~ubuntu-branches/ubuntu/intrepid/gnome-games/intrepid

« back to all changes in this revision

Viewing changes to glchess/src/lib/main.py

  • Committer: Package Import Robot
  • Author(s): Didier Roche
  • Date: 2008-10-21 00:30:34 UTC
  • mfrom: (1.1.58)
  • Revision ID: package-import@ubuntu.com-20081021003034-cb0iknvzten935zn
Tags: 1:2.24.1-0ubuntu1
* New upstream release (LP: #286667)
  - General:
    - Fix up compatiblity with Gtk/Glib 2.14
    - Reclassify Gnibbles as Arcade game not logic game
    - Read saved window configuration from correct GConf group (affects
      gnometris, gnibbles, gnobots)
  - Aisleriot:
    - Remove vestigal flowRoot elements from solitaire svg icons. They
      caused a black box when rendering.
    - Don't crash when the session manager terminates aisleriot
  - GLChess:
    - Fix crash in error handler when GGZ connection closed
    - Fix crash in empty scene when no AI engines available
    - Fix crash when have OpenGL libraries but cannot get valid display
    - Implement GGZ config parser instead of using Python config parser
      which does not handle '%' characters as GGZ does
    - Ignore GGZ server remove player/table for unknown players/tables
    - Handle exceptions loading OpenGL textures
    - Reset pause menu when starting new game
    - Only allow one new/load game dialog to be visible at once
    - Fix incorrect function call for single buffered 3D display
    - Handle fork() errors in AI processes
    - Fixes to compile in Solaris
    - Print failure to start message to stdout if cannot import GTK+
    - Handle invalid response from glRenderMode(GL_RENDER) and print
      debugging information
    - More logging messages about selection rendering bugs
    - After looking at failure case in PyOpenGL code we don't need to change
      render modes after failed to change to GL_SELECT
    - Fix potential bugs found by PyChecker
    - Fix crash when validly claiming a draw
    - Don't display failed to claim draw dialog when successfully claimed
      draw
  - GTali:
    - Undoing 5 of a kind reduces the score by 50 as there might be multiple
      scores (LP: #238978)
  - Sudoku:
    - Add not overwrite time and also remember to actually save the time in
      the file (LP: #279616)
    - Correct typo in error message that led to an exception
  - Gnotravex:
    - Stop paused tiles becoming visible after changing colour settings
  - Blackjack:
    - Fix compiler warnings

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
        
111
111
        Returns an AI player to use (game.ChessPlayer).
112
112
        """
 
113
        # Translators: Description of an AI player used in log window. %(name)s is replaced with
 
114
        # the name of the AI player. %(game)s is replaced with the name of the game the AI player
 
115
        # is in.
113
116
        description = _("'%(name)s' in '%(game)s'") % {'name': name, 'game': self.name}
114
117
        p = player.AIPlayer(self.application, name, profile, level, description)
115
118
        self.__aiPlayers.append(p)
442
445
        
443
446
        self.history = history.GameHistory()
444
447
        
445
 
        self.logger = self.ui.controller.addLogWindow(_('Application Log'), '', '')
 
448
        # Translators: Name of the log that displays application events
 
449
        title = _('Application Log')
 
450
        self.logger = self.ui.controller.addLogWindow(title, '', '')
446
451
 
447
452
    def addAIProfile(self, profile):
448
453
        """Add a new AI profile into glChess.
687
692
            self.logger.addLine('loaded in %f seconds' % (time.time() - s))
688
693
 
689
694
        else:
 
695
            # FIXME: Should be in a dialog
 
696
            # Translators: Text displayed on the command-line if an unknown argument is passed
690
697
            print _('Usage: %s [game]') % sys.argv[0]
691
698
            sys.exit(0)
692
699
 
697
704
                    aiName = p.name
698
705
                    break
699
706
            black = (aiName, 'easy')
700
 
            name = _('Human versus %s') % aiName
701
 
            g = self.addLocalGame(name, _('White'), None, _('Black'), black)
 
707
            # Translators: Name of a human versus AI game. The %s is replaced with the name of the AI player
 
708
            gameName = _('Human versus %s') % aiName
 
709
            # Translators: Name of white player in a default game
 
710
            whiteName =  _('White')
 
711
            # Translators: Name of black player in a default game            
 
712
            blackName = _('Black')
 
713
            g = self.addLocalGame(gameName, whiteName, None, blackName, black)
702
714
            g.inHistory = True
703
715
            g.start()
704
716