summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2011-04-19 20:29:12 +0100
committerPhilip Withnall <philip.withnall@collabora.co.uk>2011-04-23 21:59:50 +0100
commit754541d94a53004aa38dfb163f49f9e258930ca5 (patch)
treec7f4bc82b2bbcef42a111931f99dd7ad4bc5a7cf /tools
parentbeef9692895520e335770e0035bbec85240a61b1 (diff)
Change GroupDetails.groups to be a Set<string>
Helps: bgo#640092
Diffstat (limited to 'tools')
-rw-r--r--tools/inspect/utils.vala19
1 files changed, 7 insertions, 12 deletions
diff --git a/tools/inspect/utils.vala b/tools/inspect/utils.vala
index a544f71..37351e4 100644
--- a/tools/inspect/utils.vala
+++ b/tools/inspect/utils.vala
@@ -236,22 +236,17 @@ private class Folks.Inspect.Utils
}
else if (prop_name == "groups")
{
- HashTable<string, bool> groups =
- (HashTable<string, bool>) prop_value.get_boxed ();
+ Set<string> groups = (Set<string>) prop_value.get_object ();
output_string = "{ ";
bool first = true;
- /* FIXME: This is rather inefficient */
- groups.foreach ((k, v) =>
+ foreach (var group in groups)
{
- if ((bool) v == true)
- {
- if (first == false)
- output_string += ", ";
- output_string += "'%s'".printf ((string) k);
- first = false;
- }
- });
+ if (first == false)
+ output_string += ", ";
+ output_string += "'%s'".printf (group);
+ first = false;
+ }
output_string += " }";
return output_string;