summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorNick Mainsbridge <beatroute@iprimus.com.au>2006-05-22 11:12:26 +0000
committerNick Mainsbridge <beatroute@iprimus.com.au>2006-05-22 11:12:26 +0000
commita222c19737fa2d3fce3971350c1a18906635e29a (patch)
tree0af40873c02ca636a096ea0e1f59c5d68a2e43e3 /gtk2_ardour
parent60f5fc321bbe91db05cfe680a24b5a87d6f640ef (diff)
Mixer pane can be collapsed again, some cleanup, give up and go back to 'Off' for no automation playback state.
git-svn-id: svn://localhost/trunk/ardour2@521 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/gain_meter.cc41
-rw-r--r--gtk2_ardour/mixer_ui.cc3
-rw-r--r--gtk2_ardour/panner_ui.cc4
-rw-r--r--gtk2_ardour/plugin_ui.cc4
4 files changed, 29 insertions, 23 deletions
diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc
index 7d54cfa99c..4cbb8a8f47 100644
--- a/gtk2_ardour/gain_meter.cc
+++ b/gtk2_ardour/gain_meter.cc
@@ -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;
diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc
index 732e919433..2d0a37cd47 100644
--- a/gtk2_ardour/mixer_ui.cc
+++ b/gtk2_ardour/mixer_ui.cc
@@ -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),
diff --git a/gtk2_ardour/panner_ui.cc b/gtk2_ardour/panner_ui.cc
index e799083e13..828cf72579 100644
--- a/gtk2_ardour/panner_ui.cc
+++ b/gtk2_ardour/panner_ui.cc
@@ -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"));
diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc
index bfc4d417d2..66231adcc3 100644
--- a/gtk2_ardour/plugin_ui.cc
+++ b/gtk2_ardour/plugin_ui.cc
@@ -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)));