[nautilus-actions] na_io_provider_write_item(): reset the NAIOProvider after successfull write



commit 8d9b173c45186d59c2d70ce8304ecb080897fa68
Author: Pierre Wieser <pwieser trychlos org>
Date:   Sun Jan 29 11:44:35 2012 +0100

    na_io_provider_write_item(): reset the NAIOProvider after successfull write

 ChangeLog                    |    5 +++++
 src/core/na-io-provider.c    |    4 ++++
 src/nact/nact-menubar-file.c |    3 +++
 3 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 0cd574b..0254578 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2012-01-29 Pierre Wieser <pwieser trychlos org>
 
+	* src/core/na-io-provider.c (na_io_provider_write_item):
+	Reset the NAIOProvider after having wrote the item.
+
+	* src/nact/nact-menubar-file.c (save_item): Warns if an error occurs.
+
 	* src/core/na-icontext.c (is_candidate_for_show_if_registered):
 	Consider having either GDBus or DBus-GLib.
 
diff --git a/src/core/na-io-provider.c b/src/core/na-io-provider.c
index 95b650a..d6a6f67 100644
--- a/src/core/na-io-provider.c
+++ b/src/core/na-io-provider.c
@@ -1250,6 +1250,10 @@ na_io_provider_write_item( const NAIOProvider *provider, const NAObjectItem *ite
 
 	ret = NA_IIO_PROVIDER_GET_INTERFACE( provider->private->provider )->write_item( provider->private->provider, item, messages );
 
+	if( ret == NA_IIO_PROVIDER_CODE_OK ){
+		na_object_set_provider( item, provider );
+	}
+
 	return( ret );
 }
 
diff --git a/src/nact/nact-menubar-file.c b/src/nact/nact-menubar-file.c
index 5b14571..9d1f068 100644
--- a/src/nact/nact-menubar-file.c
+++ b/src/nact/nact-menubar-file.c
@@ -398,6 +398,9 @@ save_item( BaseWindow *window, NAUpdater *updater, NAObjectItem *item, GSList **
 			if( provider_after != provider_before ){
 				g_signal_emit_by_name( window, MAIN_SIGNAL_ITEM_UPDATED, item, MAIN_DATA_PROVIDER );
 			}
+
+		} else {
+			g_warning( "%s: unable to write item: save_ret=%d", thisfn, save_ret );
 		}
 	}
 



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