aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-07-02 19:41:00 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-07-05 16:13:52 +0800
commitf178351cb959326996921f56c7a881a8a3e1e771 (patch)
tree2fc90bbf3f86e023da13b0645cf04c1119e26cbd /src/empathy.c
parent73845ad550f78190379cfa74a4b9e4ecefa6b241 (diff)
downloadgsoc2013-empathy-f178351cb959326996921f56c7a881a8a3e1e771.tar
gsoc2013-empathy-f178351cb959326996921f56c7a881a8a3e1e771.tar.gz
gsoc2013-empathy-f178351cb959326996921f56c7a881a8a3e1e771.tar.bz2
gsoc2013-empathy-f178351cb959326996921f56c7a881a8a3e1e771.tar.lz
gsoc2013-empathy-f178351cb959326996921f56c7a881a8a3e1e771.tar.xz
gsoc2013-empathy-f178351cb959326996921f56c7a881a8a3e1e771.tar.zst
gsoc2013-empathy-f178351cb959326996921f56c7a881a8a3e1e771.zip
Handle text channels using TpSimpleHandler (#623358)
Also move handling code from empathy.c to empathy-chat-manager.
Diffstat (limited to 'src/empathy.c')
-rw-r--r--src/empathy.c47
1 files changed, 1 insertions, 46 deletions
diff --git a/src/empathy.c b/src/empathy.c
index 7b7aa1a93..a148c9796 100644
--- a/src/empathy.c
+++ b/src/empathy.c
@@ -67,7 +67,6 @@
#include "empathy-accounts-dialog.h"
#include "empathy-chat-manager.h"
#include "empathy-status-icon.h"
-#include "empathy-chat-window.h"
#include "empathy-ft-manager.h"
#include "extensions/extensions.h"
@@ -91,51 +90,7 @@ dispatch_cb (EmpathyDispatcher *dispatcher,
channel_type = empathy_dispatch_operation_get_channel_type_id (operation);
- if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_TEXT)
- {
- EmpathyTpChat *tp_chat;
- EmpathyChat *chat = NULL;
- const gchar *id;
-
- tp_chat = EMPATHY_TP_CHAT
- (empathy_dispatch_operation_get_channel_wrapper (operation));
-
- id = empathy_tp_chat_get_id (tp_chat);
- if (!EMP_STR_EMPTY (id))
- {
- TpConnection *connection;
- TpAccount *account;
-
- connection = empathy_tp_chat_get_connection (tp_chat);
- account = empathy_get_account_for_connection (connection);
- chat = empathy_chat_window_find_chat (account, id);
- }
-
- if (chat)
- {
- empathy_chat_set_tp_chat (chat, tp_chat);
- }
- else
- {
- chat = empathy_chat_new (tp_chat);
- /* empathy_chat_new returns a floating reference as EmpathyChat is
- * a GtkWidget. This reference will be taken by a container
- * (a GtkNotebook) when we'll call empathy_chat_window_present_chat */
- }
-
- empathy_chat_window_present_chat (chat,
- empathy_dispatch_operation_get_user_action_time (operation));
-
- if (empathy_tp_chat_is_invited (tp_chat, NULL))
- {
- /* We have been invited to the room. Add ourself as member as this
- * channel has been approved. */
- empathy_tp_chat_join (tp_chat);
- }
-
- empathy_dispatch_operation_claim (operation);
- }
- else if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_FILE_TRANSFER)
+ if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_FILE_TRANSFER)
{
EmpathyFTFactory *factory;