only the last step-edited note remains selected after each note addition; waf install...
[ardour.git] / gtk2_ardour / mixer_strip.cc
index df9fc36084b0fe1726d9d12382aa5921ccc757f5..963ca84f217210a16638355c2614d7c955e70a93 100644 (file)
@@ -28,7 +28,6 @@
 #include <gtkmm2ext/gtk_ui.h>
 #include <gtkmm2ext/utils.h>
 #include <gtkmm2ext/choice.h>
-#include <gtkmm2ext/stop_signal.h>
 #include <gtkmm2ext/doi.h>
 #include <gtkmm2ext/slider_controller.h>
 #include <gtkmm2ext/bindable_button.h>
@@ -188,7 +187,7 @@ MixerStrip::init ()
 
         solo_isolated_led = manage (new LED);
         solo_isolated_led->show ();
-        solo_isolated_led->set_diameter (5);
+        solo_isolated_led->set_diameter (6);
         solo_isolated_led->set_no_show_all (true);
         solo_isolated_led->set_name (X_("SoloIsolatedLED"));
         solo_isolated_led->add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
@@ -197,7 +196,7 @@ MixerStrip::init ()
 
         solo_safe_led = manage (new LED);
         solo_safe_led->show ();
-        solo_safe_led->set_diameter (5);
+        solo_safe_led->set_diameter (6);
         solo_safe_led->set_no_show_all (true);
         solo_safe_led->set_name (X_("SoloSafeLED"));
         solo_safe_led->add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
@@ -215,10 +214,10 @@ MixerStrip::init ()
 
         solo_led_table.set_spacings (0);
         solo_led_table.set_border_width (1);
-        solo_led_table.attach (*solo_isolated_led, 0, 1, 0, 1, Gtk::FILL, Gtk::FILL);
-        solo_led_table.attach (*iso_label, 1, 2, 0, 1, Gtk::FILL, Gtk::FILL);
-        solo_led_table.attach (*solo_safe_led, 0, 1, 1, 2, Gtk::FILL, Gtk::FILL);
-        solo_led_table.attach (*safe_label, 1, 2, 1, 2, Gtk::FILL, Gtk::FILL);
+        solo_led_table.attach (*iso_label, 0, 1, 0, 1, Gtk::FILL, Gtk::FILL);
+        solo_led_table.attach (*solo_isolated_led, 1, 2, 0, 1, Gtk::FILL, Gtk::FILL);
+        solo_led_table.attach (*safe_label, 0, 1, 1, 2, Gtk::FILL, Gtk::FILL);
+        solo_led_table.attach (*solo_safe_led, 1, 2, 1, 2, Gtk::FILL, Gtk::FILL);
 
         solo_led_table.show ();
         solo_led_box.pack_end (solo_led_table, false, false);
@@ -252,9 +251,11 @@ MixerStrip::init ()
        group_label.set_name ("MixerGroupButtonLabel");
 
        comment_button.set_name ("MixerCommentButton");
-
        comment_button.signal_clicked().connect (sigc::mem_fun(*this, &MixerStrip::comment_button_clicked));
 
+       _mono_button.set_name ("MixerMonoButton");
+       _mono_button.signal_clicked().connect (sigc::mem_fun (*this, &MixerStrip::mono_button_clicked));
+
        global_vpacker.set_border_width (0);
        global_vpacker.set_spacing (0);
 
@@ -280,9 +281,7 @@ MixerStrip::init ()
        global_vpacker.pack_start (middle_button_table,Gtk::PACK_SHRINK);
        global_vpacker.pack_start (gain_meter_alignment,Gtk::PACK_SHRINK);
        global_vpacker.pack_start (bottom_button_table,Gtk::PACK_SHRINK);
-       if (!is_midi_track()) {
-               global_vpacker.pack_start (panners, Gtk::PACK_SHRINK);
-       }
+       global_vpacker.pack_start (panners, Gtk::PACK_SHRINK);
        global_vpacker.pack_start (_mono_button, Gtk::PACK_SHRINK);
        global_vpacker.pack_start (output_button, Gtk::PACK_SHRINK);
        global_vpacker.pack_start (comment_button, Gtk::PACK_SHRINK);
@@ -411,6 +410,14 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
                at->FreezeChange.connect (route_connections, invalidator (*this), boost::bind (&MixerStrip::map_frozen, this), gui_context());
        }
 
