Don't show the installing widget for Epic Overlay and DLCs
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
This commit is contained in:
parent
1e69da1d23
commit
fe40dac368
|
@ -170,13 +170,7 @@ class GamesTab(QStackedWidget):
|
|||
self.filter_games("")
|
||||
|
||||
def installation_started(self, app_name: str):
|
||||
game = self.core.get_game(app_name, False)
|
||||
if not game:
|
||||
return
|
||||
if game.is_dlc:
|
||||
return
|
||||
self.installing_widget.set_game(app_name)
|
||||
self.installing_widget.setVisible(True)
|
||||
|
||||
i_widget, l_widget = self.widgets.get(app_name, (None, None))
|
||||
if not i_widget or not l_widget:
|
||||
|
|
|
@ -23,8 +23,8 @@ class GameDlc(QWidget, Ui_GameDlc):
|
|||
|
||||
self.game_utils = game_utils
|
||||
|
||||
self.available_dlc_scroll.setProperty("noBorder", 1)
|
||||
self.installed_dlc_scroll.setProperty("noBorder", 1)
|
||||
self.available_dlc_scroll.setFrameStyle(QFrame.NoFrame)
|
||||
self.installed_dlc_scroll.setFrameStyle(QFrame.NoFrame)
|
||||
|
||||
self.dlcs = dlcs
|
||||
self.installed_dlc_widgets = list()
|
||||
|
@ -37,6 +37,7 @@ class GameDlc(QWidget, Ui_GameDlc):
|
|||
|
||||
if self.installed_dlc_widgets:
|
||||
for dlc_widget in self.installed_dlc_widgets:
|
||||
dlc_widget.uninstall.disconnect()
|
||||
dlc_widget.deleteLater()
|
||||
self.installed_dlc_widgets.clear()
|
||||
if self.available_dlc_widgets:
|
||||
|
@ -66,7 +67,7 @@ class GameDlc(QWidget, Ui_GameDlc):
|
|||
|
||||
def uninstall(self, app_name):
|
||||
if self.game_utils.uninstall_game(app_name):
|
||||
self.update_dlcs(app_name)
|
||||
self.update_dlcs(self.game.app_name)
|
||||
|
||||
def install(self, app_name):
|
||||
if not self.core.is_installed(self.game.app_name):
|
||||
|
@ -116,7 +117,7 @@ class GameDlcWidget(QFrame, Ui_GameDlcWidget):
|
|||
def uninstall_dlc(self):
|
||||
self.action_button.setDisabled(True)
|
||||
self.action_button.setText(self.tr("Uninstalling"))
|
||||
self.uninstall.emit(self.dlc)
|
||||
self.uninstall.emit(self.dlc.app_name)
|
||||
|
||||
def install_game(self):
|
||||
self.action_button.setDisabled(True)
|
||||
|
|
|
@ -45,10 +45,13 @@ class InstallingGameWidget(QFrame):
|
|||
self.setLayout(layout)
|
||||
|
||||
def set_game(self, app_name):
|
||||
if not app_name:
|
||||
self.game = self.core.get_game(app_name, False)
|
||||
if (not self.game) or self.game.is_dlc:
|
||||
# Don't show for EOS Overlay or DLCs
|
||||
self.game = None
|
||||
self.setVisible(False)
|
||||
return
|
||||
self.game = self.core.get_game(app_name)
|
||||
self.setVisible(True)
|
||||
self.title_label.setText(f"<h4>{self.game.app_title}</h4>")
|
||||
self.image.hideProgress(True)
|
||||
self.image.showProgress(
|
||||
|
@ -57,4 +60,7 @@ class InstallingGameWidget(QFrame):
|
|||
)
|
||||
|
||||
def set_status(self, s: int):
|
||||
if not self.game:
|
||||
# Don't show for EOS Overlay or DLCs
|
||||
return
|
||||
self.image.updateProgress(s)
|
||||
|
|
Loading…
Reference in a new issue