folks-inspect: use LinkedHashSet to access im-addresses
authorRaul Gutierrez Segales <raul.gutierrez.segales@collabora.co.uk>
Mon, 21 Mar 2011 18:03:58 +0000 (18:03 +0000)
committerRaul Gutierrez Segales <raul.gutierrez.segales@collabora.co.uk>
Mon, 21 Mar 2011 18:20:03 +0000 (18:20 +0000)
NEWS
tools/inspect/utils.vala

diff --git a/NEWS b/NEWS
index 77b4e6a..8c7c00a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ Overview of changes from libfolks 0.4.0 to libfolks 0.5.0
 =========================================================
 
 Bugs fixed:
+* Bug 645430 - folks-inspect: Use LinkedHashSet to access im-addresses
 * Bug 644968 - _update_phone_numbers() needs to create copies
   of each List<FieldDetails>
 * Bug 644966 - _update_emails () needs to create copies of each
index e62975c..bc73d70 100644 (file)
@@ -266,8 +266,9 @@ private class Folks.Inspect.Utils
         }
       else if (prop_name == "im-addresses")
         {
-          HashTable<string, GenericArray<string>> im_addresses =
-              (HashTable<string, GenericArray<string>>) prop_value.get_boxed ();
+          HashTable<string, LinkedHashSet<string>> im_addresses =
+              (HashTable<string, LinkedHashSet<string>>)
+              prop_value.get_boxed ();
           output_string = "{ ";
           bool first = true;
 
@@ -279,15 +280,15 @@ private class Folks.Inspect.Utils
               output_string += "'%s' : { ".printf ((string) k);
               first = false;
 
-              GenericArray<string> addresses = (GenericArray<string>) v;
+              LinkedHashSet<string> addresses = (LinkedHashSet<string>) v;
               bool _first = true;
-              addresses.foreach ((a) =>
+              foreach (var a in addresses)
                 {
                   if (_first == false)
                     output_string += ", ";
                   output_string += "'%s'".printf ((string) a);
                   _first = false;
-                });
+                }
 
               output_string += " }";
             });