mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-06 17:05:34 +00:00
This change adds a config file for flake8 Python linter and fixes the problems the linter identified.
15 lines
408 B
Python
15 lines
408 B
Python
#!/usr/bin/python3
|
|
|
|
import gi
|
|
from gi.repository import Gtk
|
|
gi.require_version('Gtk', '3.0')
|
|
|
|
|
|
def bind_accelerator(accelerators, widget, accelerator, signal='clicked'):
|
|
key, mod = Gtk.accelerator_parse(accelerator)
|
|
widget.add_accelerator(signal, accelerators, key, mod, Gtk.AccelFlags.VISIBLE)
|
|
|
|
|
|
def init_accel(win):
|
|
win.accelerators = Gtk.AccelGroup()
|
|
win.add_accel_group(win.accelerators)
|