mirror of
https://github.com/ankitects/anki.git
synced 2026-01-15 06:49:03 -05:00
Keep an window open showing the migration is in progress
This commit is contained in:
parent
1c1ee7ab72
commit
cd15f96dcb
1 changed files with 22 additions and 0 deletions
|
|
@ -144,7 +144,29 @@ class ProfileManager:
|
|||
retval = conformation.exec()
|
||||
|
||||
if retval == QMessageBox.Ok:
|
||||
progress = QMessageBox()
|
||||
progress.setIcon(QMessageBox.Information)
|
||||
progress.setStandardButtons(QMessageBox.NoButton)
|
||||
progress.setWindowIcon(icon)
|
||||
progress.setWindowTitle(window_title)
|
||||
progress.setText(
|
||||
f"Please wait while your Anki collection is moved from {migration_directories}"
|
||||
)
|
||||
progress.show()
|
||||
app.processEvents()
|
||||
shutil.move(oldBase, self.base)
|
||||
progress.hide()
|
||||
|
||||
completion = QMessageBox()
|
||||
completion.setIcon(QMessageBox.Information)
|
||||
completion.setStandardButtons(QMessageBox.Ok)
|
||||
completion.setWindowIcon(icon)
|
||||
completion.setWindowTitle(window_title)
|
||||
completion.setText(
|
||||
f"Your Anki Collection was successfully moved from {migration_directories}"
|
||||
)
|
||||
completion.show()
|
||||
completion.exec()
|
||||
else:
|
||||
self.base = oldBase
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue