[nautilus-actions] Explicitly write item type in GConf
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Explicitly write item type in GConf
- Date: Wed, 14 Apr 2010 20:14:41 +0000 (UTC)
commit 4667e75f43489fc7bcb358d6fa3317b19c41c483
Author: Pierre Wieser <pwieser trychlos org>
Date: Sun Mar 28 12:05:03 2010 +0200
Explicitly write item type in GConf
ChangeLog | 9 +++++++++
src/io-gconf/nagp-writer.c | 15 +++++++++++++++
2 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a046b73..da9fbcb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -131,6 +131,15 @@
* src/core/na-factory-object.c (set_defaults_iter):
Only set a default value when the box has not been yet allocated.
+ * src/io-gconf/nagp-writer.c (nagp_writer_write_start):
+ Explicitely write item type.
+
+ * src/io-desktop/nadp-desktop-file.c:
+ * src/io-desktop/nadp-desktop-file.h
+ (nadp_desktop_file_set_boolean, nadp_desktop_file_set_locale_string,
+ nadp_desktop_file_set_string, nadp_desktop_file_set_string_list,
+ nadp_desktop_file_set_uint): New functions.
+
* src/api/na-core-utils.h:
* src/core/na-core-utils.c (na_core_utils_slist_to_array):
New function.
diff --git a/src/io-gconf/nagp-writer.c b/src/io-gconf/nagp-writer.c
index 0d592b1..8cbd7f5 100644
--- a/src/io-gconf/nagp-writer.c
+++ b/src/io-gconf/nagp-writer.c
@@ -213,6 +213,21 @@ guint
nagp_writer_write_start( const NAIFactoryProvider *writer, void *writer_data,
const NAIFactoryObject *object, GSList **messages )
{
+ GConfClient *gconf;
+ gchar *id;
+ gchar *path;
+
+ if( NA_IS_OBJECT_ITEM( object )){
+ id = na_object_get_id( object );
+ path = g_strdup_printf( "%s/%s/%s", NAGP_CONFIGURATIONS_PATH, id, NAGP_ENTRY_TYPE );
+ gconf = NAGP_GCONF_PROVIDER( writer )->private->gconf;
+
+ na_gconf_utils_write_string( gconf, path, NA_IS_OBJECT_ACTION( object ) ? NAGP_VALUE_TYPE_ACTION : NAGP_VALUE_TYPE_MENU, NULL );
+
+ g_free( path );
+ g_free( id );
+ }
+
return( NA_IIO_PROVIDER_CODE_OK );
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]