[nautilus-actions] na_gtk_utils_dump_children: improve the dump



commit 96f833e29c1e2f0422c6f08d4d55a2cf3ebeabd0
Author: Pierre Wieser <pwieser trychlos org>
Date:   Sun Nov 27 18:33:11 2011 +0100

    na_gtk_utils_dump_children: improve the dump
    
    Also dump the address of the child widget.
    Also dump children which do not have a name (dynamically allocated).

 ChangeLog               |    6 ++++++
 src/core/na-gtk-utils.c |    9 ++++-----
 2 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 808df55..4d726f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-11-27 Pierre Wieser <pwieser trychlos org>
+
+	* src/core/na-gtk-utils.c (dump_children):
+	Also dump the address of the child widget.
+	Also dump children which do not have a name (dynamically allocated).
+
 2011-11-26 Pierre Wieser <pwieser trychlos org>
 
 	* src/nact/nact-tree-ieditable.c (do_insert_before): Re-reverse the list
diff --git a/src/core/na-gtk-utils.c b/src/core/na-gtk-utils.c
index f6bb4f4..24bd6df 100644
--- a/src/core/na-gtk-utils.c
+++ b/src/core/na-gtk-utils.c
@@ -104,12 +104,11 @@ dump_children( const gchar *thisfn, GtkContainer *container, int level )
 #else
 			child_name = gtk_widget_get_name( child );
 #endif
-			if( child_name && strlen( child_name )){
-				g_debug( "%s: %s%s\t%s", thisfn, prefix->str, G_OBJECT_TYPE_NAME( child ), child_name );
+			g_debug( "%s: %s%s\t%p %s",
+					thisfn, prefix->str, G_OBJECT_TYPE_NAME( child ), ( void * ) child, child_name );
 
-				if( GTK_IS_CONTAINER( child )){
-					dump_children( thisfn, GTK_CONTAINER( child ), level+1 );
-				}
+			if( GTK_IS_CONTAINER( child )){
+				dump_children( thisfn, GTK_CONTAINER( child ), level+1 );
 			}
 		}
 	}



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