testinggtk r292 - trunk/tests
- From: bjornl svn gnome org
- To: svn-commits-list gnome org
- Subject: testinggtk r292 - trunk/tests
- Date: Sat, 28 Jun 2008 12:00:22 +0000 (UTC)
Author: bjornl
Date: Sat Jun 28 12:00:22 2008
New Revision: 292
URL: http://svn.gnome.org/viewvc/testinggtk?rev=292&view=rev
Log:
Debug function for printing a widget hierarchy
Modified:
trunk/tests/utils.py
Modified: trunk/tests/utils.py
==============================================================================
--- trunk/tests/utils.py (original)
+++ trunk/tests/utils.py Sat Jun 28 12:00:22 2008
@@ -110,3 +110,13 @@
if child.__class__.__name__ == path[0]:
return gtk_container_find_child(child, path[1:])
return None
+
+def gtk_container_print_tree(widget, indent = 0):
+ '''
+ Debug function that prints a containers widget hierarchy.
+ '''
+ print ' ' * indent + widget.__class__.__name__
+ if not isinstance(widget, gtk.Container):
+ return
+ for child in widget.get_children():
+ gtk_container_print_tree(child, indent + 2)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]