Ejemplo n.º 1
0
 def create_desktop_shortcut(self, *_args):
     """Create a desktop launcher for the selected game."""
     game = Game(self.view.selected_game)
     xdgshortcuts.create_launcher(game.slug,
                                  game.id,
                                  game.name,
                                  desktop=True)
Ejemplo n.º 2
0
    def create_shortcut(self, desktop=False):
        """Create desktop or global menu shortcuts."""
        game_slug = self.interpreter.installer.game_slug
        game_id = self.interpreter.installer.game_id
        game_name = self.interpreter.installer.game_name

        if desktop:
            xdgshortcuts.create_launcher(game_slug, game_id, game_name, desktop=True)
        else:
            xdgshortcuts.create_launcher(game_slug, game_id, game_name, menu=True)
Ejemplo n.º 3
0
    def create_shortcuts(self, *args):
        """Create desktop and global menu shortcuts."""
        game_slug = self.interpreter.game_slug
        game_id = self.interpreter.game_id
        game_name = self.interpreter.game_name
        create_desktop_shortcut = self.desktop_shortcut_box.get_active()
        create_menu_shortcut = self.menu_shortcut_box.get_active()

        if create_desktop_shortcut:
            xdgshortcuts.create_launcher(game_slug, game_id, game_name, desktop=True)
        if create_menu_shortcut:
            xdgshortcuts.create_launcher(game_slug, game_id, game_name, menu=True)

        settings.write_setting("create_desktop_shortcut", create_desktop_shortcut)
        settings.write_setting("create_menu_shortcut", create_menu_shortcut)
Ejemplo n.º 4
0
    def create_shortcuts(self, *args):
        """Create desktop and global menu shortcuts."""
        game_slug = self.interpreter.game_slug
        game_id = self.interpreter.game_id
        game_name = self.interpreter.game_name
        create_desktop_shortcut = self.desktop_shortcut_box.get_active()
        create_menu_shortcut = self.menu_shortcut_box.get_active()

        if create_desktop_shortcut:
            xdgshortcuts.create_launcher(game_slug, game_id, game_name, desktop=True)
        if create_menu_shortcut:
            xdgshortcuts.create_launcher(game_slug, game_id, game_name, menu=True)

        settings.write_setting("create_desktop_shortcut", create_desktop_shortcut)
        settings.write_setting("create_menu_shortcut", create_menu_shortcut)
Ejemplo n.º 5
0
 def on_create_desktop_shortcut(self, *_args):
     """Create a desktop launcher for the selected game."""
     xdgshortcuts.create_launcher(self.game.slug, self.game.id, self.game.name, desktop=True)
Ejemplo n.º 6
0
 def on_create_menu_shortcut(self, *_args):
     """Add the selected game to the system's Games menu."""
     xdgshortcuts.create_launcher(self.game.slug, self.game.id, self.game.name, menu=True)
Ejemplo n.º 7
0
 def on_create_desktop_shortcut(self, *_args):
     """Create a desktop launcher for the selected game."""
     xdgshortcuts.create_launcher(self.game.slug, self.game.id, self.game.name, desktop=True)
Ejemplo n.º 8
0
 def on_create_menu_shortcut(self, *_args):
     """Add the selected game to the system's Games menu."""
     xdgshortcuts.create_launcher(self.game.slug, self.game.id, self.game.name, menu=True)
Ejemplo n.º 9
0
 def create_menu_shortcut(self, *_args):
     """Add the selected game to the system's Games menu."""
     game = Game(self.view.selected_game)
     xdgshortcuts.create_launcher(game.slug, game.id, game.name, menu=True)
Ejemplo n.º 10
0
def migrate():
    for game in [Game(pga_game["id"]) for pga_game in pga.get_games()]:
        if xdgshortcuts.desktop_launcher_exists(game.slug, game.id):
            xdgshortcuts.create_launcher(game.slug, game.id, game.name, desktop=True)
        if xdgshortcuts.menu_launcher_exists(game.slug, game.id):
            xdgshortcuts.create_launcher(game.slug, game.id, game.name, menu=True)