[empathy: 10/15] Set ourselves as the preferred handler if there is a callback



commit c98d650deadd48624a6dba026aa466ddc5b58626
Author: Sjoerd Simons <sjoerd simons collabora co uk>
Date:   Mon Oct 12 16:33:45 2009 -0400

    Set ourselves as the preferred handler if there is a callback

 libempathy/empathy-dispatcher.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c
index d7d3b9f..d6c7900 100644
--- a/libempathy/empathy-dispatcher.c
+++ b/libempathy/empathy-dispatcher.c
@@ -1712,16 +1712,20 @@ empathy_dispatcher_call_create_or_ensure_channel (
 {
   EmpathyDispatcherPriv *priv = GET_PRIV (dispatcher);
   TpAccount *account;
+  const gchar *handler = "";
 
   account = empathy_get_account_for_connection (request_data->connection);
 
+  if (request_data->cb)
+    handler = empathy_handler_get_busname (priv->handler);
+
   if (request_data->should_ensure)
     {
       request_data->pending_call =
           tp_cli_channel_dispatcher_call_ensure_channel (
               priv->channel_dispatcher,
               -1, tp_proxy_get_object_path (TP_PROXY (account)),
-              request_data->request, 0, "",
+              request_data->request, 0, handler,
               dispatcher_create_channel_cb, request_data, NULL, NULL);
     }
   else
@@ -1730,7 +1734,7 @@ empathy_dispatcher_call_create_or_ensure_channel (
           tp_cli_channel_dispatcher_call_create_channel (
               priv->channel_dispatcher,
               -1, tp_proxy_get_object_path (TP_PROXY (account)),
-              request_data->request, 0, "",
+              request_data->request, 0, handler,
               dispatcher_create_channel_cb, request_data, NULL,
               G_OBJECT (dispatcher));
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]