diff --git a/CHANGELOG.md b/CHANGELOG.md index 8997e49..fadcc5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # 0.4.5 * Make it possible to delete revisions + * Make it possible to force-lock the screen even if idle timer hasn't tripped + * Add shortcuts for lock and unlock of screen # 0.4.4.1 diff --git a/bouquin/locales/en.json b/bouquin/locales/en.json index a769ceb..b5dd4b9 100644 --- a/bouquin/locales/en.json +++ b/bouquin/locales/en.json @@ -88,6 +88,7 @@ "key_prompt_enter_key": "Enter key", "lock_overlay_locked_due_to_inactivity": "Locked due to inactivity", "lock_overlay_unlock": "Unlock", + "main_window_lock_screen_accessibility": "&Lock screen", "main_window_ready": "Ready", "main_window_save_a_version": "Save a version", "main_window_settings_accessible_flag": "Settin&gs", diff --git a/bouquin/lock_overlay.py b/bouquin/lock_overlay.py index 61a52e5..42e92e1 100644 --- a/bouquin/lock_overlay.py +++ b/bouquin/lock_overlay.py @@ -27,6 +27,7 @@ class LockOverlay(QWidget): self._btn = QPushButton(strings._("lock_overlay_unlock"), self) self._btn.setObjectName("unlockButton") + self._btn.setShortcut("Ctrl+Shift+U") self._btn.setFixedWidth(200) self._btn.setCursor(Qt.PointingHandCursor) self._btn.setAutoDefault(True) diff --git a/bouquin/main_window.py b/bouquin/main_window.py index aa9d9a1..45e213f 100644 --- a/bouquin/main_window.py +++ b/bouquin/main_window.py @@ -226,6 +226,10 @@ class MainWindow(QMainWindow): act_stats.setShortcut("Ctrl+Shift+S") act_stats.triggered.connect(self._open_statistics) file_menu.addAction(act_stats) + act_lock = QAction(strings._("main_window_lock_screen_accessibility"), self) + act_lock.setShortcut("Ctrl+Shift+L") + act_lock.triggered.connect(self._enter_lock) + file_menu.addAction(act_lock) file_menu.addSeparator() act_quit = QAction("&" + strings._("quit"), self) act_quit.setShortcut("Ctrl+Q")