# HG changeset patch # User Daniel Atallah # Date 1190947447 0 # Node ID 70c2ecd55dd8c9b426e2ba42e1fa1f30714c2e0e # Parent 4dd60add6a7c317e7f5d094ee49fd96c0142442a Fix a couple bugs related to removing mail notifications. diff -r 4dd60add6a7c -r 70c2ecd55dd8 pidgin/gtknotify.c --- a/pidgin/gtknotify.c Fri Sep 28 01:57:55 2007 +0000 +++ b/pidgin/gtknotify.c Fri Sep 28 02:44:07 2007 +0000 @@ -420,8 +420,6 @@ GdkPixbuf *icon; gboolean new_n = TRUE; - icon = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_MEDIUM); - if (count > 0 || clear) { /* Allow only one non-detailed email notification for each account */ if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(treemodel), &iter)) { @@ -449,6 +447,11 @@ } } + if (clear) + return NULL; + + icon = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_MEDIUM); + if (new_n) { data = g_new0(PidginNotifyMailData, 1); gtk_tree_store_append(treemodel, &iter, NULL); @@ -550,9 +553,8 @@ /* There is no API to clear the headline specifically */ /* This will trigger reset_mail_dialog() */ pidgin_blist_set_headline(NULL, NULL, NULL, NULL, NULL); + return NULL; } - - return NULL; } }