aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-event-manager.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-07-15 22:00:49 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-07-15 22:00:49 +0800
commitd61ca0ae4fb4aa4e469655407e8697b41a9ce5ef (patch)
tree21dd69b9d22277aa63365637c76efc5ab2c7c2bc /libempathy-gtk/empathy-event-manager.c
parent2d22d576e51764d4125786e10cdc4d86b7f813bd (diff)
downloadgsoc2013-empathy-d61ca0ae4fb4aa4e469655407e8697b41a9ce5ef.tar
gsoc2013-empathy-d61ca0ae4fb4aa4e469655407e8697b41a9ce5ef.tar.gz
gsoc2013-empathy-d61ca0ae4fb4aa4e469655407e8697b41a9ce5ef.tar.bz2
gsoc2013-empathy-d61ca0ae4fb4aa4e469655407e8697b41a9ce5ef.tar.lz
gsoc2013-empathy-d61ca0ae4fb4aa4e469655407e8697b41a9ce5ef.tar.xz
gsoc2013-empathy-d61ca0ae4fb4aa4e469655407e8697b41a9ce5ef.tar.zst
gsoc2013-empathy-d61ca0ae4fb4aa4e469655407e8697b41a9ce5ef.zip
Remove the contact pending event when the contact is not pending anymore.
svn path=/trunk/; revision=1252
Diffstat (limited to 'libempathy-gtk/empathy-event-manager.c')
-rw-r--r--libempathy-gtk/empathy-event-manager.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-event-manager.c b/libempathy-gtk/empathy-event-manager.c
index e6ddb1808..9d2997096 100644
--- a/libempathy-gtk/empathy-event-manager.c
+++ b/libempathy-gtk/empathy-event-manager.c
@@ -318,10 +318,22 @@ event_manager_pendings_changed_cb (EmpathyContactList *list,
gboolean is_pending,
EmpathyEventManager *manager)
{
- GString *str;
+ EmpathyEventManagerPriv *priv = GET_PRIV (manager);
+ GString *str;
if (!is_pending) {
- /* FIXME: remove event if any */
+ GSList *l;
+
+ for (l = priv->events; l; l = l->next) {
+ EventPriv *event = l->data;
+
+ if (event->public.contact == contact &&
+ event->func == event_pending_subscribe_func) {
+ event_remove (event);
+ break;
+ }
+ }
+
return;
}