[gnome-contacts/wip/sorted: 3/8] Fix up separator handling when things move



commit e8d9f74a1f1ad40744b017cb50277e454745b611
Author: Alexander Larsson <alexl redhat com>
Date:   Sat Feb 18 09:58:23 2012 +0100

    Fix up separator handling when things move

 src/contacts-sorted.vala |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/contacts-sorted.vala b/src/contacts-sorted.vala
index 3633c59..6f0e741 100644
--- a/src/contacts-sorted.vala
+++ b/src/contacts-sorted.vala
@@ -25,6 +25,7 @@ using Gee;
    + first char or type custom "separators"
      (create, destroy, update)
    + Work with largish sets of children
+   + selection and keynave
 
    filter => child visibility setting
 
@@ -207,8 +208,10 @@ public class Contacts.Sorted : Container {
 
     apply_filter (widget);
 
+    var prev_next = iter.next ();
     update_separator (iter, null, true);
     update_separator (iter.next (), iter, true);
+    update_separator (prev_next, null, true);
 
     info.iter = iter;
 
@@ -220,12 +223,17 @@ public class Contacts.Sorted : Container {
     if (info == null)
       return;
 
+    var prev_next = info.iter.next ();
+
     if (sort_func != null) {
       children.sort_changed (info.iter, do_sort);
       this.queue_resize ();
     }
     apply_filter (info.widget);
     update_separator (info.iter, null, true);
+    update_separator (info.iter.next (), info.iter, true);
+    update_separator (prev_next, null, true);
+
   }
 
   public override void remove (Widget widget) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]