[folks] folks-inspect: handle birthday/postal-addresses
- From: Travis Reitter <treitter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] folks-inspect: handle birthday/postal-addresses
- Date: Fri, 11 Mar 2011 22:31:49 +0000 (UTC)
commit 8d7081012d1f8661ef3f729eb4a2c93772958b36
Author: Raul Gutierrez Segales <raul gutierrez segales collabora co uk>
Date: Sat Mar 5 15:06:55 2011 +0000
folks-inspect: handle birthday/postal-addresses
Fixes: bgo#643957 - Deal handle birthday and postal-addresses.
NEWS | 1 +
tools/inspect/utils.vala | 28 ++++++++++++++++++++++++++++
2 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/NEWS b/NEWS
index 18ee31c..55a0acd 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,7 @@ Bugs fixed:
* Bug 643956 â?? Use the correct signal name for postal addresses
* Bug 643954 â?? Add to_string () to PostalAddress class
* Bug 643955 â?? Add to_string () to RoleOwner class
+* Bug 643957 â?? Deal handle birthday and postal-addresses.
API changes:
* Add RoleDetails interface
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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]