how does a certain application do it's widget hierarchy in Gtk? Well lately I did, and therefore I wrote a little class that visualizes the allocation of the widget under your mouse (plus it's container). Add a little hacking with the dynamic linker and you get a small utility to inspect the widgets in (almost) any application. Take a look:
Unfortunately it's not perfect - atm it doesn't handle inner GdkWindows very well (as you can see in the video when I hover the GtkScrolledWindow), but maybe it could be easily fixed, I didn't really try as I didn't need that.
Also it doesn't work on just any application, I hooked the instantiation of my highlighting class to gtk_init(), so if your application doesn't call gtk_init(), it won't work (I'm afraid that also applies to all pygtk apps). Still, you can just compile your app with the Inspector class and instantiate it yourself.
Hopefully this will be useful for more people, so to see/grab the code, go to https://code.launchpad.net/~mhr3/+junk/inspector. And once you compile the .so file, run your favourite app using "LD_PRELOAD=./inspector.so [your_app]".