[empathy: 3/17] Don't try to offer file transfers to MUCs
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy: 3/17] Don't try to offer file transfers to MUCs
- Date: Mon, 30 Nov 2009 15:08:51 +0000 (UTC)
commit 810fc88802d72b880ff9472be7374f72a34df748
Author: Shaun McCance <Shaun McCance>
Date: Tue Sep 15 12:47:09 2009 -0500
Don't try to offer file transfers to MUCs
src/empathy-chat-window.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index be29b3a..5b3a3ac 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]