[folks] Add to_string () method to RoleOwner



commit e821ccd5a700e9391967e3a3d7cc8b56789a8e6d
Author: Raul Gutierrez Segales <raul gutierrez segales collabora co uk>
Date:   Sat Mar 5 15:03:23 2011 +0000

    Add to_string () method to RoleOwner

 NEWS                  |    2 ++
 folks/role-owner.vala |   11 +++++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/NEWS b/NEWS
index 4b87a41..660e2a9 100644
--- 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
 =========================================================
diff --git a/folks/role-owner.vala b/folks/role-owner.vala
index f58b07c..5e9e9c1 100644
--- a/folks/role-owner.vala
+++ b/folks/role-owner.vala
@@ -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);
+    }
 }
 
 /**



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]