]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/window.cpp
Fix last error display in wxLogSysError().
[wxWidgets.git] / src / gtk / window.cpp
index 99b012592d6d25e6e763e48e79b2e19a9e702fcd..a3975752f1eb3c52d1793b6ac122ee07324964d4 100644 (file)
@@ -3763,7 +3763,21 @@ void wxWindowGTK::DoSetToolTip( wxToolTip *tip )
     wxWindowBase::DoSetToolTip(tip);
 
     if (m_tooltip)
+    {
         m_tooltip->GTKApply( (wxWindow *)this );
+    }
+    else
+    {
+        GtkWidget *w = GetConnectWidget();
+        wxToolTip::GTKApply(w, NULL);
+#if GTK_CHECK_VERSION(2, 12, 0)
+        // Just applying NULL doesn't work on 2.12.0, so also use
+        // gtk_widget_set_has_tooltip. It is part of the new GtkTooltip API
+        // but seems also to work with the old GtkTooltips.
+        if (gtk_check_version(2, 12, 0) == NULL)
+            gtk_widget_set_has_tooltip(w, FALSE);
+#endif
+    }
 }
 
 void wxWindowGTK::GTKApplyToolTip( GtkTooltips *tips, const gchar *tip )