also fixed the "shootoff - WARNING - Failed to set main window icon." message. It turns out that Tkinter.PhotoImage
is documented to only handle GIF and PGM/PPM files. So, I converted icon_48x48.png to icon_48x48.gif
and changed the code as below.
BTW, the original code works in Windows, but that is undocumented. You might want to change this to match the Tinter docs.
try:
if platform.system() == "Windows":
self._window.iconbitmap("images\windows_icon.ico")
else:
# JNR, 1/22/2015, changed file from .png to .gif
icon_img = Tkinter.PhotoImage(file=os.path.join("images", "icon_48x48.gif"))
self._window.tk.call('wm','iconphoto', self._window._w, icon_img)
except:
self._logger.warning("Failed to set main window icon.")
pass
Jim sent this:
also fixed the "shootoff - WARNING - Failed to set main window icon." message. It turns out that Tkinter.PhotoImage is documented to only handle GIF and PGM/PPM files. So, I converted icon_48x48.png to icon_48x48.gif and changed the code as below. BTW, the original code works in Windows, but that is undocumented. You might want to change this to match the Tinter docs.