[nautilus-actions] Increment the level of the first child of the hierarchy



commit 6c1a2a726d6825d6f290cbe0ae67ba0feb0a8010
Author: Pierre Wieser <pwieser trychlos org>
Date:   Mon Nov 21 07:42:09 2011 +0100

    Increment the level of the first child of the hierarchy

 ChangeLog               |    3 +++
 src/core/na-gtk-utils.c |    9 ++++-----
 2 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 2d0706f..5d3195a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2011-11-21 Pierre Wieser <pwieser trychlos org>
 
+	* src/core/na-gtk-utils.c (na_gtk_utils_dump_children):
+	Increment the level of the first child of the hierarchy.
+
 	* run-autogen.sh: Be able to run from another directory.
 
 2011-11-16 Pierre Wieser <pwieser trychlos org>
diff --git a/src/core/na-gtk-utils.c b/src/core/na-gtk-utils.c
index aaf9aa5..f6bb4f4 100644
--- a/src/core/na-gtk-utils.c
+++ b/src/core/na-gtk-utils.c
@@ -81,9 +81,8 @@ na_gtk_utils_search_for_child_widget( GtkContainer *container, const gchar *name
 
 #ifdef NA_MAINTAINER_MODE
 static void
-dump_children( GtkContainer *container, int level )
+dump_children( const gchar *thisfn, GtkContainer *container, int level )
 {
-	static const gchar *thisfn = "na_gtk_utils_dump_children";
 	GList *children = gtk_container_get_children( container );
 	GList *ic;
 	GtkWidget *child;
@@ -92,7 +91,7 @@ dump_children( GtkContainer *container, int level )
 	int i;
 
 	prefix = g_string_new( "" );
-	for( i = 0 ; i < level ; ++i ){
+	for( i = 0 ; i <= level ; ++i ){
 		g_string_append_printf( prefix, "%s", "|  " );
 	}
 
@@ -109,7 +108,7 @@ dump_children( GtkContainer *container, int level )
 				g_debug( "%s: %s%s\t%s", thisfn, prefix->str, G_OBJECT_TYPE_NAME( child ), child_name );
 
 				if( GTK_IS_CONTAINER( child )){
-					dump_children( GTK_CONTAINER( child ), level+1 );
+					dump_children( thisfn, GTK_CONTAINER( child ), level+1 );
 				}
 			}
 		}
@@ -126,6 +125,6 @@ na_gtk_utils_dump_children( GtkContainer *container )
 
 	g_debug( "%s: container=%p", thisfn, container );
 
-	dump_children( container, 0 );
+	dump_children( thisfn, container, 0 );
 }
 #endif



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