changeset 157:fbe526b20885

revised handler for destroy signal in config dialog.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sat, 26 Jul 2008 01:18:24 +0900
parents e65f81211340
children ae09f0d93b17
files pidgin-twitter.c
diffstat 1 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin-twitter.c	Sat Jul 26 00:41:23 2008 +0900
+++ b/pidgin-twitter.c	Sat Jul 26 01:18:24 2008 +0900
@@ -2565,6 +2565,14 @@
     purple_prefs_set_int(pref, position);
 }
 
+static void
+disconnect_prefs_cb(GtkObject *object, gpointer data)
+{
+	PurplePlugin *plugin = (PurplePlugin *)data;
+
+	purple_prefs_disconnect_by_handle(plugin);
+}
+
 static GtkWidget *
 prefs_get_frame(PurplePlugin *plugin)
 {
@@ -2601,10 +2609,8 @@
 
     gtk_container_remove(GTK_CONTAINER(window), notebook);
 
-    /* it may cause crash when dispose configure window --yaz */
-    /* xxx find the better way */
-//    g_signal_connect(notebook, "destroy",
-//                     G_CALLBACK(gtk_widget_destroyed), &notebook);
+    g_signal_connect(notebook, "destroy",
+                     G_CALLBACK(disconnect_prefs_cb), plugin);
 
 
     /***********************/