[nautilus-actions] Fix validity check of the profile
- From: Pierre Wieser <pwieser src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Fix validity check of the profile
- Date: Mon, 7 Dec 2009 18:32:20 +0000 (UTC)
commit e090dcd0cae7553532e88e41294168a22819b946
Author: Pierre Wieser <pwieser trychlos org>
Date: Thu Dec 3 19:22:38 2009 +0100
Fix validity check of the profile
ChangeLog | 3 ++
nautilus-actions/private/na-object-profile.c | 31 +++++++++++++++-----------
2 files changed, 21 insertions(+), 13 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a2db3b9..0000820 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2009-12-03 Pierre Wieser <pwieser trychlos org>
+ * nautilus-actions/private/na-object-profile.c (object_is_valid):
+ Fix validity check of the profile.
+
Add a maintainer menu option to dump the clipboard.
* nautilus-actions/nact/nact-clipboard.c:
diff --git a/nautilus-actions/private/na-object-profile.c b/nautilus-actions/private/na-object-profile.c
index 00e1801..38aec45 100644
--- a/nautilus-actions/private/na-object-profile.c
+++ b/nautilus-actions/private/na-object-profile.c
@@ -1698,22 +1698,27 @@ object_is_valid( const NAObject *profile )
if( !NA_OBJECT_PROFILE( profile )->private->dispose_has_run ){
+ is_valid = TRUE;
parent = na_object_get_parent( profile );
- if( na_object_action_is_target_background( NA_OBJECT_ACTION( parent )) ||
- na_object_action_is_target_toolbar( NA_OBJECT_ACTION( parent ))){
-
- is_valid =
- is_valid_folders( NA_OBJECT_PROFILE( profile ));
-
- } else {
+ if( is_valid ){
+ if( na_object_action_is_target_background( NA_OBJECT_ACTION( parent )) ||
+ na_object_action_is_target_toolbar( NA_OBJECT_ACTION( parent ))){
+ is_valid =
+ is_valid_path_parameters( NA_OBJECT_PROFILE( profile )) &&
+ is_valid_folders( NA_OBJECT_PROFILE( profile ));
+ }
+ }
- is_valid =
- is_valid_path_parameters( NA_OBJECT_PROFILE( profile )) &&
- is_valid_filenames( NA_OBJECT_PROFILE( profile )) &&
- is_valid_mimetypes( NA_OBJECT_PROFILE( profile )) &&
- is_valid_isfiledir( NA_OBJECT_PROFILE( profile )) &&
- is_valid_schemes( NA_OBJECT_PROFILE( profile ));
+ if( is_valid ){
+ if( na_object_action_is_target_selection( NA_OBJECT_ACTION( parent ))){
+ is_valid =
+ is_valid_path_parameters( NA_OBJECT_PROFILE( profile )) &&
+ is_valid_filenames( NA_OBJECT_PROFILE( profile )) &&
+ is_valid_mimetypes( NA_OBJECT_PROFILE( profile )) &&
+ is_valid_isfiledir( NA_OBJECT_PROFILE( profile )) &&
+ is_valid_schemes( NA_OBJECT_PROFILE( profile ));
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]