From 0c69fe5e5524145bf2d9efc7489a2997fcc2c9cc Mon Sep 17 00:00:00 2001 From: Kevin Lange Date: Fri, 27 Jan 2017 22:39:51 +0900 Subject: [PATCH] pull out app_name for help browser --- userspace/py/bin/help-browser.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/userspace/py/bin/help-browser.py b/userspace/py/bin/help-browser.py index c9ee5301..aad7d6a5 100755 --- a/userspace/py/bin/help-browser.py +++ b/userspace/py/bin/help-browser.py @@ -17,8 +17,9 @@ from about_applet import AboutAppletWindow import yutani_mainloop +app_name = "Help Browser" version = "0.1.0" -_description = f"Help Browser {version}\n© 2017 Kevin Lange\n\nRich text help document viewer.\n\nhttp://github.com/klange/toaruos" +_description = f"{app_name} {version}\n© 2017 Kevin Lange\n\nRich text help document viewer.\n\nhttp://github.com/klange/toaruos" class HelpBrowserWindow(yutani.Window): @@ -26,7 +27,7 @@ class HelpBrowserWindow(yutani.Window): base_height = 600 def __init__(self, decorator): - super(HelpBrowserWindow, self).__init__(self.base_width + decorator.width(), self.base_height + decorator.height(), title="Help Browser", icon="help", doublebuffer=True) + super(HelpBrowserWindow, self).__init__(self.base_width + decorator.width(), self.base_height + decorator.height(), title=app_name, icon="help", doublebuffer=True) self.move(100,100) self.decorator = decorator self.last_topic = None @@ -52,7 +53,7 @@ class HelpBrowserWindow(yutani.Window): self.close() sys.exit(0) def about_window(action): - AboutAppletWindow(self.decorator,"About Help Browser","/usr/share/icons/48/help.png",_description,"help") + AboutAppletWindow(self.decorator,f"About {app_name}","/usr/share/icons/48/help.png",_description,"help") menus = [ ("File", [ #MenuEntryAction("Open...",None,print_derp,None), @@ -67,7 +68,7 @@ class HelpBrowserWindow(yutani.Window): ("Help", [ MenuEntryAction("Contents","help",self.go_page,"help_browser.trt"), MenuEntryDivider(), - MenuEntryAction("About Help Browser","star",about_window,None), + MenuEntryAction(f"About {app_name}","star",about_window,None), ]), ] @@ -180,7 +181,7 @@ You can also check the Table of Contents