diff options
author | Olivier Le Thanh Duong <olivier@lethanh.be> | 2010-03-05 05:57:43 +0800 |
---|---|---|
committer | Olivier Le Thanh Duong <olivier@lethanh.be> | 2010-03-05 05:57:43 +0800 |
commit | f0555970a6dd57a4494c295f1e29e42d8aafec2d (patch) | |
tree | 37ace70a1af2564231174d4b5b960799f2a1e5e9 | |
parent | b80b4032b86e961fc967fabb9ccdb7775e2dec7b (diff) | |
download | gsoc2013-empathy-f0555970a6dd57a4494c295f1e29e42d8aafec2d.tar gsoc2013-empathy-f0555970a6dd57a4494c295f1e29e42d8aafec2d.tar.gz gsoc2013-empathy-f0555970a6dd57a4494c295f1e29e42d8aafec2d.tar.bz2 gsoc2013-empathy-f0555970a6dd57a4494c295f1e29e42d8aafec2d.tar.lz gsoc2013-empathy-f0555970a6dd57a4494c295f1e29e42d8aafec2d.tar.xz gsoc2013-empathy-f0555970a6dd57a4494c295f1e29e42d8aafec2d.tar.zst gsoc2013-empathy-f0555970a6dd57a4494c295f1e29e42d8aafec2d.zip |
chat_window_drag_motion : search in all the drop targets
Use gtk_drag_dest_find_target to search in all the drop targets instead
of only the first one.
-rw-r--r-- | src/empathy-chat-window.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c index 2e2f5c003..8a5d50356 100644 --- a/src/empathy-chat-window.c +++ b/src/empathy-chat-window.c @@ -1563,14 +1563,11 @@ chat_window_drag_motion (GtkWidget *widget, { GdkAtom target; EmpathyChatWindowPriv *priv; - GdkAtom dest_target; priv = GET_PRIV (window); - target = gtk_drag_dest_find_target (widget, context, NULL); - - dest_target = gdk_atom_intern_static_string ("text/uri-list"); - if (target == dest_target) { + target = gtk_drag_dest_find_target (widget, context, priv->file_targets); + if (target != GDK_NONE) { /* This is a file drag. Ensure the contact is online and set the drag type to COPY. Note that it's possible that the tab will be switched by GTK+ after a timeout from drag_motion without @@ -1599,8 +1596,8 @@ chat_window_drag_motion (GtkWidget *widget, return TRUE; } - dest_target = gdk_atom_intern_static_string ("text/contact-id"); - if (target == dest_target) { + target = gtk_drag_dest_find_target (widget, context, priv->contact_targets); + if (target != GDK_NONE) { /* This is a drag of a contact from a contact list. Set to COPY. FIXME: If this drag is to a MUC window, it invites the user. Otherwise, it opens a chat. Should we use a different drag |