Skip to content

Commit 4e44c88

Browse files
authored
Minor: Improve break-lock dialog. (#867)
1 parent 52233a9 commit 4e44c88

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/vorta/application.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,15 @@ def react_to_log(self, mgs, context):
183183
profile = BackupProfileModel.get(name=context['profile_name'])
184184
repo_url = context.get('repo_url')
185185
msg = QMessageBox()
186-
msg.setStandardButtons(QMessageBox.Yes | QMessageBox.No)
187-
msg.setText(
188-
self.tr(
189-
f"The repository at {repo_url} might be in use by another computer. Override it and continue?"))
190-
msg.accepted.connect(lambda: self.break_lock(profile))
191186
msg.setWindowTitle(self.tr("Repository In Use"))
187+
msg.setIcon(QMessageBox.Critical)
188+
abortButton = msg.addButton(self.tr("Abort"), QMessageBox.RejectRole)
189+
msg.addButton(self.tr("Continue"), QMessageBox.AcceptRole)
190+
msg.setDefaultButton(abortButton)
191+
msg.setText(self.tr(f"The repository at {repo_url} might be in use elsewhere."))
192+
msg.setInformativeText(self.tr("Only break the lock if you are certain no other Borg process "
193+
"on any machine is accessing the repository. Abort or break the lock?"))
194+
msg.accepted.connect(lambda: self.break_lock(profile))
192195
self._msg = msg
193196
msg.show()
194197
elif msgid == 'LockFailed':

0 commit comments

Comments
 (0)