]> git.0d.be Git - empathy.git/commitdiff
Don't try to offer file transfers to MUCs
authorShaun McCance <Shaun McCance>
Tue, 15 Sep 2009 17:47:09 +0000 (12:47 -0500)
committerShaun McCance <shaunm@gnome.org>
Tue, 24 Nov 2009 18:05:31 +0000 (12:05 -0600)
src/empathy-chat-window.c

index be29b3a8aeccf79bc3f5da8fdbbdb777d175f91a..5b3a3ac0f05d1f49f7353d62c32bda2dc8b69a84 100644 (file)
@@ -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);