new solo safe/lock button image from oofus (a tad ugly, dare might i say)
[ardour.git] / gtk2_ardour / mixer_strip.cc
index 32aeb5abec4cc24e73d69509988e5ab84411e091..6d5a2706202174a555d0249c36910854b7d42520 100644 (file)
@@ -187,7 +187,7 @@ MixerStrip::init ()
 
        hide_button.set_events (hide_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
 
-       mute_button->set_name ("MixerMuteButton");
+       // mute_button->set_name ("MixerMuteButton");
        solo_button->set_name ("MixerSoloButton");
 
        monitor_input_button->set_diameter (3);
@@ -354,6 +354,8 @@ MixerStrip::init ()
        _visibility.add (solo_safe_led, X_("SoloSafe"), _("Solo Safe"));
        _visibility.add (solo_isolated_led, X_("SoloIsolated"), _("Solo Isolated"));
        _visibility.add (&_comment_button, X_("Comments"), _("Comments"));
+       _visibility.add (&group_button, X_("Group"), _("Group"));
+       _visibility.add (&meter_point_button, X_("MeterPoint"), _("Meter Point"));
 
        parameter_changed (X_("mixer-strip-visibility"));
 
@@ -585,7 +587,7 @@ MixerStrip::set_width_enum (Width w, void* owner)
        switch (w) {
        case Wide:
                if (show_sends_button)  {
-                       ((Gtk::Label*)show_sends_button->get_child())->set_text (_("Sends"));
+                       show_sends_button->set_text (_("Sends"));
                }
 
                ((Gtk::Label*)gpm.gain_automation_style_button.get_child())->set_text (
@@ -609,7 +611,7 @@ MixerStrip::set_width_enum (Width w, void* owner)
 
        case Narrow:
                if (show_sends_button) {
-                       ((Gtk::Label*)show_sends_button->get_child())->set_text (_("Snd"));
+                       show_sends_button->set_text (_("Snd"));
                }
 
                ((Gtk::Label*)gpm.gain_automation_style_button.get_child())->set_text (
@@ -1217,16 +1219,12 @@ MixerStrip::port_connected_or_disconnected (boost::weak_ptr<Port> wa, boost::wea
        boost::shared_ptr<Port> a = wa.lock ();
        boost::shared_ptr<Port> b = wb.lock ();
 
-       if (!a || !b) {
-               return;
-       }
-       
-       if (_route->input()->has_port (a) || _route->input()->has_port (b)) {
+       if ((a && _route->input()->has_port (a)) || (b && _route->input()->has_port (b))) {
                update_input_display ();
                set_width_enum (_width, this);
        }
 
-       if (_route->output()->has_port (a) || _route->output()->has_port (b)) {
+       if ((a && _route->output()->has_port (a)) || (b && _route->output()->has_port (b))) {
                update_output_display ();
                set_width_enum (_width, this);
        }
@@ -1675,8 +1673,7 @@ MixerStrip::switch_io (boost::shared_ptr<Route> target)
                   since we're not the target.
                */
                send_blink_connection.disconnect ();
-               show_sends_button->set_active (false);
-               show_sends_button->set_state (STATE_NORMAL);
+               show_sends_button->unset_active_state ();
        }
 
        if (!target) {
@@ -1768,7 +1765,7 @@ void
 MixerStrip::revert_to_default_display ()
 {
        if (show_sends_button) {
-               show_sends_button->set_active (false);
+               show_sends_button->unset_active_state ();
        }
 
        drop_send ();
@@ -1790,7 +1787,7 @@ MixerStrip::set_button_names ()
        switch (_width) {
        case Wide:
                rec_enable_button_label.set_text (_("Rec"));
-               mute_button_label.set_text (_("Mute"));
+               mute_button->set_text (_("Mute"));
                monitor_input_button->set_text (_("In"));
                monitor_disk_button->set_text (_("Disk"));
 
@@ -1822,7 +1819,7 @@ MixerStrip::set_button_names ()
 
        default:
                rec_enable_button_label.set_text (_("R"));
-               mute_button_label.set_text (_("M"));
+               mute_button->set_text (_("M"));
                monitor_input_button->set_text (_("I"));
                monitor_disk_button->set_text (_("D"));
                if (_route && _route->solo_safe()) {