pidgin: 04bed1a5: Some cleanup and a little leak fix that ...

datallah at pidgin.im datallah at pidgin.im
Wed Aug 27 21:00:37 EDT 2008


-----------------------------------------------------------------
Revision: 04bed1a548d5b344a6393b010717476687e90559
Ancestor: fe2be97fe8086d0aff5a8d3fda13bbed8c8f0094
Author: datallah at pidgin.im
Date: 2008-08-28T00:55:35
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/04bed1a548d5b344a6393b010717476687e90559

Modified files:
        pidgin/gtknotify.c

ChangeLog: 

Some cleanup and a little leak fix that I thought I committed a while ago.

-------------- next part --------------
============================================================
--- pidgin/gtknotify.c	4b922300be24a11b916038109b6ba3c82bd5b47a
+++ pidgin/gtknotify.c	b7f86e1964c4d426d9aeb715d4880a2effc232f0
@@ -50,7 +50,6 @@ typedef struct
 	PurpleAccount *account;
 	char *url;
 	GtkWidget *label;
-	GtkTreeIter iter;
 	int count;
 	gboolean purple_has_handle;
 } PidginNotifyMailData;
@@ -128,7 +127,10 @@ email_response_cb(GtkDialog *dlg, gint i
 			purple_notify_uri(NULL, data->url);
 
 			gtk_tree_store_remove(dialog->treemodel, &iter);
-			purple_notify_close(PURPLE_NOTIFY_EMAILS, data);
+			if (data->purple_has_handle)
+				purple_notify_close(PURPLE_NOTIFY_EMAILS, data);
+			else
+				pidgin_close_notify(PURPLE_NOTIFY_EMAILS, data);
 
 			if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(mail_dialog->treemodel), &iter))
 				return;
@@ -487,13 +489,9 @@ pidgin_notify_add_mail(GtkTreeStore *tre
 								PIDGIN_MAIL_TEXT, notification,
 								PIDGIN_MAIL_DATA, data,
 								-1);
-	data->iter = iter;              /* XXX: Do we use this for something? */
 	data->account = account;
 	data->count = count;
 
-	/* Why is this necessary?*/
-	gtk_tree_model_get(GTK_TREE_MODEL(treemodel), &iter,
-						PIDGIN_MAIL_DATA, &data, -1);
 	if (icon)
 		g_object_unref(icon);
 


More information about the Commits mailing list