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
This commit is contained in:
parent
60f5fc321b
commit
a222c19737
|
@ -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;
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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"));
|
||||
|
|
|
@ -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)));
|
||||
|
|
Loading…
Reference in New Issue
Block a user