~ubuntu-branches/ubuntu/saucy/geary/saucy-updates

« back to all changes in this revision

Viewing changes to src/client/sidebar/sidebar-branch.vala

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2013-10-10 17:40:37 UTC
  • mfrom: (1.1.8)
  • Revision ID: package-import@ubuntu.com-20131010174037-5p5o4dlsoewek2kg
Tags: 0.4.0-0ubuntu1
New stable version

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
            child.parent = this;
66
66
 
67
67
            if (children == null)
68
 
                children = new Geary.Collection.FixedTreeSet<Node>(comparator_wrapper);
 
68
                children = new Gee.TreeSet<Node>(comparator_wrapper);
69
69
            
70
70
            bool added = children.add(child);
71
71
            assert(added);
74
74
        public void remove_child(Node child) {
75
75
            assert(children != null);
76
76
            
77
 
            Gee.SortedSet<Node> new_children = new Geary.Collection.FixedTreeSet<Node>(comparator_wrapper);
 
77
            Gee.SortedSet<Node> new_children = new Gee.TreeSet<Node>(comparator_wrapper);
78
78
            
79
79
            // For similar reasons as in reorder_child(), can't rely on TreeSet to locate this
80
80
            // node because we need reference equality.
143
143
            // called or the set is manually iterated over and removed via the Iterator -- a
144
144
            // tree search is performed and the child will not be found.  Only easy solution is
145
145
            // to rebuild a new SortedSet and see if the child has moved.
146
 
            Gee.SortedSet<Node> new_children = new Geary.Collection.FixedTreeSet<Node>(comparator_wrapper);
 
146
            Gee.SortedSet<Node> new_children = new Gee.TreeSet<Node>(comparator_wrapper);
147
147
            bool added = new_children.add_all(children);
148
148
            assert(added);
149
149
            
159
159
            if (children == null)
160
160
                return;
161
161
            
162
 
            Gee.SortedSet<Node> reordered = new Geary.Collection.FixedTreeSet<Node>(comparator_wrapper);
 
162
            Gee.SortedSet<Node> reordered = new Gee.TreeSet<Node>(comparator_wrapper);
163
163
            reordered.add_all(children);
164
164
            children = reordered;
165
165