diff options
author | Nick Mainsbridge <beatroute@iprimus.com.au> | 2006-05-21 10:11:59 +0000 |
---|---|---|
committer | Nick Mainsbridge <beatroute@iprimus.com.au> | 2006-05-21 10:11:59 +0000 |
commit | 479ee9cc008750074a10b94902e3dcc20f05de3a (patch) | |
tree | 9eb2dc3a0f031f0fee26e434161b47d24d2026c6 | |
parent | f88cf52970535c94f641eeeb484827530e75d7f7 (diff) |
Mixer strip layout, emsure correct column expands on treeviews, 'Manual' automation mode labels.
git-svn-id: svn://localhost/trunk/ardour2@519 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/automation_time_axis.cc | 6 | ||||
-rw-r--r-- | gtk2_ardour/editor.cc | 4 | ||||
-rw-r--r-- | gtk2_ardour/gain_meter.cc | 82 | ||||
-rw-r--r-- | gtk2_ardour/gain_meter.h | 6 | ||||
-rw-r--r-- | gtk2_ardour/mixer_strip.cc | 78 | ||||
-rw-r--r-- | gtk2_ardour/mixer_strip.h | 8 | ||||
-rw-r--r-- | gtk2_ardour/mixer_ui.cc | 8 | ||||
-rw-r--r-- | gtk2_ardour/panner_ui.cc | 7 | ||||
-rw-r--r-- | gtk2_ardour/plugin_ui.cc | 6 |
9 files changed, 105 insertions, 100 deletions
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index 2175008b34..670a718736 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -180,7 +180,7 @@ AutomationTimeAxisView::auto_clicked () automation_menu->set_name ("ArdourContextMenu"); MenuList& items (automation_menu->items()); - items.push_back (MenuElem (_("Isolate"), + items.push_back (MenuElem (_("Manual"), bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Off))); items.push_back (MenuElem (_("Play"), bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Play))); @@ -209,7 +209,7 @@ AutomationTimeAxisView::automation_state_changed () switch (state & (Off|Play|Touch|Write)) { case Off: - auto_button.set_label (_("Isolate")); + auto_button.set_label (_("Manual")); if (auto_off_item) { ignore_state_request = true; auto_off_item->set_active (true); @@ -457,7 +457,7 @@ AutomationTimeAxisView::build_display_menu () auto_state_menu->set_name ("ArdourContextMenu"); MenuList& as_items = auto_state_menu->items(); - as_items.push_back (CheckMenuElem (_("Isolate"), + as_items.push_back (CheckMenuElem (_("Manual"), bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Off))); auto_off_item = dynamic_cast<CheckMenuItem*>(&as_items.back()); diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 06412abcc8..e10793fe38 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -525,6 +525,9 @@ Editor::Editor (AudioEngine& eng) edit_group_display.get_column (0)->set_data (X_("colnum"), GUINT_TO_POINTER(0)); edit_group_display.get_column (1)->set_data (X_("colnum"), GUINT_TO_POINTER(1)); edit_group_display.get_column (2)->set_data (X_("colnum"), GUINT_TO_POINTER(2)); + edit_group_display.get_column (0)->set_expand (true); + edit_group_display.get_column (1)->set_expand (false); + edit_group_display.get_column (2)->set_expand (false); edit_group_display.set_headers_visible (true); /* name is directly editable */ @@ -594,6 +597,7 @@ Editor::Editor (AudioEngine& eng) region_list_display.set_model (region_list_model); region_list_display.append_column (_("Regions"), region_list_columns.name); region_list_display.set_headers_visible (false); + region_list_display.set_hover_expand (true); region_list_display.get_selection()->set_select_function (mem_fun (*this, &Editor::region_list_selection_filter)); diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc index c586958281..2357739396 100644 --- a/gtk2_ardour/gain_meter.cc +++ b/gtk2_ardour/gain_meter.cc @@ -85,9 +85,6 @@ GainMeter::GainMeter (IO& io, Session& s) // 0.781787 is the value needed for gain to be set to 0. gain_adjustment (0.781787, 0.0, 1.0, 0.01, 0.1), gain_display (&gain_adjustment, "MixerStripGainDisplay"), - gain_unit_label (_("dbFS")), - meter_point_label (_("pre")), - top_table (1, 2), gain_automation_style_button (""), gain_automation_state_button ("") @@ -115,50 +112,6 @@ GainMeter::GainMeter (IO& io, Session& s) gain_display.set_print_func (_gain_printer, this); - gain_unit_button.add (gain_unit_label); - gain_unit_button.set_name ("MixerStripGainUnitButton"); - gain_unit_label.set_name ("MixerStripGainUnitButton"); - - meter_point_button.signal_button_press_event().connect (mem_fun (*this, &GainMeter::meter_press), false); - meter_point_button.signal_button_release_event().connect (mem_fun (*this, &GainMeter::meter_release), false); - - - top_table.set_col_spacings (2); - top_table.set_homogeneous (true); - top_table.attach (gain_unit_button, 0, 1, 0, 1); - - Route* r; - - if ((r = dynamic_cast<Route*> (&_io)) != 0) { - - r->meter_change.connect (mem_fun(*this, &GainMeter::meter_changed)); - meter_point_button.add (meter_point_label); - meter_point_button.set_name ("MixerStripMeterPreButton"); - meter_point_label.set_name ("MixerStripMeterPreButton"); - - switch (r->meter_point()) { - case MeterInput: - meter_point_label.set_text (_("input")); - break; - - case MeterPreFader: - meter_point_label.set_text (_("pre")); - break; - - case MeterPostFader: - meter_point_label.set_text (_("post")); - break; - } - - /* TRANSLATORS: this string should be longest of the strings - used to describe meter points. In english, its "input". - */ - - set_size_request_to_display_given_text (meter_point_button, _("tupni"), 5, 5); - - - top_table.attach (meter_point_button, 1, 2, 0, 1); - } gain_display_box.set_spacing (2); set_size_request_to_display_given_text (gain_display_frame, "-86.g", 2, 6); /* note the descender */ gain_display_frame.set_shadow_type (Gtk::SHADOW_IN); @@ -191,9 +144,12 @@ 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); + using namespace Menu_Helpers; - gain_astate_menu.items().push_back (MenuElem (_("Isolate"), + gain_astate_menu.items().push_back (MenuElem (_("Manual"), bind (mem_fun (dynamic_cast<Route*>(&_io), &IO::set_gain_automation_state), (AutoState) Off))); gain_astate_menu.items().push_back (MenuElem (_("Play"), bind (mem_fun (dynamic_cast<Route*>(&_io), &IO::set_gain_automation_state), (AutoState) Play))); @@ -227,7 +183,6 @@ GainMeter::GainMeter (IO& io, Session& s) set_spacing (4); - pack_start (top_table, Gtk::PACK_SHRINK); pack_start (gain_display_box, Gtk::PACK_SHRINK); pack_start (hbox, Gtk::PACK_SHRINK); @@ -730,33 +685,6 @@ GainMeter::set_mix_group_meter_point (Route& route, MeterPoint mp) } void -GainMeter::meter_changed (void *src) -{ - Route* r; - - ENSURE_GUI_THREAD (bind (mem_fun(*this, &GainMeter::meter_changed), src)); - - if ((r = dynamic_cast<Route*> (&_io)) != 0) { - - switch (r->meter_point()) { - case MeterInput: - meter_point_label.set_text (_("input")); - break; - - case MeterPreFader: - meter_point_label.set_text (_("pre")); - break; - - case MeterPostFader: - meter_point_label.set_text (_("post")); - break; - } - - setup_meters (); - } -} - -void GainMeter::meter_point_clicked () { Route* r; @@ -834,7 +762,7 @@ GainMeter::_astate_string (AutoState state, bool shrt) switch (state) { case Off: - sstr = (shrt ? "I" : _("I")); + sstr = (shrt ? "M" : _("M")); break; case Play: sstr = (shrt ? "P" : _("P")); diff --git a/gtk2_ardour/gain_meter.h b/gtk2_ardour/gain_meter.h index c18d351ff6..5113407de5 100644 --- a/gtk2_ardour/gain_meter.h +++ b/gtk2_ardour/gain_meter.h @@ -87,14 +87,9 @@ class GainMeter : public Gtk::VBox Gtk::Frame peak_display_frame; Gtk::EventBox peak_display; Gtk::Label peak_display_label; - Gtk::Button gain_unit_button; - Gtk::Label gain_unit_label; Gtk::HBox gain_display_box; Gtk::HBox fader_box; Gtk::DrawingArea meter_metric_area; - Gtk::Button meter_point_button; - Gtk::Label meter_point_label; - Gtk::Table top_table; sigc::connection gain_watching; @@ -155,7 +150,6 @@ Gtk::VBox* fader_vbox; void gain_changed (void *); void meter_point_clicked (); - void meter_changed (void *); void gain_unit_changed (); void hide_all_meters (); diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index 77f1247b12..2e4c3a6ae7 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -89,7 +89,9 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, Route& rt, bool in_mixer) gpm (_route, sess), panners (_route, sess), button_table (3, 2), - bottom_button_table (2, 2), + middle_button_table (1, 2), + bottom_button_table (1, 2), + meter_point_label (_("pre")), comment_button (_("Comments")), speed_adjustment (1.0, 0.001, 4.0, 0.001, 0.1), speed_spinner (&speed_adjustment, "MixerStripSpeedBase", true) @@ -123,6 +125,40 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, Route& rt, bool in_mixer) output_button.set_name ("MixerIOButton"); output_label.set_name ("MixerIOButtonLabel"); + + _route.meter_change.connect (mem_fun(*this, &MixerStrip::meter_changed)); + meter_point_button.add (meter_point_label); + meter_point_button.set_name ("MixerStripMeterPreButton"); + meter_point_label.set_name ("MixerStripMeterPreButton"); + + switch (_route.meter_point()) { + case MeterInput: + meter_point_label.set_text (_("input")); + break; + + case MeterPreFader: + meter_point_label.set_text (_("pre")); + break; + + case MeterPostFader: + meter_point_label.set_text (_("post")); + break; + } + + /* TRANSLATORS: this string should be longest of the strings + used to describe meter points. In english, its "input". + */ + + set_size_request_to_display_given_text (meter_point_button, _("tupni"), 5, 5); + + + bottom_button_table.attach (meter_point_button, 1, 2, 0, 1); + + + meter_point_button.signal_button_press_event().connect (mem_fun (gpm, &GainMeter::meter_press), false); + /* XXX what is this meant to do? */ + //meter_point_button.signal_button_release_event().connect (mem_fun (gpm, &GainMeter::meter_release), false); + rec_enable_button->set_name ("MixerRecordEnableButton"); rec_enable_button->unset_flags (Gtk::CAN_FOCUS); @@ -144,11 +180,14 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, Route& rt, bool in_mixer) button_table.attach (name_button, 0, 2, 0, 1); button_table.attach (input_button, 0, 2, 1, 2); + middle_button_table.set_homogeneous (true); + middle_button_table.set_spacings (0); + middle_button_table.attach (*mute_button, 0, 1, 0, 1); + middle_button_table.attach (*solo_button, 1, 2, 0, 1); + + bottom_button_table.set_col_spacings (0); bottom_button_table.set_homogeneous (true); - bottom_button_table.set_spacings (0); - bottom_button_table.attach (*solo_button, 0, 1, 1, 2); - bottom_button_table.attach (*mute_button, 1, 2, 1, 2); - bottom_button_table.attach (group_button, 0, 2, 0, 1); + bottom_button_table.attach (group_button, 0, 1, 0, 1); if (is_audio_track()) { @@ -218,8 +257,9 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, Route& rt, bool in_mixer) global_vpacker.pack_start (*whvbox, Gtk::PACK_SHRINK); global_vpacker.pack_start (button_table,Gtk::PACK_SHRINK); global_vpacker.pack_start (pre_redirect_box, true, true); - global_vpacker.pack_start (bottom_button_table,Gtk::PACK_SHRINK); + 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); global_vpacker.pack_start (post_redirect_box, true, true); global_vpacker.pack_start (panners, Gtk::PACK_SHRINK); global_vpacker.pack_start (output_button, Gtk::PACK_SHRINK); @@ -910,7 +950,7 @@ MixerStrip::mix_group_changed (void *ignored) } else { switch (_width) { case Wide: - group_label.set_text (_("No group")); + group_label.set_text (_("Grp")); break; case Narrow: group_label.set_text (_("~G")); @@ -1171,3 +1211,27 @@ MixerStrip::engine_running () rec_enable_button->set_sensitive (true); output_button.set_sensitive (true); } + +void +MixerStrip::meter_changed (void *src) +{ + + ENSURE_GUI_THREAD (bind (mem_fun(*this, &MixerStrip::meter_changed), src)); + + switch (_route.meter_point()) { + case MeterInput: + meter_point_label.set_text (_("input")); + break; + + case MeterPreFader: + meter_point_label.set_text (_("pre")); + break; + + case MeterPostFader: + meter_point_label.set_text (_("post")); + break; + } + + gpm.setup_meters (); +} + diff --git a/gtk2_ardour/mixer_strip.h b/gtk2_ardour/mixer_strip.h index 67ad30bbe7..65be3c00c1 100644 --- a/gtk2_ardour/mixer_strip.h +++ b/gtk2_ardour/mixer_strip.h @@ -125,8 +125,16 @@ class MixerStrip : public RouteUI, public Gtk::EventBox PannerUI panners; Gtk::Table button_table; + Gtk::Table middle_button_table; Gtk::Table bottom_button_table; + Gtk::Button gain_unit_button; + Gtk::Label gain_unit_label; + Gtk::Button meter_point_button; + Gtk::Label meter_point_label; + + void meter_changed (void *); + Gtk::Button diskstream_button; Gtk::Label diskstream_label; diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index 9573011b37..732e919433 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -85,6 +85,8 @@ Mixer_UI::Mixer_UI (AudioEngine& eng) track_display.append_column (_("Visible"), track_columns.visible); track_display.get_column (0)->set_data (X_("colnum"), GUINT_TO_POINTER(0)); track_display.get_column (1)->set_data (X_("colnum"), GUINT_TO_POINTER(1)); + track_display.get_column (0)->set_expand(true); + track_display.get_column (1)->set_expand(false); track_display.set_name (X_("MixerTrackDisplayList")); track_display.get_selection()->set_mode (Gtk::SELECTION_NONE); track_display.set_reorderable (true); @@ -110,11 +112,13 @@ Mixer_UI::Mixer_UI (AudioEngine& eng) group_display.get_column (0)->set_data (X_("colnum"), GUINT_TO_POINTER(0)); group_display.get_column (1)->set_data (X_("colnum"), GUINT_TO_POINTER(1)); group_display.get_column (2)->set_data (X_("colnum"), GUINT_TO_POINTER(2)); + group_display.get_column (0)->set_expand(true); + group_display.get_column (1)->set_expand(false); + group_display.get_column (2)->set_expand(false); group_display.set_name ("MixerGroupList"); group_display.get_selection()->set_mode (Gtk::SELECTION_SINGLE); group_display.set_reorderable (true); group_display.set_headers_visible (true); - group_display.set_headers_clickable (false); group_display.set_rules_hint (true); /* name is directly editable */ @@ -178,7 +182,7 @@ Mixer_UI::Mixer_UI (AudioEngine& eng) rhs_pane1.pack1 (track_display_frame); rhs_pane1.pack2 (group_display_frame); - rhs_pane1.set_size_request (110, -1); + rhs_pane1.set_size_request (105, -1); list_vpacker.pack_start (rhs_pane1, true, true); diff --git a/gtk2_ardour/panner_ui.cc b/gtk2_ardour/panner_ui.cc index 3261a9bdd6..6c10137548 100644 --- a/gtk2_ardour/panner_ui.cc +++ b/gtk2_ardour/panner_ui.cc @@ -68,6 +68,9 @@ PannerUI::PannerUI (IO& io, Session& s) ARDOUR_UI::instance()->tooltips().set_tip (pan_automation_state_button, _("Pan automation mode")); ARDOUR_UI::instance()->tooltips().set_tip (pan_automation_style_button, _("Pan automation type")); + set_size_request_to_display_given_text (pan_automation_state_button, X_("M"), 2, 2); + set_size_request_to_display_given_text (pan_automation_style_button, X_("M"), 2, 2); + pan_bar_packer.set_size_request (-1, 61); panning_viewport.set_size_request (61, 61); @@ -82,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 (_("Isolate"), + pan_astate_menu.items().push_back (MenuElem (_("Manual"), 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))); @@ -761,7 +764,7 @@ PannerUI::_astate_string (AutoState state, bool shrt) switch (state) { case Off: - sstr = (shrt ? "I" : _("I")); + sstr = (shrt ? "M" : _("M")); break; case Play: sstr = (shrt ? "P" : _("P")); diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc index 5815221d66..bfc4d417d2 100644 --- a/gtk2_ardour/plugin_ui.cc +++ b/gtk2_ardour/plugin_ui.cc @@ -358,7 +358,7 @@ PluginUI::ControlUI::ControlUI () /* don't fix the height, it messes up the bar controllers */ - set_size_request_to_display_given_text (automate_button, X_("longenuff"), 2, 2); + set_size_request_to_display_given_text (automate_button, X_("lngnuf"), 2, 2); ignore_change = 0; display = 0; @@ -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 (_("Isolate")); + cui->automate_button.set_label (_("Manual")); 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 (_("Isolate"), + items.push_back (MenuElem (_("Manual"), 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))); |