Don't add auditioner and click to MIDI connection port matrices.
[ardour.git] / gtk2_ardour / mixer_ui.cc
index 156947a7090cdc1ca913727687ed7ca16dde0f1c..16f3089825b6e7bd4dbfc8b3370181d87e547b3e 100644 (file)
@@ -374,27 +374,14 @@ Mixer_UI::remove_strip (MixerStrip* strip)
        strip_redisplay_does_not_sync_order_keys = false;
 }
 
-const char*
-Mixer_UI::get_order_key() 
-{
-       return X_("signal");
-#if 0
-       if (Config->get_sync_all_route_ordering()) {
-               return X_("editor");
-       } else {
-               return X_("signal");
-       }
-#endif
-}
-
 void
-Mixer_UI::sync_order_keys (const char *src)
+Mixer_UI::sync_order_keys (string const & src)
 {
        vector<int> neworder;
        TreeModel::Children rows = track_model->children();
        TreeModel::Children::iterator ri;
 
-       if ((strcmp (src, get_order_key()) == 0) || !session || (session->state_of_the_state() & Session::Loading) || rows.empty()) {
+       if (src == N_("signal") || !session || (session->state_of_the_state() & Session::Loading) || rows.empty()) {
                return;
        }
 
@@ -408,8 +395,9 @@ Mixer_UI::sync_order_keys (const char *src)
        for (order = 0, ri = rows.begin(); ri != rows.end(); ++ri, ++order) {
                boost::shared_ptr<Route> route = (*ri)[track_columns.route];
                int old_key = order;
-               int new_key = route->order_key (get_order_key());
+               int new_key = route->order_key (N_("signal"));
 
+               assert (new_key < neworder.size());
                neworder[new_key] = old_key;
 
                if (new_key != old_key) {
@@ -486,7 +474,7 @@ Mixer_UI::connect_to_session (Session* sess)
               show_window();
        }
 
-       _group_tabs->set_session (sess);
+       _group_tabs->connect_to_session (sess);
 
        start_updating ();
 }
@@ -671,7 +659,7 @@ Mixer_UI::hide_all_audiotracks ()
 }
 
 void
-Mixer_UI::track_list_reorder (const TreeModel::Path& path, const TreeModel::iterator& iter, int* new_order)
+Mixer_UI::track_list_reorder (const TreeModel::Path&, const TreeModel::iterator&, int* /*new_order*/)
 {
        strip_redisplay_does_not_sync_order_keys = true;
        session->set_remote_control_ids();
@@ -680,7 +668,7 @@ Mixer_UI::track_list_reorder (const TreeModel::Path& path, const TreeModel::iter
 }
 
 void
-Mixer_UI::track_list_change (const Gtk::TreeModel::Path& path,const Gtk::TreeModel::iterator& iter)
+Mixer_UI::track_list_change (const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator&)
 {
        // never reset order keys because of a property change
        strip_redisplay_does_not_reset_order_keys = true; 
@@ -690,7 +678,7 @@ Mixer_UI::track_list_change (const Gtk::TreeModel::Path& path,const Gtk::TreeMod
 }
 
 void
-Mixer_UI::track_list_delete (const Gtk::TreeModel::Path& path)
+Mixer_UI::track_list_delete (const Gtk::TreeModel::Path&)
 {
        /* this could require an order sync */
        session->set_remote_control_ids();
@@ -723,7 +711,7 @@ Mixer_UI::redisplay_track_list ()
                        strip->route()->set_order_key (N_("signal"), order);
 
                        if (!strip_redisplay_does_not_reset_order_keys) {
-                               strip->route()->set_order_key (get_order_key(), order);
+                               strip->route()->set_order_key (N_("signal"), order);
                        } 
 
                        if (strip->packed()) {
@@ -761,7 +749,7 @@ Mixer_UI::redisplay_track_list ()
        }
        
        if (!strip_redisplay_does_not_reset_order_keys && !strip_redisplay_does_not_sync_order_keys) {
-               session->sync_order_keys (get_order_key());
+               session->sync_order_keys (N_("signal"));
        }
 
        // Rebind all of the midi controls automatically
@@ -884,7 +872,7 @@ Mixer_UI::auto_rebind_midi_controls ()
 struct SignalOrderRouteSorter {
     bool operator() (boost::shared_ptr<Route> a, boost::shared_ptr<Route> b) {
            /* use of ">" forces the correct sort order */
-           return a->order_key (Mixer_UI::get_order_key()) < b->order_key (Mixer_UI::get_order_key());
+           return a->order_key (N_("signal")) < b->order_key (N_("signal"));
     }
 };
 
@@ -1197,7 +1185,7 @@ Mixer_UI::route_group_name_edit (const Glib::ustring& path, const Glib::ustring&
 }
 
 void 
-Mixer_UI::route_group_row_change (const Gtk::TreeModel::Path& path,const Gtk::TreeModel::iterator& iter)
+Mixer_UI::route_group_row_change (const Gtk::TreeModel::Path&const Gtk::TreeModel::iterator& iter)
 {
        RouteGroup* group;
 
@@ -1403,7 +1391,7 @@ Mixer_UI::get_state (void)
 
 
 void 
-Mixer_UI::pane_allocation_handler (Allocation& alloc, Gtk::Paned* which)
+Mixer_UI::pane_allocation_handler (Allocation&, Gtk::Paned* which)
 {
        int pos;
        XMLProperty* prop = 0;
@@ -1475,6 +1463,13 @@ Mixer_UI::on_key_press_event (GdkEventKey* ev)
        return key_press_focus_accelerator_handler (*this, ev);
 }
 
+bool
+Mixer_UI::on_key_release_event (GdkEventKey* ev)
+{
+       return Gtk::Window::on_key_release_event (ev);
+       // return key_press_focus_accelerator_handler (*this, ev);
+}
+
 void
 Mixer_UI::parameter_changed (string const & p)
 {