PyGTK + Glade = weird problem

sapo fabioxgn at gmail.com
Fri Feb 24 23:21:29 EST 2006


Anyway, now i tried in my glade app and i m getting this error when i
try to show the window:

GtkWarning: gtk_paint_flat_box: assertion `style->depth ==
gdk_drawable_get_depth (window)' failed

here is the code:

class main:
    def __init__(self):
        self.principal = gtk.glade.XML("scc.glade")
        self.w_cadcli = self.principal.get_widget("w_cadcli")
        dic = {"on_principal_destroy" : self.DestroyFunction,
               "on_sair_activate" : self.DestroyFunction,
               "on_w_cadcli_destroy" : self.show_hide_window,
               "on_cadcli_activate" : self.show_hide_window}
        self.principal.signal_autoconnect(dic)
        principal = self.principal.get_widget("principal")
        gtk.main()

    def DestroyFunction(self,*args):
        gtk.main_quit()

    def show_hide_window(self,obj,event=None):
        #if the second window is open hide it, if dont show it
        if self.w_cadcli.get_property("visible") == True:
            self.w_cadcli.hide()
        else:
            self.w_cadcli.show()
        return True




More information about the Python-list mailing list