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)
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)
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)
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)
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)
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)
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)