changeset 21884:b40a6bb267a1

Reset tree-path when a tooltip is destroyed.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Tue, 18 Dec 2007 06:32:42 +0000
parents bb409f0d26b6
children f5d961556972
files pidgin/pidgintooltip.c
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/pidgintooltip.c	Wed Dec 12 00:12:41 2007 +0000
+++ b/pidgin/pidgintooltip.c	Tue Dec 18 06:32:42 2007 +0000
@@ -167,6 +167,13 @@
 }
 
 static void
+reset_data_treepath(PidginTooltipData *data)
+{
+	gtk_tree_path_free(data->path);
+	data->path = NULL;
+}
+
+static void
 pidgin_tooltip_draw(PidginTooltipData *data)
 {
 	GtkWidget *tipwindow;
@@ -205,6 +212,8 @@
 
 	data->path = path;
 	setup_tooltip_window(data->userdata, w, h);
+	g_signal_connect_swapped(G_OBJECT(tipwindow), "destroy",
+			G_CALLBACK(reset_data_treepath), data);
 }
 
 static gboolean