Hi!<br>I want to use StackableWindow in my program like dialogs, but dialogs is not suitable for me, because I want to have different application menus in every dialog, so, I decided to use StackableWindow. But the problem is that showing new window (creating it and putting on the top of the stack) doesn't blocks the code, which call window creation. Is it possible to use StackableWindow alike dialogs concept?<br>
<br>There is small example: (now I see <font size="1"><span style="font-family: courier new,monospace;"> print 'after destroying window' after showing new window, that is wrong. It should be showed after window destroying</span></font>).<br>
<br><font size="1"><span style="font-family: courier new,monospace;">import gtk</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">import hildon</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">class BlockedWindow:</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> def __init__(self, parent):</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> win = hildon.StackableWindow()</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> win.set_title('Modal window')</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> win.set_modal(True)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> win.set_transient_for(parent)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> label = gtk.Label("This is a subview")</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> vbox = gtk.VBox()</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> vbox.pack_start(label)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> win.add(vbox)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> self.win = win</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> def activate(self):</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> self.win.show_all()</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">def show_new_window(widget, parent):</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> print 'before showing blocked window'</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> win = BlockedWindow(parent)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> win.activate() # like dialog.run()</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> print 'after destroying window'</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">def main():</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> program = hildon.Program.get_instance()</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> win = hildon.StackableWindow()</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> win.set_title("Main window")</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> button = gtk.Button("Go to subview")</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> win.add(button)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> button.connect("clicked", show_new_window, win)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> win.connect("destroy", gtk.main_quit, None)</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> win.show_all()</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> gtk.main()</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">if __name__ == "__main__":</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> main()<br>
<br><br>Br, Max.<br></span></font>