|
|
@ -375,7 +375,11 @@ class Application(tk.Frame): |
|
|
|
self._master.destroy() |
|
|
|
self._master.destroy() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def run_application(available_commands, title='Arduino Scheduled Commands'): |
|
|
|
def run_application( |
|
|
|
|
|
|
|
available_commands, |
|
|
|
|
|
|
|
title='Arduino Scheduled Commands', |
|
|
|
|
|
|
|
icon=None |
|
|
|
|
|
|
|
): |
|
|
|
''' run the gui application |
|
|
|
''' run the gui application |
|
|
|
|
|
|
|
|
|
|
|
available_commands: |
|
|
|
available_commands: |
|
|
@ -383,11 +387,16 @@ def run_application(available_commands, title='Arduino Scheduled Commands'): |
|
|
|
|
|
|
|
|
|
|
|
title: |
|
|
|
title: |
|
|
|
window title bar text |
|
|
|
window title bar text |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
icon: |
|
|
|
|
|
|
|
program icon to use |
|
|
|
''' |
|
|
|
''' |
|
|
|
|
|
|
|
|
|
|
|
# create the Tkinter root and instantiate the application |
|
|
|
# create the Tkinter root and instantiate the application |
|
|
|
root = tk.Tk() |
|
|
|
root = tk.Tk() |
|
|
|
root.wm_title(title) |
|
|
|
root.wm_title(title) |
|
|
|
|
|
|
|
if icon is not None: |
|
|
|
|
|
|
|
root.iconbitmap(icon) |
|
|
|
app = Application(master=root, available_commands=available_commands) |
|
|
|
app = Application(master=root, available_commands=available_commands) |
|
|
|
|
|
|
|
|
|
|
|
# use app.quit() as callback if the window is closed (with the 'X' button) |
|
|
|
# use app.quit() as callback if the window is closed (with the 'X' button) |
|
|
|