changeset 32603:d9368e77b2e4

Fix some new uses of GtkTooltips for GTK+ > 2.12.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Tue, 16 Feb 2010 07:40:57 +0000
parents bf81971d3aaa
children 41982cac439f
files pidgin/gtkrequest.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkrequest.c	Tue Feb 16 06:54:06 2010 +0000
+++ b/pidgin/gtkrequest.c	Tue Feb 16 07:40:57 2010 +0000
@@ -85,7 +85,9 @@
 {
 	GtkWidget *image;
 	GdkPixbuf *pixbuf;
+#if !GTK_CHECK_VERSION(2,12,0)
 	GtkTooltips *tips;
+#endif
 
 	if (!account)
 		return;
@@ -94,8 +96,12 @@
 	image = gtk_image_new_from_pixbuf(pixbuf);
 	g_object_unref(G_OBJECT(pixbuf));
 
+#if GTK_CHECK_VERSION(2,12,0)
+	gtk_widget_set_tooltip_text(image, purple_account_get_username(account));
+#else
 	tips = gtk_tooltips_new();
 	gtk_tooltips_set_tip(tips, image, purple_account_get_username(account), NULL);
+#endif
 
 	if (GTK_IS_DIALOG(cont)) {
 		gtk_box_pack_start(GTK_BOX(GTK_DIALOG(cont)->action_area), image, FALSE, TRUE, 0);