made icon only available on windows
authorGeorgios Atheridis <georgios@atheridis.org>
Sat, 14 Jan 2023 05:27:32 +0000 (05:27 +0000)
committerGeorgios Atheridis <georgios@atheridis.org>
Sat, 14 Jan 2023 05:27:32 +0000 (05:27 +0000)
announcer.pyw

index c664b59b4d399936e1ced9063b87278c2a7a6f60..b770a356244ec80d31cca013f3fc092b73274d5f 100644 (file)
@@ -292,7 +292,11 @@ if __name__ == '__main__':
     gui.geometry("260x125")
     gui.title("Peks Announcer")
     gui.protocol("WM_DELETE_WINDOW", close_script)
-    gui.wm_iconbitmap("appicon.ico")
+
+    # Icon is not compatible on posix systems
+    if os.name == "nt":
+        gui.wm_iconbitmap("appicon.ico")
+
     title = Label(text="Hello World")
     title.grid(row=0, column=0)
     volume_slider = Scale(gui, from_=0, to=100, orient=HORIZONTAL, command=update_volume)