aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-chat-window.c
diff options
context:
space:
mode:
authorOlivier Le Thanh Duong <olivier@lethanh.be>2010-03-05 05:57:43 +0800
committerOlivier Le Thanh Duong <olivier@lethanh.be>2010-03-05 05:57:43 +0800
commitf0555970a6dd57a4494c295f1e29e42d8aafec2d (patch)
tree37ace70a1af2564231174d4b5b960799f2a1e5e9 /src/empathy-chat-window.c
parentb80b4032b86e961fc967fabb9ccdb7775e2dec7b (diff)
downloadgsoc2013-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.
Diffstat (limited to 'src/empathy-chat-window.c')
-rw-r--r--src/empathy-chat-window.c11
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