[nautilus-actions] Do not enable 'cut' option when locked down



commit dc3e117f97c0d6e60ee62f98037af750220c6227
Author: Pierre Wieser <pwieser trychlos org>
Date:   Sat Dec 12 23:37:09 2009 +0100

    Do not enable 'cut' option when locked down

 ChangeLog                                 |    3 +++
 TODO                                      |    2 +-
 nautilus-actions/nact/nact-main-menubar.c |    2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 32bbf56..001b4e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2009-12-12 Pierre Wieser <pwieser trychlos org>
 
+	* nautilus-actions/nact/nact-main-menubar.c (on_update_sensitivities):
+	Do not enable 'cut' if locked down.
+
 	* nautilus-actions/private/na-object-profile.c
 	(object_are_equal, object_is_valid): Now marked as static.
 
diff --git a/TODO b/TODO
index 0de4d78..ab80086 100644
--- a/TODO
+++ b/TODO
@@ -99,6 +99,6 @@
 
 - desktop provider: fix default toolbar label
 
-- lockdown: cut should be disabled
+- lockdown:
   inline edition should be disabled
   all entry fields should be readonly
diff --git a/nautilus-actions/nact/nact-main-menubar.c b/nautilus-actions/nact/nact-main-menubar.c
index 05531d5..4122ae1 100644
--- a/nautilus-actions/nact/nact-main-menubar.c
+++ b/nautilus-actions/nact/nact-main-menubar.c
@@ -649,7 +649,7 @@ on_update_sensitivities( NactMainWindow *window, gpointer user_data )
 
 	/* cut/copy/duplicate/delete enabled when selection not empty */
 	/* cut/delete require a writable item */
-	cut_enabled = ( mis->treeview_has_focus || mis->popup_handler ) && count_selected > 0 && !readonly;
+	cut_enabled = ( mis->treeview_has_focus || mis->popup_handler ) && count_selected > 0 && !readonly &&!locked;
 	copy_enabled = ( mis->treeview_has_focus || mis->popup_handler ) && count_selected > 0;
 	duplicate_enabled = ( mis->treeview_has_focus || mis->popup_handler ) && count_selected > 0 && !locked;
 	delete_enabled = ( mis->treeview_has_focus || mis->popup_handler ) && count_selected > 0 && !readonly && !locked;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]