[nautilus-actions] No more check for action existancy in NAPivot
- From: Pierre Wieser <pwieser src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [nautilus-actions] No more check for action existancy in NAPivot
- Date: Fri, 2 Oct 2009 22:40:54 +0000 (UTC)
commit 534746d5ac76e1e5167761a254b1d1d60ca4f21e
Author: pierre <pierre vfedora10 virtuals pwi>
Date: Mon Sep 28 11:30:38 2009 +0200
No more check for action existancy in NAPivot
ChangeLog | 3 +++
src/nact/nact-main-menubar.c | 1 +
src/nact/nact-main-window.c | 17 ++++++++++-------
3 files changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b969d97..923b26f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,6 +18,9 @@
* src/nact/nact-main-window.c:
Now implements the BaseIPrefs interface.
+ * src/nact/nact-main-window.c (nact_main_window_action_exists):
+ No more check for action existancy in NAPivot.
+
* src/nact/nact-iactions-list.c:
* src/nact/nact-iactions-list.h
(nact_iactions_list_collapse_all, nact_iactions_list_expand_all):
diff --git a/src/nact/nact-main-menubar.c b/src/nact/nact-main-menubar.c
index 52af10f..2ee8f1a 100644
--- a/src/nact/nact-main-menubar.c
+++ b/src/nact/nact-main-menubar.c
@@ -385,6 +385,7 @@ on_save_activated( GtkAction *gtk_action, NactMainWindow *window )
g_return_if_fail( NACT_IS_MAIN_WINDOW( window ));
/* delete the removed actions
+ * so that new actions with same id do not risk to be deleted later
*/
nact_main_window_remove_deleted( window );
diff --git a/src/nact/nact-main-window.c b/src/nact/nact-main-window.c
index 3b92914..8bd1cb9 100644
--- a/src/nact/nact-main-window.c
+++ b/src/nact/nact-main-window.c
@@ -579,8 +579,8 @@ nact_main_window_new( BaseApplication *application )
* Returns: %TRUE if the specified action already exists in the system,
* %FALSE else.
*
- * We have to check against existing actions in #NAPivot, and against
- * currently edited actions in #NactIActionsList.
+ * Do not check in NAPivot: actions which are not displayed in the user
+ * interface are not considered as existing.
*/
gboolean
nact_main_window_action_exists( const NactMainWindow *window, const gchar *uuid )
@@ -594,11 +594,14 @@ nact_main_window_action_exists( const NactMainWindow *window, const gchar *uuid
if( !window->private->dispose_has_run ){
- application = NACT_APPLICATION( base_window_get_application( BASE_WINDOW( window )));
- pivot = nact_application_get_pivot( application );
- action = na_pivot_get_item( pivot, uuid );
- if( action ){
- exists = TRUE;
+ /* leave here this dead code, if case I change of opinion later */
+ if( FALSE ){
+ application = NACT_APPLICATION( base_window_get_application( BASE_WINDOW( window )));
+ pivot = nact_application_get_pivot( application );
+ action = na_pivot_get_item( pivot, uuid );
+ if( action ){
+ exists = TRUE;
+ }
}
if( !exists ){
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]