diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2009-01-10 00:15:43 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2009-01-10 00:15:43 +0800 |
commit | 50cad5e06347b2fa49d6718034bcdb552d43b4d3 (patch) | |
tree | 286d079352da13fa8e393d905ffe30d870c8b698 /src/empathy-event-manager.c | |
parent | 94255bf43b3fb2dd2684c87b18dbf8448f72d8fb (diff) | |
download | gsoc2013-empathy-50cad5e06347b2fa49d6718034bcdb552d43b4d3.tar gsoc2013-empathy-50cad5e06347b2fa49d6718034bcdb552d43b4d3.tar.gz gsoc2013-empathy-50cad5e06347b2fa49d6718034bcdb552d43b4d3.tar.bz2 gsoc2013-empathy-50cad5e06347b2fa49d6718034bcdb552d43b4d3.tar.lz gsoc2013-empathy-50cad5e06347b2fa49d6718034bcdb552d43b4d3.tar.xz gsoc2013-empathy-50cad5e06347b2fa49d6718034bcdb552d43b4d3.tar.zst gsoc2013-empathy-50cad5e06347b2fa49d6718034bcdb552d43b4d3.zip |
Port to the new empathy_call_when_ready api
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
svn path=/trunk/; revision=2193
Diffstat (limited to 'src/empathy-event-manager.c')
-rw-r--r-- | src/empathy-event-manager.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c index 3c7541c82..1855027b4 100644 --- a/src/empathy-event-manager.c +++ b/src/empathy-event-manager.c @@ -238,11 +238,18 @@ event_manager_operation_claimed_cb (EmpathyDispatchOperation *operation, static void event_manager_media_channel_got_name_cb (EmpathyContact *contact, - gpointer user_data) + const GError *error, gpointer user_data, GObject *object) { EventManagerApproval *approval = user_data; gchar *msg; + if (error != NULL) + { + /* FIXME just returning assuming the operation will be invalidated as + * well */ + return; + } + msg = g_strdup_printf (_("Incoming call from %s"), empathy_contact_get_name (contact)); @@ -258,7 +265,7 @@ event_manager_media_channel_got_contact (EventManagerApproval *approval) { empathy_contact_call_when_ready (approval->contact, EMPATHY_CONTACT_READY_NAME, event_manager_media_channel_got_name_cb, - approval); + approval, NULL, G_OBJECT (approval->manager)); } static void @@ -331,14 +338,22 @@ event_manager_tube_dispatch_ability_cb (GObject *object, static void event_manager_tube_got_contact_name_cb (EmpathyContact *contact, - gpointer user_data) + const GError *error, gpointer user_data, GObject *object) { EventManagerApproval *approval = (EventManagerApproval *)user_data; EmpathyTubeDispatchAbility dispatchability; + if (error != NULL) + { + /* FIXME?, we assume that the operation gets invalidated as well (if it + * didn't already */ + return; + } + dispatchability = empathy_tube_dispatch_is_dispatchable (approval->tube_dispatch); + switch (dispatchability) { case EMPATHY_TUBE_DISPATCHABILITY_UNKNOWN: @@ -457,7 +472,7 @@ event_manager_approve_channel_cb (EmpathyDispatcher *dispatcher, empathy_contact_call_when_ready (contact, EMPATHY_CONTACT_READY_NAME, event_manager_tube_got_contact_name_cb, - approval); + approval, NULL, G_OBJECT (manager)); g_object_unref (factory); g_object_unref (account); |