AFAIK there's not gtk.RESPONSE_QUIT response id. When you create the dialog in Glade you're able to define a response ID for a dialog button in the properties editor. The response ID should be an integer matching one of the response constants in the gtk module, e.g.
>>> import gtk >>> int(gtk.RESPONSE_OK) -5 >>> int(gtk.RESPONSE_CANCEL) -6 Hope that helps! Andi On Sat, Jan 10, 2009 at 9:05 AM, Miguel Ángel García <[email protected]> wrote: > Hello. > > I'm not too sure, but I think that you have to compare with > RESPONSE_CANCEL despite RESPONSE_QUIT. What I'm sure is that you must > quit the quotes, because it is a var, not a string. > > If I had had that problem, I had try to set a: > print gtk.RESPONSE_QUIT, self.response > between the "run" and the "if" statements, to see what is returning and > why it is not entering in the condition. > > Good luck! > > El Sat, 10 Jan 2009 12:07:18 +0530 > "anusha k" <[email protected]> escribió: > >> hi, >> I am developing a account application .In that i added a quit dialog >> with a two stock buttons i.e quit and cancel.but when i triggered the >> quit button just closes the dialog not the main window .here is my >> code: >> >> def dialogQuit(self,widget): >> self.dialog_quit = self.wTree.get_widget("dialog_quit") >> self.dialog_quit.show() >> self.response = self.dialog_quit.run() >> if self.response == 'gtk.RESPONSE_QUIT': >> gtk.main_quit() >> self.dialog_quit.destroy() <[email protected]> >> >> how to solve the issue >> >> Thanks in advance >> >> Njoy the share of Freedom, >> Anusha > > > -- > In a world without walls and fences, who needs Windows and Gates? > _______________________________________________ > pygtk mailing list [email protected] > http://www.daa.com.au/mailman/listinfo/pygtk > Read the PyGTK FAQ: http://faq.pygtk.org/ > _______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
