summaryrefslogtreecommitdiff
path: root/src/nautilus-properties-window.c
diff options
context:
space:
mode:
authorWilliam Jon McCann <jmccann@redhat.com>2012-08-17 20:55:48 -0400
committerWilliam Jon McCann <jmccann@redhat.com>2012-08-20 11:43:09 -0400
commitd51023f9aafe3e25de028bdcdeecb5f10209e894 (patch)
tree6087a02860d28b691c636ed5b85509d92202ee46 /src/nautilus-properties-window.c
parent01fba6ad616a79eef4f76bfba2c8b4f85cc0e2f5 (diff)
downloadnautilus-d51023f9aafe3e25de028bdcdeecb5f10209e894.tar.gz
Don't show execute permission checkbox for directories
It is ambigious what it even does. It refers to making files executable. You never want to turn execute permission off on a directory and lock yourself out of it. This just shows it when the selection is a file.
Diffstat (limited to 'src/nautilus-properties-window.c')
-rw-r--r--src/nautilus-properties-window.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index 1c6127c6f..b7d54a099 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -4070,7 +4070,6 @@ create_simple_permissions (NautilusPropertiesWindow *window, GtkGrid *page_grid)
gboolean has_file, has_directory;
GtkLabel *group_label;
GtkLabel *owner_label;
- GtkLabel *execute_label;
GtkWidget *value;
GtkComboBox *group_combo_box;
GtkComboBox *owner_combo_box;
@@ -4153,15 +4152,17 @@ create_simple_permissions (NautilusPropertiesWindow *window, GtkGrid *page_grid)
!has_directory);
}
- append_blank_slim_row (page_grid);
-
- execute_label = attach_title_field (page_grid, _("Execute:"));
- add_permissions_checkbox_with_label (window, page_grid,
- GTK_WIDGET (execute_label),
- _("Allow _executing file as program"),
- UNIX_PERM_USER_EXEC|UNIX_PERM_GROUP_EXEC|UNIX_PERM_OTHER_EXEC,
- execute_label, FALSE);
-
+ if (!has_directory) {
+ GtkLabel *execute_label;
+ append_blank_slim_row (page_grid);
+
+ execute_label = attach_title_field (page_grid, _("Execute:"));
+ add_permissions_checkbox_with_label (window, page_grid,
+ GTK_WIDGET (execute_label),
+ _("Allow _executing file as program"),
+ UNIX_PERM_USER_EXEC|UNIX_PERM_GROUP_EXEC|UNIX_PERM_OTHER_EXEC,
+ execute_label, FALSE);
+ }
}
static void