diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2011-04-20 01:31:54 +0100 |
---|---|---|
committer | Philip Withnall <philip.withnall@collabora.co.uk> | 2011-04-23 22:00:38 +0100 |
commit | 37a01ab4fdc9e0ac85b850824212a1ed44e8d27e (patch) | |
tree | aba00187241312ec6ba4c73d42c9bd4d6e373b81 /tools | |
parent | 03bfb40e46b9c804700c57e0a6a6faf6aa503cda (diff) |
Change PersonaStore.personas to be a Map<string, Persona>
This helps in our quest to get rid of HashTable.
Helps: bgo#640092
Diffstat (limited to 'tools')
-rw-r--r-- | tools/inspect/utils.vala | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/inspect/utils.vala b/tools/inspect/utils.vala index e5928fc..0b36547 100644 --- a/tools/inspect/utils.vala +++ b/tools/inspect/utils.vala @@ -174,7 +174,7 @@ private class Folks.Inspect.Utils bool show_personas) { Utils.print_line ("Persona store '%s' with %u personas:", - store.id, store.personas.size ()); + store.id, store.personas.size); /* List the store's properties */ unowned ParamSpec[] properties = @@ -205,10 +205,10 @@ private class Folks.Inspect.Utils Utils.print_line ("Personas:"); Utils.indent (); - store.personas.foreach ((k, v) => + foreach (var persona in store.personas.values) { - Utils.print_persona ((Persona) v); - }); + Utils.print_persona (persona); + } Utils.unindent (); } Utils.unindent (); @@ -229,9 +229,9 @@ private class Folks.Inspect.Utils else if (object_type.is_a (typeof (PersonaStore)) && prop_name == "personas") { - unowned HashTable<string, Persona> personas = - (HashTable<string, Persona>) prop_value.get_boxed (); - return "Set of %u personas".printf (personas.size ()); + Map<string, Persona> personas = + (Map<string, Persona>) prop_value.get_object (); + return "Set of %u personas".printf (personas.size); } else if (prop_name == "groups") { |