gossip r2758 - in trunk: . src
- From: mr svn gnome org
- To: svn-commits-list gnome org
- Subject: gossip r2758 - in trunk: . src
- Date: Tue, 4 Mar 2008 08:45:28 +0000 (GMT)
Author: mr
Date: Tue Mar 4 08:45:28 2008
New Revision: 2758
URL: http://svn.gnome.org/viewvc/gossip?rev=2758&view=rev
Log:
Fixed empty groups still being shown with no contacts visible in them
Modified:
trunk/ChangeLog
trunk/src/gossip-contact-list.c
Modified: trunk/src/gossip-contact-list.c
==============================================================================
--- trunk/src/gossip-contact-list.c (original)
+++ trunk/src/gossip-contact-list.c Tue Mar 4 08:45:28 2008
@@ -1588,17 +1588,32 @@
model = GTK_TREE_MODEL (priv->store);
for (l = iters; l; l = l->next) {
- GtkTreeIter parent;
+ GtkTreeIter parent_iter;
/* NOTE: it is only <= 2 here because we have
* separators after the group name, otherwise it
* should be 1.
*/
- if (gtk_tree_model_iter_parent (model, &parent, l->data) &&
- gtk_tree_model_iter_n_children (model, &parent) <= 2) {
- gtk_tree_store_remove (priv->store, &parent);
+ if (gtk_tree_model_iter_parent (model, &parent_iter, l->data) &&
+ gtk_tree_model_iter_n_children (model, &parent_iter) <= 2) {
+ gtk_tree_store_remove (priv->store, &parent_iter);
} else {
+ GtkTreePath *parent_path = NULL;
+
gtk_tree_store_remove (priv->store, l->data);
+
+ /* To make sure the parent is hidden
+ * correctly if we now have no more
+ * online contacts, we emit the
+ * row-changed signal on the parent so
+ * it prompts it to be refreshed by
+ * the filter func.
+ */
+ parent_path = gtk_tree_model_get_path (model, &parent_iter);
+ if (parent_path) {
+ gtk_tree_model_row_changed (model, parent_path, &parent_iter);
+ gtk_tree_path_free (parent_path);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]