[folks] Rename Groupable -> GroupDetails



commit b2a60c1f8bc8d032ce99a4bd1e7ec53106da9c63
Author: Travis Reitter <travis reitter collabora co uk>
Date:   Thu Mar 10 15:11:27 2011 -0800

    Rename Groupable -> GroupDetails
    
    Helps bgo#642513 - Folks "Owner" interfaces are awkwardly-named

 NEWS                                          |    1 +
 backends/key-file/kf-persona-store.vala       |   10 +++++-----
 backends/telepathy/lib/tpf-persona-store.vala |    8 ++++----
 backends/telepathy/lib/tpf-persona.vala       |    6 +++---
 folks/Makefile.am                             |    2 +-
 folks/{groupable.vala => group-details.vala}  |    2 +-
 folks/individual-aggregator.vala              |    4 ++--
 folks/individual.vala                         |   24 ++++++++++++------------
 folks/persona-store.vala                      |    2 +-
 tools/import-pidgin.vala                      |    6 +++---
 10 files changed, 33 insertions(+), 32 deletions(-)
---
diff --git a/NEWS b/NEWS
index 11dc30a..3eea67a 100644
--- a/NEWS
+++ b/NEWS
@@ -32,6 +32,7 @@ API changes:
 * Rename Emailable -> EmailDetails
 * Rename Favouritable -> FavouriteDetails
 * Rename GenderOwner -> GenderDetails
+* Rename Groupable -> GroupDetails
 
 Overview of changes from libfolks 0.3.5 to libfolks 0.3.6
 =========================================================
diff --git a/backends/key-file/kf-persona-store.vala b/backends/key-file/kf-persona-store.vala
index 11aa5c4..2bfc919 100644
--- a/backends/key-file/kf-persona-store.vala
+++ b/backends/key-file/kf-persona-store.vala
@@ -238,10 +238,10 @@ public class Folks.Backends.Kf.PersonaStore : Folks.PersonaStore
 
               if (this._personas.size () > 0)
                 {
-                  /* FIXME: Groupable.ChangeReason is not the right enum to use
-                   * here */
+                  /* FIXME: GroupDetails.ChangeReason is not the right enum to
+                   * use here */
                   this.personas_changed (this._personas.get_values (), null,
-                      null, null, Groupable.ChangeReason.NONE);
+                      null, null, GroupDetails.ChangeReason.NONE);
                 }
 
               this._is_prepared = true;
@@ -327,11 +327,11 @@ public class Folks.Backends.Kf.PersonaStore : Folks.PersonaStore
       this._personas.insert (persona.iid, persona);
       persona.im_addresses = im_addresses;
 
-      /* FIXME: Groupable.ChangeReason is not the right enum to use here */
+      /* FIXME: GroupDetails.ChangeReason is not the right enum to use here */
       GLib.List<Persona> personas = new GLib.List<Persona> ();
       personas.prepend (persona);
       this.personas_changed (personas, null, null, null,
-          Groupable.ChangeReason.NONE);
+          GroupDetails.ChangeReason.NONE);
 
       return persona;
     }
diff --git a/backends/telepathy/lib/tpf-persona-store.vala b/backends/telepathy/lib/tpf-persona-store.vala
index c7f7f52..1049bb1 100644
--- a/backends/telepathy/lib/tpf-persona-store.vala
+++ b/backends/telepathy/lib/tpf-persona-store.vala
@@ -905,7 +905,7 @@ public class Tpf.PersonaStore : Folks.PersonaStore
       if (actor_handle > 0 && valid)
         actor = this._handle_persona_map[actor_handle];
 
-      Groupable.ChangeReason reason = Groupable.ChangeReason.NONE;
+      GroupDetails.ChangeReason reason = GroupDetails.ChangeReason.NONE;
       var tp_reason = TelepathyGLib.asv_get_uint32 (details, "change-reason",
           out valid);
       if (valid)
