_NORMAL_BUTTON_ICON_SIZE = Gtk.IconSize.BUTTON _TREE_ICON_SIZE = Gtk.IconSize.BUTTON _INFO_ICON_SIZE = Gtk.IconSize.LARGE_TOOLBAR _DEVICE_ICON_SIZE = Gtk.IconSize.DND try: import gi gi.check_version("3.7.4") _CAN_SET_ROW_NONE = None except (ValueError, AttributeError): _CAN_SET_ROW_NONE = '' # tree model columns _COLUMN = _NamedInts(PATH=0, NUMBER=1, ACTIVE=2, NAME=3, ICON=4, STATUS_TEXT=5, STATUS_ICON=6, DEVICE=7) _COLUMN_TYPES = (str, int, bool, str, str, str, str, TYPE_PYOBJECT) _TREE_SEPATATOR = (None, 0, False, None, None, None, None, None) assert len(_TREE_SEPATATOR) == len(_COLUMN_TYPES) assert len(_COLUMN_TYPES) == len(_COLUMN) # # create UI layout # def _new_button(label, icon_name=None,
from . import config_panel as _config_panel from . import action as _action, icons as _icons from .about import show_window as _show_about_window # # constants # _SMALL_BUTTON_ICON_SIZE = Gtk.IconSize.MENU _NORMAL_BUTTON_ICON_SIZE = Gtk.IconSize.BUTTON _TREE_ICON_SIZE = Gtk.IconSize.BUTTON _INFO_ICON_SIZE = Gtk.IconSize.LARGE_TOOLBAR _DEVICE_ICON_SIZE = Gtk.IconSize.DND # tree model columns _COLUMN = _NamedInts(PATH=0, NUMBER=1, ACTIVE=2, NAME=3, ICON=4, STATUS_TEXT=5, STATUS_ICON=6, DEVICE=7) _COLUMN_TYPES = (str, int, bool, str, str, str, str, TYPE_PYOBJECT) _TREE_SEPATATOR = (None, 0, False, None, None, None, None, None) assert len(_TREE_SEPATATOR) == len(_COLUMN_TYPES) assert len(_COLUMN_TYPES) == len(_COLUMN) _TOOLTIP_LINK_SECURE = _("The wireless link between this device and its receiver is encrypted.") _TOOLTIP_LINK_INSECURE = _("The wireless link between this device and its receiver is not encrypted.\n" "\n" "For pointing devices (mice, trackballs, trackpads), this is a minor security issue.\n" "\n" "It is, however, a major security issue for text-input devices (keyboards, numpads),\n" "because typed text can be sniffed inconspicuously by 3rd parties within range.") _UNIFYING_RECEIVER_TEXT = ( _("No device paired") + '.\n\n<small>' + _("Up to %d devices can be paired to this receiver") + '.</small>',