Sync from development - prepare for v0.2.2

This commit is contained in:
Omni
2026-01-21 21:59:42 +00:00
parent 9000b1e080
commit 53af9f26a2
24 changed files with 2134 additions and 79 deletions

View File

@@ -40,6 +40,7 @@ class SuccessDialog(QDialog):
self.setWindowTitle("Success!")
self.setWindowModality(Qt.NonModal)
self.setAttribute(Qt.WA_ShowWithoutActivating, True)
self.setAttribute(Qt.WA_DeleteOnClose, True)
self.setFixedSize(500, 500)
self.setWindowFlag(Qt.WindowDoesNotAcceptFocus, True)
self.setStyleSheet("QDialog { background: #181818; color: #fff; border-radius: 12px; }" )
@@ -184,7 +185,7 @@ class SuccessDialog(QDialog):
self._update_countdown()
self._timer.start(1000)
self.return_btn.clicked.connect(self.accept)
self.exit_btn.clicked.connect(QApplication.quit)
self.exit_btn.clicked.connect(self._safe_exit)
# Set the Wabbajack icon if available
self._set_dialog_icon()
@@ -256,4 +257,15 @@ class SuccessDialog(QDialog):
self.return_btn.setText(self._orig_return_text)
self.return_btn.setEnabled(True)
self.exit_btn.setEnabled(True)
self._timer.stop()
self._timer.stop()
def _safe_exit(self):
"""Safely exit the application with proper cleanup"""
try:
if self._timer.isActive():
self._timer.stop()
self.close()
QApplication.quit()
except Exception as e:
logger.error(f"Error during safe exit: {e}")
QApplication.quit()