mirror of
https://github.com/relativemodder/aegnux.git
synced 2025-12-10 13:39:43 +05:00
bugfix
This commit is contained in:
@@ -11,14 +11,16 @@ def main():
|
|||||||
app.setDesktopFileName(DESKTOP_FILE_NAME)
|
app.setDesktopFileName(DESKTOP_FILE_NAME)
|
||||||
app.setWindowIcon(QIcon(AE_ICON_PATH))
|
app.setWindowIcon(QIcon(AE_ICON_PATH))
|
||||||
|
|
||||||
mainWindow = MainWindow()
|
|
||||||
|
|
||||||
show_window = True
|
show_window = True
|
||||||
|
quit_after_handling_args = False
|
||||||
|
|
||||||
for arg in sys.argv:
|
for arg in sys.argv:
|
||||||
if 'misterhorsepm://' in arg or '.aep' in arg:
|
if 'misterhorsepm://' in arg or '.aep' in arg:
|
||||||
show_window = False
|
show_window = False
|
||||||
|
quit_after_handling_args = True
|
||||||
break
|
break
|
||||||
|
|
||||||
|
mainWindow = MainWindow(quit_after_handling_args)
|
||||||
|
|
||||||
if show_window:
|
if show_window:
|
||||||
mainWindow.show()
|
mainWindow.show()
|
||||||
|
|||||||
@@ -21,11 +21,12 @@ from src.types import DownloadMethod
|
|||||||
|
|
||||||
|
|
||||||
class MainWindow(MainWindowUI):
|
class MainWindow(MainWindowUI):
|
||||||
def __init__(self):
|
def __init__(self, quit_after_handling_args: bool = False):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
self.ran_from_aep_file = False
|
self.ran_from_aep_file = False
|
||||||
self.ran_from_mhtb_link = False
|
self.ran_from_mhtb_link = False
|
||||||
|
self.quit_after_handling_args = quit_after_handling_args
|
||||||
|
|
||||||
self.setWindowTitle(gls('welcome_win_title'))
|
self.setWindowTitle(gls('welcome_win_title'))
|
||||||
self.install_button.clicked.connect(self.install_button_clicked)
|
self.install_button.clicked.connect(self.install_button_clicked)
|
||||||
@@ -99,7 +100,7 @@ class MainWindow(MainWindowUI):
|
|||||||
gls('mhtb_not_found_title'),
|
gls('mhtb_not_found_title'),
|
||||||
gls('mhtb_not_found_text')
|
gls('mhtb_not_found_text')
|
||||||
)
|
)
|
||||||
return
|
exit(0)
|
||||||
|
|
||||||
self.run_mhtb_thread = RunExeThread([f'{mhtb_dir.as_posix()}/ProductManager.exe', mhtb_link])
|
self.run_mhtb_thread = RunExeThread([f'{mhtb_dir.as_posix()}/ProductManager.exe', mhtb_link])
|
||||||
self.run_mhtb_thread.log_signal.connect(self._log)
|
self.run_mhtb_thread.log_signal.connect(self._log)
|
||||||
@@ -187,10 +188,7 @@ class MainWindow(MainWindowUI):
|
|||||||
|
|
||||||
@Slot(bool)
|
@Slot(bool)
|
||||||
def _finished(self, success: bool):
|
def _finished(self, success: bool):
|
||||||
if self.ran_from_mhtb_link:
|
if self.quit_after_handling_args:
|
||||||
exit(0)
|
|
||||||
|
|
||||||
if self.ran_from_aep_file:
|
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
self.lock_ui(False)
|
self.lock_ui(False)
|
||||||
|
|||||||
Reference in New Issue
Block a user