Fix the tray command line option not working
This commit is contained in:
1 parent
12fdf7ab96
commit
ccf7fbf96d
2 files changed
+14
-14
No files matched your search
Vendored
+9
-9
@@ -20,6 +20,15 @@
|
|||||||
"console": "integratedTerminal",
|
"console": "integratedTerminal",
|
||||||
"justMyCode": false
|
"justMyCode": false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "Run App (INFO+Tray)",
|
||||||
|
"type": "python",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "main.py",
|
||||||
|
"args": ["--no-run-check", "-vv", "--tray"],
|
||||||
|
"console": "integratedTerminal",
|
||||||
|
"justMyCode": false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Run App (DEBUG)",
|
"name": "Run App (DEBUG)",
|
||||||
"type": "python",
|
"type": "python",
|
||||||
@@ -46,14 +55,5 @@
|
|||||||
"console": "integratedTerminal",
|
"console": "integratedTerminal",
|
||||||
"justMyCode": false
|
"justMyCode": false
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "Test ArgParser",
|
|
||||||
"type": "python",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "main.py",
|
|
||||||
"args": ["--excludes", "1", "2", "3"],
|
|
||||||
"console": "integratedTerminal",
|
|
||||||
"justMyCode": false
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -891,9 +891,6 @@ class TrayIcon:
|
|||||||
self.icon: pystray.Icon | None = None
|
self.icon: pystray.Icon | None = None
|
||||||
self._button = ttk.Button(master, command=self.minimize, text="Minimize to Tray")
|
self._button = ttk.Button(master, command=self.minimize, text="Minimize to Tray")
|
||||||
self._button.grid(column=0, row=0, sticky="ne")
|
self._button.grid(column=0, row=0, sticky="ne")
|
||||||
if manager._twitch.settings.tray:
|
|
||||||
# start hidden in tray
|
|
||||||
self._manager._root.after_idle(self.minimize)
|
|
||||||
|
|
||||||
def is_tray(self) -> bool:
|
def is_tray(self) -> bool:
|
||||||
return self.icon is not None
|
return self.icon is not None
|
||||||
@@ -1284,8 +1281,11 @@ 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)
|
||||||
# show the window when ready
|
# stay hidden in tray if needed, otherwise show the window when everything's ready
|
||||||
if not self._twitch.settings.tray:
|
if self._twitch.settings.tray:
|
||||||
|
# NOTE: this starts the tray icon thread
|
||||||
|
self._root.after_idle(self.tray.minimize)
|
||||||
|
else:
|
||||||
self._root.deiconify()
|
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
|
||||||
|
|||||||
Reference in new issue
Block a user