aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-individual-widget.c
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2010-09-02 23:39:09 +0800
committerPhilip Withnall <philip.withnall@collabora.co.uk>2010-09-03 19:03:38 +0800
commit3cc4fc238021bfdb6f8448a160988ff223662dc3 (patch)
tree7f953abcece0ce7b6312c970f90658208cdb6433 /libempathy-gtk/empathy-individual-widget.c
parentb50d7c49a1e5ac9dc43befe60a4296240b8d093e (diff)
downloadgsoc2013-empathy-3cc4fc238021bfdb6f8448a160988ff223662dc3.tar
gsoc2013-empathy-3cc4fc238021bfdb6f8448a160988ff223662dc3.tar.gz
gsoc2013-empathy-3cc4fc238021bfdb6f8448a160988ff223662dc3.tar.bz2
gsoc2013-empathy-3cc4fc238021bfdb6f8448a160988ff223662dc3.tar.lz
gsoc2013-empathy-3cc4fc238021bfdb6f8448a160988ff223662dc3.tar.xz
gsoc2013-empathy-3cc4fc238021bfdb6f8448a160988ff223662dc3.tar.zst
gsoc2013-empathy-3cc4fc238021bfdb6f8448a160988ff223662dc3.zip
Listen to FolksIndividual::removed in EmpathyIndividualWidget
In certain cases, a tooltip will be updated on the contact list when unlinking a meta-contact (reproducable with a meta-contact of meta-contacts). In order to prevent an individual table from getting stuck in the EmpathyIndividualWidget in the tooltip, EmpathyIndividualWidget needs to connect to FolksIndividual::removed to be updated when the Individual is removed or replaced.
Diffstat (limited to 'libempathy-gtk/empathy-individual-widget.c')
-rw-r--r--libempathy-gtk/empathy-individual-widget.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-individual-widget.c b/libempathy-gtk/empathy-individual-widget.c
index 40ece1eec..b68830676 100644
--- a/libempathy-gtk/empathy-individual-widget.c
+++ b/libempathy-gtk/empathy-individual-widget.c
@@ -1701,6 +1701,14 @@ personas_changed_cb (FolksIndividual *individual,
}
static void
+individual_removed_cb (FolksIndividual *individual,
+ FolksIndividual *replacement_individual,
+ EmpathyIndividualWidget *self)
+{
+ empathy_individual_widget_set_individual (self, replacement_individual);
+}
+
+static void
remove_individual (EmpathyIndividualWidget *self)
{
EmpathyIndividualWidgetPriv *priv = GET_PRIV (self);
@@ -1716,6 +1724,8 @@ remove_individual (EmpathyIndividualWidget *self)
notify_avatar_cb, self);
g_signal_handlers_disconnect_by_func (priv->individual,
personas_changed_cb, self);
+ g_signal_handlers_disconnect_by_func (priv->individual,
+ individual_removed_cb, self);
if (priv->flags & EMPATHY_INDIVIDUAL_WIDGET_EDIT_FAVOURITE)
{
@@ -1762,6 +1772,8 @@ individual_update (EmpathyIndividualWidget *self)
(GCallback) notify_avatar_cb, self);
g_signal_connect (priv->individual, "personas-changed",
(GCallback) personas_changed_cb, self);
+ g_signal_connect (priv->individual, "removed",
+ (GCallback) individual_removed_cb, self);
if (priv->flags & EMPATHY_INDIVIDUAL_WIDGET_EDIT_FAVOURITE)
{