Mixer pane can be collapsed again, some cleanup, give up and go back to 'Off' for...
authorNick Mainsbridge <beatroute@iprimus.com.au>
Mon, 22 May 2006 11:12:26 +0000 (11:12 +0000)
committerNick Mainsbridge <beatroute@iprimus.com.au>
Mon, 22 May 2006 11:12:26 +0000 (11:12 +0000)
git-svn-id: svn://localhost/trunk/ardour2@521 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/gain_meter.cc
gtk2_ardour/mixer_ui.cc
gtk2_ardour/panner_ui.cc
gtk2_ardour/plugin_ui.cc

index 7d54cfa99c373d3956a7f42d5334c28b50197e4a..4cbb8a8f471a64b1fffb9a9ed1666deaa04381d4 100644 (file)
@@ -128,8 +128,6 @@ GainMeter::GainMeter (IO& io, Session& s)
        max_peak = minus_infinity();
        peak_display_label.set_text (_("-inf"));
 
-       gain_display_box.pack_end (peak_display_frame,  Gtk::PACK_SHRINK);
-
        meter_metric_area.set_size_request (25, -1);
        meter_metric_area.set_name ("MeterMetricsStrip");
 
@@ -144,19 +142,31 @@ GainMeter::GainMeter (IO& io, Session& s)
        gain_automation_style_button.unset_flags (Gtk::CAN_FOCUS);
        gain_automation_state_button.unset_flags (Gtk::CAN_FOCUS);
 
-       gain_automation_state_button.set_size_request(10, -1);
-       gain_automation_style_button.set_size_request(10, -1);
+       gain_automation_state_button.set_size_request(15, 15);
+       gain_automation_style_button.set_size_request(15, 15);
 
        fader_vbox = manage (new Gtk::VBox());
        fader_vbox->set_spacing (0);
        fader_vbox->pack_start (*gain_slider, false, false, 0);
 
