문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top