This commit is contained in:
faroukbmiled 2023-09-20 14:44:00 +01:00
parent cf86eb35f9
commit 4d8f3e3679
4 changed files with 10 additions and 16 deletions

View File

@ -21,10 +21,8 @@ def check_custom_theme(theme_name):
if os.path.exists(os.path.join(application_path, theme_name)):
return os.path.join(application_path, theme_name)
else:
try:
return os.path.join(RESOURCES_DIR, theme_name)
except:
return os.path.join(RESOURCES_DIR, "boiiiwd_theme.json")
try: return os.path.join(RESOURCES_DIR, theme_name)
except: return os.path.join(RESOURCES_DIR, "boiiiwd_theme.json")
# theme initialization
ctk.set_appearance_mode(check_config("appearance", "Dark")) # Modes: "System" (standard), "Dark", "Light"

View File

@ -223,8 +223,7 @@ class BOIIIWD(ctk.CTk):
self.settings_tab.load_settings("reset_on_fail", "10")
self.settings_tab.load_settings("show_fails", "on")
self.settings_tab.load_settings("skip_already_installed", "on")
except:
pass
except: pass
if not check_steamcmd():
self.show_steam_warning_message()
@ -367,7 +366,7 @@ class BOIIIWD(ctk.CTk):
self.library_tab.grid_remove()
def show_library_widgets(self):
self.title("BOIII Workshop Downloader - Library")
self.title("BOIII Workshop Downloader - Library ➜ Loading... ⏳")
status = self.library_tab.load_items(self.edit_destination_folder.get())
self.library_tab.grid(row=0, rowspan=3, column=1, padx=(0, 20), pady=(20, 20), sticky="nsew")
self.title(f"BOIII Workshop Downloader - Library ➜ {status}")

View File

@ -216,10 +216,8 @@ class SettingsTab(ctk.CTkFrame):
pass
def enable_save_button(self, *args):
try:
self.save_button.configure(state='normal')
except:
pass
try: self.save_button.configure(state='normal')
except: pass
def save_settings(self):
self.save_button.configure(state='disabled')

View File

@ -133,12 +133,11 @@ class UpdateWindow(ctk.CTkToplevel):
os.remove(fr"{zip_path}")
self.label_download.configure(text="Update cancelled.")
self.progress_bar.set(0.0)
# there's a better solution ill implement it later
try:
main_app.app.attributes('-alpha', 1.0)
except:
pass
try: main_app.app.attributes('-alpha', 1.0)
except: pass
show_message("Cancelled!", "Update cancelled by user", icon="warning")
except Exception as e:
self.progress_bar.set(0.0)
self.label_download.configure(text="Update failed")