[nautilus-actions] Dump hierarchy tree before alpha sort



commit 127341a9a668402694c596cb2c61063557736df0
Author: pierre <pierre vfedora10 virtuals pwi>
Date:   Mon Sep 28 16:23:18 2009 +0200

    Dump hierarchy tree before alpha sort

 ChangeLog                    |    3 +++
 src/common/na-iio-provider.c |   13 ++++++++-----
 src/nact/nact-main-menubar.c |    4 ++++
 3 files changed, 15 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 91a84cd..22fb80f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,9 @@
 	Add a relabel argument.
 	Remove useless debug trace.
 
+	* src/common/na-iio-provider.c (na_iio_provider_get_items_tree):
+	Dump the hierarchy tree before the alphabetical sort.
+
 	* src/nact/base-iprefs.c:
 	* src/nact/base-iprefs.c (base_iprefs_get_bool,
 	base_iprefs_set_bool):
diff --git a/src/common/na-iio-provider.c b/src/common/na-iio-provider.c
index 0f44ba0..6fa69cf 100644
--- a/src/common/na-iio-provider.c
+++ b/src/common/na-iio-provider.c
@@ -177,11 +177,13 @@ na_iio_provider_get_items_tree( const NAPivot *pivot )
 		na_utils_free_string_list( level_zero );
 		na_object_free_items( merged );
 
+		g_debug( "%s: tree before alphabetical reordering", thisfn );
+		na_object_dump_tree( hierarchy );
+		g_debug( "%s: end of tree", thisfn );
+
 		if( na_iprefs_is_alphabetical_order( NA_IPREFS( pivot ))){
 			hierarchy = sort_tree( pivot, hierarchy );
 		}
-
-		na_object_dump_tree( hierarchy );
 	}
 
 	return( hierarchy );
@@ -196,6 +198,7 @@ na_iio_provider_get_items_tree( const NAPivot *pivot )
 static GList *
 build_hierarchy( GList *tree, GSList *level_zero, gboolean list_if_empty )
 {
+	static const gchar *thisfn = "na_iio_provider_build_hierarchy";
 	GList *hierarchy, *it;
 	GSList *ilevel;
 	GSList *subitems_ids;
@@ -205,12 +208,12 @@ build_hierarchy( GList *tree, GSList *level_zero, gboolean list_if_empty )
 
 	if( g_slist_length( level_zero )){
 		for( ilevel = level_zero ; ilevel ; ilevel = ilevel->next ){
-			g_debug( "na_iio_provider_build_hierarchy: next_level_zero uuid is %s", ( gchar * ) ilevel->data );
+			g_debug( "%s: uuid=%s", thisfn, ( gchar * ) ilevel->data );
 			it = g_list_find_custom( tree, ilevel->data, ( GCompareFunc ) search_item );
 			if( it ){
 				hierarchy = g_list_append( hierarchy, g_object_ref( it->data ));
-				g_debug( "na_iio_provider_build_hierarchy: appending %s at %p to hierarchy %p",
-						G_OBJECT_TYPE_NAME( it->data ), ( void * ) it->data, ( void * ) hierarchy );
+				g_debug( "%s: uuid=%s: %s (%p) appended to hierarchy %p",
+						thisfn, ( gchar * ) ilevel->data, G_OBJECT_TYPE_NAME( it->data ), ( void * ) it->data, ( void * ) hierarchy );
 
 				if( NA_IS_OBJECT_MENU( it->data )){
 					subitems_ids = na_object_menu_get_items_list( NA_OBJECT_MENU( it->data ));
diff --git a/src/nact/nact-main-menubar.c b/src/nact/nact-main-menubar.c
index 2ee8f1a..c55a33d 100644
--- a/src/nact/nact-main-menubar.c
+++ b/src/nact/nact-main-menubar.c
@@ -840,9 +840,13 @@ refresh_actions_sensitivity_with_count( NactMainWindow *window, gint count_selec
 			TAB_UPDATABLE_PROP_EDITED_ACTION, &item,
 			TAB_UPDATABLE_PROP_EDITED_PROFILE, &profile,
 			NULL );
+	g_debug( "%s: item=%p (%s), profile=%p", thisfn,
+			( void * ) item, item ? G_OBJECT_TYPE_NAME( item ) : "(nil)", ( void * ) profile );
 
 	has_exportable = nact_iactions_list_has_exportable( NACT_IACTIONS_LIST( window ));
+	g_debug( "%s: has_exportable=%s", thisfn, has_exportable ? "True":"False" );
 	has_modified = nact_main_window_has_modified_items( window );
+	g_debug( "%s: has_modified=%s", thisfn, has_modified ? "True":"False" );
 
 	paste_enabled = FALSE;
 	clipboard = nact_main_window_get_clipboard( window );



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