diff --git a/arduino_timetable/gui.py b/arduino_timetable/gui.py index 4f5399c..8af8f34 100644 --- a/arduino_timetable/gui.py +++ b/arduino_timetable/gui.py @@ -375,7 +375,11 @@ class Application(tk.Frame): 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 available_commands: @@ -383,11 +387,16 @@ def run_application(available_commands, title='Arduino Scheduled Commands'): title: window title bar text + + icon: + program icon to use ''' # create the Tkinter root and instantiate the application root = tk.Tk() root.wm_title(title) + if icon is not None: + root.iconbitmap(icon) app = Application(master=root, available_commands=available_commands) # use app.quit() as callback if the window is closed (with the 'X' button)