[nautilus-actions] Do not add extra spaces in string lists
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Do not add extra spaces in string lists
- Date: Mon, 17 May 2010 21:23:22 +0000 (UTC)
commit ac141449870b49c79cc3945eaba1cf6ad2bafc26
Author: Pierre Wieser <pwieser trychlos org>
Date: Mon May 17 23:22:55 2010 +0200
Do not add extra spaces in string lists
ChangeLog | 9 +++++++++
src/core/na-core-utils.c | 2 +-
src/core/na-factory-object.c | 4 ++++
src/nact/nact-main-menubar-file.c | 8 ++++++++
4 files changed, 22 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 60ee238..f110a91 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2010-05-17 Pierre Wieser <pwieser trychlos org>
+ * src/core/na-core-utils.c (na_core_utils_slist_from_array):
+ Strip the strings extracted from the array.
+
+ * src/core/na-factory-object.c (na_factory_object_are_equal):
+ Dump the data when different.
+
+ * src/nact/nact-main-menubar-file.c
+ (nact_main_menubar_file_save_items): Add a debug message.
+
* src/api/na-object-api.h (na_object_set_last_version):
* src/api/na-object-action.h:
* src/core/na-object-action.c (na_object_action_set_last_version):
diff --git a/src/core/na-core-utils.c b/src/core/na-core-utils.c
index 33fd3f5..4ab06ad 100644
--- a/src/core/na-core-utils.c
+++ b/src/core/na-core-utils.c
@@ -304,7 +304,7 @@ na_core_utils_slist_from_array( const gchar **str_array )
idx = ( gchar ** ) str_array;
while( *idx ){
- slist = g_slist_prepend( slist, g_strdup( *idx ));
+ slist = g_slist_prepend( slist, g_strstrip( g_strdup( *idx )));
idx++;
}
diff --git a/src/core/na-factory-object.c b/src/core/na-factory-object.c
index 2c896fd..adfd517 100644
--- a/src/core/na-factory-object.c
+++ b/src/core/na-factory-object.c
@@ -412,6 +412,10 @@ na_factory_object_are_equal( const NAIFactoryObject *a, const NAIFactoryObject *
are_equal = na_data_boxed_are_equal( a_boxed, b_boxed );
if( !are_equal ){
g_debug( "%s: %s not equal as %s different", thisfn, G_OBJECT_TYPE_NAME( a ), a_def->name );
+ g_debug( "%s: a=", thisfn );
+ na_data_boxed_dump( a_boxed );
+ g_debug( "%s: b=", thisfn );
+ na_data_boxed_dump( b_boxed );
}
} else {
diff --git a/src/nact/nact-main-menubar-file.c b/src/nact/nact-main-menubar-file.c
index 8816701..9c59382 100644
--- a/src/nact/nact-main-menubar-file.c
+++ b/src/nact/nact-main-menubar-file.c
@@ -254,6 +254,7 @@ nact_main_menubar_file_save_items( NactMainWindow *window )
NactApplication *application;
NAUpdater *updater;
MenubarIndicatorsStruct *mis;
+ gchar *label;
g_debug( "%s: window=%p", thisfn, ( void * ) window );
g_return_if_fail( NACT_IS_MAIN_WINDOW( window ));
@@ -280,8 +281,15 @@ nact_main_menubar_file_save_items( NactMainWindow *window )
* recursively each and every modified item
*/
for( it = items ; it ; it = it->next ){
+ label = na_object_get_label( it->data );
+ g_debug( "%s saving item %s %p (%s), modified=%s",
+ thisfn,
+ G_OBJECT_TYPE_NAME( it->data ),
+ ( void * ) it->data, label,
+ na_object_is_modified( it->data ) ? "True":"False" );
save_item( window, updater, NA_OBJECT_ITEM( it->data ));
na_object_check_status( it->data );
+ g_free( label );
}
g_list_free( items );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]