diff pidgin/gtknotify.c @ 28062:4b61989ab198

Close the Pounce dialog when you dismiss the last pounce. committer: Paul Aurich <paul@darkrain42.org>
author salinasv@gmail.com
date Sat, 22 Aug 2009 18:52:16 +0000
parents f6cdf5f72479
children 74ce58c7bc30
line wrap: on
line diff
--- a/pidgin/gtknotify.c	Sat Aug 22 18:30:53 2009 +0000
+++ b/pidgin/gtknotify.c	Sat Aug 22 18:52:16 2009 +0000
@@ -184,10 +184,12 @@
 	GList **list = data;
 	*list = g_list_prepend(*list, gtk_tree_path_copy(path));
 }
+
 static void
 pounce_response_dismiss()
 {
 	GtkTreeSelection *selection;
+	GtkTreeIter iter;
 	GList *list = NULL;
 
 	selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(pounce_dialog->treeview));
@@ -203,6 +205,9 @@
 		gtk_tree_path_free(list->data);
 		list = g_list_delete_link(list, list);
 	}
+
+	if (!gtk_tree_model_get_iter_first(GTK_TREE_MODEL(pounce_dialog->treemodel), &iter))
+		pounce_response_close(pounce_dialog);
 }
 
 static void