| 10 | |
| 11 | @Gtk.Template(resource_path=f"{RES_PATH}/shortcuts.ui") |
| 12 | class DialectShortcutsWindow(Gtk.ShortcutsWindow): |
| 13 | __gtype_name__ = "DialectShortcutsWindow" |
| 14 | |
| 15 | translate_shortcut: Gtk.ShortcutsShortcut = Gtk.Template.Child() # type: ignore |
| 16 | |
| 17 | def __init__(self, **kwargs): |
| 18 | super().__init__(**kwargs) |
| 19 | |
| 20 | @Gtk.Template.Callback() |
| 21 | def _on_show(self, _data): |
| 22 | """Called on self::show signal""" |
| 23 | self.translate_shortcut.props.visible = not Settings.get().live_translation |
| 24 | self.translate_shortcut.props.accelerator = Settings.get().translate_accel |