added cancelbutton handler, which destroys the

dialog
This commit is contained in:
Dimitur Kirov 2005-07-25 14:21:01 +00:00
parent 3ec2d68304
commit 0b0e605bb1
1 changed files with 5 additions and 0 deletions

View File

@ -709,12 +709,17 @@ class InputDialog:
self.ok_handler = ok_handler
okbutton = xml.get_widget('okbutton')
okbutton.connect('clicked', self.on_okbutton_clicked)
cancelbutton = xml.get_widget('cancelbutton')
cancelbutton.connect('clicked', self.on_cancelbutton_clicked)
self.dialog.show_all()
def on_okbutton_clicked(self, widget):
response = self.input_entry.get_text()
self.dialog.destroy()
self.ok_handler(response)
def on_cancelbutton_clicked(self, widget):
self.dialog.destroy()
def get_response(self):
if self.is_modal: