[pygtk] dialog problem

Miguel Ángel García magmaxlistas at gmail.com
Sat Jan 10 17:05:46 WST 2009


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" <anuhacks en gmail.com> 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() <pygtk en daa.com.au>
> 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?

More information about the pygtk mailing list