+       if (has_audio_outputs ()) {
+               _mono_button.show ();
+               panners.show_all ();
+       } else {
+               _mono_button.hide ();
+               panners.hide_all ();
+       }
+
        if (is_track ()) {
                
                button_table.attach (*rec_enable_button, 0, 2, 2, 3);
@@ -429,9 +436,6 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
 
        invert_button->set_active (_route->phase_invert ());
 
-       _mono_button.set_name ("MixerMonoButton");
-       _mono_button.signal_clicked().connect (sigc::mem_fun (*this, &MixerStrip::mono_button_clicked));
-
        switch (_route->meter_point()) {
        case MeterInput:
                meter_point_label.set_text (_("input"));
@@ -510,7 +514,6 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
        bottom_button_table.show();
        processor_box.show_all ();
        gpm.show_all ();
-       panners.show_all ();
        gain_meter_alignment.show ();
        gain_unit_button.show();
        gain_unit_label.show();
@@ -869,10 +872,7 @@ MixerStrip::maybe_add_bundle_to_input_menu (boost::shared_ptr<Bundle> b, ARDOUR:
 {
        using namespace Menu_Helpers;
 
-       if (b->ports_are_outputs() == false ||
-           route()->input()->default_type() != b->type() ||
-           b->nchannels() != _route->n_inputs().get (b->type ())) {
-
+       if (b->ports_are_outputs() == false || b->nchannels() != _route->n_inputs()) {
                return;
        }
 
@@ -906,10 +906,7 @@ MixerStrip::maybe_add_bundle_to_output_menu (boost::shared_ptr<Bundle> b, ARDOUR
 {
        using namespace Menu_Helpers;
 
-       if (b->ports_are_inputs() == false ||
-           route()->output()->default_type() != b->type() ||
-           b->nchannels() != _route->n_outputs().get (b->type ())) {
-
+       if (b->ports_are_inputs() == false || b->nchannels() != _route->n_outputs()) {
                return;
        }
 
@@ -1422,8 +1419,8 @@ MixerStrip::build_route_ops_menu ()
 
        MenuList& items = route_ops_menu->items();
 
-       items.push_back (MenuElem (_("Save As Template"), sigc::mem_fun(*this, &RouteUI::save_as_template)));
-       items.push_back (MenuElem (_("Rename"), sigc::mem_fun(*this, &RouteUI::route_rename)));
+       items.push_back (MenuElem (_("Save As Template..."), sigc::mem_fun(*this, &RouteUI::save_as_template)));
+       items.push_back (MenuElem (_("Rename..."), sigc::mem_fun(*this, &RouteUI::route_rename)));
        rename_menu_item = &items.back();
        items.push_back (SeparatorElem());
        items.push_back (CheckMenuElem (_("Active"), sigc::mem_fun (*this, &RouteUI::toggle_route_active)));
@@ -1432,10 +1429,10 @@ MixerStrip::build_route_ops_menu ()
 
        items.push_back (SeparatorElem());
 
-       items.push_back (MenuElem (_("Adjust latency"), sigc::mem_fun (*this, &RouteUI::adjust_latency)));
+       items.push_back (MenuElem (_("Adjust Latency..."), sigc::mem_fun (*this, &RouteUI::adjust_latency)));
 
        items.push_back (SeparatorElem());
-       items.push_back (CheckMenuElem (_("Protect against denormals"), sigc::mem_fun (*this, &RouteUI::toggle_denormal_protection)));
+       items.push_back (CheckMenuElem (_("Protect Against Denormals"), sigc::mem_fun (*this, &RouteUI::toggle_denormal_protection)));
        denormal_menu_item = dynamic_cast<CheckMenuItem *> (&items.back());
        denormal_menu_item->set_active (_route->denormal_protection());
 
@@ -1839,6 +1836,7 @@ MixerStrip::on_key_press_event (GdkEventKey* ev)
                break;
 
        case GDK_r:
+                cerr << "Stole that r\n";
                rec_enable_press (&fake);
                return true;
                break;
@@ -1891,6 +1889,7 @@ MixerStrip::on_key_release_event (GdkEventKey* ev)
                break;
 
        case GDK_r:
+                cerr << "Stole that r\n";
                rec_enable_release (&fake);
                return true;
                break;