aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-individual-view.c
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2010-08-24 19:22:38 +0800
committerPhilip Withnall <philip.withnall@collabora.co.uk>2010-08-27 17:23:48 +0800
commit4b17d88ae214bc8b9b74d7fd6c0c01e14f206478 (patch)
tree34e52622df4119ea0b533ed133556165077cfe58 /libempathy-gtk/empathy-individual-view.c
parentc9bc158a8897e4ab2f0758d87084f048e51de165 (diff)
downloadgsoc2013-empathy-4b17d88ae214bc8b9b74d7fd6c0c01e14f206478.tar.gz
gsoc2013-empathy-4b17d88ae214bc8b9b74d7fd6c0c01e14f206478.tar.zst
gsoc2013-empathy-4b17d88ae214bc8b9b74d7fd6c0c01e14f206478.zip
Add an EmpathyIndividualView feature for dropping files on Individuals
This allows drag and drop to be enabled for the linking dialogue without allowing files to be dropped onto the dialogue, which wouldn't make sense. Helps: bgo#627715
Diffstat (limited to 'libempathy-gtk/empathy-individual-view.c')
-rw-r--r--libempathy-gtk/empathy-individual-view.c16
1 files changed, 11 insertions, 5 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;