full exception handling

This commit is contained in:
BarsTiger
2022-05-18 22:18:10 +03:00
parent e4198f4fa0
commit b0bbf6021b
3 changed files with 43 additions and 10 deletions

View File

@@ -1,5 +1,6 @@
from data.settings import Settings
import ctypes
from ezzthread import threaded
def popup(title, text, style=0):
@@ -16,6 +17,11 @@ def popup(title, text, style=0):
return ctypes.windll.user32.MessageBoxW(0, text, title, style)
@threaded
def t_popup(title, text, style=0):
popup(title, text, style)
def fill_settings(ui) -> None:
settings = Settings.get_settings()
ui.chooseAnimationBox.setCurrentText(settings.get("animation"))
@@ -38,3 +44,4 @@ def update_settings(ui) -> None:
"client_id": get_text(ui.imgurClientId.text().strip())
}
list(map((lambda x: Settings.update(x, settings[x])), settings))
return Settings.get_settings()