summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-10-30 22:33:37 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-10-30 22:33:37 +0000
commitfa1c6e429b326c1470bc2454ba6570eda1475e2f (patch)
tree745eff3e96bb52a65b096b13a143bd1a43f6eb16
parent9e1c3be0a7a2506058584cacdd11bc5acadf3399 (diff)
prevent edit pane handle from being lost on GTKOSX when its moved into the notebook tabs. hack, or what?
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@5991 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/editor.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 7a8340bfad..4c00c0cfe2 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -196,6 +196,27 @@ DragInfo::clear_copied_locations ()
copied_locations.clear ();
}
+#ifdef GTKOSX
+static void
+pane_size_watcher (Paned* pane)
+{
+ /* if the handle of a pane vanishes into (at least) the tabs of a notebook,
+ it is no longer accessible. so stop that. this doesn't happen on X11,
+ just the quartz backend.
+
+ ugh.
+ */
+
+ int max_width_of_lhs = GTK_WIDGET(pane->gobj())->allocation.width - 25;
+
+ gint pos = pane->get_position ();
+
+ if (pos > max_width_of_lhs) {
+ pane->set_position (max_width_of_lhs);
+ }
+}
+#endif
+
Editor::Editor ()
:
/* time display buttons */
@@ -722,6 +743,10 @@ Editor::Editor ()
edit_pane.pack2 (the_notebook, false, true);
edit_pane.signal_size_allocate().connect (bind (mem_fun(*this, &Editor::pane_allocation_handler), static_cast<Paned*> (&edit_pane)));
+#ifdef GTKOSX
+ Glib::PropertyProxy<int> proxy = edit_pane.property_position();
+ proxy.signal_changed().connect (bind (sigc::ptr_fun (pane_size_watcher), static_cast<Paned*> (&edit_pane)));
+#endif
top_hbox.pack_start (toolbar_frame, true, true);