Fix an issue with tray startup not working
This commit is contained in:
1 parent
c12a691a54
commit
befb755273
1 file changed
+7
-7
@@ -1723,14 +1723,8 @@ class GUIManager:
|
|||||||
self._handler = _TKOutputHandler(self)
|
self._handler = _TKOutputHandler(self)
|
||||||
self._handler.setFormatter(FORMATTER)
|
self._handler.setFormatter(FORMATTER)
|
||||||
logging.getLogger("TwitchDrops").addHandler(self._handler)
|
logging.getLogger("TwitchDrops").addHandler(self._handler)
|
||||||
# stay hidden in tray if needed, otherwise show the window when everything's ready
|
|
||||||
if self._twitch.settings.tray:
|
|
||||||
# NOTE: this starts the tray icon thread
|
|
||||||
self._root.after_idle(self.tray.minimize)
|
|
||||||
else:
|
|
||||||
self._root.deiconify()
|
|
||||||
if sys.platform == "win32":
|
|
||||||
# gracefully handle Windows shutdown closing the application
|
# gracefully handle Windows shutdown closing the application
|
||||||
|
if sys.platform == "win32":
|
||||||
# NOTE: this root.update() is required for the below to work - don't remove
|
# NOTE: this root.update() is required for the below to work - don't remove
|
||||||
root.update()
|
root.update()
|
||||||
self._message_map = {
|
self._message_map = {
|
||||||
@@ -1752,6 +1746,12 @@ class GUIManager:
|
|||||||
else:
|
else:
|
||||||
# use old-style window closing protocol for non-windows platforms
|
# use old-style window closing protocol for non-windows platforms
|
||||||
root.protocol("WM_DESTROY_WINDOW", self.close)
|
root.protocol("WM_DESTROY_WINDOW", self.close)
|
||||||
|
# stay hidden in tray if needed, otherwise show the window when everything's ready
|
||||||
|
if self._twitch.settings.tray:
|
||||||
|
# NOTE: this starts the tray icon thread
|
||||||
|
self._root.after_idle(self.tray.minimize)
|
||||||
|
else:
|
||||||
|
self._root.deiconify()
|
||||||
|
|
||||||
# https://stackoverflow.com/questions/56329342/tkinter-treeview-background-tag-not-working
|
# https://stackoverflow.com/questions/56329342/tkinter-treeview-background-tag-not-working
|
||||||
def _fixed_map(self, option):
|
def _fixed_map(self, option):
|
||||||
|
|||||||
Reference in new issue
Block a user