View Single Post
Posts: 146 | Thanked: 15 times | Joined on Oct 2008
#6
Originally Posted by daperl View Post
My opinion is that every widget inherits its pango context from its container parent. I don't think it makes a copy. But if it does, I would just make a recursive call starting at the top level window.

Maybe use the gtk.Container.get_children() call

The pseudo code might look something like this:

Code:
window.changePango(window)

def changePango (self, child):
    if child is a container:
        for subChild in child.get_children():
            changePango (subChild)
    else:
        change the child's pango context
If a child doesn't make a copy, just change the toplevel window's pango context and then maybe call the toplevel window's check_resize().

Check gtk.Container for more info.
Just a question: how do you check if a widget is a container?

Thanks,
L.