From 1f30ed512e983cf6207394e3524692fad4114dbb Mon Sep 17 00:00:00 2001 From: Samuel Walker Date: Thu, 20 Jun 2024 18:50:01 -0600 Subject: [PATCH] fixed windows crashing on dialogs --- Backend.py | 3 ++- Main.py | 3 ++- Upload.py | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Backend.py b/Backend.py index 764516b..9a85fed 100644 --- a/Backend.py +++ b/Backend.py @@ -170,7 +170,8 @@ def ftpDownload(ftp, file, stream): #create tkinter window print("downloading file: "+file) dialog = CTk() - dialog.attributes('-type', 'dialog') + if os.name == 'posix': + dialog.attributes('-type', 'dialog') dialog.title("Downloading Modpack") set_appearance_mode("dark") set_default_color_theme("blue") diff --git a/Main.py b/Main.py index 9831788..5a1754f 100644 --- a/Main.py +++ b/Main.py @@ -54,7 +54,8 @@ def main(): # GUI for selecting Prism instance path app = CTk() - app.attributes('-type', 'dialog') + if os.name == 'posix': + app.attributes('-type', 'dialog') app.geometry("500x400") app.title("FamilyCraft Launcher") set_appearance_mode("dark") diff --git a/Upload.py b/Upload.py index ec17c45..09972be 100644 --- a/Upload.py +++ b/Upload.py @@ -84,7 +84,8 @@ def main(): fileName = "modpack.mrpack" app = CTk() - app.attributes('-type', 'dialog') + if os.name == 'posix': + app.attributes('-type', 'dialog') app.geometry('500x400') app.title("FamilyCraft Launcher Upload Utility") set_appearance_mode("dark")