[gcompris] hangman, fixed support for accentuated letters
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcompris] hangman, fixed support for accentuated letters
- Date: Sun, 26 Jan 2014 15:43:05 +0000 (UTC)
commit 8777cbd1e3082b06c4c237d09c37d5a751b684ab
Author: Bruno Coudoin <bruno coudoin gcompris net>
Date: Sun Jan 26 16:37:04 2014 +0100
hangman, fixed support for accentuated letters
The code that also check for accentuated letter in the
word to find was broken.
src/hangman-activity/hangman.py | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/hangman-activity/hangman.py b/src/hangman-activity/hangman.py
index cab902f..02a1f4f 100644
--- a/src/hangman-activity/hangman.py
+++ b/src/hangman-activity/hangman.py
@@ -466,11 +466,12 @@ class Letter:
self.letterItem.props.visibility = goocanvas.ITEM_VISIBLE
def check(self, targetLetter):
- if (self.letters.count(targetLetter) > 0):
- self.rect.set_properties(fill_color_rgba = 0x66CC33AAL)
- self.letterItem.props.visibility = goocanvas.ITEM_VISIBLE
- self.found = True
- return True
+ for letter in self.letters:
+ if (letter.count(targetLetter) > 0):
+ self.rect.set_properties(fill_color_rgba = 0x66CC33AAL)
+ self.letterItem.props.visibility = goocanvas.ITEM_VISIBLE
+ self.found = True
+ return True
return False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]