]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/Tooltips.C
Yet more dialog tweaking from Rob.
[lyx.git] / src / frontends / xforms / Tooltips.C
index 30368ecb2989e5af16d1760b5eafcf292d10974c..d49797a3487cea8973d7352c10286e730d7933d3 100644 (file)
@@ -1,9 +1,11 @@
-/*
+/**
  * \file Tooltips.C
- * Copyright 2002 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- * \author Angus Leeming, a.leeming@ic.ac.uk
+ * \author Angus Leeming 
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 /* Tooltips for xforms. xforms 0.89 supports them directly, but 0.88 needs
 #endif
 
 #include "Tooltips.h"
-#include "Dialogs.h"
 #include "xforms_helpers.h" // formatted
 #include "gettext.h"
 #include "support/lstrings.h"
 #include "support/LAssert.h"
+#include FORMS_H_LOCATION
 
 #include <boost/bind.hpp>
 
@@ -32,15 +34,10 @@ bool Tooltips::enabled_ = true;
 boost::signal0<void> Tooltips::toggled;
 
 
-#if FL_REVISION >= 89
+#if FL_VERSION > 0 || FL_REVISION >= 89
 
 Tooltips::Tooltips()
 {
-       static bool first = true;
-       if (first) {
-               first = false;
-               Dialogs::toggleTooltips.connect(boost::bind(&Tooltips::toggleEnabled));
-       }
        toggled.connect(boost::bind(&Tooltips::set, this));
 }
 
@@ -78,7 +75,7 @@ void Tooltips::init(FL_OBJECT * ob, string const & tip)
        if (it != tooltipsMap.end())
                return;
 
-       string const str = strip(frontStrip(tip));
+       string const str = trim(tip);
        if (str.empty())
                return;
 
@@ -117,12 +114,7 @@ static void C_TooltipTimerCB(FL_OBJECT * ob, long data)
 Tooltips::Tooltips()
        : tooltip_timer_(0)
 {
-       static bool first = true;
-       if (first) {
-               first = false;
-               Dialogs::toggleTooltips.connect(slot(&Tooltips::toggleEnabled));
-       }
-       toggled.connect(slot(this, &Tooltips::set));
+       toggled.connect(boost::bind(&Tooltips::set, this));
 }
 
 
@@ -146,7 +138,7 @@ void Tooltips::init(FL_OBJECT * ob, string const & tip)
        if (it != tooltipsMap.end())
                return;
 
-       string const str = strip(frontStrip(tip));
+       string const str = trim(tip);
        if (str.empty())
                return;