[Darlan] History manager.

Add the name of the Contact to the confirmation dialog.
Add the title to the confirmation dialogs. Fixes #6892
This commit is contained in:
Denis Fomin 2011-05-25 19:11:04 +04:00
parent 225f74f0b8
commit d8adb7bd18
1 changed files with 12 additions and 5 deletions

View File

@ -256,6 +256,7 @@ class HistoryManager:
'database filesize, click YES, else click NO.' 'database filesize, click YES, else click NO.'
'\n\nIn case you click YES, please wait...'), '\n\nIn case you click YES, please wait...'),
on_response_yes=on_yes, on_response_no=on_no) on_response_yes=on_yes, on_response_no=on_no)
dialog.set_title(_('Database Cleanup'))
button_box = dialog.get_children()[0].get_children()[1] button_box = dialog.get_children()[0].get_children()[1]
button_box.get_children()[0].grab_focus() button_box.get_children()[0].grab_focus()
@ -586,13 +587,18 @@ class HistoryManager:
self.AT_LEAST_ONE_DELETION_DONE = True self.AT_LEAST_ONE_DELETION_DONE = True
pri_text = i18n.ngettext( if paths_len == 1:
'Do you really want to delete logs of the selected contact?', jid_id = '<i>%s</i>' % liststore[list_of_paths[0]][0]
'Do you really want to delete logs of the selected contacts?', pri_text = _('Do you really want to delete the logs of %(jid)s?') \
paths_len) % {'jid': jid_id}
dialog = dialogs.ConfirmationDialog(pri_text, else:
pri_text = _(
'Do you really want to delete logs of the selected contacts?')
dialog = dialogs.ConfirmationDialog('',
_('This is an irreversible operation.'), on_response_ok=(on_ok, _('This is an irreversible operation.'), on_response_ok=(on_ok,
liststore, list_of_paths)) liststore, list_of_paths))
dialog.set_title(_('Deletion Confirmation'))
dialog.set_markup(pri_text)
ok_button = dialog.get_children()[0].get_children()[1].get_children()[0] ok_button = dialog.get_children()[0].get_children()[1].get_children()[0]
ok_button.grab_focus() ok_button.grab_focus()
dialog.set_transient_for(self.window) dialog.set_transient_for(self.window)
@ -630,6 +636,7 @@ class HistoryManager:
dialog = dialogs.ConfirmationDialog(pri_text, dialog = dialogs.ConfirmationDialog(pri_text,
_('This is an irreversible operation.'), on_response_ok=(on_ok, _('This is an irreversible operation.'), on_response_ok=(on_ok,
liststore, list_of_paths)) liststore, list_of_paths))
dialog.set_title(_('Deletion Confirmation'))
ok_button = dialog.get_children()[0].get_children()[1].get_children()[0] ok_button = dialog.get_children()[0].get_children()[1].get_children()[0]
ok_button.grab_focus() ok_button.grab_focus()
dialog.set_transient_for(self.window) dialog.set_transient_for(self.window)