Show version number on About button

This commit is contained in:
Samuel Sloniker 2024-07-30 09:40:00 -07:00
parent d54e44153d
commit afdac88880

View File

@ -6,6 +6,9 @@ import navpoint.phone_server
import navpoint.usb import navpoint.usb
import navpoint.about import navpoint.about
def _version():
with open(navpoint.fix_path.fix_path("README.md")) as f:
return f.readline().split()[3]
def run(): def run():
def _usb_clicked(): def _usb_clicked():
@ -37,7 +40,7 @@ def run():
ttk.Separator(window, orient="horizontal").pack() ttk.Separator(window, orient="horizontal").pack()
ttk.Label(window, text="Navpoint is free and open-source.").pack() ttk.Label(window, text="Navpoint is free and open-source.").pack()
about_button = ttk.Button( about_button = ttk.Button(
window, text="About Navpoint", command=navpoint.about.about window, text="About Navpoint " + _version(), command=navpoint.about.about
) )
about_button.pack() about_button.pack()