aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2010-06-25 20:48:43 +0800
committerTravis Reitter <treitter@gmail.com>2010-07-21 07:12:35 +0800
commit0dea2287893dc5cf657bb48c2707e30139118cb4 (patch)
tree201dc32d44563497991b905ced98b39ead7b61cf /libempathy-gtk
parente54fe4814b321be3e32e99f7dfd49b93e392bded (diff)
downloadgsoc2013-empathy-0dea2287893dc5cf657bb48c2707e30139118cb4.tar
gsoc2013-empathy-0dea2287893dc5cf657bb48c2707e30139118cb4.tar.gz
gsoc2013-empathy-0dea2287893dc5cf657bb48c2707e30139118cb4.tar.bz2
gsoc2013-empathy-0dea2287893dc5cf657bb48c2707e30139118cb4.tar.lz
gsoc2013-empathy-0dea2287893dc5cf657bb48c2707e30139118cb4.tar.xz
gsoc2013-empathy-0dea2287893dc5cf657bb48c2707e30139118cb4.tar.zst
gsoc2013-empathy-0dea2287893dc5cf657bb48c2707e30139118cb4.zip
Finish adding favourites support
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-individual-store.c41
-rw-r--r--libempathy-gtk/empathy-individual-view.c7
2 files changed, 21 insertions, 27 deletions
diff --git a/libempathy-gtk/empathy-individual-store.c b/libempathy-gtk/empathy-individual-store.c
index a1a07a32c..95f236a13 100644
--- a/libempathy-gtk/empathy-individual-store.c
+++ b/libempathy-gtk/empathy-individual-store.c
@@ -794,6 +794,24 @@ individual_store_members_changed_cb (EmpathyIndividualManager *manager,
}
static void
+individual_store_favourites_changed_cb (EmpathyIndividualManager *manager,
+ FolksIndividual *individual,
+ gboolean is_favourite,
+ EmpathyIndividualStore *self)
+{
+ EmpathyIndividualStorePriv *priv;
+
+ priv = GET_PRIV (self);
+
+ DEBUG ("Individual %s is %s a favourite",
+ folks_individual_get_id (individual),
+ is_favourite ? "now" : "no longer");
+
+ individual_store_remove_individual (self, individual);
+ individual_store_add_individual (self, individual);
+}
+
+static void
individual_store_groups_changed_cb (EmpathyIndividualManager *manager,
FolksIndividual *individual,
gchar *group,
@@ -835,8 +853,9 @@ individual_store_manager_setup (gpointer user_data)
"members-changed",
G_CALLBACK (individual_store_members_changed_cb), self);
- /* TODO: implement */
- DEBUG ("handling individual favourite status changes unimplemented");
+ g_signal_connect (priv->manager,
+ "favourites-changed",
+ G_CALLBACK (individual_store_favourites_changed_cb), self);
g_signal_connect (priv->manager,
"groups-changed",
@@ -891,24 +910,6 @@ individual_store_member_renamed_cb (EmpathyIndividualManager *manager,
}
static void
-individual_store_favourites_changed_cb (EmpathyIndividualManager *manager,
- FolksIndividual *individual,
- gboolean is_favourite,
- EmpathyIndividualStore *self)
-{
- EmpathyIndividualStorePriv *priv;
-
- priv = GET_PRIV (self);
-
- DEBUG ("Individual %s is %s a favourite",
- folks_individual_get_id (individual),
- is_favourite ? "now" : "no longer");
-
- individual_store_remove_individual (self, individual);
- individual_store_add_individual (self, individual);
-}
-
-static void
individual_store_dispose (GObject *object)
{
EmpathyIndividualStorePriv *priv = GET_PRIV (object);
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index 067fb60a0..218590940 100644
--- a/libempathy-gtk/empathy-individual-view.c
+++ b/libempathy-gtk/empathy-individual-view.c
@@ -346,10 +346,6 @@ individual_view_handle_drag (EmpathyIndividualView *self,
{
/* Mark contact as favourite */
folks_favourite_set_is_favourite (FOLKS_FAVOURITE (individual), TRUE);
-
- /* TODO: implement this */
- DEBUG ("adding individual to favourites not fully implemented");
-
return;
}
@@ -358,9 +354,6 @@ individual_view_handle_drag (EmpathyIndividualView *self,
/* Remove contact as favourite */
folks_favourite_set_is_favourite (FOLKS_FAVOURITE (individual), FALSE);
- /* TODO: implement this */
- DEBUG ("removing individual from favourites not fully " "implemented");
-
/* Don't try to remove it */
old_group = NULL;
}