Fix Loudrob's stuff

This commit is contained in:
John 2015-07-17 15:04:59 +03:00
parent c21c7d53fd
commit 5a4dc305d1
3 changed files with 4 additions and 6 deletions

View file

@ -402,13 +402,9 @@ class CatalogItemPanel(DirectFrame):
'item': self['item'].getName(),
'price': self['item'].getPrice(self['type'])}
else:
friendText = 'Error'
numFriends = len(base.localAvatar.friendsList) + len(base.cr.avList) - 1
if numFriends > 0:
friendText = self.parentCatalogScreen.friendName
message = TTLocalizer.CatalogVerifyGift % {'item': self['item'].getName(),
'price': self['item'].getPrice(self['type']),
'friend': friendText}
'friend': TTLocalizer.CatalogGiftError if not self.parentCatalogScreen.friendName else self.parentCatalogScreen.friendName}
self.verify = TTDialog.TTGlobalDialog(doneEvent='verifyGiftDone', message=message, style=TTDialog.TwoChoice)
self.verify.show()
self.accept('verifyGiftDone', self.__handleVerifyGift)

View file

@ -47,7 +47,7 @@ class CatalogScreen(DirectFrame):
DirectFrame.__init__(self, parent)
self.friend = None
self.friendAvId = None
self.friendName = 'Error Nameless Toon'
self.friendName = None
self.friendList = []
self.friends = []
self.load(guiItems, guiButton, guiBack)
@ -1045,6 +1045,7 @@ class CatalogScreen(DirectFrame):
self.scrollList.show()
self.hideEmblems()
self.giftToggle['text'] = TTLocalizer.CatalogGiftToggleOn
self.friendLabel['text'] = TTLocalizer.CatalogGiftChoose
self.__loadFriend()
else:
self.friend = None

View file

@ -5462,6 +5462,7 @@ CatalogGoodbyeList = ['Bye now!',
'Bye!']
CatalogHelpText1 = 'Turn the page to see items for sale.'
CatalogSeriesLabel = 'Series %s'
CatalogGiftError = 'Error'
CatalogGiftFor = 'Buy Gift for:'
CatalogGiftTo = 'To: %s'
CatalogGiftToggleOn = 'Stop Gifting'