Clear error on GGZ connection

make move strings translateable

svn path=/trunk/; revision=6847
This commit is contained in:
Robert Ancell 2007-10-06 15:20:15 +00:00
parent 3ae2b251f8
commit 9ad10cefbb
3 changed files with 6 additions and 2 deletions

View file

@ -431,8 +431,8 @@ class GtkView(glchess.ui.ViewController):
subs['result'] = status
haveResult = status is not None
subs['move'] = {True: '%(movenum)2iw.' % subs,
False: '%(movenum)2ib.' % subs}[isWhite]
subs['move'] = {True: _('%(movenum)2iw.') % subs,
False: _('%(movenum)2ib.') % subs}[isWhite]
if move.sanMove.startswith('O-O-O'):
string = {(True, True): _('%(move)s White castles long (%(result)s)'),

View file

@ -144,6 +144,9 @@ class GtkNetworkGameDialog(glchess.ui.NetworkController):
self.__gui.get_widget('info_panel_description').set_markup('<i>%s</i>' % description)
self.__gui.get_widget('info_panel').show()
def clearError(self):
self.__gui.get_widget('info_panel').hide()
def addProfile(self, profile, name):
"""Called by glchess.ui.UIController"""
iter = self.profileModel.append()

View file

@ -159,6 +159,7 @@ class GGZConnection(ggz.ClientFeedback):
def onConnected(self):
self.dialog.controller.setSensitive(True)
self.dialog.controller.clearError()
def onDisconnected(self):
self.dialog.controller.setError('Disconnected', 'You have been disconnected from the server')