summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRaul Gutierrez Segales <raul.gutierrez.segales@collabora.co.uk>2011-03-05 15:06:55 +0000
committerTravis Reitter <travis.reitter@collabora.co.uk>2011-03-11 14:28:37 -0800
commit8d7081012d1f8661ef3f729eb4a2c93772958b36 (patch)
treeee22e3939124ff518078572c191f1f6c87f83696 /tools
parent47c2dec59010201759dd0a4e845e6618b697be9e (diff)
folks-inspect: handle birthday/postal-addresses
Fixes: bgo#643957 - Deal handle birthday and postal-addresses.
Diffstat (limited to 'tools')
-rw-r--r--tools/inspect/utils.vala28
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/inspect/utils.vala b/tools/inspect/utils.vala
index dc0788e..f974851 100644
--- a/tools/inspect/utils.vala
+++ b/tools/inspect/utils.vala
@@ -313,6 +313,34 @@ private class Folks.Inspect.Utils
return output_string;
}
+ else if (prop_name == "birthday")
+ {
+ unowned DateTime dobj = (DateTime) prop_value.get_boxed ();
+ if (dobj != null)
+ return dobj.to_string ();
+ else
+ return "";
+ }
+ else if (prop_name == "postal-addresses")
+ {
+ output_string = "{ ";
+ bool first = true;
+ unowned GLib.List<PostalAddress> prop_list =
+ (GLib.List<PostalAddress>) prop_value.get_pointer ();
+
+ foreach (var p in prop_list)
+ {
+ if (!first)
+ {
+ output_string += ". ";
+ }
+ output_string += p.to_string ();
+ first = false;
+ }
+ output_string += " }";
+
+ return output_string;
+ }
return Utils.transform_value_to_string (prop_value);
}