Brought back visual indication of delete dragging.
[ardour.git] / gtk2_ardour / editor_mixer.cc
index 58043811028102d98770b2e47c78067fde09737c..dee928b62f5c3eff346453313fe6f9e931fae5ca 100644 (file)
@@ -47,6 +47,16 @@ Editor::editor_mixer_button_toggled ()
        }
 }
 
+void
+Editor::editor_list_button_toggled ()
+{
+       Glib::RefPtr<Gtk::Action> act = ActionManager::get_action (X_("Editor"), X_("show-editor-list"));
+       if (act) {
+               Glib::RefPtr<Gtk::ToggleAction> tact = Glib::RefPtr<Gtk::ToggleAction>::cast_dynamic(act);
+               show_editor_list (tact->get_active());
+       }
+}
+
 void
 Editor::cms_deleted ()
 {
@@ -130,13 +140,23 @@ Editor::show_editor_mixer (bool yn)
        }
 }
 
+void
+Editor::show_editor_list (bool yn)
+{
+       if (yn) {
+               the_notebook.show();
+       } else {
+               the_notebook.hide();
+       }
+}
+
 void
 Editor::set_selected_mixer_strip (TimeAxisView& view)
 {
-       AudioTimeAxisView* at;
+       RouteTimeAxisView* rt;
        bool show = false;
 
-       if (!session || (at = dynamic_cast<AudioTimeAxisView*>(&view)) == 0) {
+       if (!session || (rt = dynamic_cast<RouteTimeAxisView*>(&view)) == 0) {
                return;
        }
        
@@ -144,7 +164,7 @@ Editor::set_selected_mixer_strip (TimeAxisView& view)
 
                /* might be nothing to do */
 
-               if (current_mixer_strip->route() == at->route()) {
+               if (current_mixer_strip->route() == rt->route()) {
                        return;
                }
 
@@ -157,7 +177,7 @@ Editor::set_selected_mixer_strip (TimeAxisView& view)
 
        current_mixer_strip = new MixerStrip (*ARDOUR_UI::instance()->the_mixer(),
                                              *session,
-                                             at->route());
+                                             rt->route());
        current_mixer_strip->GoingAway.connect (mem_fun(*this, &Editor::cms_deleted));
        
        if (show) {
@@ -335,6 +355,9 @@ Editor::session_going_away ()
 
        editor_mixer_button.set_active(false);
        editor_mixer_button.set_sensitive(false);
+       editor_list_button.set_active(false);
+       editor_list_button.set_sensitive(false);
+       
        /* clear tempo/meter rulers */
 
        remove_metric_marks ();