diff --git a/src/dialogs.py b/src/dialogs.py index 20f4248d2..e5e3ca202 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -484,11 +484,12 @@ class ConfirmationDialogCheck(ConfirmationDialog): '''HIG compliant confirmation dialog with checkbutton.''' def __init__(self, pritext, sectext='', checktext = ''): HigDialog.__init__(self, None, pritext, sectext, - gtk.STOCK_DIALOG_WARNING, [ [gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL], - [ gtk.STOCK_OK, gtk.RESPONSE_OK ] ]) + gtk.STOCK_DIALOG_WARNING, [ [gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL] ]) + # add ok button manually, because we need to focus on it + ok_button = self.add_button (gtk.STOCK_OK, gtk.RESPONSE_OK) self.checkbutton = gtk.CheckButton(checktext) self.vbox.pack_start(self.checkbutton, expand=False, fill=True) - + ok_button.grab_focus() # override this method not to destroy the dialog def get_response(self): self.show_all()