group_display.show();
_in_group_rebuild_or_clear = false;
+ _maximised = false;
MixerStrip::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::remove_strip, this, _1), gui_context());
void
Mixer_UI::add_strips (RouteList& routes)
{
+ bool from_scratch = track_model->children().size() == 0;
+ Gtk::TreeModel::Children::iterator insert_iter = track_model->children().end();
+
+ for (Gtk::TreeModel::Children::iterator it = track_model->children().begin(); it != track_model->children().end(); ++it) {
+ boost::shared_ptr<Route> r = (*it)[track_columns.route];
+
+ if (r->order_key() == (routes.front()->order_key() + routes.size())) {
+ insert_iter = it;
+ break;
+ }
+ }
+
+ if(!from_scratch) {
+ _selection.clear_routes ();
+ }
+
MixerStrip* strip;
try {
show_strip (strip);
- TreeModel::Row row = *(track_model->append());
+ TreeModel::Row row = *(track_model->insert(insert_iter));
row[track_columns.text] = route->name();
row[track_columns.visible] = strip->route()->is_master() ? true : strip->marked_for_display();
row[track_columns.route] = route;
row[track_columns.strip] = strip;
+
+ if (!from_scratch) {
+ _selection.add (strip);
+ }
route->PropertyChanged.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::strip_property_changed, this, _1, strip), gui_context());
}
}
+ if ((prop = node.property ("maximised"))) {
+ bool yn = string_is_affirmative (prop->value());
+ Glib::RefPtr<Action> act = ActionManager::get_action (X_("Common"), X_("ToggleMaximalMixer"));
+ assert (act);
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+ bool fs = tact && tact->get_active();
+ if (yn ^ fs) {
+ ActionManager::do_action ("Common",
+ "ToggleMaximalMixer");
+ }
+ }
+
+
return 0;
}
node->add_property ("show-mixer", _visible ? "yes" : "no");
+ node->add_property ("maximised", _maximised ? "yes" : "no");
+
return *node;
}
_session->set_exclusive_input_active (rl, onoff, flip_others);
}
+void
+Mixer_UI::maximise_mixer_space ()
+{
+ if (_maximised) {
+ return;
+ }
+
+ fullscreen ();
+
+ _maximised = true;
+}
+
+void
+Mixer_UI::restore_mixer_space ()
+{
+ if (!_maximised) {
+ return;
+ }
+
+ unfullscreen();
+
+ _maximised = false;
+}