pidgin/gtkmenutray.c

branch
cpw.qulogic.gtk3
changeset 32367
57b77b20301a
parent 26929
2a8ade936729
child 32375
9ccb07c70f2a
--- a/pidgin/gtkmenutray.c	Tue Feb 16 00:36:25 2010 +0000
+++ b/pidgin/gtkmenutray.c	Tue Feb 16 04:45:35 2010 +0000
@@ -104,9 +104,11 @@
 		gtk_widget_destroy(GTK_WIDGET(tray->tray));
 #endif
 
+#if !GTK_CHECK_VERSION(2,12,0)
 	if (tray->tooltips) {
 		gtk_object_sink(GTK_OBJECT(tray->tooltips));
 	}
+#endif
 
 	G_OBJECT_CLASS(parent_class)->finalize(obj);
 }
@@ -244,13 +246,15 @@
 void
 pidgin_menu_tray_set_tooltip(PidginMenuTray *menu_tray, GtkWidget *widget, const char *tooltip)
 {
+#if !GTK_CHECK_VERSION(2,12,0)
 	if (!menu_tray->tooltips)
 		menu_tray->tooltips = gtk_tooltips_new();
+#endif
 
 	/* Should we check whether widget is a child of menu_tray? */
 
 	/*
-	 * If the widget does not have it's own window, then it
+	 * If the widget does not have its own window, then it
 	 * must have automatically been added to an event box
 	 * when it was added to the menu tray.  If this is the
 	 * case, we want to set the tooltip on the widget's parent,
@@ -259,6 +263,10 @@
 	if (GTK_WIDGET_NO_WINDOW(widget))
 		widget = widget->parent;
 
+#if GTK_CHECK_VERSION(2,12,0)
+	gtk_widget_set_tooltip_text(widget, tooltip);
+#else
 	gtk_tooltips_set_tip(menu_tray->tooltips, widget, tooltip, NULL);
+#endif
 }
 

mercurial