[nautilus-actions] Delete the schema names which may be embedded in GConfEntry
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Delete the schema names which may be embedded in GConfEntry
- Date: Fri, 9 Apr 2010 16:50:30 +0000 (UTC)
commit 10d5990067b1d7ad9ad4c209303df867a0729c8e
Author: Pierre Wieser <pwieser trychlos org>
Date: Fri Apr 9 14:57:36 2010 +0200
Delete the schema names which may be embedded in GConfEntry
This at last fix the bug which prevented to delete item which were imported via schemas.
ChangeLog | 3 +++
TODO | 8 +++-----
src/io-gconf/nagp-writer.c | 34 ++++++++++++++++++++--------------
3 files changed, 26 insertions(+), 19 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index cce509d..e430a9d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2009-04-09 Pierre Wieser <pwieser trychlos org>
+ * src/io-gconf/nagp-writer.c (nagp_iio_provider_delete_item):
+ Also delete the schema names which may be embedded in GConfEntry.
+
* src/api/na-gconf-utils.h:
* src/core/na-gconf-utils.c (na_gconf_utils_dump_entries):
New function.
diff --git a/TODO b/TODO
index 25df348..3ad10cb 100644
--- a/TODO
+++ b/TODO
@@ -57,11 +57,6 @@
give same defaults that when creating an action in NACT
choose the target I/O provider
-- NACT: unable to really delete an action imported with schemas
- 2009-11-21 (2.29.2-provider) not able to reproduce this, whether the
- action is imported via Import assistant or by drag and drop from
- Nautilus
-
- Nautilus bug when dnd to nautilus on other screen
see https://bugzilla.gnome.org/show_bug.cgi?id=593453
@@ -146,3 +141,6 @@
- "x-nautilus-desktop:///" is rather a scheme than a folder
- enhancement.ui: add a 'why this item is invalid'
+
+- remove foo
+- bug when deleting last action
diff --git a/src/io-gconf/nagp-writer.c b/src/io-gconf/nagp-writer.c
index 6b0f198..e743702 100644
--- a/src/io-gconf/nagp-writer.c
+++ b/src/io-gconf/nagp-writer.c
@@ -172,20 +172,13 @@ nagp_iio_provider_delete_item( const NAIIOProvider *provider, const NAObjectItem
ret = NA_IIO_PROVIDER_CODE_OK;
uuid = na_object_get_id( NA_OBJECT( item ));
- path = gconf_concat_dir_and_key( NAGP_SCHEMAS_PATH, uuid );
- gconf_client_recursive_unset( self->private->gconf, path, 0, &error );
- if( error ){
- g_warning( "%s: path=%s, error=%s", thisfn, path, error->message );
- *messages = g_slist_append( *messages, g_strdup( error->message ));
- g_error_free( error );
- error = NULL;
- ret = NA_IIO_PROVIDER_CODE_DELETE_SCHEMAS_ERROR;
- }
- g_free( path );
-
+ /* GCONF_UNSET_INCLUDING_SCHEMA_NAMES seems mean: including the name
+ * of the schemas which is embedded in the GConfEntry - this doesn't
+ * mean including the schemas themselves
+ */
if( ret == NA_IIO_PROVIDER_CODE_OK ){
path = gconf_concat_dir_and_key( NAGP_CONFIGURATIONS_PATH, uuid );
- gconf_client_recursive_unset( self->private->gconf, path, 0, &error );
+ gconf_client_recursive_unset( self->private->gconf, path, GCONF_UNSET_INCLUDING_SCHEMA_NAMES, &error );
if( error ){
g_warning( "%s: path=%s, error=%s", thisfn, path, error->message );
*messages = g_slist_append( *messages, g_strdup( error->message ));
@@ -193,11 +186,24 @@ nagp_iio_provider_delete_item( const NAIIOProvider *provider, const NAObjectItem
error = NULL;
ret = NA_IIO_PROVIDER_CODE_DELETE_CONFIG_ERROR;
}
+ gconf_client_suggest_sync( self->private->gconf, NULL );
+ g_free( path );
}
- gconf_client_suggest_sync( self->private->gconf, NULL );
+ if( ret == NA_IIO_PROVIDER_CODE_OK ){
+ path = gconf_concat_dir_and_key( NAGP_SCHEMAS_PATH, uuid );
+ gconf_client_recursive_unset( self->private->gconf, path, 0, &error );
+ if( error ){
+ g_warning( "%s: path=%s, error=%s", thisfn, path, error->message );
+ *messages = g_slist_append( *messages, g_strdup( error->message ));
+ g_error_free( error );
+ error = NULL;
+ ret = NA_IIO_PROVIDER_CODE_DELETE_SCHEMAS_ERROR;
+ }
+ g_free( path );
+ gconf_client_suggest_sync( self->private->gconf, NULL );
+ }
- g_free( path );
g_free( uuid );
return( ret );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]