[gcompris] piano composition, better buttons



commit bf09a372f6f9f23c793db7ebf2f3fcac8be2f4b7
Author: Bruno Coudoin <bruno coudoin free fr>
Date:   Sun Sep 30 23:51:48 2012 +0200

    piano composition, better buttons
    
    Replaced the textual button "Erase and Change Clef" by
    an icon based one.
    Fixed missing files in the resource makefile.

 .../piano_composition.py                           |   13 ++++++++++---
 .../resources/piano_composition/Makefile.am        |   10 ++++++++--
 2 files changed, 18 insertions(+), 5 deletions(-)
---
diff --git a/src/piano_composition-activity/piano_composition.py b/src/piano_composition-activity/piano_composition.py
index 9228efc..059e2ff 100644
--- a/src/piano_composition-activity/piano_composition.py
+++ b/src/piano_composition-activity/piano_composition.py
@@ -136,7 +136,7 @@ class Gcompris_piano_composition:
             clefText = _("Now you can load melodies from around the world")
             keyboardDescription = False
         elif level == 7:
-            clefText = _("Compose music now! Click to load or save your work")
+            clefText = _("Compose music now! You can now load and save your work")
             keyboardDescription = False
 
         # CLEF DESCRIPTION
@@ -199,8 +199,13 @@ class Gcompris_piano_composition:
 
         if (level > 2):
 
-            self.changeClefButton = textButton(100, 140, _("Erase and Change Clef"),
-                                               self.rootitem, 0xE73A95FFL, 100)
+            self.changeClefButton = goocanvas.Image(
+                parent = self.rootitem,
+                pixbuf = gcompris.utils.load_pixmap('piano_composition/bassclef_button.svg'),
+                x = 90,
+                y = 120,
+                tooltip =  "\n\n" + _("Erase and Change Clef"),
+            )
             self.changeClefButton.connect("button_press_event", self.change_clef_event)
             gcompris.utils.item_focus_init(self.changeClefButton, None)
 
@@ -545,10 +550,12 @@ dialogue to\nenable the sound."), None)
         if hasattr(self.staff, 'newClef'):
             self.staff.newClef.clear()
         if self.staff.staffName == "trebleClef":
+            self.changeClefButton.props.pixbuf = gcompris.utils.load_pixmap('piano_composition/trebbleclef_button.svg')
             self.staff = BassStaff(370, 185, self.rootitem, 3)
             self.staff.drawStaff()
             self.staff.dynamicNoteSpacing = True
         else:
+            self.changeClefButton.props.pixbuf = gcompris.utils.load_pixmap('piano_composition/bassclef_button.svg')
             self.staff = TrebleStaff(370, 185, self.rootitem, 3)
             self.staff.drawStaff()
             self.staff.dynamicNoteSpacing = True
diff --git a/src/piano_composition-activity/resources/piano_composition/Makefile.am b/src/piano_composition-activity/resources/piano_composition/Makefile.am
index ef2dcd3..a9fee4b 100644
--- a/src/piano_composition-activity/resources/piano_composition/Makefile.am
+++ b/src/piano_composition-activity/resources/piano_composition/Makefile.am
@@ -5,22 +5,28 @@ img_DATA = \
 	bach.jpg \
 	banana.png \
 	bassClef.png \
+	bassclef_button.svg \
 	blackflat.png \
 	blacksharp.png \
 	button_front.svg \
+	edit-clear.svg \
+	edit-cut.svg \
+	edit-undo.svg \
 	eighthNote.png \
 	failed.svg \
 	flag.png \
 	gsoc2012.jpg \
 	halfNote.png \
 	keyboard.png \
-	load.png \
 	melodies.desktop.in \
 	mozart.jpg \
 	note_highlight.png \
+	open.svg \
 	passed.svg \
+	play.svg \
 	quarterNote.png \
-	save.png \
+	save.svg \
+	trebbleclef_button.svg \
 	trebleClef.png \
 	wholeNote.png
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]