Skip to content

Commit

Permalink
Disable autostart if system tray is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
marticliment committed Sep 6, 2022
1 parent c8ca31e commit d625a1e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion wingetui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1461,7 +1461,9 @@ def updateIfPossible(self):
border-radius: 4px;
}}
"""

if "--daemon" in sys.argv:
if getSettings("DisablesystemTray"):
sys.exit(0)
a = MainApplication()
a.exec()
a.running = False
Expand Down
2 changes: 1 addition & 1 deletion wingetui/storeEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@ def __init__(self, parent = None):
updateCheckBox.setChecked(not getSettings("DisableAutoUpdateWingetUI"))
updateCheckBox.clicked.connect(lambda v: setSettings("DisableAutoUpdateWingetUI", not bool(v)))
self.layout.addWidget(updateCheckBox)
doCloseWingetUI = QCheckBox("Minimze WingetUI to the system tray instead of closing it")
doCloseWingetUI = QCheckBox("Keep WingetUI always running on the system tray")
doCloseWingetUI.setChecked(not getSettings("DisablesystemTray"))
doCloseWingetUI.clicked.connect(lambda v: setSettings("DisablesystemTray", not bool(v)))
self.layout.addWidget(doCloseWingetUI)
Expand Down

0 comments on commit d625a1e

Please sign in to comment.