Set locked status on window title when locked. Don't exit on incorrect key, let it be tried again
All checks were successful
CI / test (push) Successful in 4m35s
Lint / test (push) Successful in 31s
Trivy / test (push) Successful in 23s

This commit is contained in:
Miguel Jacq 2025-11-25 10:46:11 +11:00
parent 648031786a
commit 26737fbfb2
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9
7 changed files with 11 additions and 21 deletions

View file

@ -371,7 +371,7 @@ class MainWindow(QMainWindow):
else:
error = str(e)
QMessageBox.critical(self, strings._("db_database_error"), error)
sys.exit(1)
return False
def _prompt_for_key_until_valid(self, first_time: bool) -> bool:
"""
@ -1691,6 +1691,8 @@ class MainWindow(QMainWindow):
tb.hide()
self._lock_overlay.show()
self._lock_overlay.raise_()
lock_msg = strings._("lock_overlay_locked")
self.setWindowTitle(f"{APP_NAME} ({lock_msg})")
@Slot()
def _on_unlock_clicked(self):
@ -1717,6 +1719,7 @@ class MainWindow(QMainWindow):
tb.show()
self._idle_timer.start()
QTimer.singleShot(0, self._focus_editor_now)
self.setWindowTitle(APP_NAME)
# ----------------- Close handlers ----------------- #
def closeEvent(self, event):