/pidgin/main: 074df5eb09a2: Silence warning when tooltip's tipwi...

Mike Ruprecht cmaiku at gmail.com
Sat Jan 23 14:06:34 EST 2016


Changeset: 074df5eb09a2803bc6edc0df9f65385162b2a2b1
Author:	 Mike Ruprecht <cmaiku at gmail.com>
Date:	 2016-01-22 02:14 -0600
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/074df5eb09a2

Description:

Silence warning when tooltip's tipwindow is destroyed before widget

diffstat:

 pidgin/pidgintooltip.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (23 lines):

diff --git a/pidgin/pidgintooltip.c b/pidgin/pidgintooltip.c
--- a/pidgin/pidgintooltip.c
+++ b/pidgin/pidgintooltip.c
@@ -126,7 +126,6 @@ setup_tooltip_window(void)
 static void
 setup_tooltip_window_position(gpointer data, int w, int h)
 {
-	int sig;
 	int scr_w, scr_h, x, y, dy;
 	int preserved_x, preserved_y;
 	int mon_num;
@@ -193,8 +192,9 @@ setup_tooltip_window_position(gpointer d
 			G_CALLBACK(pidgin_tooltip_draw_cb), data);
 
 	/* Hide the tooltip when the widget is destroyed */
-	sig = g_signal_connect(G_OBJECT(pidgin_tooltip.widget), "destroy", G_CALLBACK(pidgin_tooltip_destroy), NULL);
-	g_signal_connect_swapped(G_OBJECT(tipwindow), "destroy", G_CALLBACK(g_source_remove), GINT_TO_POINTER(sig));
+	g_signal_connect_object(G_OBJECT(pidgin_tooltip.widget),
+			"destroy", G_CALLBACK(pidgin_tooltip_destroy),
+			G_OBJECT(tipwindow), 0);
 }
 
 void pidgin_tooltip_show(GtkWidget *widget, gpointer userdata,



More information about the Commits mailing list