+       hbox.set_spacing (0);
+       hbox.pack_start (*fader_vbox, false, false, 2);
+
        Route* r;
 
        if ((r = dynamic_cast<Route*> (&_io)) != 0) {
-               using namespace Menu_Helpers;
+               /* 
+                  if we don't have a route (if we're the click), 
+                  pack some route-dependent stuff.
+               */
+
+               gain_display_box.pack_end (peak_display_frame,  Gtk::PACK_SHRINK);
+
+               hbox.pack_start (meter_packer, true, false);
+
+               using namespace Menu_Helpers;
        
-               gain_astate_menu.items().push_back (MenuElem (_("Manual"), 
+               gain_astate_menu.items().push_back (MenuElem (_("Off"), 
                                                      bind (mem_fun (&_io, &IO::set_gain_automation_state), (AutoState) Off)));
                gain_astate_menu.items().push_back (MenuElem (_("Play"),
                                                      bind (mem_fun (&_io, &IO::set_gain_automation_state), (AutoState) Play)));
@@ -181,9 +191,6 @@ GainMeter::GainMeter (IO& io, Session& s)
                gain_automation_state_changed ();
        }
 
-       hbox.set_spacing (0);
-       hbox.pack_start (*fader_vbox, false, false, 2);
-       hbox.pack_start (meter_packer, true, false);
 
        set_spacing (4);
 
@@ -764,7 +771,7 @@ GainMeter::_astate_string (AutoState state, bool shrt)
 
        switch (state) {
        case Off:
-               sstr = (shrt ? "M" : _("M"));
+               sstr = (shrt ? "O" : _("O"));
                break;
        case Play:
                sstr = (shrt ? "P" : _("P"));
@@ -807,13 +814,13 @@ GainMeter::_astyle_string (AutoStyle style, bool shrt)
 void
 GainMeter::gain_automation_style_changed ()
 {
-  Route* _route = dynamic_cast<Route*>(&_io);
+  // Route* _route = dynamic_cast<Route*>(&_io);
        switch (_width) {
        case Wide:
-               gain_automation_style_button.set_label (astyle_string(_route->gain_automation_curve().automation_style()));
+               gain_automation_style_button.set_label (astyle_string(_io.gain_automation_curve().automation_style()));
                break;
        case Narrow:
-               gain_automation_style_button.set_label  (short_astyle_string(_route->gain_automation_curve().automation_style()));
+               gain_automation_style_button.set_label  (short_astyle_string(_io.gain_automation_curve().automation_style()));
                break;
        }
 }
@@ -822,20 +829,20 @@ void
 GainMeter::gain_automation_state_changed ()
 {
        ENSURE_GUI_THREAD(mem_fun(*this, &GainMeter::gain_automation_state_changed));
-       Route* _route = dynamic_cast<Route*>(&_io);
+       //Route* _route = dynamic_cast<Route*>(&_io);
        
        bool x;
 
        switch (_width) {
        case Wide:
-               gain_automation_state_button.set_label (astate_string(_route->gain_automation_curve().automation_state()));
+               gain_automation_state_button.set_label (astate_string(_io.gain_automation_curve().automation_state()));
                break;
        case Narrow:
-               gain_automation_state_button.set_label (short_astate_string(_route->gain_automation_curve().automation_state()));
+               gain_automation_state_button.set_label (short_astate_string(_io.gain_automation_curve().automation_state()));
                break;
        }
 
-       x = (_route->gain_automation_state() != Off);
+       x = (_io.gain_automation_state() != Off);
        
        if (gain_automation_state_button.get_active() != x) {
                ignore_toggle = true;
index 732e919433ddf52ae7a79ca61b6005ea9f0dd1ac..2d0a37cd4755c4794a67be37645cbbe2d0317f84 100644 (file)
@@ -182,14 +182,13 @@ Mixer_UI::Mixer_UI (AudioEngine& eng)
 
        rhs_pane1.pack1 (track_display_frame);
        rhs_pane1.pack2 (group_display_frame);
-       rhs_pane1.set_size_request (105, -1);
 
        list_vpacker.pack_start (rhs_pane1, true, true);
 
        global_hpacker.pack_start (scroller, true, true);
        global_hpacker.pack_start (out_packer, false, false);
 
-       list_hpane.pack1(list_vpacker, false, false);
+       list_hpane.add1(list_vpacker);
        list_hpane.add2(global_hpacker);
 
        rhs_pane1.signal_size_allocate().connect (bind (mem_fun(*this, &Mixer_UI::pane_allocation_handler), 
index e799083e134bc1cb1b1b66fbd18aa2b5d3e9528f..828cf725796d4675969402294f1d0a07b95c6e37 100644 (file)
@@ -85,7 +85,7 @@ PannerUI::PannerUI (IO& io, Session& s)
        pan_automation_state_button.unset_flags (Gtk::CAN_FOCUS);
 
        using namespace Menu_Helpers;
-       pan_astate_menu.items().push_back (MenuElem (_("Manual"), 
+       pan_astate_menu.items().push_back (MenuElem (_("Off"), 
                                                     bind (mem_fun (_io.panner(), &Panner::set_automation_state), (AutoState) Off)));
        pan_astate_menu.items().push_back (MenuElem (_("Play"),
                                                     bind (mem_fun (_io.panner(), &Panner::set_automation_state), (AutoState) Play)));
@@ -764,7 +764,7 @@ PannerUI::_astate_string (AutoState state, bool shrt)
 
        switch (state) {
        case Off:
-               sstr = (shrt ? "M" : _("M"));
+               sstr = (shrt ? "O" : _("O"));
                break;
        case Play:
                sstr = (shrt ? "P" : _("P"));
index bfc4d417d26a1a0855e003b7ab5ef7de15650e86..66231adcc38db3ca7e814d8ed66da5de845711b3 100644 (file)
@@ -388,7 +388,7 @@ PluginUI::automation_state_changed (ControlUI* cui)
 
        switch (insert.get_port_automation_state (cui->port_index) & (Off|Play|Touch|Write)) {
        case Off:
-               cui->automate_button.set_label (_("Manual"));
+               cui->automate_button.set_label (_("Off"));
                break;
        case Play:
                cui->automate_button.set_label (_("Play"));
@@ -631,7 +631,7 @@ PluginUI::astate_clicked (ControlUI* cui, uint32_t port)
        MenuList& items (automation_menu->items());
 
        items.clear ();
-       items.push_back (MenuElem (_("Manual"), 
+       items.push_back (MenuElem (_("Off"), 
                                   bind (mem_fun(*this, &PluginUI::set_automation_state), (AutoState) Off, cui)));
        items.push_back (MenuElem (_("Play"),
                                   bind (mem_fun(*this, &PluginUI::set_automation_state), (AutoState) Play, cui)));