aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-event-manager.c
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-01-10 00:15:49 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-01-10 00:15:49 +0800
commit500751eb56f36006b7bf02cd4a2da8b2ff3dc2a4 (patch)
treeb4cf89132f09bb714aa8a217299c8dc1a00cce44 /src/empathy-event-manager.c
parente5131b54acfadb755d15fd0d207582437bee233b (diff)
downloadgsoc2013-empathy-500751eb56f36006b7bf02cd4a2da8b2ff3dc2a4.tar
gsoc2013-empathy-500751eb56f36006b7bf02cd4a2da8b2ff3dc2a4.tar.gz
gsoc2013-empathy-500751eb56f36006b7bf02cd4a2da8b2ff3dc2a4.tar.bz2
gsoc2013-empathy-500751eb56f36006b7bf02cd4a2da8b2ff3dc2a4.tar.lz
gsoc2013-empathy-500751eb56f36006b7bf02cd4a2da8b2ff3dc2a4.tar.xz
gsoc2013-empathy-500751eb56f36006b7bf02cd4a2da8b2ff3dc2a4.tar.zst
gsoc2013-empathy-500751eb56f36006b7bf02cd4a2da8b2ff3dc2a4.zip
Remove approvals when the underlying operation got invalidated
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> svn path=/trunk/; revision=2195
Diffstat (limited to 'src/empathy-event-manager.c')
-rw-r--r--src/empathy-event-manager.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c
index 1855027b4..7643ad735 100644
--- a/src/empathy-event-manager.c
+++ b/src/empathy-event-manager.c
@@ -52,6 +52,7 @@ typedef struct {
EmpathyDispatchOperation *operation;
gulong approved_handler;
gulong claimed_handler;
+ gulong invalidated_handler;
/* Remove contact if applicable */
EmpathyContact *contact;
/* Tube dispatcher if applicable */
@@ -109,6 +110,8 @@ event_manager_approval_free (EventManagerApproval *approval)
approval->approved_handler);
g_signal_handler_disconnect (approval->operation,
approval->claimed_handler);
+ g_signal_handler_disconnect (approval->operation,
+ approval->invalidated_handler);
g_object_unref (approval->operation);
if (approval->contact != NULL)
@@ -237,6 +240,14 @@ event_manager_operation_claimed_cb (EmpathyDispatchOperation *operation,
}
static void
+event_manager_operation_invalidated_cb (EmpathyDispatchOperation *operation,
+ guint domain, gint code, gchar *message,
+ EventManagerApproval *approval)
+{
+ event_manager_approval_done (approval);
+}
+
+static void
event_manager_media_channel_got_name_cb (EmpathyContact *contact,
const GError *error, gpointer user_data, GObject *object)
{
@@ -388,6 +399,9 @@ event_manager_approve_channel_cb (EmpathyDispatcher *dispatcher,
approval->claimed_handler = g_signal_connect (operation, "claimed",
G_CALLBACK (event_manager_operation_claimed_cb), approval);
+ approval->invalidated_handler = g_signal_connect (operation, "invalidated",
+ G_CALLBACK (event_manager_operation_invalidated_cb), approval);
+
if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_TEXT))
{
EmpathyTpChat *tp_chat =