Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2013-05-13 12:04:47 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2013-05-13 12:04:47 (GMT)
commit395b67acbcf57bcf03e89523e454949db718aa94 (patch)
treede7b1f3e3ae2755b21dbcf9e5f41064913f47f96
parent32c426519d66caf6def99eedd41fac8de146d2d0 (diff)
Add a button to show no labels
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
-rw-r--r--activity.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/activity.py b/activity.py
index c1e6f51..6e3cea1 100644
--- a/activity.py
+++ b/activity.py
@@ -86,6 +86,12 @@ class SimplePianoActivity(activity.Activity):
german_labels.connect('clicked', self.set_german_labels_cb)
toolbar_box.toolbar.insert(german_labels, -1)
+ no_labels = RadioToolButton()
+ no_labels.props.icon_name = 'edit-clear'
+ no_labels.props.group = keybord_labels
+ no_labels.connect('clicked', self.set_keyboard_no_labels_cb)
+ toolbar_box.toolbar.insert(no_labels, -1)
+
separator = Gtk.SeparatorToolItem()
separator.props.draw = False
separator.set_expand(True)
@@ -236,6 +242,10 @@ class SimplePianoActivity(activity.Activity):
self.piano.font_size = 25
self.piano.set_labels(self.german_labels)
+ def set_keyboard_no_labels_cb(self, widget):
+ self.piano.font_size = 25
+ self.piano.set_labels(None)
+
def enableKeyboard(self):
self.keyboardStandAlone = KeyboardStandAlone(
self.sequencer.recording, self.sequencer.adjustDuration,