]> git.saurik.com Git - wxWidgets.git/commitdiff
If an empty string is passed, remove the tooltip instead of setting it
authorRobin Dunn <robin@alldunn.com>
Wed, 18 Oct 2006 03:54:48 +0000 (03:54 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 18 Oct 2006 03:54:48 +0000 (03:54 +0000)
to "".

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42091 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/window.cpp

index de71af2416030ed5a1696935d192bfd86af2c668..206fe6ffd85a35046ffd489be17c4d2ddbf1527a 100644 (file)
@@ -3763,8 +3763,15 @@ void wxWindowGTK::DoSetToolTip( wxToolTip *tip )
 
 void wxWindowGTK::ApplyToolTip( GtkTooltips *tips, const wxChar *tip )
 {
-    wxString tmp( tip );
-    gtk_tooltips_set_tip( tips, GetConnectWidget(), wxGTK_CONV(tmp), (gchar*) NULL );
+    if (tip)
+    {
+        wxString tmp( tip );
+        gtk_tooltips_set_tip( tips, GetConnectWidget(), wxGTK_CONV(tmp), (gchar*) NULL );
+    }
+    else
+    {
+        gtk_tooltips_set_tip( tips, GetConnectWidget(), NULL, NULL);
+    }
 }
 #endif // wxUSE_TOOLTIPS