@@ -914,14 +914,14 @@ public class Tpf.PersonaStore : Folks.PersonaStore
       this._ignore_by_handle (handle, message, actor, reason);
     }
 
-  private static Groupable.ChangeReason _change_reason_from_tp_reason (
+  private static GroupDetails.ChangeReason _change_reason_from_tp_reason (
       uint reason)
     {
-      return (Groupable.ChangeReason) reason;
+      return (GroupDetails.ChangeReason) reason;
     }
 
   private void _ignore_by_handle (uint handle, string? message, Persona? actor,
-      Groupable.ChangeReason reason)
+      GroupDetails.ChangeReason reason)
     {
       var persona = this._handle_persona_map[handle];
 
diff --git a/backends/telepathy/lib/tpf-persona.vala b/backends/telepathy/lib/tpf-persona.vala
index 5b38ecc..a419747 100644
--- a/backends/telepathy/lib/tpf-persona.vala
+++ b/backends/telepathy/lib/tpf-persona.vala
@@ -31,7 +31,7 @@ public class Tpf.Persona : Folks.Persona,
     AliasDetails,
     AvatarDetails,
     FavouriteDetails,
-    Groupable,
+    GroupDetails,
     PresenceOwner,
     IMable
 {
@@ -144,7 +144,7 @@ public class Tpf.Persona : Folks.Persona,
   /**
    * A mapping of group ID to whether the contact is a member.
    *
-   * See { link Folks.Groupable.groups}.
+   * See { link Folks.GroupDetails.groups}.
    */
   public HashTable<string, bool> groups
     {
@@ -176,7 +176,7 @@ public class Tpf.Persona : Folks.Persona,
   /**
    * Add or remove the Persona from the specified group.
    *
-   * See { link Folks.Groupable.change_group}.
+   * See { link Folks.GroupDetails.change_group}.
    */
   public async void change_group (string group, bool is_member)
     {
diff --git a/folks/Makefile.am b/folks/Makefile.am
index 4b72661..9576aa4 100644
--- a/folks/Makefile.am
+++ b/folks/Makefile.am
@@ -21,7 +21,7 @@ libfolks_la_SOURCES = \
 	favourite-details.vala \
 	field-details.vala \
 	gender-details.vala \
-	groupable.vala \
+	group-details.vala \
 	presence-owner.vala \
 	imable.vala \
 	individual.vala \
diff --git a/folks/groupable.vala b/folks/group-details.vala
similarity index 99%
rename from folks/groupable.vala
rename to folks/group-details.vala
index ae1e115..8244dc4 100644
--- a/folks/groupable.vala
+++ b/folks/group-details.vala
@@ -24,7 +24,7 @@ using GLib;
  * Interface for { link Persona}s or { link Individual}s which can be grouped
  * into sets of similar objects.
  */
-public interface Folks.Groupable : Object
+public interface Folks.GroupDetails : Object
 {
   /**
    * The reason a group member has changed its membership in the group.
diff --git a/folks/individual-aggregator.vala b/folks/individual-aggregator.vala
index f3006d9..55d9e9e 100644
--- a/folks/individual-aggregator.vala
+++ b/folks/individual-aggregator.vala
@@ -115,7 +115,7 @@ public class Folks.IndividualAggregator : Object
       GLib.List<Individual>? removed,
       string? message,
       Persona? actor,
-      Groupable.ChangeReason reason);
+      GroupDetails.ChangeReason reason);
 
   /* FIXME: make this a singleton? */
   /**
@@ -529,7 +529,7 @@ public class Folks.IndividualAggregator : Object
       GLib.List<Persona>? removed,
       string? message,
       Persona? actor,
-      Groupable.ChangeReason reason)
+      GroupDetails.ChangeReason reason)
     {
       var added_individuals = new GLib.List<Individual> ();
       GLib.List<Individual> removed_individuals = null;
diff --git a/folks/individual.vala b/folks/individual.vala
index af02fcd..3f3bd4a 100644
--- a/folks/individual.vala
+++ b/folks/individual.vala
@@ -69,7 +69,7 @@ public class Folks.Individual : Object,
     EmailDetails,
     FavouriteDetails,
     GenderDetails,
-    Groupable,
+    GroupDetails,
     IMable,
     NameOwner,
     NoteOwner,
@@ -394,8 +394,8 @@ public class Folks.Individual : Object,
           this._groups = value;
           this._persona_list.foreach ((p) =>
             {
-              if (p is Groupable && ((Persona) p).store.is_writeable == true)
-                ((Groupable) p).groups = value;
+              if (p is GroupDetails && ((Persona) p).store.is_writeable == true)
+                ((GroupDetails) p).groups = value;
             });
         }
     }
@@ -526,8 +526,8 @@ public class Folks.Individual : Object,
     {
       this._persona_list.foreach ((p) =>
         {
-          if (p is Groupable)
-            ((Groupable) p).change_group.begin (group, is_member);
+          if (p is GroupDetails)
+            ((GroupDetails) p).change_group.begin (group, is_member);
         });
 
       /* don't notify, since it hasn't happened in the persona backing stores
@@ -603,7 +603,7 @@ public class Folks.Individual : Object,
       GLib.List<Persona>? removed,
       string? message,
       Persona? actor,
-      Groupable.ChangeReason reason)
+      GroupDetails.ChangeReason reason)
     {
       GLib.List<Persona> removed_personas = null;
       removed.foreach ((data) =>
@@ -666,9 +666,9 @@ public class Folks.Individual : Object,
        * groups channel list) */
       this._persona_list.foreach ((p) =>
         {
-          if (p is Groupable)
+          if (p is GroupDetails)
             {
-              var persona = (Groupable) p;
+              var persona = (GroupDetails) p;
 
               persona.groups.foreach ((k, v) =>
                 {
@@ -936,9 +936,9 @@ public class Folks.Individual : Object,
       persona.notify["postal-addresses"].connect
           (this._notify_postal_addresses_cb);
 
-      if (persona is Groupable)
+      if (persona is GroupDetails)
         {
-          ((Groupable) persona).group_changed.connect (
+          ((GroupDetails) persona).group_changed.connect (
               this._persona_group_changed_cb);
         }
     }
@@ -1031,9 +1031,9 @@ public class Folks.Individual : Object,
           (this._notify_postal_addresses_cb);
 
 
-      if (persona is Groupable)
+      if (persona is GroupDetails)
         {
-          ((Groupable) persona).group_changed.disconnect (
+          ((GroupDetails) persona).group_changed.disconnect (
               this._persona_group_changed_cb);
         }
     }
diff --git a/folks/persona-store.vala b/folks/persona-store.vala
index 71b7e3d..c2b1add 100644
--- a/folks/persona-store.vala
+++ b/folks/persona-store.vala
@@ -128,7 +128,7 @@ public abstract class Folks.PersonaStore : Object
       GLib.List<Persona>? removed,
       string? message,
       Persona? actor,
-      Groupable.ChangeReason reason);
+      GroupDetails.ChangeReason reason);
 
   /**
    * Emitted when the backing store for this PersonaStore has been removed.
diff --git a/tools/import-pidgin.vala b/tools/import-pidgin.vala
index 5387f4b..01ed9ae 100644
--- a/tools/import-pidgin.vala
+++ b/tools/import-pidgin.vala
@@ -145,13 +145,13 @@ public class Folks.Importers.Pidgin : Folks.Importer
 
           /* Skip the persona if creating them failed or if they don't support
            * groups. */
-          if (persona == null || !(persona is Groupable))
+          if (persona == null || !(persona is GroupDetails))
             continue;
 
           try
             {
-              Groupable groupable = (Groupable) persona;
-              yield groupable.change_group (group_name, true);
+              GroupDetails group_details = (GroupDetails) persona;
+              yield group_details.change_group (group_name, true);
             }
           catch (GLib.Error e)
             {



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