[gcompris/gcomprismusic] Added Makefile.am for each level, and used the focus API on melody icon, corrected the code for play
- From: Karthik Subramanian <karthiks src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcompris/gcomprismusic] Added Makefile.am for each level, and used the focus API on melody icon, corrected the code for play
- Date: Mon, 6 Jun 2011 21:22:10 +0000 (UTC)
commit f083afa58a7b31be448c9ddf574ca05bf3f04026
Author: Karthik Subramanian <itskarthik s gmail com>
Date: Tue Jun 7 02:51:40 2011 +0530
Added Makefile.am for each level, and used the focus API on melody icon, corrected the code for playing the melody
src/rhymes-activity/Makefile.am | 2 +-
src/rhymes-activity/resources/Makefile.am | 1 +
src/rhymes-activity/resources/rhymes/Makefile.am | 7 +++++++
src/rhymes-activity/rhymes.py | 8 ++++----
src/rhymes-activity/rhymes.xml.in | 10 +++++-----
5 files changed, 18 insertions(+), 10 deletions(-)
---
diff --git a/src/rhymes-activity/Makefile.am b/src/rhymes-activity/Makefile.am
index 63d41f7..085d592 100644
--- a/src/rhymes-activity/Makefile.am
+++ b/src/rhymes-activity/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS =
+SUBDIRS = resources
pythondir = $(PYTHON_PLUGIN_DIR)
diff --git a/src/rhymes-activity/resources/Makefile.am b/src/rhymes-activity/resources/Makefile.am
new file mode 100644
index 0000000..09975ea
--- /dev/null
+++ b/src/rhymes-activity/resources/Makefile.am
@@ -0,0 +1 @@
+SUBDIR = rhymes
diff --git a/src/rhymes-activity/resources/rhymes/Makefile.am b/src/rhymes-activity/resources/rhymes/Makefile.am
new file mode 100644
index 0000000..74f4587
--- /dev/null
+++ b/src/rhymes-activity/resources/rhymes/Makefile.am
@@ -0,0 +1,7 @@
+imgdir = $(pkgdatadir)/@PACKAGE_DATA_DIR@/rhymes
+img_DATA = \
+ humptydumptyicon.svg \
+ humptydumpty.svg \
+ playbutton.svg \
+ twnkleicon.svg \
+ twinkletwinkle.jpg
diff --git a/src/rhymes-activity/rhymes.py b/src/rhymes-activity/rhymes.py
index 3ed3ca2..3395fc8 100644
--- a/src/rhymes-activity/rhymes.py
+++ b/src/rhymes-activity/rhymes.py
@@ -87,13 +87,14 @@ class Gcompris_rhymes:
self.gcomprisBoard.canvas.get_root_item())
#rhyme list having title,text,image path, icon path, audio path, and co
#ordinates for each.
-
+
self.gcomprisBoard.level = 1
self.gcomprisBoard.maxlevel = 2
self.gcomprisBoard.sublevel = 1
self.gcomprisBoard.number_of_sublevel = 1
gcompris.bar_set(gcompris.BAR_LEVEL)
gcompris.bar_set_level(self.gcomprisBoard)
+ gcompris.sound.policy_set(gcompris.sound.PLAY_AND_INTERRUPT)
self.read_data()
print self.dataset.sections()
print self.dataset.get("1","title")
@@ -186,11 +187,10 @@ class Gcompris_rhymes:
pixbuf = gcompris.utils.load_pixmap("rhymes/playbutton.svg")
)
self.rhymeplayicon.connect("button-press-event", self.playrhyme,calledrhyme)
-
+ gcompris.utils.item_focus_init(self.rhymeplayicon,None)
def playrhyme(self,item,item1,event, calledrhyme):
- gcompris.sound.reopen()
- gcompris.sound.play_ogg(self.rhymelist[calledrhyme]['audio'])
+ gcompris.sound.play_ogg(self.dataset.get(str(calledrhyme),"audio"))
def end(self):
print "rhymes end"
diff --git a/src/rhymes-activity/rhymes.xml.in b/src/rhymes-activity/rhymes.xml.in
index f9c5410..74a59d9 100644
--- a/src/rhymes-activity/rhymes.xml.in
+++ b/src/rhymes-activity/rhymes.xml.in
@@ -6,13 +6,13 @@
section="/experimental"
icon="rhymes.svg"
difficulty="1"
- author="your name here"
+ author="Karthik Subramanian"
boarddir=""
demo="1">
- <_title>set a title for rhymes</_title>
- <_description>set a description for rhymes</_description>
- <_prerequisite>set a prerequisite for rhymes</_prerequisite>
- <_goal>set a goal for rhymes</_goal>
+ <_title>Rhymes</_title>
+ <_description>An activity to learn and listen to Nursery Rhymes</_description>
+ <_prerequisite>Should be able to read Elementary English</_prerequisite>
+ <_goal>Learn and Sing rhymes</_goal>
<_manual>set a manual for rhymes</_manual>
<_credit>set a credit for rhymes</_credit>
</Board>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]