示例#1
0
def migrate():
    """Run migration"""
    for pga_game in get_games():
        game = Game(pga_game["id"])
        if game.runner_name != "mess":
            continue
        if "mess" in game.config.game_level:
            game.config.game_level["mame"] = game.config.game_level.pop("mess")
        game.runner_name = "mame"
        game.save()
示例#2
0
 def build_game_tab(self):
     if self.game and self.runner_name:
         self.game.runner_name = self.runner_name
         self.game_box = GameBox(self.lutris_config, self.game)
         game_sw = self.build_scrolled_window(self.game_box)
     elif self.runner_name:
         game = Game(None)
         game.runner_name = self.runner_name
         self.game_box = GameBox(self.lutris_config, game)
         game_sw = self.build_scrolled_window(self.game_box)
     else:
         game_sw = Gtk.Label(label=self.no_runner_label)
     self.add_notebook_tab(game_sw, "Game options")
示例#3
0
 def build_game_tab(self):
     if self.game and self.runner_name:
         self.game.runner_name = self.runner_name
         self.game_box = GameBox(self.lutris_config, "game", self.game)
         game_sw = self.build_scrolled_window(self.game_box)
     elif self.runner_name:
         game = Game(None)
         game.runner_name = self.runner_name
         self.game_box = GameBox(self.lutris_config, "game", game)
         game_sw = self.build_scrolled_window(self.game_box)
     else:
         game_sw = Gtk.Label(label=self.no_runner_label)
         game_sw.show()
     self.add_notebook_tab(game_sw, "Game configuration")
示例#4
0
 def _build_game_tab(self):
     if self.game and self.runner_name:
         self.game.runner_name = self.runner_name
         try:
             self.game.runner = runners.import_runner(self.runner_name)
         except runners.InvalidRunner:
             pass
         self.game_box = GameBox(self.lutris_config, self.game)
         game_sw = self.build_scrolled_window(self.game_box)
     elif self.runner_name:
         game = Game(None)
         game.runner_name = self.runner_name
         self.game_box = GameBox(self.lutris_config, game)
         game_sw = self.build_scrolled_window(self.game_box)
     else:
         game_sw = Gtk.Label(label=self.no_runner_label)
     self._add_notebook_tab(game_sw, "Game options")
示例#5
0
 def _build_game_tab(self):
     if self.game and self.runner_name:
         self.game.runner_name = self.runner_name
         try:
             self.game.runner = runners.import_runner(self.runner_name)
         except runners.InvalidRunner:
             pass
         self.game_box = GameBox(self.lutris_config, self.game)
         game_sw = self.build_scrolled_window(self.game_box)
     elif self.runner_name:
         game = Game(None)
         game.runner_name = self.runner_name
         self.game_box = GameBox(self.lutris_config, game)
         game_sw = self.build_scrolled_window(self.game_box)
     else:
         game_sw = Gtk.Label(label=self.no_runner_label)
     self._add_notebook_tab(game_sw, "Game options")