Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/langs/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion src/langs/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion src/langs/eo.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions src/macro/macro.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 3 additions & 0 deletions src/utils/record_file_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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"]):
Expand Down Expand Up @@ -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()
12 changes: 12 additions & 0 deletions src/windows/main/main_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")))
Expand Down Expand Up @@ -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

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a big fan of displaying the absolute path, just the file name is better, because a pmr file can be placed in a long path and we can't see the name

e.g. /home/user/macros/test.pmr should only give test.pmr

else:
file_name = self.text_content.get("global",{}).get("untitled_file_name","Untitled.pmr")

@LOUDO56 LOUDO56 Jun 14, 2026

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Untilted" should have a translation key


self.title(f"PyMacroRecord - {file_name}{'*' if not is_saved else ''}")