From 66f154decb8cd7d140a702277d8c262c4d8194cc Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 22 Sep 2019 12:27:42 -0700 Subject: [PATCH] only add dock image to non win32 runs --- gooey/gui/containers/application.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gooey/gui/containers/application.py b/gooey/gui/containers/application.py index c44d72e8..9147b267 100644 --- a/gooey/gui/containers/application.py +++ b/gooey/gui/containers/application.py @@ -192,11 +192,12 @@ def layoutComponent(self): # Program Icon (Windows) icon = wx.Icon(self.buildSpec['images']['programIcon'], wx.BITMAP_TYPE_PNG) self.SetIcon(icon) - # OSX needs to have its taskbar icon explicitly set - # bizarrely, wx requires the TaskBarIcon to be attached to the Frame - # as instance data (self.). Otherwise, it will not render correctly. - self.taskbarIcon = TaskBarIcon(iconType=wx.adv.TBI_DOCK) - self.taskbarIcon.SetIcon(icon) + if sys.platform != 'win32': + # OSX needs to have its taskbar icon explicitly set + # bizarrely, wx requires the TaskBarIcon to be attached to the Frame + # as instance data (self.). Otherwise, it will not render correctly. + self.taskbarIcon = TaskBarIcon(iconType=wx.adv.TBI_DOCK) + self.taskbarIcon.SetIcon(icon)