forked from Support/sp-hydra-veil-gui
Improved Asset Folder management
This commit is contained in:
parent
59cac90c58
commit
e5c83e72b1
2 changed files with 13 additions and 3 deletions
|
|
@ -38,9 +38,9 @@ def recovery_dialog(custom_error, db_version_you_have):
|
||||||
# ASSETS FOLDER
|
# ASSETS FOLDER
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
if not assets_folder_setup():
|
if not assets_folder_setup():
|
||||||
from gui.v2.ui.popups.Database_version import show_recovery_dialog
|
from gui.v2.ui.popups.generic_error_popup import show_error
|
||||||
custom_error = "Unable to Setup your Assets Folder."
|
custom_error = "Unable to Setup your Assets Folder. Please create an assets directory at ~/.local/share/hydra-veil/assets"
|
||||||
recovery_dialog(custom_error, 0)
|
show_error(custom_error, "Critical Error")
|
||||||
|
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
# INITIALIZE DATABASE
|
# INITIALIZE DATABASE
|
||||||
|
|
|
||||||
10
gui/v2/ui/popups/generic_error_popup.py
Normal file
10
gui/v2/ui/popups/generic_error_popup.py
Normal file
|
|
@ -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()
|
||||||
Loading…
Reference in a new issue