removed --no-super
This commit is contained in:
2
main.py
2
main.py
@@ -38,7 +38,6 @@ def main():
|
||||
|
||||
restart = "--restart" 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
|
||||
|
||||
if not noupdate and config.get("auto_update", True):
|
||||
@@ -62,7 +61,6 @@ def main():
|
||||
config=config,
|
||||
restart=restart,
|
||||
no_quit=no_quit,
|
||||
super_menu=super_menu
|
||||
)
|
||||
|
||||
if config.get("discord_presence", True):
|
||||
|
||||
@@ -39,13 +39,16 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||
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__()
|
||||
|
||||
self.strings = strings
|
||||
self.config = config
|
||||
self.listener = None
|
||||
|
||||
self.restart = restart
|
||||
self.no_quit = no_quit
|
||||
|
||||
flags = (
|
||||
QtCore.Qt.FramelessWindowHint #type: ignore
|
||||
| QtCore.Qt.WindowStaysOnTopHint #type: ignore
|
||||
@@ -67,7 +70,6 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||
mask = QtGui.QBitmap.fromImage(mask_img)
|
||||
self.setMask(mask)
|
||||
|
||||
self.super_menu = super_menu
|
||||
self.dukto_handler = dukto_handler
|
||||
self.progress_dialog = None
|
||||
|
||||
@@ -113,7 +115,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||
|
||||
# Super key
|
||||
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()
|
||||
|
||||
def build_menus(self):
|
||||
@@ -146,11 +148,11 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||
right_menu.addSeparator()
|
||||
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["toggle_visibility"], self.toggle_visible)
|
||||
right_menu.addSeparator()
|
||||
if "--no-quit" not in sys.argv:
|
||||
if self.no_quit:
|
||||
right_menu.addAction(s["quit"], QtWidgets.QApplication.quit)
|
||||
|
||||
self.tray.setContextMenu(right_menu)
|
||||
|
||||
Reference in New Issue
Block a user