cerr << "size of " << what << " = " << r->width << " x " << r->height << endl;
}
+#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 ()
: _join_object_range_state (JOIN_OBJECT_RANGE_NONE)
last_autoscroll_y = 0;
autoscroll_active = false;
autoscroll_timeout_tag = -1;
- interthread_progress_window = 0;
logo_item = 0;
analysis_window = 0;
edit_pane.pack2 (the_notebook, false, true);
edit_pane.signal_size_allocate().connect (sigc::bind (sigc::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, false, true);
HBox *hbox = manage (new HBox);
}
}
+ if ((prop = node.property (X_("editor-list-page")))) {
+ the_notebook.set_current_page (atoi (prop->value ()));
+ }
+
+ if ((prop = node.property (X_("editor-pane-position")))) {
+ edit_pane.set_position (atoi (prop->value ()));
+ }
return 0;
}
node->add_property (X_("show-editor-list"), tact->get_active() ? "yes" : "no");
}
+ snprintf (buf, sizeof (buf), "%d", the_notebook.get_current_page ());
+ node->add_property (X_("editor-list-page"), buf);
+
+ snprintf (buf, sizeof (buf), "%d", edit_pane.get_position ());
+ node->add_property (X_("editor-pane-position"), buf);
+
return *node;
}
{
ENSURE_GUI_THREAD (*this, &Editor::map_transport_state)
- if (_session->transport_stopped()) {
+ if (_session && _session->transport_stopped()) {
have_pending_keyboard_selection = false;
}
}
void
-Editor::remove_a_region (boost::shared_ptr<Region> r)
+Editor::show_a_region (boost::shared_ptr<Region> r)
{
- // _session->remove_region_from_region_list (r);
+ r->set_hidden (false);
}
void
_regions->selection_mapover (sigc::mem_fun (*this, &Editor::hide_a_region));
}
+void
+Editor::show_region_in_region_list ()
+{
+ _regions->selection_mapover (sigc::mem_fun (*this, &Editor::show_a_region));
+}
+
void
Editor::start_step_editing ()
{