[folks/folks-0-4] folks-inspect: use LinkedHashSet to access im-addresses



commit 10eecd3623d2e33333751081e7bf1ce87a4b22fd
Author: Raul Gutierrez Segales <raul gutierrez segales collabora co uk>
Date:   Mon Mar 21 18:03:58 2011 +0000

    folks-inspect: use LinkedHashSet to access im-addresses

 NEWS                     |    1 +
 tools/inspect/utils.vala |   11 ++++++-----
 2 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/NEWS b/NEWS
index ebc8cba..30063de 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ Overview of changes from libfolks 0.4.0 to libfolks 0.4.1
 =========================================================
 
 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
diff --git a/tools/inspect/utils.vala b/tools/inspect/utils.vala
index e62975c..bc73d70 100644
--- a/tools/inspect/utils.vala
+++ b/tools/inspect/utils.vala
@@ -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 += " }";
             });



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