prevent traceback when no callback is given in ConfirmationDialogCheck dialog

This commit is contained in:
Yann Leboulanger 2007-09-30 20:38:41 +00:00
parent b22da6ead9
commit 436adf7b95
1 changed files with 4 additions and 2 deletions

View File

@ -1089,11 +1089,13 @@ class ConfirmationDialogCheck(ConfirmationDialog):
# XXX should cancel if somebody closes the dialog
def on_response_ok(self, widget):
self.user_response_ok(self.is_checked())
if self.user_response_ok:
self.user_response_ok(self.is_checked())
self.destroy()
def on_response_cancel(self, widget):
self.user_response_cancel()
if self.user_response_cancel:
self.user_response_cancel()
self.destroy()
def is_checked(self):