[folks] folks-inspect: print "web-service-addresses" property correctly
- From: Alban Crequy <albanc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] folks-inspect: print "web-service-addresses" property correctly
- Date: Fri, 8 Apr 2011 14:20:07 +0000 (UTC)
commit db68c9757ef05fb17fa14769733e591c86efe431
Author: Alban Crequy <alban crequy collabora co uk>
Date: Fri Apr 8 14:25:45 2011 +0100
folks-inspect: print "web-service-addresses" property correctly
https://bugzilla.gnome.org/show_bug.cgi?id=647168
NEWS | 1 +
tools/inspect/utils.vala | 33 +++++++++++++++++++++++++++++++++
2 files changed, 34 insertions(+), 0 deletions(-)
---
diff --git a/NEWS b/NEWS
index aabe896..d01dd7f 100644
--- a/NEWS
+++ b/NEWS
@@ -26,6 +26,7 @@ Bugs fixed:
* Deal with duplicated phones/e-mails in Tracker
* Bug 646944 â?? Fix libsocialweb updates and removals of contacts
* Bug 644867 â?? add interface for linkable web service contact UIDs
+* Bug 647168 â?? print the "web-service-addresses" property correctly
API changes:
* Add equal () to StructuredName
diff --git a/tools/inspect/utils.vala b/tools/inspect/utils.vala
index bc73d70..ca54553 100644
--- a/tools/inspect/utils.vala
+++ b/tools/inspect/utils.vala
@@ -296,6 +296,39 @@ private class Folks.Inspect.Utils
output_string += " }";
return output_string;
}
+ else if (prop_name == Folks.PersonaStore.detail_key
+ (PersonaDetail.WEB_SERVICE_ADDRESSES))
+ {
+ HashMap<string, LinkedHashSet<string>> web_service_addresses =
+ (HashMap<string, LinkedHashSet<string>>)
+ prop_value.get_object ();
+ output_string = "{ ";
+ bool first = true;
+
+ foreach (var entry in web_service_addresses.entries)
+ {
+ if (first == false)
+ output_string += ", ";
+ output_string += "'%s' : { ".printf ((string) entry.key);
+ first = false;
+
+ LinkedHashSet<string> addresses =
+ (LinkedHashSet<string>) entry.value;
+ bool _first = true;
+ foreach (var a in addresses)
+ {
+ if (_first == false)
+ output_string += ", ";
+ output_string += "'%s'".printf ((string) a);
+ _first = false;
+ }
+
+ output_string += " }";
+ }
+
+ output_string += " }";
+ return output_string;
+ }
else if (prop_name == "email-addresses" ||
prop_name == "urls" ||
prop_name == "phone-numbers")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]