Beispiel #1
0
    def remove(self, from_library=False, from_disk=False):
        if from_disk and self.runner:
            logger.debug("Removing game %s from disk" % self.id)
            self.runner.remove_game_data(game_path=self.directory)

        # Do not keep multiple copies of the same game
        existing_games = pga.get_games_where(slug=self.slug)
        if len(existing_games) > 1:
            from_library = True

        if from_library:
            logger.debug("Removing game %s from library" % self.id)
            pga.delete_game(self.id)
        else:
            pga.set_uninstalled(self.id)
        self.config.remove()
        xdg.remove_launcher(self.slug, self.id, desktop=True, menu=True)
        return from_library
Beispiel #2
0
    def remove(self, from_library=False, from_disk=False):
        if from_disk and self.runner:
            logger.debug("Removing game %s from disk" % self.id)
            self.runner.remove_game_data(game_path=self.directory)

        # Do not keep multiple copies of the same game
        existing_games = pga.get_games_where(slug=self.slug)
        if len(existing_games) > 1:
            from_library = True

        if from_library:
            logger.debug("Removing game %s from library" % self.id)
            pga.delete_game(self.id)
        else:
            pga.set_uninstalled(self.id)
        self.config.remove()
        xdg.remove_launcher(self.slug, self.id, desktop=True, menu=True)
        return from_library
Beispiel #3
0
 def remove_desktop_shortcut(self, *_args):
     """Remove a .desktop shortcut"""
     game = Game(self.view.selected_game)
     xdg.remove_launcher(game.slug, game.id, desktop=True)
Beispiel #4
0
 def remove_menu_shortcut(self, *_args):
     """Remove an XDG menu shortcut"""
     game = Game(self.view.selected_game)
     xdg.remove_launcher(game.slug, game.id, menu=True)
Beispiel #5
0
 def remove_menu_shortcut(self, *args):
     game = Game(self.view.selected_game)
     xdg.remove_launcher(game.slug, game.id, menu=True)
Beispiel #6
0
 def remove_desktop_shortcut(self, *args):
     game = Game(self.view.selected_game)
     xdg.remove_launcher(game.slug, game.id, desktop=True)
Beispiel #7
0
 def remove_menu_shortcut(self, *args):
     game = Game(self.view.selected_game)
     xdg.remove_launcher(game.slug, game.id, menu=True)