[gcompris] piano composition, tooltip fixes.
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcompris] piano composition, tooltip fixes.
- Date: Sun, 30 Sep 2012 21:54:04 +0000 (UTC)
commit 0fda4e85f2a46a9bf36748622ebb6b65b67c6488
Author: Bruno Coudoin <bruno coudoin free fr>
Date: Sun Sep 30 23:04:02 2012 +0200
piano composition, tooltip fixes.
src/piano_composition-activity/gcomprismusic.py | 6 +++++-
.../piano_composition.py | 11 +++++------
2 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/src/piano_composition-activity/gcomprismusic.py b/src/piano_composition-activity/gcomprismusic.py
index 3bb7ac3..8888904 100644
--- a/src/piano_composition-activity/gcomprismusic.py
+++ b/src/piano_composition-activity/gcomprismusic.py
@@ -23,7 +23,6 @@ Please see
http://gcompris.net/wiki/Adding_a_music_activity_and_using_gcomprismusic.py_module
for complete documentation (with examples!) of this module
'''
-
import gobject
import gtk
import gtk.gdk
@@ -133,6 +132,7 @@ class Staff():
self.x = x #master X position
self.y = y #master Y position
self.rootitem = goocanvas.Group(parent=canvasRoot, x=0, y=0)
+ self.lyrics_rootitem = goocanvas.Group(parent=self.rootitem, x=0, y=0)
# STAFF FORMATTING
# ALL LOCATIONS BELOW ARE RELATIVE TO self.x and self.y
@@ -430,6 +430,10 @@ class Staff():
except:
pass
+ self.lyrics_rootitem.remove()
+ self.lyrics_rootitem = goocanvas.Group(parent=self.rootitem, x=0, y=0)
+
+
def clear(self):
'''
removes and erases all notes and clefs on staff (in preparation for
diff --git a/src/piano_composition-activity/piano_composition.py b/src/piano_composition-activity/piano_composition.py
index 1bfe3b9..78743a9 100644
--- a/src/piano_composition-activity/piano_composition.py
+++ b/src/piano_composition-activity/piano_composition.py
@@ -219,7 +219,7 @@ class Gcompris_piano_composition:
y=y,
height=45,
width=20,
- tooltip=_("Eighth Note")
+ tooltip = "\n\n" + _("Eighth Note")
)
goocanvas.Image(
@@ -241,7 +241,7 @@ class Gcompris_piano_composition:
y=y,
height=45,
width=20,
- tooltip=_("Quarter Note")
+ tooltip = "\n\n" + _("Quarter Note")
)
self.quarterNoteSelectedButton.connect("button_press_event", self.updateToQuarter)
gcompris.utils.item_focus_init(self.quarterNoteSelectedButton, None)
@@ -253,7 +253,7 @@ class Gcompris_piano_composition:
y=y,
height=45,
width=20,
- tooltip=_("Half Note")
+ tooltip = "\n\n" + _("Half Note")
)
self.halfNoteSelected.connect("button_press_event", self.updateToHalf)
gcompris.utils.item_focus_init(self.halfNoteSelected, None)
@@ -265,7 +265,7 @@ class Gcompris_piano_composition:
y=y,
height=45,
width=20,
- tooltip=_("Whole Note")
+ tooltip = "\n\n" + _("Whole Note")
)
self.wholeNoteSelected.connect("button_press_event", self.updateToWhole)
gcompris.utils.item_focus_init(self.wholeNoteSelected, None)
@@ -457,10 +457,9 @@ dialogue to\nenable the sound."), None)
called once a melody has been selected
writes the melody to the staff, and displays the title and lyrics
'''
-
self.display_level(self.gcomprisBoard.level)
- rootitem = self.staff.rootitem
self.staff.stringToNotation(self.data.get(section, 'melody'))
+ rootitem = self.staff.lyrics_rootitem
goocanvas.Text(parent = rootitem,
x=150,
y=15,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]