[folks] Add to_string () method to PostalAddress
- From: Travis Reitter <treitter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Add to_string () method to PostalAddress
- Date: Wed, 9 Mar 2011 19:30:30 +0000 (UTC)
commit 8a519d5a49a4e0cba5e33285cabb6510945c579b
Author: Raul Gutierrez Segales <raul gutierrez segales collabora co uk>
Date: Sat Mar 5 15:02:59 2011 +0000
Add to_string () method to PostalAddress
NEWS | 2 ++
folks/postal-address-owner.vala | 12 ++++++++++++
2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/NEWS b/NEWS
index 20ef1e6..4b87a41 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,7 @@ Bugs fixed:
* Bug 642501 â?? Folks needs API for attaching notes to a Contact
* Bug 641210 â?? Add interface for postal addresses
* Bug 643956 â?? Use the correct signal name for postal addresses
+* Bug 643954 â?? Add to_string () to PostalAddress class
API changes:
* Add RoleOwner interface
@@ -23,6 +24,7 @@ API changes:
* Add PostalAddressOwner interface
* Add PostalAddressOwner.uid as a convenience for backends
* Add PostalAddress.equal()
+* Add PostalAddress.to_string()
Overview of changes from libfolks 0.3.5 to libfolks 0.3.6
=========================================================
diff --git a/folks/postal-address-owner.vala b/folks/postal-address-owner.vala
index b487a85..fc73134 100644
--- a/folks/postal-address-owner.vala
+++ b/folks/postal-address-owner.vala
@@ -207,6 +207,18 @@ public class Folks.PostalAddress : Object
return true;
}
+
+ /*
+ * Returns a formatted address.
+ *
+ * @since 0.3.UNRELEASED
+ */
+ public string to_string ()
+ {
+ var str = _("%s, %s, %s, %s, %s, %s, %s");
+ return str.printf (this.po_box, this.extension, this.street,
+ this.locality, this.region, this.postal_code, this.country);
+ }
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]