Add to_string () method to RoleOwner
authorRaul Gutierrez Segales <raul.gutierrez.segales@collabora.co.uk>
Sat, 5 Mar 2011 15:03:23 +0000 (15:03 +0000)
committerTravis Reitter <travis.reitter@collabora.co.uk>
Wed, 9 Mar 2011 19:16:43 +0000 (11:16 -0800)
NEWS
folks/role-owner.vala

diff --git a/NEWS b/NEWS
index 4b87a41..660e2a9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,7 @@ Bugs fixed:
 * 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
+* Bug 643955 — Add to_string () to RoleOwner class
 
 API changes:
 * Add RoleOwner interface
@@ -25,6 +26,7 @@ API changes:
 * Add PostalAddressOwner.uid as a convenience for backends
 * Add PostalAddress.equal()
 * Add PostalAddress.to_string()
+* Add RoleOwner.to_string()
 
 Overview of changes from libfolks 0.3.5 to libfolks 0.3.6
 =========================================================
index f58b07c..5e9e9c1 100644 (file)
@@ -93,6 +93,17 @@ public class Folks.Role : Object
     {
       return r.organisation_name.hash () + r.title.hash ();
     }
+
+  /**
+   * Formatted version of this role.
+   *
+   * @since 0.3.UNRELEASED
+   */
+  public string to_string ()
+    {
+      var str = _("Title: %s , Organisation: %s");
+      return str.printf (this.title, this.organisation_name);
+    }
 }
 
 /**