provide the ability to enable + disable tooltips
git-svn-id: svn://localhost/ardour2/branches/3.0@13505 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
ff4ea9346b
commit
60f85cac42
|
@ -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 ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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__ */
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user