Question

I used glade to build my GUI.
Now i have a transient top level dialog window that pops up. If i kill this dialog window with a window manager shortcut, it gets deleted/destroyed. I catch those signals an do a dialog_window.hide() but if i reopen the dialog window an empty window appears.

Am i missing some glade settings?
Or do i have to rebuild the dialog window each time? - When yes, how?

Here is my glade-file: http://codepad.org/dP7NOlob
The window i'm talking about is named edit_account_window

Was it helpful?

Solution

If the WindowManager kills the window all widgets get deleted, so the window needs to be rebuild. This can be done like this:

def buildFooWindow(self):
    self.builder.add_objects_from_file( 'glade_file_path', ['foo_window'] )
    self.builder.connect_signals({'foo_window_cancel': self.fooWindowCancel})

So you have to call this function each time you want to show the window.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top