diff --git a/dislocker_client.py b/dislocker_client.py index f2933f9..79c5bd7 100644 --- a/dislocker_client.py +++ b/dislocker_client.py @@ -20,6 +20,7 @@ dislocker_dir = os.path.dirname(os.path.abspath(sys.argv[0])) os.chdir(dislocker_dir) +resource_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "resource") config_dir_path = "./config/" client_config_path = config_dir_path + "client.json" if not os.path.isfile(client_config_path): @@ -70,6 +71,7 @@ class App(customtkinter.CTk): def __init__(self): super().__init__() self.title(f"{app_name} | ロック中") + self.iconbitmap(default=resource_path + '\\icon\\dislocker.ico') if client_config["testing"] == 1: pass else: @@ -133,7 +135,6 @@ class App(customtkinter.CTk): print(unlock) def toast(self): - resource_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "resource") success = Notification( app_id='Dislocker', title='ご協力ありがとうございます!', @@ -155,6 +156,7 @@ class Lock(customtkinter.CTkToplevel): else: self.title(f'{app_name} | PC番号 {client_config["pc_number"]} | ロックされています') + self.iconbitmap(default=resource_path + '\\icon\\dislocker.ico') self.window_width = 600 self.window_height = 320 self.screen_width = self.winfo_screenwidth() @@ -335,7 +337,7 @@ class Help(customtkinter.CTkToplevel): self.title(f'{app_name} | ヘルプ | テストモード') else: self.title(f'{app_name} | ヘルプ') - self.iconbitmap("./resource/icon/dislocker.ico") + self.iconbitmap(default=resource_path + '\\icon\\dislocker.ico') self.geometry("600x400") self.resizable(height=False, width=False) self.attributes('-topmost', True)