mirror of
https://github.com/lutris/lutris
synced 2024-09-15 22:09:55 +00:00
Remove one more game-removed signal
This commit is contained in:
parent
dee381c81e
commit
ad82a5c778
|
@ -12,6 +12,7 @@ from lutris.gui.dialogs import QuestionDialog
|
|||
from lutris.gui.widgets.gi_composites import GtkTemplate
|
||||
from lutris.util import datapath
|
||||
from lutris.util.jobs import AsyncCall
|
||||
from lutris.util.path_cache import remove_from_path_cache
|
||||
from lutris.util.library_sync import delete_from_remote_library, sync_local_library
|
||||
from lutris.util.log import logger
|
||||
from lutris.util.strings import get_natural_sort_key, gtk_safe, human_size
|
||||
|
@ -480,6 +481,7 @@ class GameRemovalRow(Gtk.ListBoxRow):
|
|||
# We uninstall installed games, and delete games where self.remove_from_library is true;
|
||||
# but we must be careful to fire the game-removed single only once.
|
||||
if self.game.is_installed:
|
||||
remove_from_path_cache(self.game)
|
||||
if self.remove_from_library:
|
||||
self.game.uninstall(delete_files=self.delete_files, no_signal=True)
|
||||
self.game.delete()
|
||||
|
@ -487,3 +489,4 @@ class GameRemovalRow(Gtk.ListBoxRow):
|
|||
self.game.uninstall(delete_files=self.delete_files)
|
||||
elif self.remove_from_library:
|
||||
self.game.delete()
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ from lutris.services.lutris import LutrisService
|
|||
from lutris.util import datapath
|
||||
from lutris.util.jobs import AsyncCall
|
||||
from lutris.util.log import logger
|
||||
from lutris.util.path_cache import MISSING_GAMES, add_to_path_cache, remove_from_path_cache
|
||||
from lutris.util.path_cache import MISSING_GAMES, add_to_path_cache
|
||||
from lutris.util.strings import get_natural_sort_key
|
||||
from lutris.util.system import update_desktop_icons
|
||||
|
||||
|
@ -1092,9 +1092,9 @@ class LutrisWindow(Gtk.ApplicationWindow,
|
|||
def on_game_installed(self, game):
|
||||
return True
|
||||
|
||||
def on_game_removed(self, game):
|
||||
def on_game_removed(self, _game):
|
||||
"""Simple method used to refresh the view"""
|
||||
remove_from_path_cache(game)
|
||||
self.sidebar.update_rows()
|
||||
self.update_missing_games_sidebar_row()
|
||||
self.emit("view-updated")
|
||||
return True
|
||||
|
|
|
@ -360,7 +360,6 @@ class LutrisSidebar(Gtk.ListBox):
|
|||
GObject.add_emission_hook(Game, "game-start", self.on_game_start)
|
||||
GObject.add_emission_hook(Game, "game-stop", self.on_game_stop)
|
||||
GObject.add_emission_hook(Game, "game-updated", self.update_rows)
|
||||
GObject.add_emission_hook(Game, "game-removed", self.update_rows)
|
||||
GObject.add_emission_hook(BaseService, "service-login", self.on_service_auth_changed)
|
||||
GObject.add_emission_hook(BaseService, "service-logout", self.on_service_auth_changed)
|
||||
GObject.add_emission_hook(BaseService, "service-games-load", self.on_service_games_updating)
|
||||
|
|
Loading…
Reference in a new issue