also hide persistent tooltips

debatable, since most of them are not "help/tool info" but rather
"current value display".
Then again tooltip is tooltip and can be annoying or not wanted.
This commit is contained in:
Robin Gareus 2016-04-27 01:07:53 +02:00
parent 54e01f4e48
commit 49e5494907
3 changed files with 9 additions and 1 deletions

View file

@ -29,6 +29,8 @@ using namespace std;
using namespace Gtk;
using namespace Gtkmm2ext;
bool PersistentTooltip::_tooltips_enabled = true;
/** @param target The widget to provide the tooltip for */
PersistentTooltip::PersistentTooltip (Gtk::Widget* target, bool draggable, int margin_y)
: _target (target)
@ -115,7 +117,7 @@ PersistentTooltip::hide ()
void
PersistentTooltip::show ()
{
if (_tip.empty()) {
if (_tip.empty() || !_tooltips_enabled) {
return;
}