[pygtk] Exiting an application with gtk.main_quit

Isaac Alston genelisp at googlemail.com
Mon Apr 21 00:44:34 WST 2008


I've been trying to do the following: show a user/pass modal dialog
before the user is allowed to use the main window with pygtk and
glade3. If the user clicks 'cancel' then the dialog should also quit
the application (because the user needs a valid login). I thought it
would be as simple as binding the destroy event to gtk.main_quit;
however, when I do this I get 'RuntimeError: called outside of a
mainloop' and I'm not sure why. Here's my python code:
http://dpaste.com/hold/45961 and here's auth_dialog.glade:
http://dpaste.com/hold/45963 and main_window.glade:

Can anyone help me resolve my issue please?



More information about the pygtk mailing list