]> git.lyx.org Git - features.git/commitdiff
Fix broken tooltips.
authorAngus Leeming <leeming@lyx.org>
Mon, 14 Oct 2002 16:38:00 +0000 (16:38 +0000)
committerAngus Leeming <leeming@lyx.org>
Mon, 14 Oct 2002 16:38:00 +0000 (16:38 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5396 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/xforms/ChangeLog
src/frontends/xforms/FormBase.C
src/frontends/xforms/FormBaseDeprecated.C
src/frontends/xforms/Tooltips.C
src/frontends/xforms/Tooltips.h

index 4d401d4b409cc6ed17bc87f688de7ec0846cd341..20f91375fd686f3aaca00839daf76d9b2f34df0c 100644 (file)
@@ -1,3 +1,10 @@
+2002-10-14  Angus Leeming  <leeming@lyx.org>
+
+       * Tooltips.h (set) make it private:
+       * Tooltips.C (set): don't forget to initialise the FL_OBJECT!
+
+       * FormBase.C (show):
+       * FormBaseDeprecated.C (show): no longer invoke Tooltips::set().
 
 2002-10-14  André Pönitz <poenitz@gmx.net>
 
index 892adcc4eae4bce427aad4d679eef7dbaa6819c6..42ef8fb8036ce8de533950251018a3a7beeeb474 100644 (file)
@@ -157,10 +157,6 @@ void FormBase::show()
                             iconify_policy,
                             maximize_title.c_str());
        }
-
-       // For some strange reason known only to xforms, the tooltips can only
-       // be set on a form that is already visible...
-       tooltips().set();
 }
 
 
index 0d917285859362bc950eced2e7fb70439f0b7518..92762d3b328dfcd4bc25952ccd3875cb33217dc1 100644 (file)
@@ -166,10 +166,6 @@ void FormBaseDeprecated::show()
                             iconify_policy,
                             maximize_title.c_str());
        }
-
-       // For some strange reason known only to xforms, the tooltips can only
-       // be set on a form that is already visible...
-       tooltips().set();
 }
 
 
index d49797a3487cea8973d7352c10286e730d7933d3..9726e436c3289dd65f593338cb06fefdc8834553 100644 (file)
@@ -81,6 +81,10 @@ void Tooltips::init(FL_OBJECT * ob, string const & tip)
 
        // Store the tooltip string
        tooltipsMap[ob] = formatted(str, 400);
+
+       // Set the tooltip
+       char const * const c_str = enabled_ ? str.c_str() : 0;
+       fl_set_object_helper(ob, c_str);
 }
 
 
index 9bd1486446ecfb4894041107ba5a24eb13d99b2a..9cfae2c74b03bae8da71202048b9f1dcd9367336 100644 (file)
@@ -43,9 +43,6 @@ public:
        /// Are the tooltips on or off?
        static bool enabled() { return enabled_; }
 
-       /// This method is connected to the tooltipsToggled signal.
-       void set();
-
 #if FL_VERSION < 1 && FL_REVISION < 89
 
        /** Return the tooltip associated with this object.
@@ -62,6 +59,9 @@ public:
 
 private:
 
+       /// This method is connected to the Tooltips::toggled signal.
+       void set();
+
        /// Are the tooltips on or off?
        static bool enabled_;