aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy-gtk/empathy-individual-view.c16
-rw-r--r--libempathy-gtk/empathy-individual-view.h3
2 files changed, 13 insertions, 6 deletions
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index 6767c3bfd..66ddad73a 100644
--- a/libempathy-gtk/empathy-individual-view.c
+++ b/libempathy-gtk/empathy-individual-view.c
@@ -557,13 +557,19 @@ individual_view_drag_motion (GtkWidget *widget,
else
{
/* This is a file drag, and it can only be dropped on contacts,
- not groups.
- */
- FolksIndividual *individual;
+ * not groups.
+ * If we don't have FEATURE_FILE_DROP, disallow the drop completely,
+ * even if we have a valid target. */
+ FolksIndividual *individual = NULL;
EmpathyCapabilities caps = EMPATHY_CAPABILITIES_NONE;
- gtk_tree_model_get (model, &iter,
- EMPATHY_INDIVIDUAL_STORE_COL_INDIVIDUAL, &individual, -1);
+ if (priv->view_features & EMPATHY_INDIVIDUAL_VIEW_FEATURE_FILE_DROP)
+ {
+ gtk_tree_model_get (model, &iter,
+ EMPATHY_INDIVIDUAL_STORE_COL_INDIVIDUAL, &individual,
+ -1);
+ }
+
if (individual != NULL)
{
EmpathyContact *contact = NULL;
diff --git a/libempathy-gtk/empathy-individual-view.h b/libempathy-gtk/empathy-individual-view.h
index 003ff2ab3..4a581c35c 100644
--- a/libempathy-gtk/empathy-individual-view.h
+++ b/libempathy-gtk/empathy-individual-view.h
@@ -57,7 +57,8 @@ typedef enum
EMPATHY_INDIVIDUAL_VIEW_FEATURE_CONTACT_DROP = 1 << 4,
EMPATHY_INDIVIDUAL_VIEW_FEATURE_CONTACT_DRAG = 1 << 5,
EMPATHY_INDIVIDUAL_VIEW_FEATURE_CONTACT_TOOLTIP = 1 << 6,
- EMPATHY_INDIVIDUAL_VIEW_FEATURE_ALL = (1 << 7) - 1,
+ EMPATHY_INDIVIDUAL_VIEW_FEATURE_FILE_DROP = 1 << 7,
+ EMPATHY_INDIVIDUAL_VIEW_FEATURE_ALL = (1 << 8) - 1,
} EmpathyIndividualViewFeatureFlags;
struct _EmpathyIndividualView