[nautilus] icon-dnd: don't set 'Set as Background' sensitive outside the desktop
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] icon-dnd: don't set 'Set as Background' sensitive outside the desktop
- Date: Wed, 29 Sep 2010 08:13:01 +0000 (UTC)
commit ab1229476f949fef5cd51545088c91c649be2ef1
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue Sep 28 14:50:15 2010 +0200
icon-dnd: don't set 'Set as Background' sensitive outside the desktop
libnautilus-private/nautilus-icon-dnd.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/libnautilus-private/nautilus-icon-dnd.c b/libnautilus-private/nautilus-icon-dnd.c
index 3e2a6a4..2fb42a6 100644
--- a/libnautilus-private/nautilus-icon-dnd.c
+++ b/libnautilus-private/nautilus-icon-dnd.c
@@ -1081,7 +1081,7 @@ nautilus_icon_container_receive_dropped_icons (NautilusIconContainer *container,
GdkDragContext *context,
int x, int y)
{
- char *drop_target;
+ char *drop_target, *container_uri;
gboolean local_move_only;
double world_x, world_y;
gboolean icon_hit;
@@ -1104,10 +1104,14 @@ nautilus_icon_container_receive_dropped_icons (NautilusIconContainer *container,
action = GDK_ACTION_MOVE;
} else {
action = GDK_ACTION_MOVE | GDK_ACTION_COPY | GDK_ACTION_LINK;
+ container_uri = get_container_uri (container);
- if (selection_is_image_file (container->details->dnd_info->drag_info.selection_list)) {
+ if (eel_uri_is_desktop (container_uri) &&
+ selection_is_image_file (container->details->dnd_info->drag_info.selection_list)) {
action |= NAUTILUS_DND_ACTION_SET_AS_BACKGROUND;
}
+
+ g_free (container_uri);
}
real_action = nautilus_drag_drop_action_ask
(GTK_WIDGET (container), action);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]