From 599370f60c45b748fc40f389793f02a5e54f1e7e Mon Sep 17 00:00:00 2001 From: Arda Aydin Date: Sat, 12 Sep 2026 13:05:23 +0300 Subject: [PATCH] Put Device menu first in menu bar Co-Authored-By: Claude Opus 4.6 --- app_state.py | 2 +- main.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app_state.py b/app_state.py index 78ada34..1c51f57 100644 --- a/app_state.py +++ b/app_state.py @@ -8,7 +8,7 @@ so later rebinding would only ever be seen by the module that did it. import configparser import os -VERSION = "0.0.0.082" +VERSION = "0.0.0.083" PROPERTIES_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), "editor.properties") DEFAULT_GRID_SIZE = 10 DEFAULT_ADD_TIMESTAMP = True diff --git a/main.py b/main.py index ba3d619..e5b3008 100644 --- a/main.py +++ b/main.py @@ -2167,6 +2167,13 @@ accel_mod = "Cmd" if sys.platform == "darwin" else "Ctrl" # --- Native Application Menu Configurations --- menu_bar = tk.Menu(window) +menu_device = tk.Menu(menu_bar, tearoff=0) +menu_device.add_command(label="Connect...", command=do_device_connect) +menu_device.add_command(label="Disconnect", command=do_device_disconnect, state="disabled") +menu_device.add_separator() +menu_device.add_command(label="Download to SAX...", command=do_download_to_sax, state="disabled") +menu_bar.add_cascade(label="Device", menu=menu_device) + menu_file = tk.Menu(menu_bar, tearoff=0) menu_file.add_command(label="Open", command=sax_file.open_file) menu_file.add_command(label="Save", command=do_save, accelerator=f"{accel_mod}+S") @@ -2175,13 +2182,6 @@ menu_file.add_separator() menu_file.add_command(label="Exit", command=window.quit) menu_bar.add_cascade(label="File", menu=menu_file) -menu_device = tk.Menu(menu_bar, tearoff=0) -menu_device.add_command(label="Connect...", command=do_device_connect) -menu_device.add_command(label="Disconnect", command=do_device_disconnect, state="disabled") -menu_device.add_separator() -menu_device.add_command(label="Download to SAX...", command=do_download_to_sax, state="disabled") -menu_bar.add_cascade(label="Device", menu=menu_device) - menu_edit = tk.Menu(menu_bar, tearoff=0) menu_edit.add_command(label="Undo", command=do_undo, accelerator=f"{accel_mod}+Z") menu_edit.add_command(label="Redo", command=do_redo, accelerator=f"{accel_mod}+Y")