X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fladspa_pluginui.cc;h=1f7ba8d4c082c225c0af691eed9706c7bb02016d;hb=99904735e066804358f1d0bd138a84f1e9ecda91;hp=6aaea06a7ea0aaeacb3b73c139b325c4ae00b3a7;hpb=eb270e70a12c410cdd98585ad25bb6d8e384a4f5;p=ardour.git diff --git a/gtk2_ardour/ladspa_pluginui.cc b/gtk2_ardour/ladspa_pluginui.cc index 6aaea06a7e..1f7ba8d4c0 100644 --- a/gtk2_ardour/ladspa_pluginui.cc +++ b/gtk2_ardour/ladspa_pluginui.cc @@ -288,12 +288,14 @@ LadspaPluginUI::ControlUI::ControlUI () : automate_button (X_("")) // force creation of a label { automate_button.set_name ("PluginAutomateButton"); - ARDOUR_UI::instance()->tooltips().set_tip (automate_button, - _("Automation control")); + ARDOUR_UI::instance()->tooltips().set_tip (automate_button, _("Automation control")); - /* don't fix the height, it messes up the bar controllers */ + /* XXX translators: use a string here that will be at least as long + as the longest automation label (see ::automation_state_changed() + below). be sure to include a descender. + */ - set_size_request_to_display_given_text (automate_button, X_("lngnuf"), 2, 2); + set_size_request_to_display_given_text (*automate_button.get_child(), _("Mgnual"), 5, 5); ignore_change = 0; display = 0; @@ -323,7 +325,7 @@ LadspaPluginUI::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 (_("Off")); + cui->automate_button.set_label (_("Manual")); break; case Play: cui->automate_button.set_label (_("Play")); @@ -373,6 +375,8 @@ LadspaPluginUI::build_control_ui (guint32 port_index, PBD::Controllable* mcontro control_ui->set_spacing (5); + Gtk::Requisition req (control_ui->automate_button.size_request()); + if (plugin->parameter_is_input (port_index)) { boost::shared_ptr lp; @@ -451,8 +455,7 @@ LadspaPluginUI::build_control_ui (guint32 port_index, PBD::Controllable* mcontro sigc::slot pslot = sigc::bind (mem_fun(*this, &LadspaPluginUI::print_parameter), (uint32_t) port_index); control_ui->control = new BarController (*control_ui->adjustment, *mcontrol, pslot); - // should really match the height of the text in the automation button+label - control_ui->control->set_size_request (200, 22); + control_ui->control->set_size_request (200, req.height); control_ui->control->set_name (X_("PluginSlider")); control_ui->control->set_style (BarController::LeftToRight); control_ui->control->set_use_parent (true); @@ -566,7 +569,7 @@ LadspaPluginUI::astate_clicked (ControlUI* cui, uint32_t port) MenuList& items (automation_menu->items()); items.clear (); - items.push_back (MenuElem (_("Off"), + items.push_back (MenuElem (_("Manual"), bind (mem_fun(*this, &LadspaPluginUI::set_automation_state), (AutoState) Off, cui))); items.push_back (MenuElem (_("Play"), bind (mem_fun(*this, &LadspaPluginUI::set_automation_state), (AutoState) Play, cui)));