From 8bfaa2d3d9e7712a238651c487c761e70b20f6ab Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 6 Jun 2013 08:31:46 -0400 Subject: [PATCH] move control surface prefs onto their own tab in the user prefs; for Generic MIDI GUI, rename "Threshold" to "Smoothing" and add a tooltip to describe it; fix misuse of S_() in prefs editor --- gtk2_ardour/rc_option_editor.cc | 26 +++++++++++++------------- libs/surfaces/generic_midi/gmcp_gui.cc | 6 +++++- libs/surfaces/generic_midi/wscript | 3 +++ 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index 676ebf8332..216a122e91 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -653,7 +653,7 @@ public: { _store = ListStore::create (_model); _view.set_model (_store); - _view.append_column (_("Name"), _model.name); + _view.append_column (_("Control Surface Protocol"), _model.name); _view.get_column(0)->set_resizable (true); _view.get_column(0)->set_expand (true); _view.append_column_editable (_("Enabled"), _model.enabled); @@ -1813,9 +1813,9 @@ RCOptionEditor::RCOptionEditor () add_option (_("User interaction"), new KeyboardOptions); - add_option (_("User interaction"), new OptionEditorHeading (_("Control surfaces"))); + /* Control Surfaces */ - add_option (_("User interaction"), new ControlSurfacesOptions (*this)); + add_option (_("Control Surfaces"), new ControlSurfacesOptions (*this)); ComboOption* rm = new ComboOption ( "remote-model", @@ -1828,14 +1828,14 @@ RCOptionEditor::RCOptionEditor () rm->add (MixerOrdered, _("follows order of mixer")); rm->add (EditorOrdered, _("follows order of editor")); - add_option (_("User interaction"), rm); + add_option (_("Control Surfaces"), rm); /* VIDEO Timeline */ add_option (_("Video"), new VideoTimelineOptions (_rc_config)); /* INTERFACE */ - add_option (S_("GUI"), + add_option (S_("Preferences|GUI"), new BoolOption ( "widget-prelight", _("Graphically indicate mouse pointer hovering over various widgets"), @@ -1843,7 +1843,7 @@ RCOptionEditor::RCOptionEditor () sigc::mem_fun (*_rc_config, &RCConfiguration::set_widget_prelight) )); - add_option (S_("GUI"), + add_option (S_("Preferences|GUI"), new BoolOption ( "use-tooltips", _("Show tooltips if mouse hovers over a control"), @@ -1853,9 +1853,9 @@ RCOptionEditor::RCOptionEditor () #ifndef GTKOSX /* font scaling does nothing with GDK/Quartz */ - add_option (S_("GUI"), new FontScalingOptions (_rc_config)); + add_option (S_("Preferences|GUI"), new FontScalingOptions (_rc_config)); #endif - add_option (S_("GUI"), + add_option (S_("Preferences|GUI"), new BoolOption ( "use-own-plugin-gui", string_compose (_("Use plugins' own interfaces instead of %1's"), PROGRAM_NAME), @@ -1881,7 +1881,7 @@ RCOptionEditor::RCOptionEditor () _mixer_strip_visibility.add (0, X_("MeterPoint"), _("Meter Point")); add_option ( - S_("GUI"), + S_("Preferences|GUI"), new VisibilityOption ( _("Mixer Strip"), &_mixer_strip_visibility, @@ -1890,7 +1890,7 @@ RCOptionEditor::RCOptionEditor () ) ); - add_option (S_("GUI"), + add_option (S_("Preferences|GUI"), new BoolOption ( "default-narrow_ms", _("Use narrow strips in the mixer by default"), @@ -1898,7 +1898,7 @@ RCOptionEditor::RCOptionEditor () sigc::mem_fun (*_rc_config, &RCConfiguration::set_default_narrow_ms) )); - add_option (S_("GUI"), new OptionEditorHeading (_("Metering"))); + add_option (S_("Preferences|GUI"), new OptionEditorHeading (_("Metering"))); ComboOption* mht = new ComboOption ( "meter-hold", @@ -1912,7 +1912,7 @@ RCOptionEditor::RCOptionEditor () mht->add (MeterHoldMedium, _("medium")); mht->add (MeterHoldLong, _("long")); - add_option (S_("GUI"), mht); + add_option (S_("Preferences|GUI"), mht); ComboOption* mfo = new ComboOption ( "meter-falloff", @@ -1929,7 +1929,7 @@ RCOptionEditor::RCOptionEditor () mfo->add (METER_FALLOFF_FASTER, _("faster")); mfo->add (METER_FALLOFF_FASTEST, _("fastest")); - add_option (S_("GUI"), mfo); + add_option (S_("Preferences|GUI"), mfo); } void diff --git a/libs/surfaces/generic_midi/gmcp_gui.cc b/libs/surfaces/generic_midi/gmcp_gui.cc index e36562311b..e56ea62424 100644 --- a/libs/surfaces/generic_midi/gmcp_gui.cc +++ b/libs/surfaces/generic_midi/gmcp_gui.cc @@ -28,6 +28,7 @@ #include #include +#include "gtkmm2ext/gtk_ui.h" #include "gtkmm2ext/utils.h" #include "generic_midi_control_protocol.h" @@ -147,7 +148,10 @@ GMCPGUI::GMCPGUI (GenericMidiControlProtocol& p) threshold_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &GMCPGUI::threshold_changed)); - label = manage (new Label (_("Threshold:"))); + Gtkmm2ext::UI::instance()->set_tip (threshold_spinner, + string_compose (_("Controls how %1 behaves if the MIDI controller sends discontinuous values"), PROGRAM_NAME)); + + label = manage (new Label (_("Smoothing:"))); label->set_alignment (0, 0.5); table->attach (*label, 0, 1, n, n + 1); table->attach (threshold_spinner, 1, 2, n, n + 1); diff --git a/libs/surfaces/generic_midi/wscript b/libs/surfaces/generic_midi/wscript index 6daf413b66..4cdf2602fd 100644 --- a/libs/surfaces/generic_midi/wscript +++ b/libs/surfaces/generic_midi/wscript @@ -38,6 +38,9 @@ def build(bld): obj.use = 'libardour libardour_cp libgtkmm2ext libpbd' obj.vnum = LIBARDOUR_GENERIC_MIDI_LIB_VERSION obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3', 'surfaces') + obj.defines = [ + 'PROGRAM_NAME="' + bld.env['PROGRAM_NAME'] + '"' + ] def shutdown(): autowaf.shutdown() -- 2.30.2