[pygtk] Change the appearance for all labels in a glade file

Walter Leibbrandt walter at translate.org.za
Wed Oct 8 17:13:19 WST 2008


Patty Ackermann wrote:
> Is there a fast way to change the appearance of all the labels (using 
> pango) in a glade file instead of doing it manually? I guess I am 
> hinting at returning a list of widgets that are only labels and 
> concatenating the pango markup.
labels = [w for w in glade_xml.get_widget_prefix('') if w is gtk.Label]

Although I would also suggest looking at RC files if it's applicable.


Walter Leibbrandt                  http://translate.org.za/blogs/walter
Software Developer                                  +27 12 460 1095 (w)

Recent blogs:
* Switching from Subversion to git
* The first official release of Spelt
* Auto-completion and auto-correction for Gtk+ widgets

More information about the pygtk mailing list