[nautilus-actions] Explicitly read subitems string list



commit 6d229c5fdfb49c12c2e9b6eaa0ad1e36aeb934ce
Author: Pierre Wieser <pwieser trychlos org>
Date:   Mon Mar 29 05:40:22 2010 +0200

    Explicitly read subitems string list

 ChangeLog                    |    3 +++
 src/io-desktop/nadp-reader.c |   21 +++++++++++++++++++++
 2 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 3051f17..6be6719 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -125,6 +125,9 @@
 
 2009-03-29 Pierre Wieser <pwieser trychlos org>
 
+	* src/io-desktop/nadp-reader.c (nadp_reader_ifactory_provider_read_done):
+	Explicitly read subitems string list.
+
 	* src/io-desktop/nadp-desktop-provider.c (ifactory_provider_iface_init):
 	* src/io-desktop/nadp-writer.c:
 	* src/io-desktop/nadp-writer.h (nadp_writer_ifactory_provider_write_done):
diff --git a/src/io-desktop/nadp-reader.c b/src/io-desktop/nadp-reader.c
index 0fc44fe..8a13ff5 100644
--- a/src/io-desktop/nadp-reader.c
+++ b/src/io-desktop/nadp-reader.c
@@ -70,6 +70,7 @@ static void              desktop_weak_notify( NadpDesktopFile *ndf, GObject *ite
 static void              free_desktop_paths( GList *paths );
 
 static gboolean          read_done_desktop_is_writable( const NAIFactoryProvider *provider, NAObjectItem *item, NadpReaderData *reader_data, GSList **messages );
+static void              read_subitems_key( const NAIFactoryProvider *provider, NAObjectItem *item, NadpReaderData *reader_data, GSList **messages );
 static void              read_done_load_profiles( const NAIFactoryProvider *provider, NAObjectAction *action, NadpReaderData *data, GSList **messages );
 static void              read_done_action_load_profile( const NAIFactoryProvider *provider, NadpReaderData *reader_data, const gchar *profile_id, GSList **messages );
 static void              read_done_attach_profile( const NAIFactoryProvider *provider, NAObjectProfile *profile, NadpReaderData *reader_data, GSList **messages );
@@ -457,6 +458,7 @@ nadp_reader_ifactory_provider_read_done( const NAIFactoryProvider *reader, void
 		if( NA_IS_OBJECT_ITEM( serializable )){
 			writable = read_done_desktop_is_writable( reader, NA_OBJECT_ITEM( serializable ), ( NadpReaderData * ) reader_data, messages );
 			na_object_set_readonly( serializable, !writable );
+			read_subitems_key( reader, NA_OBJECT_ITEM( serializable ), ( NadpReaderData * ) reader_data, messages );
 		}
 
 		if( NA_IS_OBJECT_ACTION( serializable )){
@@ -486,6 +488,25 @@ read_done_desktop_is_writable( const NAIFactoryProvider *provider, NAObjectItem
 }
 
 static void
+read_subitems_key( const NAIFactoryProvider *provider, NAObjectItem *item, NadpReaderData *reader_data, GSList **messages )
+{
+	GSList *subitems;
+	gboolean key_found;
+
+	subitems = nadp_desktop_file_get_string_list( reader_data->ndf,
+			NADP_GROUP_DESKTOP,
+			NA_IS_OBJECT_ACTION( item ) ? NADP_KEY_PROFILES : NADP_KEY_ITEMS_LIST,
+			&key_found,
+			NULL );
+
+	if( key_found ){
+		na_object_set_items_slist( item, subitems );
+	}
+
+	na_core_utils_slist_free( subitems );
+}
+
+static void
 read_done_load_profiles( const NAIFactoryProvider *provider, NAObjectAction *action, NadpReaderData *reader_data, GSList **messages )
 {
 	GSList *order;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]