summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/editor_actions.cc10
-rw-r--r--gtk2_ardour/rc_option_editor.cc8
-rw-r--r--libs/ardour/ardour/rc_configuration_vars.h1
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/utils.h2
-rw-r--r--libs/gtkmm2ext/utils.cc12
5 files changed, 33 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc
index a8b9f0da0c..b2f11bb367 100644
--- a/gtk2_ardour/editor_actions.cc
+++ b/gtk2_ardour/editor_actions.cc
@@ -23,6 +23,7 @@
#include "pbd/file_utils.h"
#include "gtkmm2ext/tearoff.h"
+#include "gtkmm2ext/utils.h"
#include "ardour/filesystem_paths.h"
#include "ardour/profile.h"
@@ -1489,6 +1490,15 @@ Editor::parameter_changed (std::string p)
if (_routes) {
_routes->reset_remote_control_ids ();
}
+ } else if (p == "use-tooltips") {
+
+ /* this doesn't really belong here but it has to go somewhere */
+
+ if (Config->get_use_tooltips()) {
+ Gtkmm2ext::enable_tooltips ();
+ } else {
+ Gtkmm2ext::disable_tooltips ();
+ }
}
}
diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc
index 978cea87cc..c52764d8fe 100644
--- a/gtk2_ardour/rc_option_editor.cc
+++ b/gtk2_ardour/rc_option_editor.cc
@@ -1707,6 +1707,14 @@ RCOptionEditor::RCOptionEditor ()
sigc::mem_fun (*_rc_config, &RCConfiguration::set_widget_prelight)
));
+ add_option (S_("GUI"),
+ new BoolOption (
+ "use-tooltips",
+ _("Show tooltips if mouse hovers over a control"),
+ sigc::mem_fun (*_rc_config, &RCConfiguration::get_use_tooltips),
+ sigc::mem_fun (*_rc_config, &RCConfiguration::set_use_tooltips)
+ ));
+
#ifndef GTKOSX
/* font scaling does nothing with GDK/Quartz */
add_option (S_("GUI"), new FontScalingOptions (_rc_config));
diff --git a/libs/ardour/ardour/rc_configuration_vars.h b/libs/ardour/ardour/rc_configuration_vars.h
index a8912e3ef9..ef697b4043 100644
--- a/libs/ardour/ardour/rc_configuration_vars.h
+++ b/libs/ardour/ardour/rc_configuration_vars.h
@@ -202,6 +202,7 @@ CONFIG_VARIABLE (DenormalModel, denormal_model, "denormal-model", DenormalFTZDAZ
CONFIG_VARIABLE (bool, show_zoom_tools, "show-zoom-tools", true)
CONFIG_VARIABLE (bool, widget_prelight, "widget-prelight", true)
+CONFIG_VARIABLE (bool, use_tooltips, "use-tooltips", true)
CONFIG_VARIABLE (std::string, mixer_strip_visibility, "mixer-strip-visibility", "PhaseInvert,SoloSafe,SoloIsolated,Group,MeterPoint")
CONFIG_VARIABLE (bool, allow_non_quarter_pulse, "allow-non-quarter-pulse", false)
CONFIG_VARIABLE (bool, show_region_gain, "show-region-gain", false)
diff --git a/libs/gtkmm2ext/gtkmm2ext/utils.h b/libs/gtkmm2ext/gtkmm2ext/utils.h
index c4c9a4125c..1b0a9f5725 100644
--- a/libs/gtkmm2ext/gtkmm2ext/utils.h
+++ b/libs/gtkmm2ext/gtkmm2ext/utils.h
@@ -110,6 +110,8 @@ namespace Gtkmm2ext {
Gtk::Label* left_aligned_label (std::string const &);
void set_no_tooltip_whatsoever (Gtk::Widget &);
+ void enable_tooltips ();
+ void disable_tooltips ();
};
#endif /* __gtkmm2ext_utils_h__ */
diff --git a/libs/gtkmm2ext/utils.cc b/libs/gtkmm2ext/utils.cc
index 11c5b90722..c0c7a88362 100644
--- a/libs/gtkmm2ext/utils.cc
+++ b/libs/gtkmm2ext/utils.cc
@@ -650,3 +650,15 @@ Gtkmm2ext::set_no_tooltip_whatsoever (Gtk::Widget& w)
w.property_has_tooltip() = true;
w.signal_query_tooltip().connect (sigc::ptr_fun (make_null_tooltip));
}
+
+void
+Gtkmm2ext::enable_tooltips ()
+{
+ gtk_rc_parse_string ("gtk-enable-tooltips = 1");
+}
+
+void
+Gtkmm2ext::disable_tooltips ()
+{
+ gtk_rc_parse_string ("gtk-enable-tooltips = 0");
+}