cpw.darkrain42.xmpp.disco: d7de0393: Don't leak the GObject data and disable ...

paul at darkrain42.org paul at darkrain42.org
Sat Apr 25 16:17:37 EDT 2009


-----------------------------------------------------------------
Revision: d7de0393cb0ecf1d36dfaa1af478711ff793ca0c
Ancestor: 96395797c0c43554716f48034c902ac51069bdba
Author: paul at darkrain42.org
Date: 2009-04-18T06:51:59
Branch: im.pidgin.cpw.darkrain42.xmpp.disco
URL: http://d.pidgin.im/viewmtn/revision/info/d7de0393cb0ecf1d36dfaa1af478711ff793ca0c

Modified files:
        pidgin/gtkdisco.c

ChangeLog: 

Don't leak the GObject data and disable the Add/Register buttons when browsing.

-------------- next part --------------
============================================================
--- pidgin/gtkdisco.c	732af8c53a0deb80d89daba8967219668a5d12ad
+++ pidgin/gtkdisco.c	dffe789493e75d424451092ff0b77f6a173b7d29
@@ -98,6 +98,9 @@ static void list_button_cb(GtkButton *bu
 	if (!gc)
 		return;
 
+	gtk_widget_set_sensitive(dialog->add_button, FALSE);
+	gtk_widget_set_sensitive(dialog->register_button, FALSE);
+
 	if (dialog->discolist != NULL) {
 		pdl = purple_disco_list_get_ui_data(dialog->discolist);
 		gtk_widget_destroy(pdl->tree);
@@ -160,7 +163,8 @@ selection_changed_cb(GtkTreeSelection *s
 		info->list = dialog->discolist;
 		info->service = service;
 
-		g_object_set_data(G_OBJECT(dialog->add_button), "disco-info", info);
+		g_object_set_data_full(G_OBJECT(dialog->add_button), "disco-info",
+		                       info, g_free);
 		g_object_set_data(G_OBJECT(dialog->register_button), "disco-info", info);
 
 		flags = purple_disco_service_get_flags(service);


More information about the Commits mailing list