[folks] Rename Groups interface to Groupable
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Rename Groups interface to Groupable
- Date: Mon, 13 Sep 2010 13:15:40 +0000 (UTC)
commit 74c267a0046f4dd067984def2456f25abc2f9d94
Author: Philip Withnall <philip withnall collabora co uk>
Date: Mon Sep 13 14:10:06 2010 +0100
Rename Groups interface to Groupable
Helps: bgo#627397
backends/key-file/kf-persona-store.vala | 8 +++---
backends/telepathy/lib/tpf-persona-store.vala | 8 +++---
backends/telepathy/lib/tpf-persona.vala | 2 +-
folks/Makefile.am | 2 +-
folks/{groups.vala => groupable.vala} | 2 +-
folks/individual-aggregator.vala | 4 +-
folks/individual.vala | 26 ++++++++++++------------
folks/persona-store.vala | 2 +-
tools/import-pidgin.vala | 4 +-
9 files changed, 29 insertions(+), 29 deletions(-)
---
diff --git a/backends/key-file/kf-persona-store.vala b/backends/key-file/kf-persona-store.vala
index 1b84e99..6077d4b 100644
--- a/backends/key-file/kf-persona-store.vala
+++ b/backends/key-file/kf-persona-store.vala
@@ -170,9 +170,9 @@ public class Folks.Backends.Kf.PersonaStore : Folks.PersonaStore
if (this._personas.size () > 0)
{
- /* FIXME: Groups.ChangeReason is not the right enum to use here */
+ /* FIXME: Groupable.ChangeReason is not the right enum to use here */
this.personas_changed (this._personas.get_values (), null, null, null,
- Groups.ChangeReason.NONE);
+ Groupable.ChangeReason.NONE);
}
}
@@ -251,11 +251,11 @@ public class Folks.Backends.Kf.PersonaStore : Folks.PersonaStore
this._personas.insert (persona.iid, persona);
persona.im_addresses = im_addresses;
- /* FIXME: Groups.ChangeReason is not the right enum to use here */
+ /* FIXME: Groupable.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,
- Groups.ChangeReason.NONE);
+ Groupable.ChangeReason.NONE);
return persona;
}
diff --git a/backends/telepathy/lib/tpf-persona-store.vala b/backends/telepathy/lib/tpf-persona-store.vala
index 41ac34d..e603b7f 100644
--- a/backends/telepathy/lib/tpf-persona-store.vala
+++ b/backends/telepathy/lib/tpf-persona-store.vala
@@ -605,7 +605,7 @@ public class Tpf.PersonaStore : Folks.PersonaStore
if (actor_handle > 0 && valid)
actor = this.handle_persona_map[actor_handle];
- Groups.ChangeReason reason = Groups.ChangeReason.NONE;
+ Groupable.ChangeReason reason = Groupable.ChangeReason.NONE;
uint32 tp_reason = TelepathyGLib.asv_get_uint32 (details, "change-reason",
out valid);
if (valid)
@@ -614,13 +614,13 @@ public class Tpf.PersonaStore : Folks.PersonaStore
this.ignore_by_handle (handle, message, actor, reason);
}
- private Groups.ChangeReason change_reason_from_tp_reason (uint reason)
+ private Groupable.ChangeReason change_reason_from_tp_reason (uint reason)
{
- return (Groups.ChangeReason) reason;
+ return (Groupable.ChangeReason) reason;
}
private void ignore_by_handle (uint handle, string? message, Persona? actor,
- Groups.ChangeReason reason)
+ Groupable.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 c54085c..2e95ef5 100644
--- a/backends/telepathy/lib/tpf-persona.vala
+++ b/backends/telepathy/lib/tpf-persona.vala
@@ -36,7 +36,7 @@ public class Tpf.Persona : Folks.Persona,
Alias,
Avatar,
Favourite,
- Groups,
+ Groupable,
IMable,
Presence
{
diff --git a/folks/Makefile.am b/folks/Makefile.am
index 8066073..35fa24b 100644
--- a/folks/Makefile.am
+++ b/folks/Makefile.am
@@ -17,7 +17,7 @@ folks_valasources = \
backend.vala \
backend-store.vala \
favourite.vala \
- groups.vala \
+ groupable.vala \
imable.vala \
individual.vala \
individual-aggregator.vala \
diff --git a/folks/groups.vala b/folks/groupable.vala
similarity index 99%
rename from folks/groups.vala
rename to folks/groupable.vala
index 617dfe2..ed0add5 100644
--- a/folks/groups.vala
+++ b/folks/groupable.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.Groups : Object
+public interface Folks.Groupable : 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 9bb942b..49c0bc7 100644
--- a/folks/individual-aggregator.vala
+++ b/folks/individual-aggregator.vala
@@ -89,7 +89,7 @@ public class Folks.IndividualAggregator : Object
GLib.List<Individual>? removed,
string? message,
Persona? actor,
- Groups.ChangeReason reason);
+ Groupable.ChangeReason reason);
/* FIXME: make this a singleton? */
/**
@@ -409,7 +409,7 @@ public class Folks.IndividualAggregator : Object
GLib.List<Persona>? removed,
string? message,
Persona? actor,
- Groups.ChangeReason reason)
+ Groupable.ChangeReason reason)
{
GLib.List<Individual> added_individuals = null,
removed_individuals = null;
diff --git a/folks/individual.vala b/folks/individual.vala
index 54f6471..ce50a2f 100644
--- a/folks/individual.vala
+++ b/folks/individual.vala
@@ -67,7 +67,7 @@ public class Folks.Individual : Object,
Alias,
Avatar,
Favourite,
- Groups,
+ Groupable,
Presence
{
private bool _is_favourite;
@@ -228,8 +228,8 @@ public class Folks.Individual : Object,
this._groups = value;
this._persona_list.foreach ((p) =>
{
- if (p is Groups && ((Persona) p).store.is_writeable == true)
- ((Groups) p).groups = value;
+ if (p is Groupable && ((Persona) p).store.is_writeable == true)
+ ((Groupable) p).groups = value;
});
}
}
@@ -296,8 +296,8 @@ public class Folks.Individual : Object,
{
this._persona_list.foreach ((p) =>
{
- if (p is Groups)
- ((Groups) p).change_group.begin (group, is_member);
+ if (p is Groupable)
+ ((Groupable) p).change_group.begin (group, is_member);
});
/* don't notify, since it hasn't happened in the persona backing stores
@@ -363,7 +363,7 @@ public class Folks.Individual : Object,
GLib.List<Persona>? removed,
string? message,
Persona? actor,
- Groups.ChangeReason reason)
+ Groupable.ChangeReason reason)
{
GLib.List<Persona> removed_personas = null;
removed.foreach ((data) =>
@@ -414,9 +414,9 @@ public class Folks.Individual : Object,
* groups channel list) */
this._persona_list.foreach ((p) =>
{
- if (p is Groups)
+ if (p is Groupable)
{
- unowned Groups persona = (Groups) p;
+ unowned Groupable persona = (Groupable) p;
persona.groups.foreach ((k, v) =>
{
@@ -659,7 +659,7 @@ public class Folks.Individual : Object,
*/
public HashTable<string, bool> get_groups ()
{
- Groups g = this;
+ Groupable g = this;
return g.groups;
}
@@ -719,9 +719,9 @@ public class Folks.Individual : Object,
persona.notify["presence-type"].connect (this.notify_presence_cb);
persona.notify["is-favourite"].connect (this.notify_is_favourite_cb);
- if (persona is Groups)
+ if (persona is Groupable)
{
- ((Groups) persona).group_changed.connect (
+ ((Groupable) persona).group_changed.connect (
this.persona_group_changed_cb);
}
}
@@ -736,9 +736,9 @@ public class Folks.Individual : Object,
persona.notify["is-favourite"].disconnect (
this.notify_is_favourite_cb);
- if (persona is Groups)
+ if (persona is Groupable)
{
- ((Groups) persona).group_changed.disconnect (
+ ((Groupable) persona).group_changed.disconnect (
this.persona_group_changed_cb);
}
}
diff --git a/folks/persona-store.vala b/folks/persona-store.vala
index e299402..738bb9c 100644
--- a/folks/persona-store.vala
+++ b/folks/persona-store.vala
@@ -107,7 +107,7 @@ public abstract class Folks.PersonaStore : Object
GLib.List<Persona>? removed,
string? message,
Persona? actor,
- Groups.ChangeReason reason);
+ Groupable.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 48a6170..f224bcd 100644
--- a/tools/import-pidgin.vala
+++ b/tools/import-pidgin.vala
@@ -136,12 +136,12 @@ 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 Groups))
+ if (persona == null || !(persona is Groupable))
continue;
try
{
- Groups groupable = (Groups) persona;
+ Groupable groupable = (Groupable) persona;
yield groupable.change_group (group_name, true);
}
catch (GLib.Error e)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]