[nautilus-actions] Check if action is writable when deleting a profile
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Check if action is writable when deleting a profile
- Date: Tue, 14 Feb 2012 17:40:20 +0000 (UTC)
commit 1deff0c1b7376a4b4ff1eb710f7f46d07410cfe1
Author: Pierre Wieser <pwieser trychlos org>
Date: Tue Feb 14 16:20:45 2012 +0100
Check if action is writable when deleting a profile
ChangeLog | 3 +++
src/nact/nact-menubar-edit.c | 9 ++++++++-
2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 30666a8..3eefb85 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2012-02-14 Pierre Wieser <pwieser trychlos org>
+ * src/nact/nact-menubar-edit.c (get_deletables):
+ Check if action is writable when deleting a profile.
+
* src/core/na-object-action.c (ifactory_object_read_done):
* src/core/na-object-menu.c (ifactory_object_read_done):
* src/core/na-object-profile.c (ifactory_object_read_done):
diff --git a/src/nact/nact-menubar-edit.c b/src/nact/nact-menubar-edit.c
index d7490b7..17bbf4a 100644
--- a/src/nact/nact-menubar-edit.c
+++ b/src/nact/nact-menubar-edit.c
@@ -488,11 +488,18 @@ get_deletables( NAUpdater *updater, GList *selected, GSList **non_deletables )
GList *subitems;
GSList *sub_deletables;
guint reason;
+ NAObjectItem *item;
to_delete = NULL;
for( it = selected ; it ; it = it->next ){
- if( !na_object_is_finally_writable( it->data, &reason )){
+ if( NA_IS_OBJECT_PROFILE( it->data )){
+ item = na_object_get_parent( it->data );
+ } else {
+ item = NA_OBJECT_ITEM( it->data );
+ }
+
+ if( !na_object_is_finally_writable( item, &reason )){
*non_deletables = g_slist_prepend(
*non_deletables, add_non_deletable_msg( NA_OBJECT_ITEM( it->data ), reason ));
continue;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]