From e377a85e2155b2d0b7903fd4711a3c24dc90f34f Mon Sep 17 00:00:00 2001 From: Gonzalo Odiard Date: Sun, 25 Nov 2012 05:12:45 +0000 Subject: Add the labels to show the notes in german notation Signed-off-by: Gonzalo Odiard --- diff --git a/activity.py b/activity.py index dc5b90f..9f300f0 100644 --- a/activity.py +++ b/activity.py @@ -70,6 +70,12 @@ class SimplePianoActivity(activity.Activity): notes_labels.connect('clicked', self.set_notes_labels_cb) toolbar_box.toolbar.insert(notes_labels, -1) + german_labels = RadioToolButton() + german_labels.props.icon_name = 'c_key' + german_labels.props.group = keybord_labels + german_labels.connect('clicked', self.set_german_labels_cb) + toolbar_box.toolbar.insert(german_labels, -1) + separator = Gtk.SeparatorToolItem() separator.props.draw = False separator.set_expand(True) @@ -88,6 +94,11 @@ class SimplePianoActivity(activity.Activity): 'SOL#', 'LA', 'LA#', 'SI'] self.notes_labels = [notes, notes, ['DO']] + german_notes = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', + 'G#', 'A', 'A#', 'B'] + + self.german_labels = [german_notes, german_notes, ['C']] + self.piano = PianoKeyboard(octaves=2, add_c=True, labels=self.keyboard_letters) @@ -147,6 +158,10 @@ class SimplePianoActivity(activity.Activity): self.piano.font_size = 20 self.piano.set_labels(self.keyboard_letters) + def set_german_labels_cb(self, widget): + self.piano.font_size = 20 + self.piano.set_labels(self.german_labels) + def enableKeyboard(self): self.keyboardStandAlone = KeyboardStandAlone(self.sequencer.recording, self.sequencer.adjustDuration, self.csnd.loopGetTick, diff --git a/icons/c_key.svg b/icons/c_key.svg new file mode 100644 index 0000000..fa9a0d4 --- /dev/null +++ b/icons/c_key.svg @@ -0,0 +1,59 @@ + + + +image/svg+xml + + + +C + + \ No newline at end of file -- cgit v0.9.1