[gcompris] note_names, fixed bug related to the C note
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcompris] note_names, fixed bug related to the C note
- Date: Mon, 17 Sep 2012 22:59:30 +0000 (UTC)
commit a2828a2ba35246c2c479a9d57ead58cbb815183b
Author: Bruno Coudoin <bruno coudoin free fr>
Date: Tue Sep 18 00:56:03 2012 +0200
note_names, fixed bug related to the C note
At level 2 and others, the C note was proposed once on the right
but 2 was proposed on the left (lower and upper C).
First there was a bug, when the upper C was proposed, you was only
hearing to this note, whatever you click on the right.
Then it was confusing thus I have left the 2 C being proposed
on the right side.
src/note_names-activity/note_names.py | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/src/note_names-activity/note_names.py b/src/note_names-activity/note_names.py
index e471a97..20c5a3f 100644
--- a/src/note_names-activity/note_names.py
+++ b/src/note_names-activity/note_names.py
@@ -344,12 +344,11 @@ They also form the C Major Scale. Notice that the note positions are different t
y = 220
random.shuffle(self.pitchPossibilities)
for numID in self.pitchPossibilities:
- if numID != 8:
- drawNoteButton(x, y, numID, self.play_sound_on_click)
- y += 30
- if y > 320:
- y = 220
- x = x + 40
+ drawNoteButton(x, y, numID, self.play_sound_on_click)
+ y += 30
+ if y > 320:
+ y = 220
+ x = x + 40
def play_sound_on_click(self, widget, target, event, numID):
'''
@@ -358,8 +357,6 @@ They also form the C Major Scale. Notice that the note positions are different t
self.selectedNoteObject = widget
if self.pitchSoundEnabled:
- if self.currentNote.numID == 8:
- numID = 8
HalfNote(numID, self.staff.staffName, self.staff.rootitem).play()
if hasattr(self, 'focusRect'):
self.focusRect.remove()
@@ -387,7 +384,7 @@ They also form the C Major Scale. Notice that the note positions are different t
self.timers.append(gobject.timeout_add(1500, self.readyToSoundAgain))
g = self.selectedNoteObject.get_data('numID')
c = self.currentNote.numID
- if g == c or (c == 8 and g == 1):
+ if g == c:
if not self.repeatThisNoteLaterPlease:
self.remainingNotesToIdentify.remove(c)
if self.remainingNotesToIdentify == []:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]