def errorDialog(self, msg): MfxMessageDialog(self.parent, title=TITLE + ' HTML Problem', text=msg, bitmap='warning', strings=(_('&OK'), ), default=0)
def mOptSoundDirectX(self, *event): ##print self.sound_mode.get() d = MfxMessageDialog(self.top, title=_("Sound preferences info"), text=_("""\ Changing DirectX settings will take effect the next time you restart """)+TITLE, bitmap="warning", default=0, strings=(_("&OK"),))
def __init__(self, parent, game): stats, gstats = game.stats, game.gstats w1 = w2 = "" n = 0 for s in game.s.foundations: n = n + len(s.cards) w1 = (_("Highlight piles: ") + str(stats.highlight_piles) + "\n" + _("Highlight cards: ") + str(stats.highlight_cards) + "\n" + _("Highlight same rank: ") + str(stats.highlight_samerank) + "\n") if game.s.talon: if game.gameinfo.redeals != 0: w2 = w2 + _("\nRedeals: ") + str(game.s.talon.round - 1) w2 = w2 + _("\nCards in Talon: ") + str(len(game.s.talon.cards)) if game.s.waste and game.s.waste not in game.s.foundations: w2 = w2 + _("\nCards in Waste: ") + str(len(game.s.waste.cards)) if game.s.foundations: w2 = w2 + _("\nCards in Foundations: ") + str(n) # date = time.strftime("%Y-%m-%d %H:%M", time.localtime(game.gstats.start_time)) MfxMessageDialog.__init__( self, parent, title=_("Game status"), text=game.getTitleName() + "\n" + game.getGameNumber(format=1) + "\n" + _("Playing time: ") + game.getTime() + "\n" + _("Started at: ") + date + "\n\n" + _("Moves: ") + str(game.moves.index) + "\n" + _("Undo moves: ") + str(stats.undo_moves) + "\n" + _("Bookmark moves: ") + str(gstats.goto_bookmark_moves) + "\n" + _("Demo moves: ") + str(stats.demo_moves) + "\n" + _("Total player moves: ") + str(stats.player_moves) + "\n" + _("Total moves in this game: ") + str(stats.total_moves) + "\n" + _("Hints: ") + str(stats.hints) + "\n" + "\n" + w1 + w2, strings=( _("&OK"), (_("&Statistics..."), 101), (TOP_TITLE + "...", 105), ), image=game.app.gimages.logos[3], image_side="left", image_padx=20, padx=20, )
def __init__(self, parent, game): stats, gstats = game.stats, game.gstats w1 = w2 = '' n = 0 for s in game.s.foundations: n = n + len(s.cards) w1 = (_('Highlight piles: ') + str(stats.highlight_piles) + '\n' + _('Highlight cards: ') + str(stats.highlight_cards) + '\n' + _('Highlight same rank: ') + str(stats.highlight_samerank) + '\n') if game.s.talon: if game.gameinfo.redeals != 0: w2 = w2 + _('\nRedeals: ') + str(game.s.talon.round - 1) w2 = w2 + _('\nCards in Talon: ') + str(len(game.s.talon.cards)) if game.s.waste and game.s.waste not in game.s.foundations: w2 = w2 + _('\nCards in Waste: ') + str(len(game.s.waste.cards)) if game.s.foundations: w2 = w2 + _('\nCards in Foundations: ') + str(n) # date = time.strftime('%Y-%m-%d %H:%M', time.localtime(game.gstats.start_time)) MfxMessageDialog.__init__( self, parent, title=_('Game status'), text=game.getTitleName() + '\n' + game.getGameNumber(format=1) + '\n' + _('Playing time: ') + game.getTime() + '\n' + _('Started at: ') + date + '\n\n' + _('Moves: ') + str(game.moves.index) + '\n' + _('Undo moves: ') + str(stats.undo_moves) + '\n' + _('Bookmark moves: ') + str(gstats.goto_bookmark_moves) + '\n' + _('Demo moves: ') + str(stats.demo_moves) + '\n' + _('Total player moves: ') + str(stats.player_moves) + '\n' + _('Total moves in this game: ') + str(stats.total_moves) + '\n' + _('Hints: ') + str(stats.hints) + '\n' + '\n' + w1 + w2, strings=( _('&OK'), (_('&Statistics...'), 101), ), image=game.app.gimages.logos[3], image_side='left', image_padx=20, padx=20, )
def __init__(self, parent, game): stats, gstats = game.stats, game.gstats w1 = w2 = '' n = 0 for s in game.s.foundations: n = n + len(s.cards) w1 = (_('Highlight piles: ') + str(stats.highlight_piles) + '\n' + _('Highlight cards: ') + str(stats.highlight_cards) + '\n' + _('Highlight same rank: ') + str(stats.highlight_samerank) + '\n') if game.s.talon: if game.gameinfo.redeals != 0: w2 = w2 + _('\nRedeals: ') + str(game.s.talon.round - 1) w2 = w2 + _('\nCards in Talon: ') + str(len(game.s.talon.cards)) if game.s.waste and game.s.waste not in game.s.foundations: w2 = w2 + _('\nCards in Waste: ') + str(len(game.s.waste.cards)) if game.s.foundations: w2 = w2 + _('\nCards in Foundations: ') + str(n) # date = time.strftime('%Y-%m-%d %H:%M', time.localtime(game.gstats.start_time)) MfxMessageDialog.__init__( self, parent, title=_('Game status'), text=game.getTitleName() + '\n' + game.getGameNumber(format=1) + '\n' + _('Playing time: ') + game.getTime() + '\n' + _('Started at: ') + date + '\n\n' + _('Moves: ') + str(game.moves.index) + '\n' + _('Undo moves: ') + str(stats.undo_moves) + '\n' + _('Bookmark moves: ') + str(gstats.goto_bookmark_moves) + '\n' + _('Demo moves: ') + str(stats.demo_moves) + '\n' + _('Total player moves: ') + str(stats.player_moves) + '\n' + _('Total moves in this game: ') + str(stats.total_moves) + '\n' + _('Hints: ') + str(stats.hints) + '\n' + '\n' + w1 + w2, strings=(_('&OK'), (_('&Statistics...'), 101), ), image=game.app.gimages.logos[3], image_side='left', image_padx=20, padx=20, )
def __init__(self, parent, game): stats, gstats = game.stats, game.gstats w1 = w2 = "" n = 0 for s in game.s.foundations: n = n + len(s.cards) w1 = (_("Highlight piles: ") + str(stats.highlight_piles) + "\n" + _("Highlight cards: ") + str(stats.highlight_cards) + "\n" + _("Highlight same rank: ") + str(stats.highlight_samerank) + "\n") if game.s.talon: if game.gameinfo.redeals != 0: w2 = w2 + _("\nRedeals: ") + str(game.s.talon.round - 1) w2 = w2 + _("\nCards in Talon: ") + str(len(game.s.talon.cards)) if game.s.waste and game.s.waste not in game.s.foundations: w2 = w2 + _("\nCards in Waste: ") + str(len(game.s.waste.cards)) if game.s.foundations: w2 = w2 + _("\nCards in Foundations: ") + str(n) # date = time.strftime("%Y-%m-%d %H:%M", time.localtime(game.gstats.start_time)) MfxMessageDialog.__init__( self, parent, title=_("Game status"), text=game.getTitleName() + "\n" + game.getGameNumber(format=1) + "\n" + _("Playing time: ") + game.getTime() + "\n" + _("Started at: ") + date + "\n\n"+ _("Moves: ") + str(game.moves.index) + "\n" + _("Undo moves: ") + str(stats.undo_moves) + "\n" + _("Bookmark moves: ") + str(gstats.goto_bookmark_moves) + "\n" + _("Demo moves: ") + str(stats.demo_moves) + "\n" + _("Total player moves: ") + str(stats.player_moves) + "\n" + _("Total moves in this game: ") + str(stats.total_moves) + "\n" + _("Hints: ") + str(stats.hints) + "\n" + "\n" + w1 + w2, strings=((_("&Statistics..."), 101), 'sep', _("&OK")), image=game.app.gimages.logos[3], image_side="left", image_padx=20, padx=20, )