aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-individual-manager.c
diff options
context:
space:
mode:
authorTravis Reitter <treitter@gmail.com>2010-07-13 08:12:14 +0800
committerTravis Reitter <treitter@gmail.com>2010-07-21 07:12:37 +0800
commite135f5a5112058e61bb20357f34f69e63a4cc942 (patch)
tree04ec078f51efa7985d8f5e5931af3f38e9691d53 /libempathy/empathy-individual-manager.c
parentfaa4b2c9106b84c7c083c9ef2763dbd0e6892998 (diff)
downloadgsoc2013-empathy-e135f5a5112058e61bb20357f34f69e63a4cc942.tar
gsoc2013-empathy-e135f5a5112058e61bb20357f34f69e63a4cc942.tar.gz
gsoc2013-empathy-e135f5a5112058e61bb20357f34f69e63a4cc942.tar.bz2
gsoc2013-empathy-e135f5a5112058e61bb20357f34f69e63a4cc942.tar.lz
gsoc2013-empathy-e135f5a5112058e61bb20357f34f69e63a4cc942.tar.xz
gsoc2013-empathy-e135f5a5112058e61bb20357f34f69e63a4cc942.tar.zst
gsoc2013-empathy-e135f5a5112058e61bb20357f34f69e63a4cc942.zip
Update to the FolksIndividualAggregator:individuals-changed signal.
Diffstat (limited to 'libempathy/empathy-individual-manager.c')
-rw-r--r--libempathy/empathy-individual-manager.c37
1 files changed, 14 insertions, 23 deletions
diff --git a/libempathy/empathy-individual-manager.c b/libempathy/empathy-individual-manager.c
index 9f260cb27..58a020bb6 100644
--- a/libempathy/empathy-individual-manager.c
+++ b/libempathy/empathy-individual-manager.c
@@ -92,13 +92,17 @@ individual_notify_is_favourite_cb (FolksIndividual *individual,
}
static void
-aggregator_individuals_added_cb (FolksIndividualAggregator *aggregator,
- GList *individuals,
+aggregator_individuals_changed_cb (FolksIndividualAggregator *aggregator,
+ GList *added,
+ GList *removed,
+ const char *message,
+ FolksPersona *actor,
+ guint reason,
EmpathyIndividualManager *self)
{
GList *l;
- for (l = individuals; l; l = l->next)
+ for (l = added; l; l = l->next)
{
g_signal_connect (l->data, "group-changed",
G_CALLBACK (individual_group_changed_cb), self);
@@ -106,19 +110,7 @@ aggregator_individuals_added_cb (FolksIndividualAggregator *aggregator,
G_CALLBACK (individual_notify_is_favourite_cb), self);
}
- /* TODO: don't hard-code the reason or message */
- g_signal_emit (self, signals[MEMBERS_CHANGED], 0, "individual(s) added",
- individuals, NULL, TP_CHANNEL_GROUP_CHANGE_REASON_NONE, TRUE);
-}
-
-static void
-aggregator_individuals_removed_cb (FolksIndividualAggregator *aggregator,
- GList *individuals,
- EmpathyIndividualManager *self)
-{
- GList *l;
-
- for (l = individuals; l; l = l->next)
+ for (l = removed; l; l = l->next)
{
g_signal_handlers_disconnect_by_func (l->data,
individual_group_changed_cb, self);
@@ -126,9 +118,10 @@ aggregator_individuals_removed_cb (FolksIndividualAggregator *aggregator,
individual_notify_is_favourite_cb, self);
}
- /* TODO: don't hard-code the reason or message */
- g_signal_emit (self, signals[MEMBERS_CHANGED], 0, "individual(s) removed",
- NULL, individuals, TP_CHANNEL_GROUP_CHANGE_REASON_NONE, TRUE);
+ g_signal_emit (self, signals[MEMBERS_CHANGED], 0, message,
+ added, removed,
+ tp_chanel_group_change_reason_from_folks_groups_change_reason (reason),
+ TRUE);
}
static void
@@ -233,10 +226,8 @@ empathy_individual_manager_init (EmpathyIndividualManager *self)
priv->contact_manager = empathy_contact_manager_dup_singleton ();
priv->aggregator = folks_individual_aggregator_new ();
- g_signal_connect (priv->aggregator, "individuals-added",
- G_CALLBACK (aggregator_individuals_added_cb), self);
- g_signal_connect (priv->aggregator, "individuals-removed",
- G_CALLBACK (aggregator_individuals_removed_cb), self);
+ g_signal_connect (priv->aggregator, "individuals-changed",
+ G_CALLBACK (aggregator_individuals_changed_cb), self);
}
EmpathyIndividualManager *