Create CheckButtons with mnemonics

This commit is contained in:
Philipp Hörist 2017-03-04 01:06:38 +01:00
parent a44be8e6b6
commit fc6b50d953
1 changed files with 5 additions and 5 deletions

View File

@ -1671,7 +1671,7 @@ class YesNoDialog(HigDialog):
on_response_no=self.on_response_no)
if checktext:
self.checkbutton = Gtk.CheckButton(label=checktext)
self.checkbutton = Gtk.CheckButton.new_with_mnemonic(checktext)
self.vbox.pack_start(self.checkbutton, False, True, 0)
else:
self.checkbutton = None
@ -1764,7 +1764,7 @@ class ConfirmationDialogCheck(ConfirmationDialog):
ok_button = self.action_area.get_children()[0] # right to left
ok_button.grab_focus()
self.checkbutton = Gtk.CheckButton(label=checktext)
self.checkbutton = Gtk.CheckButton.new_with_mnemonic(checktext)
self.vbox.pack_start(self.checkbutton, False, True, 0)
self.set_modal(is_modal)
self.popup()
@ -1820,14 +1820,14 @@ class ConfirmationDialogDoubleCheck(ConfirmationDialog):
ok_button.grab_focus()
if checktext1:
self.checkbutton1 = Gtk.CheckButton(label=checktext1)
self.checkbutton1 = Gtk.CheckButton.new_with_mnemonic(checktext1)
if tooltip1:
self.checkbutton1.set_tooltip_text(tooltip1)
self.vbox.pack_start(self.checkbutton1, False, True, 0)
else:
self.checkbutton1 = None
if checktext2:
self.checkbutton2 = Gtk.CheckButton(label=checktext2)
self.checkbutton2 = Gtk.CheckButton.new_with_mnemonic(checktext2)
if tooltip2:
self.checkbutton2.set_tooltip_text(tooltip2)
self.vbox.pack_start(self.checkbutton2, False, True, 0)
@ -2098,7 +2098,7 @@ class InputDialogCheck(InputDialog):
self.input_entry.select_region(0, -1) # select all
if checktext:
self.checkbutton = Gtk.CheckButton(label=checktext)
self.checkbutton = Gtk.CheckButton.new_with_mnemonic(checktext)
self.vbox.pack_start(self.checkbutton, False, True, 0)
self.checkbutton.show()