[nautilus-actions] Force GConf sync to get ride of 'foo' entry
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Force GConf sync to get ride of 'foo' entry
- Date: Thu, 10 Jun 2010 22:33:45 +0000 (UTC)
commit 309082c4d350b62fbddb8b9894b09882e2cd3ee7
Author: Pierre Wieser <pwieser trychlos org>
Date: Thu Apr 15 19:18:25 2010 +0200
Force GConf sync to get ride of 'foo' entry
ChangeLog | 5 +++++
src/io-gconf/nagp-writer.c | 24 +++++++++++++++++-------
2 files changed, 22 insertions(+), 7 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7223784..992bdb9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -45,6 +45,11 @@
* src/utils/nautilus-actions-run.c:
Mark two new strings for translation.
+2010-04-15 Pierre Wieser <pwieser trychlos org>
+
+ * src/io-gconf/nagp-writer.c (nagp_iio_provider_is_willing_to_write):
+ Force GConf sync to get ride of 'foo' entry.
+
2010-04-14 Pierre Wieser <pwieser trychlos org>
* NEWS: Update before release.
diff --git a/src/io-gconf/nagp-writer.c b/src/io-gconf/nagp-writer.c
index 8cbd7f5..c5b0f40 100644
--- a/src/io-gconf/nagp-writer.c
+++ b/src/io-gconf/nagp-writer.c
@@ -69,7 +69,7 @@ nagp_iio_provider_is_willing_to_write( const NAIIOProvider *provider )
gboolean
nagp_iio_provider_is_able_to_write( const NAIIOProvider *provider )
{
- /*static const gchar *thisfn = "nagp_iio_provider_is_able_to_write";*/
+ static const gchar *thisfn = "nagp_iio_provider_is_able_to_write";
static const gchar *path = "/apps/nautilus-actions/foo";
NagpGConfProvider *self;
gboolean able_to = FALSE;
@@ -82,18 +82,28 @@ nagp_iio_provider_is_able_to_write( const NAIIOProvider *provider )
if( !self->private->dispose_has_run ){
- if( !na_gconf_utils_write_string( self->private->gconf, path, "1", NULL )){
- able_to = FALSE;
-
- } else if( !gconf_client_recursive_unset( self->private->gconf, path, 0, NULL )){
+ if( !na_gconf_utils_write_string( self->private->gconf, path, "foo", NULL )){
able_to = FALSE;
} else {
- able_to = TRUE;
+ gchar *str = na_gconf_utils_read_string( self->private->gconf, path, FALSE, NULL );
+ if( strcmp( str, "foo" )){
+ able_to = FALSE;
+
+ } else if( !gconf_client_recursive_unset( self->private->gconf, path, 0, NULL )){
+ able_to = FALSE;
+
+ } else {
+ able_to = TRUE;
+ }
+
+ g_free( str );
}
}
- /*g_debug( "%s: provider=%p, able_to=%s", thisfn, ( void * ) provider, able_to ? "True":"False" );*/
+ gconf_client_suggest_sync( self->private->gconf, NULL );
+
+ g_debug( "%s: provider=%p, able_to=%s", thisfn, ( void * ) provider, able_to ? "True":"False" );
return( able_to );
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]