removed --no-super

This commit is contained in:
N0\A
2025-10-31 17:04:49 +01:00
parent a6a83bf70e
commit b6becb6912
2 changed files with 7 additions and 7 deletions

View File

@@ -38,7 +38,6 @@ def main():
restart = "--restart" in sys.argv restart = "--restart" in sys.argv
no_quit = "--no-quit" in sys.argv no_quit = "--no-quit" in sys.argv
super_menu = not "--no-super" in sys.argv and not "--no-start" in sys.argv
noupdate = "--no-update" in sys.argv noupdate = "--no-update" in sys.argv
if not noupdate and config.get("auto_update", True): if not noupdate and config.get("auto_update", True):
@@ -62,7 +61,6 @@ def main():
config=config, config=config,
restart=restart, restart=restart,
no_quit=no_quit, no_quit=no_quit,
super_menu=super_menu
) )
if config.get("discord_presence", True): if config.get("discord_presence", True):

View File

@@ -39,13 +39,16 @@ class MainWindow(QtWidgets.QMainWindow):
http_download_signal = QtCore.Signal(str, str) http_download_signal = QtCore.Signal(str, str)
def __init__(self, dukto_handler, strings, config: Config, restart=False, no_quit=False, super_menu=True): def __init__(self, dukto_handler, strings, config: Config, restart=False, no_quit=False):
super().__init__() super().__init__()
self.strings = strings self.strings = strings
self.config = config self.config = config
self.listener = None self.listener = None
self.restart = restart
self.no_quit = no_quit
flags = ( flags = (
QtCore.Qt.FramelessWindowHint #type: ignore QtCore.Qt.FramelessWindowHint #type: ignore
| QtCore.Qt.WindowStaysOnTopHint #type: ignore | QtCore.Qt.WindowStaysOnTopHint #type: ignore
@@ -67,7 +70,6 @@ class MainWindow(QtWidgets.QMainWindow):
mask = QtGui.QBitmap.fromImage(mask_img) mask = QtGui.QBitmap.fromImage(mask_img)
self.setMask(mask) self.setMask(mask)
self.super_menu = super_menu
self.dukto_handler = dukto_handler self.dukto_handler = dukto_handler
self.progress_dialog = None self.progress_dialog = None
@@ -113,7 +115,7 @@ class MainWindow(QtWidgets.QMainWindow):
# Super key # Super key
self.show_menu_signal.connect(self.show_menu) self.show_menu_signal.connect(self.show_menu)
if self.super_menu: if config.get("hotkey") != None and config.get("hotkey") != "none" and config.get("hotkey") != "":
self.start_hotkey_listener() self.start_hotkey_listener()
def build_menus(self): def build_menus(self):
@@ -146,11 +148,11 @@ class MainWindow(QtWidgets.QMainWindow):
right_menu.addSeparator() right_menu.addSeparator()
right_menu.addAction(s["check_updates"], self.update_git) right_menu.addAction(s["check_updates"], self.update_git)
if "--restart" in sys.argv: if self.restart:
right_menu.addAction(s["restart"], self.restart_application) right_menu.addAction(s["restart"], self.restart_application)
right_menu.addAction(s["toggle_visibility"], self.toggle_visible) right_menu.addAction(s["toggle_visibility"], self.toggle_visible)
right_menu.addSeparator() right_menu.addSeparator()
if "--no-quit" not in sys.argv: if self.no_quit:
right_menu.addAction(s["quit"], QtWidgets.QApplication.quit) right_menu.addAction(s["quit"], QtWidgets.QApplication.quit)
self.tray.setContextMenu(right_menu) self.tray.setContextMenu(right_menu)