]> granicus.if.org Git - transmission/commitdiff
(trunk gtk) implement gtr_widget_set_tooltip_text() for gtk < 2.12
authorCharles Kerr <charles@transmissionbt.com>
Mon, 30 Mar 2009 16:16:38 +0000 (16:16 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Mon, 30 Mar 2009 16:16:38 +0000 (16:16 +0000)
gtk/util.c

index 30fc5b6e3a50e8cf571d72ed3841bb9636d0b214..17c237beb66f4a8829eac5eeee4fcb9f779df93b 100644 (file)
@@ -653,14 +653,15 @@ gtr_timeout_add_seconds( guint seconds, GSourceFunc function, gpointer data )
 #endif
 }
 
-
 void
 gtr_widget_set_tooltip_text( GtkWidget * w, const char * tip )
 {
 #if GTK_CHECK_VERSION( 2,12,0 )
     gtk_widget_set_tooltip_text( w, tip );
 #else
-    /* FIXME */
+    static GtkTooltips * tips = NULL;
+    if( tips == NULL )
+        tips = gtk_tooltips_new( );
+    gtk_tooltips_set_tip( tips, w, tip, NULL );
 #endif
 }
-