aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorShaun McCance <Shaun McCance>2009-09-16 01:47:09 +0800
committerShaun McCance <shaunm@gnome.org>2009-11-25 02:05:31 +0800
commit810fc88802d72b880ff9472be7374f72a34df748 (patch)
treec9a9c1a023f5e22ffc86dadfcd81fd4e10d6b9d4 /src
parentdf2e42c11963a62c729ca592c3fb291a82ccedb9 (diff)
downloadgsoc2013-empathy-810fc88802d72b880ff9472be7374f72a34df748.tar
gsoc2013-empathy-810fc88802d72b880ff9472be7374f72a34df748.tar.gz
gsoc2013-empathy-810fc88802d72b880ff9472be7374f72a34df748.tar.bz2
gsoc2013-empathy-810fc88802d72b880ff9472be7374f72a34df748.tar.lz
gsoc2013-empathy-810fc88802d72b880ff9472be7374f72a34df748.tar.xz
gsoc2013-empathy-810fc88802d72b880ff9472be7374f72a34df748.tar.zst
gsoc2013-empathy-810fc88802d72b880ff9472be7374f72a34df748.zip
Don't try to offer file transfers to MUCs
Diffstat (limited to 'src')
-rw-r--r--src/empathy-chat-window.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index be29b3a8a..5b3a3ac0f 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -1416,6 +1416,14 @@ chat_window_drag_data_received (GtkWidget *widget,
gchar *nl;
gchar *uri;
+ priv = GET_PRIV (window);
+ contact = empathy_chat_get_remote_contact (priv->current_chat);
+
+ if (!EMPATHY_IS_CONTACT (contact)) {
+ gtk_drag_finish (context, TRUE, FALSE, time);
+ return;
+ }
+
/* Only handle a single file for new. It would be wicked cool to be
able to do multiple files, offering to zip them or whatever like
nautilus-sendto does. Note that text/uri-list is defined to have
@@ -1436,8 +1444,6 @@ chat_window_drag_data_received (GtkWidget *widget,
file = g_file_new_for_uri (data);
}
- priv = GET_PRIV (window);
- contact = empathy_chat_get_remote_contact (priv->current_chat);
empathy_send_file (contact, file);
g_object_unref (file);