From 280b95b31096e6ad06e82d60ef187560bbaef619 Mon Sep 17 00:00:00 2001 From: Mineeagle Date: Mon, 1 Jun 2026 21:05:42 +0200 Subject: [PATCH 1/4] Add display of current .pmr file --- src/macro/macro.py | 1 + src/utils/record_file_management.py | 3 +++ src/windows/main/main_app.py | 14 +++++++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/macro/macro.py b/src/macro/macro.py index f50661e..eedbb03 100644 --- a/src/macro/macro.py +++ b/src/macro/macro.py @@ -125,6 +125,7 @@ def stop_record(self): self.main_app.macro_recorded = True self.main_app.macro_saved = False + self.main_app.update_title() if userSettings["Minimization"]["When_Recording"]: self.main_app.deiconify() diff --git a/src/utils/record_file_management.py b/src/utils/record_file_management.py index 053603f..93c74b5 100644 --- a/src/utils/record_file_management.py +++ b/src/utils/record_file_management.py @@ -48,6 +48,7 @@ def save_macro(self, event=None): else: json_macroEvents = dumps(macroData, indent=4) current_file.write(json_macroEvents) + self.main_app.update_title(is_saved=True) else: self.save_macro_as() @@ -85,6 +86,7 @@ def load_macro(self, event=None): self.main_app.macro_recorded = True self.main_app.macro_saved = True self.main_app.current_file = macroFile.name + self.main_app.update_title() if "settings" in self.main_app.macro.macro_events: if not self.main_app.settings.settings_dict["Loading"]["Always_import_macro_settings"]: if messagebox.askyesno("PyMacroRecord", self.config_text["global"]["load_macro_settings"]): @@ -112,3 +114,4 @@ def new_macro(self, event=None): self.main_app.current_file = None self.main_app.macro_saved = False self.main_app.macro_recorded = False + self.main_app.update_title() diff --git a/src/windows/main/main_app.py b/src/windows/main/main_app.py index 8ab6d3c..848774a 100644 --- a/src/windows/main/main_app.py +++ b/src/windows/main/main_app.py @@ -47,7 +47,7 @@ class MainApp(Window): """Main windows of the application""" def __init__(self): - super().__init__("PyMacroRecord", 350, 200) + super().__init__("PyMacroRecord", 700, 400) self.attributes("-topmost", 1) if platform == "win32": self.iconbitmap(resource_path(path.join("assets", "logo.ico"))) @@ -91,9 +91,11 @@ def __init__(self): self.playBtn = Button(self.center_frame, image=self.playImg, command=self.macro.start_playback) self.macro_recorded = True self.macro_saved = True + self.current_file = sys.argv[1] else: self.playBtn = Button(self.center_frame, image=self.playImg, state=DISABLED) self.playBtn.pack(side=LEFT, padx=50) + self.update_title() # Record Button self.recordImg = PhotoImage(file=resource_path(path.join("assets", "button", "record.png"))) @@ -180,3 +182,13 @@ def on_version_checked(self): NewVerAvailable(self, self.version.new_version) except Exception: pass + + def update_title(self, is_saved:bool | None = None): + is_saved = self.macro_saved if is_saved == None else is_saved + + if self.current_file != None: + file_name = self.current_file + else: + file_name = 'untitled.pmr' + + self.title(f"PyMacroRecord - {file_name}{'*' if not is_saved else ''}") \ No newline at end of file From 4181beb51904ace3e157f76eed1be096663811bf Mon Sep 17 00:00:00 2001 From: Mineeagle Date: Tue, 2 Jun 2026 20:46:25 +0200 Subject: [PATCH 2/4] Add language specific untitled file name --- src/windows/main/main_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/windows/main/main_app.py b/src/windows/main/main_app.py index 848774a..e7d9ee4 100644 --- a/src/windows/main/main_app.py +++ b/src/windows/main/main_app.py @@ -189,6 +189,6 @@ def update_title(self, is_saved:bool | None = None): if self.current_file != None: file_name = self.current_file else: - file_name = 'untitled.pmr' + file_name = self.text_content.get("global",{}).get("untitled_file_name","Untitled.pmr") self.title(f"PyMacroRecord - {file_name}{'*' if not is_saved else ''}") \ No newline at end of file From e662417ffee0e4a04066d0d7cd35b2159c03104e Mon Sep 17 00:00:00 2001 From: Mineeagle Date: Tue, 2 Jun 2026 20:47:04 +0200 Subject: [PATCH 3/4] Add untitled.pmr translations for German, English and Esperanto --- src/langs/de.json | 3 ++- src/langs/en.json | 3 ++- src/langs/eo.json | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/langs/de.json b/src/langs/de.json index 9164a24..89b213b 100644 --- a/src/langs/de.json +++ b/src/langs/de.json @@ -16,7 +16,8 @@ "confirm": "Bestätigen", "information": "Informationen", "restart_software_text": "Sie müssen das Programm neu starten, damit die Änderung übernommen wird.", - "load_macro_settings": "Macro-Einstellungen laden?" + "load_macro_settings": "Macro-Einstellungen laden?", + "untitled_file_name": "Unbenannt.pmr" }, "new_version": { "title": "Software update", diff --git a/src/langs/en.json b/src/langs/en.json index ea16cfe..0b4fabe 100644 --- a/src/langs/en.json +++ b/src/langs/en.json @@ -16,7 +16,8 @@ "confirm": "Confirm", "information": "Information", "restart_software_text": "You need to restart the software for it to take effect.", - "load_macro_settings": "Import macro settings too?" + "load_macro_settings": "Import macro settings too?", + "untitled_file_name": "Untitled.pmr" }, "new_version": { "title": "Software update", diff --git a/src/langs/eo.json b/src/langs/eo.json index 1ce9026..9523560 100644 --- a/src/langs/eo.json +++ b/src/langs/eo.json @@ -16,7 +16,8 @@ "confirm": "Konfirmi", "information": "Informo", "restart_software_text": "Necesas relanĉi la programon, por ke ĝi efektiviĝas.", - "load_macro_settings": "Ĉu importi ankaŭ la makroaj agordoj?" + "load_macro_settings": "Ĉu importi ankaŭ la makroaj agordoj?", + "untitled_file_name": "Sentitolo.pmr" }, "new_version": { "title": "Programĝisdatiĝo", From dcdaa4a8295baba62b9f9c7f13ac281350f1d709 Mon Sep 17 00:00:00 2001 From: Mineeagle Date: Tue, 2 Jun 2026 20:56:32 +0200 Subject: [PATCH 4/4] Reset window size --- src/windows/main/main_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/windows/main/main_app.py b/src/windows/main/main_app.py index e7d9ee4..c54c484 100644 --- a/src/windows/main/main_app.py +++ b/src/windows/main/main_app.py @@ -47,7 +47,7 @@ class MainApp(Window): """Main windows of the application""" def __init__(self): - super().__init__("PyMacroRecord", 700, 400) + super().__init__("PyMacroRecord", 350, 200) self.attributes("-topmost", 1) if platform == "win32": self.iconbitmap(resource_path(path.join("assets", "logo.ico")))