From 4e44c886052b3665beb74933e472fd8aa7a23840 Mon Sep 17 00:00:00 2001 From: Manu <3916435+m3nu@users.noreply.github.com> Date: Wed, 17 Feb 2021 22:45:51 +0800 Subject: [PATCH] Minor: Improve break-lock dialog. (#867) --- src/vorta/application.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/vorta/application.py b/src/vorta/application.py index 202d4235..fc3360c8 100644 --- a/src/vorta/application.py +++ b/src/vorta/application.py @@ -183,12 +183,15 @@ class VortaApp(QtSingleApplication): profile = BackupProfileModel.get(name=context['profile_name']) repo_url = context.get('repo_url') msg = QMessageBox() - msg.setStandardButtons(QMessageBox.Yes | QMessageBox.No) - msg.setText( - self.tr( - f"The repository at {repo_url} might be in use by another computer. Override it and continue?")) - msg.accepted.connect(lambda: self.break_lock(profile)) msg.setWindowTitle(self.tr("Repository In Use")) + msg.setIcon(QMessageBox.Critical) + abortButton = msg.addButton(self.tr("Abort"), QMessageBox.RejectRole) + msg.addButton(self.tr("Continue"), QMessageBox.AcceptRole) + msg.setDefaultButton(abortButton) + msg.setText(self.tr(f"The repository at {repo_url} might be in use elsewhere.")) + msg.setInformativeText(self.tr("Only break the lock if you are certain no other Borg process " + "on any machine is accessing the repository. Abort or break the lock?")) + msg.accepted.connect(lambda: self.break_lock(profile)) self._msg = msg msg.show() elif msgid == 'LockFailed':