[nautilus] Don't allow drops on tabs for unwritable slots
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] Don't allow drops on tabs for unwritable slots
- Date: Sat, 25 Aug 2012 13:11:06 +0000 (UTC)
commit 6aa7f6cbdc57cc1000b1be69f131e3223c2486a3
Author: William Jon McCann <jmccann redhat com>
Date: Fri Aug 24 20:01:47 2012 -0400
Don't allow drops on tabs for unwritable slots
https://bugzilla.gnome.org/show_bug.cgi?id=329515
src/nautilus-window-slot-dnd.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-window-slot-dnd.c b/src/nautilus-window-slot-dnd.c
index 4ec439f..7a1a098 100644
--- a/src/nautilus-window-slot-dnd.c
+++ b/src/nautilus-window-slot-dnd.c
@@ -97,6 +97,18 @@ slot_proxy_drag_motion (GtkWidget *widget,
}
}
+ if (target_uri != NULL) {
+ NautilusFile *file;
+ gboolean can;
+ file = nautilus_file_get_existing_by_uri (target_uri);
+ can = nautilus_file_can_write (file);
+ g_object_unref (file);
+ if (!can) {
+ action = 0;
+ goto out;
+ }
+ }
+
if (drag_info->have_data &&
drag_info->have_valid_data) {
if (drag_info->info == NAUTILUS_ICON_DND_GNOME_ICON_LIST) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]