From e5c83e72b19b53eb88de6f25066ee37ccbb6c1ad Mon Sep 17 00:00:00 2001 From: SimplifiedPrivacy Date: Sun, 12 Jul 2026 21:32:33 -0400 Subject: [PATCH] Improved Asset Folder management --- gui/__main__.py | 6 +++--- gui/v2/ui/popups/generic_error_popup.py | 10 ++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 gui/v2/ui/popups/generic_error_popup.py diff --git a/gui/__main__.py b/gui/__main__.py index 0cb9a78..f9266a5 100644 --- a/gui/__main__.py +++ b/gui/__main__.py @@ -38,9 +38,9 @@ def recovery_dialog(custom_error, db_version_you_have): # ASSETS FOLDER # ============================================================================ if not assets_folder_setup(): - from gui.v2.ui.popups.Database_version import show_recovery_dialog - custom_error = "Unable to Setup your Assets Folder." - recovery_dialog(custom_error, 0) + from gui.v2.ui.popups.generic_error_popup import show_error + custom_error = "Unable to Setup your Assets Folder. Please create an assets directory at ~/.local/share/hydra-veil/assets" + show_error(custom_error, "Critical Error") # ============================================================================ # INITIALIZE DATABASE diff --git a/gui/v2/ui/popups/generic_error_popup.py b/gui/v2/ui/popups/generic_error_popup.py new file mode 100644 index 0000000..670dfd4 --- /dev/null +++ b/gui/v2/ui/popups/generic_error_popup.py @@ -0,0 +1,10 @@ +from PyQt6.QtWidgets import QApplication, QMessageBox +import sys + +def show_error(error_text, title="Error"): + app = QApplication.instance() + if app is None: + app = QApplication(sys.argv) + + QMessageBox.critical(None, title, error_text) + app.quit() \ No newline at end of file