[nautilus-actions] Level is writable if not locked
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Level is writable if not locked
- Date: Wed, 24 Mar 2010 23:36:30 +0000 (UTC)
commit 42c311f113486a3d0bffa7875d4cfdaed65b41d6
Author: Pierre Wieser <pwieser trychlos org>
Date: Thu Mar 25 00:35:44 2010 +0100
Level is writable if not locked
i.e. not all providers nor even GConf are locked by admin.
ChangeLog | 3 +++
src/core/na-pivot.c | 18 +++++++++++++-----
2 files changed, 16 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ffebc67..3ca50a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2009-03-24 Pierre Wieser <pwieser trychlos org>
+ * src/core/na-pivot.c (na_pivot_is_level_zero_writable):
+ Writable if not all not GConf are locked by admin.
+
* src/nact/nact-iaction-tab.c (nact_iaction_tab_runtime_init_toplevel):
* src/nact/nact-iadvanced-tab.c (runtime_init_connect_signals):
* src/nact/nact-icommand-tab.c (nact_icommand_tab_runtime_init_toplevel):
diff --git a/src/core/na-pivot.c b/src/core/na-pivot.c
index 05535e4..ad0c409 100644
--- a/src/core/na-pivot.c
+++ b/src/core/na-pivot.c
@@ -818,17 +818,26 @@ na_pivot_set_loadable( NAPivot *pivot, guint loadable )
gboolean
na_pivot_is_level_zero_writable( const NAPivot *pivot )
{
- gboolean writable;
+ gboolean all_locked;
+ gboolean gconf_locked;
+ GConfClient *gconf;
+ gchar *path;
writable = FALSE;
g_return_val_if_fail( NA_IS_PIVOT( pivot ), writable );
if( !pivot->private->dispose_has_run ){
- writable = !na_pivot_is_configuration_locked_by_admin( pivot );
+ all_locked = na_pivot_is_configuration_locked_by_admin( pivot );
+
+ gconf = na_iprefs_get_gconf_client( NA_IPREFS( pivot ));
+
+ path = gconf_concat_dir_and_key( IPREFS_GCONF_BASEDIR, "mandatory/io-gconf/locked" );
+ gconf_locked = na_gconf_utils_read_bool( gconf, path, FALSE, FALSE );
+ g_free( path );
}
- return( writable );
+ return( !all_locked && !gconf_locked );
}
/**
@@ -851,10 +860,9 @@ na_pivot_is_configuration_locked_by_admin( const NAPivot *pivot )
if( !pivot->private->dispose_has_run ){
gconf = na_iprefs_get_gconf_client( NA_IPREFS( pivot ));
- path = gconf_concat_dir_and_key( IPREFS_GCONF_BASEDIR, "mandatory/all/locked" );
+ path = gconf_concat_dir_and_key( IPREFS_GCONF_BASEDIR, "mandatory/all/locked" );
locked = na_gconf_utils_read_bool( gconf, path, FALSE, FALSE );
-
g_free( path );
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]