aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2008-03-11 20:22:27 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2008-03-11 20:22:27 +0800
commit465e6ae8de678dcad0a1410d8b5273a9544822b2 (patch)
tree6e900a219fecce12450ceb3de95ccb75e334850a /libempathy-gtk
parent3f50043de314def38cad13396238d2ca85580a3d (diff)
downloadgsoc2013-empathy-465e6ae8de678dcad0a1410d8b5273a9544822b2.tar
gsoc2013-empathy-465e6ae8de678dcad0a1410d8b5273a9544822b2.tar.gz
gsoc2013-empathy-465e6ae8de678dcad0a1410d8b5273a9544822b2.tar.bz2
gsoc2013-empathy-465e6ae8de678dcad0a1410d8b5273a9544822b2.tar.lz
gsoc2013-empathy-465e6ae8de678dcad0a1410d8b5273a9544822b2.tar.xz
gsoc2013-empathy-465e6ae8de678dcad0a1410d8b5273a9544822b2.tar.zst
gsoc2013-empathy-465e6ae8de678dcad0a1410d8b5273a9544822b2.zip
Fix droping a contact to the chat window.
git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@751 4ee84921-47dd-4033-b63a-18d7a039a3e4
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) {