fix string; fix so it default to ok

This commit is contained in:
Nikos Kouremenos 2005-12-02 11:42:17 +00:00
parent 796b26883d
commit e39eb2a4e7
2 changed files with 7 additions and 2 deletions

View File

@ -508,6 +508,11 @@ class ConfirmationDialog(HigDialog):
def __init__(self, pritext, sectext=''): def __init__(self, pritext, sectext=''):
HigDialog.__init__(self, None, HigDialog.__init__(self, None,
gtk.MESSAGE_QUESTION, gtk.BUTTONS_OK_CANCEL, pritext, sectext) gtk.MESSAGE_QUESTION, gtk.BUTTONS_OK_CANCEL, pritext, sectext)
self.set_default_response(gtk.RESPONSE_OK)
ok_button = self.action_area.get_children()[0] # right to left
ok_button.grab_focus()
class WarningDialog(HigDialog): class WarningDialog(HigDialog):
def __init__(self, pritext, sectext=''): def __init__(self, pritext, sectext=''):

View File

@ -1461,9 +1461,9 @@ if __name__ == '__main__':
except: except:
pass pass
# Migrate old logs if user wnats that # Migrate old logs if user wants that
if NO_DB: if NO_DB:
dialog = dialogs.ConfirmationDialog(_('It is the first time you rin Gajim since the way logs are save changed. You can ask Gajim to migrate your old logs by pressing Ok button. This can take some minutes.'), _('Do you want to migrate your logs?')) dialog = dialogs.ConfirmationDialog(_('Do you want to migrate your logs?'), _('It is the first time you run Gajim since the way logs are stored has changed. Gajim can migrate your logs at this state. Migrate?'))
if dialog.get_response() == gtk.RESPONSE_OK: if dialog.get_response() == gtk.RESPONSE_OK:
from common import migrate_logs_to_dot9_db from common import migrate_logs_to_dot9_db
migrate_logs_to_dot9_db.migrate() migrate_logs_to_dot9_db.migrate()