[gnome-contacts/wip/sorted] Don't use Gee in Sorted



commit aa084b01117d1fa3e4575f61f00aed03e79fe4c9
Author: Alexander Larsson <alexl redhat com>
Date:   Tue May 15 11:26:09 2012 +0200

    Don't use Gee in Sorted

 src/contacts-sorted.vala |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/contacts-sorted.vala b/src/contacts-sorted.vala
index 49f097c..c786820 100644
--- a/src/contacts-sorted.vala
+++ b/src/contacts-sorted.vala
@@ -17,7 +17,6 @@
  */
 
 using Gtk;
-using Gee;
 
 /* Requriements:
    + sort
@@ -58,7 +57,7 @@ public class Contacts.Sorted : Container {
   }
 
   Sequence<ChildInfo?> children;
-  HashMap<unowned Widget, unowned ChildInfo?> child_hash;
+  HashTable<unowned Widget, unowned ChildInfo?> child_hash;
   CompareDataFunc<Widget>? sort_func;
   FilterFunc? filter_func;
   UpdateSeparatorFunc? update_separator_func;
@@ -79,7 +78,7 @@ public class Contacts.Sorted : Container {
     selection_mode = SelectionMode.SINGLE;
 
     children = new Sequence<ChildInfo?>();
-    child_hash = new HashMap<unowned Widget, unowned ChildInfo?> ();
+    child_hash = new HashTable<unowned Widget, unowned ChildInfo?> (GLib.direct_hash, GLib.direct_equal);
   }
 
   [Signal (action=true)]
@@ -756,7 +755,7 @@ public class Contacts.Sorted : Container {
     bool was_visible = widget.get_visible ();
     widget.unparent ();
 
-    child_hash.unset (widget);
+    child_hash.remove (widget);
     children.remove (info.iter);
 
     update_separator (next);



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