diff --git a/ui/a2ui/__init__.py b/ui/a2ui/__init__.py index 648f924c..983f30d4 100644 --- a/ui/a2ui/__init__.py +++ b/ui/a2ui/__init__.py @@ -1,5 +1,5 @@ """ -a2ui - setup interface for an Autohotkey environment. +a2ui - Setup User Interface for an Autohotkey runtime. """ import os import sys @@ -20,8 +20,9 @@ RESTART_DELAY = 300 RUNTIME_WATCH_INTERVAL = 1000 DEFAULT_WIN_SIZE = (700, 480) -TITLE_ONLINE = 'Runtime is Live!' -TITLE_OFFLINE = 'Runtime is Offline!' +_TITLE_PREFIX = 'Runtime is' +TITLE_ONLINE = _TITLE_PREFIX + ' Live!' +TITLE_OFFLINE = _TITLE_PREFIX + ' Offline!' class A2Window(QtWidgets.QMainWindow): @@ -189,6 +190,8 @@ def _setup_actions(self): self._make_url_action(self.ui.actionChat_on_Gitter, self.a2.urls.gitter, Icons.gitter) self._make_url_action(self.ui.actionChat_on_Telegram, self.a2.urls.telegram, Icons.telegram) + self.ui.actionInspect_UI.triggered.connect(self._inspect_ui) + def _make_url_action(self, action: QtGui.QAction, url: str, icon: QtGui.QIcon): action.setData(url) action.setIcon(icon) @@ -205,9 +208,9 @@ def _setup_shortcuts(self): for keys, parent, func in ( (Qt.Key_Escape, self, self.escape), - (Qt.CTRL | Qt.Key_Enter, self, self.edit_submit), - (Qt.CTRL | Qt.Key_Return, self, self.edit_submit), - (Qt.CTRL | Qt.Key_S, self, self.edit_submit), + ('Ctrl+Enter', self, self.edit_submit), + ('Ctrl+Return', self, self.edit_submit), + ('Ctrl+S', self, self.edit_submit), (Qt.Key_Home, scroll_area, self.scroll_to_start), (Qt.Key_End, scroll_area, self.scroll_to_end), (Qt.Key_F1, self, self.module_view.help), diff --git a/ui/typings/a2qt/QtGui.pyi b/ui/typings/a2qt/QtGui.pyi index 6e6fa0ac..e6851732 100644 --- a/ui/typings/a2qt/QtGui.pyi +++ b/ui/typings/a2qt/QtGui.pyi @@ -7447,6 +7447,7 @@ class QSessionManager(QtCore.QObject): class QShortcut(QtCore.QObject): + activated : QtCore.Signal = ... @overload def __init__(self, arg__1:QtGui.QKeySequence.StandardKey, arg__2:QtCore.QObject, arg__3:Callable, arg__4:QtCore.Qt.ShortcutContext=...) -> None: ... @@ -7457,7 +7458,7 @@ class QShortcut(QtCore.QObject): @overload def __init__(self, key:Union[QtGui.QKeySequence, QtCore.QKeyCombination, QtGui.QKeySequence.StandardKey, str, int], parent:QtCore.QObject, member:Optional[bytes]=..., ambiguousMember:Optional[bytes]=..., context:QtCore.Qt.ShortcutContext=...) -> None: ... @overload - def __init__(self, parent:QtCore.QObject) -> None: ... + def __init__(self, parent:QtCore.QObject | None) -> None: ... def autoRepeat(self) -> bool: ... def context(self) -> QtCore.Qt.ShortcutContext: ...