From 66f39eb29395212c58031bd8ebd3d66c5c2e26f8 Mon Sep 17 00:00:00 2001 From: suti7yk5032 Date: Thu, 22 Aug 2024 11:46:52 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=A6=E3=82=A3=E3=83=B3=E3=83=89=E3=82=A6?= =?UTF-8?q?=E3=81=AE=E3=82=A2=E3=82=A4=E3=82=B3=E3=83=B3=E3=82=92=E9=81=A9?= =?UTF-8?q?=E7=94=A8=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dislocker_client.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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)