From 395b67acbcf57bcf03e89523e454949db718aa94 Mon Sep 17 00:00:00 2001 From: Gonzalo Odiard Date: Mon, 13 May 2013 12:04:47 +0000 Subject: Add a button to show no labels Signed-off-by: Gonzalo Odiard --- 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, -- cgit v0.9.1