diff options
author | Robin Gareus <robin@gareus.org> | 2017-06-29 00:20:55 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-06-29 00:22:42 +0200 |
commit | c3c4efaa09875bafddb2180c7f0312fad848193e (patch) | |
tree | 988d011718e0b6d6c79a4ccfeb431a2c930f6dd9 /gtk2_ardour | |
parent | 972e01f9c71205c537eab0f6115bd068ab6e35b1 (diff) |
Use mnemonic-save API for menu-element texts
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/mixer_strip.cc | 13 | ||||
-rw-r--r-- | gtk2_ardour/patch_change.cc | 11 | ||||
-rw-r--r-- | gtk2_ardour/plugin_pin_dialog.cc | 3 | ||||
-rw-r--r-- | gtk2_ardour/processor_box.cc | 5 |
4 files changed, 11 insertions, 21 deletions
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index 195a9de04e..6f02710e42 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -33,6 +33,7 @@ #include <gtkmm2ext/doi.h> #include <gtkmm2ext/slider_controller.h> #include <gtkmm2ext/bindable_button.h> +#include "gtkmm2ext/menu_elems.h" #include "ardour/amp.h" #include "ardour/audio_track.h" @@ -1094,11 +1095,7 @@ MixerStrip::maybe_add_bundle_to_input_menu (boost::shared_ptr<Bundle> b, ARDOUR: input_menu_bundles.push_back (b); MenuList& citems = input_menu.items(); - - std::string n = b->name (); - replace_all (n, "_", " "); - - citems.push_back (MenuElem (n, sigc::bind (sigc::mem_fun(*this, &MixerStrip::bundle_input_chosen), b))); + citems.push_back (MenuElemNoMnemonic (b->name (), sigc::bind (sigc::mem_fun(*this, &MixerStrip::bundle_input_chosen), b))); } void @@ -1122,11 +1119,7 @@ MixerStrip::maybe_add_bundle_to_output_menu (boost::shared_ptr<Bundle> b, ARDOUR output_menu_bundles.push_back (b); MenuList& citems = output_menu.items(); - - std::string n = b->name (); - replace_all (n, "_", " "); - - citems.push_back (MenuElem (n, sigc::bind (sigc::mem_fun(*this, &MixerStrip::bundle_output_chosen), b))); + citems.push_back (MenuElemNoMnemonic (b->name (), sigc::bind (sigc::mem_fun(*this, &MixerStrip::bundle_output_chosen), b))); } void diff --git a/gtk2_ardour/patch_change.cc b/gtk2_ardour/patch_change.cc index fb3507ae64..3070011380 100644 --- a/gtk2_ardour/patch_change.cc +++ b/gtk2_ardour/patch_change.cc @@ -24,6 +24,7 @@ #include <glibmm/regex.h> #include "gtkmm2ext/keyboard.h" +#include "gtkmm2ext/menu_elems.h" #include "gtkmm2ext/utils.h" #include "midi++/midnam_patch.h" @@ -137,14 +138,8 @@ PatchChange::initialize_popup_menus() for (PatchNameList::const_iterator patch = patches.begin(); patch != patches.end(); ++patch) { - std::string name = (*patch)->name(); - boost::replace_all (name, "_", " "); - - patch_menus.push_back ( - Gtk::Menu_Helpers::MenuElem ( - name, - sigc::bind (sigc::mem_fun(*this, &PatchChange::on_patch_menu_selected), - (*patch)->patch_primary_key()))); + patch_menus.push_back (Gtkmm2ext::MenuElemNoMnemonic ((*patch)->name(), + sigc::bind (sigc::mem_fun(*this, &PatchChange::on_patch_menu_selected), (*patch)->patch_primary_key()))); } } } diff --git a/gtk2_ardour/plugin_pin_dialog.cc b/gtk2_ardour/plugin_pin_dialog.cc index ed15db2a76..5b7ed436bd 100644 --- a/gtk2_ardour/plugin_pin_dialog.cc +++ b/gtk2_ardour/plugin_pin_dialog.cc @@ -27,6 +27,7 @@ #include "gtkmm2ext/utils.h" #include "gtkmm2ext/rgb_macros.h" +#include "gtkmm2ext/menu_elems.h" #include "ardour/amp.h" #include "ardour/audioengine.h" @@ -1822,7 +1823,7 @@ PluginPinWidget::maybe_add_route_to_input_menu (boost::shared_ptr<Route> r, Data /* we're going to create the new send pre-fader, so check the route amp's data type. */ const ChanCount& rc (r->amp ()->input_streams ()); if (!already_present && rc.get (dt) > 0) { - citems.push_back (MenuElem (r->name (), sigc::bind (sigc::mem_fun (*this, &PluginPinWidget::add_send_from), wp, boost::weak_ptr<Route> (r)))); + citems.push_back (MenuElemNoMnemonic (r->name (), sigc::bind (sigc::mem_fun (*this, &PluginPinWidget::add_send_from), wp, boost::weak_ptr<Route> (r)))); ++added; } return added; diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index d9bf1a9749..f1dd84a84d 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -35,6 +35,7 @@ #include <gtkmm/messagedialog.h> #include <gtkmm2ext/gtk_ui.h> +#include "gtkmm2ext/menu_elems.h" #include <gtkmm2ext/utils.h> #include <gtkmm2ext/choice.h> #include <gtkmm2ext/utils.h> @@ -728,7 +729,7 @@ ProcessorEntry::build_controls_menu () } for (list<Control*>::iterator i = _controls.begin(); i != _controls.end(); ++i) { - items.push_back (CheckMenuElem ((*i)->name ())); + items.push_back (CheckMenuElemNoMnemonic ((*i)->name ())); Gtk::CheckMenuItem* c = dynamic_cast<Gtk::CheckMenuItem*> (&items.back ()); c->set_active ((*i)->visible ()); c->signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &ProcessorEntry::toggle_control_visibility), *i)); @@ -2107,7 +2108,7 @@ ProcessorBox::build_possible_aux_menu () for (RouteList::iterator r = rl->begin(); r != rl->end(); ++r) { if (!_route->internal_send_for (*r) && *r != _route) { - items.push_back (MenuElem ((*r)->name(), sigc::bind (sigc::ptr_fun (ProcessorBox::rb_choose_aux), boost::weak_ptr<Route>(*r)))); + items.push_back (MenuElemNoMnemonic ((*r)->name(), sigc::bind (sigc::ptr_fun (ProcessorBox::rb_choose_aux), boost::weak_ptr<Route>(*r)))); } } |