diff --git a/rare/__main__.py b/rare/__main__.py index f2645432..edfd748e 100644 --- a/rare/__main__.py +++ b/rare/__main__.py @@ -28,7 +28,6 @@ def main(): if args.subparser == "launch": file.write("launch " + args.app_name) else: - print("write start") file.write("start") file.close() diff --git a/rare/components/tabs/downloads/__init__.py b/rare/components/tabs/downloads/__init__.py index 63c7617e..45d7c982 100644 --- a/rare/components/tabs/downloads/__init__.py +++ b/rare/components/tabs/downloads/__init__.py @@ -77,6 +77,7 @@ class DownloadTab(QWidget): widget.update.connect(self.update_game) if QSettings().value("auto_update", False, bool): self.update_game(igame.app_name, True) + widget.update_button.setDisabled(True) self.updates.setLayout(self.update_layout) self.layout.addWidget(self.updates) diff --git a/rare/components/tabs/games/game_info/__init__.py b/rare/components/tabs/games/game_info/__init__.py index c36007e3..118f613b 100644 --- a/rare/components/tabs/games/game_info/__init__.py +++ b/rare/components/tabs/games/game_info/__init__.py @@ -5,8 +5,10 @@ from PyQt5.QtGui import QPixmap, QKeyEvent from PyQt5.QtWidgets import QWidget, QPushButton, QVBoxLayout, QLabel, QHBoxLayout, QTabWidget, QMessageBox, \ QProgressBar, QStackedWidget, QGroupBox, QScrollArea from qtawesome import icon +from rare.utils import legendary_utils from rare import utils +from rare.components.dialogs.uninstall_dialog import UninstallDialog from rare.components.tabs.games.game_info.game_settings import GameSettings from rare.utils.legendary_utils import VerifyThread from rare.utils.extra_widgets import SideTabBar @@ -47,7 +49,6 @@ class GameInfo(QScrollArea): update_list = pyqtSignal() verify_game = pyqtSignal(str) verify_threads = {} - action = pyqtSignal(str) def __init__(self, core: LegendaryCore): super(GameInfo, self).__init__() @@ -90,7 +91,7 @@ class GameInfo(QScrollArea): top_layout.addStretch() self.game_actions = GameActions() - self.game_actions.uninstall_button.clicked.connect(lambda: self.action.emit("uninstall")) + self.game_actions.uninstall_button.clicked.connect(self.uninstall) self.game_actions.verify_button.clicked.connect(self.verify) self.game_actions.repair_button.clicked.connect(self.repair) @@ -100,6 +101,14 @@ class GameInfo(QScrollArea): self.widget.setLayout(self.layout) self.setWidget(self.widget) + def uninstall(self): + infos = UninstallDialog(self.game).get_information() + if infos == 0: + print("Cancel Uninstall") + return + legendary_utils.uninstall(self.game.app_name, self.core, infos) + self.update_list.emit() + def repair(self): repair_file = os.path.join(self.core.lgd.get_tmp_path(), f'{self.game.app_name}.repair') if not os.path.exists(repair_file):