aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-03-11 20:22:27 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-03-11 20:22:27 +0800
commit703709297e0572df76949522b2306045e3280d38 (patch)
tree6e900a219fecce12450ceb3de95ccb75e334850a /libempathy-gtk
parentd7a93aa6fd67383c1aff9a1e8ead5cb20bcde388 (diff)
downloadgsoc2013-empathy-703709297e0572df76949522b2306045e3280d38.tar
gsoc2013-empathy-703709297e0572df76949522b2306045e3280d38.tar.gz
gsoc2013-empathy-703709297e0572df76949522b2306045e3280d38.tar.bz2
gsoc2013-empathy-703709297e0572df76949522b2306045e3280d38.tar.lz
gsoc2013-empathy-703709297e0572df76949522b2306045e3280d38.tar.xz
gsoc2013-empathy-703709297e0572df76949522b2306045e3280d38.tar.zst
gsoc2013-empathy-703709297e0572df76949522b2306045e3280d38.zip
Fix droping a contact to the chat window.
svn path=/trunk/; revision=751
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-chat-window.c27
1 files changed, 6 insertions, 21 deletions
diff --git a/libempathy-gtk/empathy-chat-window.c b/libempathy-gtk/empathy-chat-window.c
index 5e5a854c5..5c3946e98 100644
--- a/libempathy-gtk/empathy-chat-window.c
+++ b/libempathy-gtk/empathy-chat-window.c
@@ -1585,8 +1585,6 @@ chat_window_drag_data_received (GtkWidget *widget,
EmpathyChatWindow *window)
{
if (info == DND_DRAG_TYPE_CONTACT_ID) {
- EmpathyContactFactory *factory;
- EmpathyContact *contact = NULL;
EmpathyChat *chat;
EmpathyChatWindow *old_window;
McAccount *account;
@@ -1600,30 +1598,17 @@ chat_window_drag_data_received (GtkWidget *widget,
empathy_debug (DEBUG_DOMAIN, "DND contact from roster with id:'%s'", id);
strv = g_strsplit (id, "/", 2);
- factory = empathy_contact_factory_new ();
account = mc_account_lookup (strv[0]);
- if (account) {
- contact = empathy_contact_factory_get_from_id (factory,
- account,
- strv[1]);
- g_object_unref (account);
- }
- g_object_unref (factory);
- g_object_unref (account);
- g_strfreev (strv);
-
- if (!contact) {
- empathy_debug (DEBUG_DOMAIN, "DND contact from roster not found");
- return;
- }
-
- account = empathy_contact_get_account (contact);
- chat = empathy_chat_window_find_chat (account, id);
+ chat = empathy_chat_window_find_chat (account, strv[1]);
if (!chat) {
- empathy_chat_with_contact_id (account, id);
+ empathy_chat_with_contact_id (account, strv[2]);
+ g_object_unref (account);
+ g_strfreev (strv);
return;
}
+ g_object_unref (account);
+ g_strfreev (strv);
old_window = empathy_chat_get_window (chat);
if (old_window) {