Skip to content
Snippets Groups Projects
Commit 4fd4bda0 authored by Daniel Brötzmann's avatar Daniel Brötzmann
Browse files

Add mnemonics to default button types

parent 77a4f36c
No related branches found
No related tags found
No related merge requests found
...@@ -45,26 +45,26 @@ def make(cls, type_=None, **kwargs): ...@@ -45,26 +45,26 @@ def make(cls, type_=None, **kwargs):
if type_ is not None: if type_ is not None:
if type_ == 'OK': if type_ == 'OK':
default_kwargs['response'] = Gtk.ResponseType.OK default_kwargs['response'] = Gtk.ResponseType.OK
default_kwargs['text'] = 'OK' default_kwargs['text'] = _('_OK')
elif type_ == 'Cancel': elif type_ == 'Cancel':
default_kwargs['response'] = Gtk.ResponseType.CANCEL default_kwargs['response'] = Gtk.ResponseType.CANCEL
default_kwargs['text'] = _('Cancel') default_kwargs['text'] = _('_Cancel')
elif type_ == 'Accept': elif type_ == 'Accept':
default_kwargs['response'] = Gtk.ResponseType.ACCEPT default_kwargs['response'] = Gtk.ResponseType.ACCEPT
default_kwargs['text'] = _('Accept') default_kwargs['text'] = _('_Accept')
default_kwargs['is_default'] = True default_kwargs['is_default'] = True
default_kwargs['action'] = ButtonAction.SUGGESTED default_kwargs['action'] = ButtonAction.SUGGESTED
elif type_ == 'Delete': elif type_ == 'Delete':
default_kwargs['response'] = Gtk.ResponseType.REJECT default_kwargs['response'] = Gtk.ResponseType.REJECT
default_kwargs['text'] = _('Delete') default_kwargs['text'] = _('_Delete')
default_kwargs['action'] = ButtonAction.DESTRUCTIVE default_kwargs['action'] = ButtonAction.DESTRUCTIVE
elif type_ == 'Remove': elif type_ == 'Remove':
default_kwargs['response'] = Gtk.ResponseType.REJECT default_kwargs['response'] = Gtk.ResponseType.REJECT
default_kwargs['text'] = _('Remove') default_kwargs['text'] = _('_Remove')
default_kwargs['action'] = ButtonAction.DESTRUCTIVE default_kwargs['action'] = ButtonAction.DESTRUCTIVE
else: else:
raise ValueError('Unknown button type: %s ' % type_) raise ValueError('Unknown button type: %s ' % type_)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment