diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2007-10-19 19:26:38 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2007-10-19 19:26:38 +0800 |
commit | a4b1c43fd11f07d46c207204db5e2cd8d11da7f3 (patch) | |
tree | ab610e9311cf0b1e0d21d9d02794cf92bc015a46 | |
parent | a753213fd2a4cca960ae3917c0b582df0d005b3d (diff) | |
download | gsoc2013-empathy-a4b1c43fd11f07d46c207204db5e2cd8d11da7f3.tar gsoc2013-empathy-a4b1c43fd11f07d46c207204db5e2cd8d11da7f3.tar.gz gsoc2013-empathy-a4b1c43fd11f07d46c207204db5e2cd8d11da7f3.tar.bz2 gsoc2013-empathy-a4b1c43fd11f07d46c207204db5e2cd8d11da7f3.tar.lz gsoc2013-empathy-a4b1c43fd11f07d46c207204db5e2cd8d11da7f3.tar.xz gsoc2013-empathy-a4b1c43fd11f07d46c207204db5e2cd8d11da7f3.tar.zst gsoc2013-empathy-a4b1c43fd11f07d46c207204db5e2cd8d11da7f3.zip |
If EmpathyChat object does not exist when DnD a contact, create one. Fixes
2007-10-19 Xavier Claessens <xclaesse@gmail.com>
* libempathy-gtk/empathy-chat-window.c: If EmpathyChat object does not
exist when DnD a contact, create one. Fixes bug #483168.
svn path=/trunk/; revision=380
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | libempathy-gtk/empathy-chat-window.c | 7 |
2 files changed, 12 insertions, 0 deletions
@@ -1,5 +1,10 @@ 2007-10-19 Xavier Claessens <xclaesse@gmail.com> + * libempathy-gtk/empathy-chat-window.c: If EmpathyChat object does not + exist when DnD a contact, create one. Fixes bug #483168. + +2007-10-19 Xavier Claessens <xclaesse@gmail.com> + * libempathy-gtk/empathy-status-icon.c: Fix crash when iconifying main window if it's already hiden. diff --git a/libempathy-gtk/empathy-chat-window.c b/libempathy-gtk/empathy-chat-window.c index a4d29b258..49950d3ea 100644 --- a/libempathy-gtk/empathy-chat-window.c +++ b/libempathy-gtk/empathy-chat-window.c @@ -1607,11 +1607,17 @@ chat_window_drag_data_received (GtkWidget *widget, account = empathy_contact_get_account (contact); chat = empathy_chat_window_find_chat (account, id); + if (chat) { + g_object_ref (chat); + } else { + chat = EMPATHY_CHAT (empathy_private_chat_new_with_contact (contact)); + } old_window = empathy_chat_get_window (chat); if (old_window) { if (old_window == window) { gtk_drag_finish (context, TRUE, FALSE, time); + g_object_unref (chat); return; } @@ -1629,6 +1635,7 @@ chat_window_drag_data_received (GtkWidget *widget, * anyway with add_chat() and remove_chat(). */ gtk_drag_finish (context, TRUE, FALSE, time); + g_object_unref (chat); } else if (info == DND_DRAG_TYPE_TAB) { EmpathyChat *chat = NULL; |