[nautilus/remove_background_leftovers: 4/4] 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/remove_background_leftovers: 4/4] icon-dnd: don't set 'Set as Background' sensitive outside the desktop
- Date: Tue, 28 Sep 2010 12:49:58 +0000 (UTC)
commit 522d2f0ad61d7ec3fb1480980bf8dfbf5db90a97
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 | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/libnautilus-private/nautilus-icon-dnd.c b/libnautilus-private/nautilus-icon-dnd.c
index 3e2a6a4..2f3b678 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,8 +1104,10 @@ 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;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]