Commit 83a7e52b authored by Bruno Coudoin's avatar Bruno Coudoin

Jose Jorges is working again on melody. He bring us an intrument

        themed version with a xylophone and guitar.
        Franck Doucet made the drawing (easy to recognize, basicaly, when it's well done
        and new in GCompris, it from Franck)
parent 5a68c3bd
2005-03-12 Bruno coudoin <bruno.coudoin@free.fr>
Jose Jorges is working again on melody. He bring us an intrument
themed version with a xylophone and guitar.
Franck Doucet made the drawing (easy to recognize, basicaly, when it's well done
and new in GCompris, it from Franck)
* TODO:
* boards/flags/gcompris_flags.assetml.in:
* boards/melody/guitar/background.png:
* boards/melody/guitar/cursor.png:
* boards/melody/guitar/son1.png:
* boards/melody/guitar/son2.png:
* boards/melody/guitar/son3.png:
* boards/melody/guitar/son4.png:
* boards/melody/switch.png:
* boards/melody/xylofon/background.png:
* boards/melody/xylofon/cursor.png:
* boards/melody/xylofon/son1.png:
* boards/melody/xylofon/son2.png:
* boards/melody/xylofon/son3.png:
* boards/melody/xylofon/son4.png:
* boards/sounds/melody/guitar/melody.ogg:
* boards/sounds/melody/guitar/son1.ogg:
* boards/sounds/melody/guitar/son2.ogg:
* boards/sounds/melody/guitar/son3.ogg:
* boards/sounds/melody/guitar/son4.ogg:
* boards/sounds/melody/melody.ogg:
* boards/sounds/melody/son1.ogg:
* boards/sounds/melody/son2.ogg:
* boards/sounds/melody/son3.ogg:
* boards/sounds/melody/son4.ogg:
* boards/sounds/melody/tachos/melody.ogg:
* boards/sounds/melody/tachos/son1.ogg:
* boards/sounds/melody/tachos/son2.ogg:
* boards/sounds/melody/tachos/son3.ogg:
* boards/sounds/melody/tachos/son4.ogg:
* boards/sounds/melody/xylofon/melody.ogg:
* boards/sounds/melody/xylofon/son1.ogg:
* boards/sounds/melody/xylofon/son2.ogg:
* boards/sounds/melody/xylofon/son3.ogg:
* boards/sounds/melody/xylofon/son4.ogg:
* configure.in:
* po_report.pl: updated to use C locale
* src/boards/python/melody.py:
* src/gcompris/config.c: added bulgarian
2005-03-11 Alexander Shopov <ash@contact.bg>
* configure.in: Added "bg" (Bulgarian) to ALL_LINGUAS
......
......@@ -138,7 +138,8 @@ Then make a new release for the windows version. This is most important
because it will make it easier to distribute updates (python activities
only) to all our users, whatever the platform they use.
This will allows us to make gcompris a complete, full featuredducational software that rivals many proprietary ones.
This will allows us to make gcompris a complete, full featured
educational software that rivals many proprietary ones.
If somebody want to work on the profile concept, we will be abble to
provide these features at least 6 monthes earlier than what I can do.
......
......@@ -15,6 +15,11 @@
<_Credits>All these images taken from GKB Keyboard Switcher applet</_Credits>
<Categories>flags</Categories>
</Asset>
<Asset file="bg.png" mimetype="image/png">
<_Description>Bulgarian</_Description>
<_Credits>All these images taken from GKB Keyboard Switcher applet</_Credits>
<Categories>flags</Categories>
</Asset>
<Asset file="ca.png" mimetype="image/png">
<_Description>Catalan</_Description>
<_Credits>All these images taken from GKB Keyboard Switcher applet</_Credits>
......
......@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/gcompris/gcompris.c)
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(gcompris, 6.5PRE2)
AM_INIT_AUTOMAKE(gcompris, 6.5.1)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
......@@ -460,7 +460,7 @@ VERSION_VOICES_MISC_RU=1.0
AC_SUBST(VERSION_VOICES_MISC_RU)
#FLAGS
VERSION_FLAGS=1.7
VERSION_FLAGS=1.8
AC_SUBST(VERSION_FLAGS)
......
......@@ -35,99 +35,99 @@ my %table_partially; # Unsupported languages (less than 50%).
# Update as needed
my %COUNTRY = (
'sq' => 'Albanian',
'pt_BR' => 'Brazilian Portuguese',
'en_GB' => 'British English',
'en_CA' => 'Canadian English',
'da' => 'Danish',
'de' => 'German',
'gu' => 'Gujarati',
'pl' => 'Polish',
'pa' => 'Punjabi',
'es' => 'Spanish',
'nl' => 'Dutch',
'ja' => 'Japanese',
'pt' => 'Portuguese',
'cs' => 'Czech',
'sr' => 'Serbian',
'sr@Latn' => 'Serbian',
'ta' => 'Tamil',
'tr' => 'Turkish',
'uk' => 'Ukrainian',
'fi' => 'Finnish',
'fr' => 'French',
'sv' => 'Swedish',
'zh_CN' => 'Chinese Simplified',
'el' => 'Greek',
'af' => 'Afrikaans',
'am' => 'Amharic',
'ang' => 'Old English',
'ar' => 'Arabic',
'zh_TW' => 'Chinese Traditional',
'ru' => 'Russian',
'nb' => 'Norwegian Bookmal',
'lt' => 'Lithuanian',
'it' => 'Italian',
'as' => 'Assamese',
'az' => 'Azerbaijani',
'ko' => 'Korean',
'az_IR' => 'Iranian Azerbaijani',
'be' => 'Belarusian',
'bg' => 'Bulgarian',
'bn' => 'Bengali',
'hu' => 'Hungarian',
'ca' => 'Catalan',
'br' => 'Breton',
'bs' => 'Bosnian',
'ca' => 'Catalan',
'cs' => 'Czech',
'cy' => 'Welsh',
'ro' => 'Romanian',
'id' => 'Indonesian',
'hi' => 'Hindi',
'eu' => 'Basque',
'nn' => 'Norwegian Nynorsk',
'vi' => 'Vietnamese',
'ms' => 'Malay',
'hr' => 'Croatian',
'mn' => 'Mongolian',
'sk' => 'Slovak',
'mk' => 'Macedonian',
'be' => 'Belarusian',
'sl' => 'Slovenian',
'he' => 'Hebrew',
'da' => 'Danish',
'de' => 'German',
'el' => 'Greek',
'en_AU' => 'Australian English',
'en_CA' => 'Canadian English',
'en_GB' => 'British English',
'eo' => 'Esperanto',
'es' => 'Spanish',
'et' => 'Estonian',
'lv' => 'Latvian',
'th' => 'Thai',
'gl' => 'Galician',
'ne' => 'Nepali',
'eu' => 'Basque',
'fa' => 'Persian',
'wa' => 'Wallon',
'is' => 'Icelandic',
'fi' => 'Finnish',
'fr' => 'French',
'ga' => 'Irish Gaelic',
'af' => 'Afrikaans',
'gl' => 'Galician',
'gu' => 'Gujarati',
'he' => 'Hebrew',
'hi' => 'Hindi',
'hr' => 'Croatian',
'hu' => 'Hungarian',
'ia' => 'Interlingua',
'id' => 'Indonesian',
'is' => 'Icelandic',
'it' => 'Italian',
'ja' => 'Japanese',
'ka' => 'Georgian',
'kn' => 'Kannada',
'ko' => 'Korean',
'li' => 'Limburgish',
'lt' => 'Lithuanian',
'lv' => 'Latvian',
'mi' => 'Maori',
'mk' => 'Macedonian',
'ml' => 'Malayalam',
'mn' => 'Mongolian',
'mr' => 'Marathi',
'ms' => 'Malay',
'nb' => 'Norwegian Bookmal',
'ne' => 'Nepali',
'nl' => 'Dutch',
'nn' => 'Norwegian Nynorsk',
'nso' => 'Northern Sotho',
'am' => 'Amharic',
'sr@ije' => 'Serbian Jekavian',
'zu' => 'Zulu',
'tk' => 'Turkmen',
'li' => 'Limburgish',
'or' => 'Oriya',
'mr' => 'Marathi',
'yi' => 'Yiddish',
'eo' => 'Esperanto',
'kn' => 'Kannada',
'mi' => 'Maori',
'xh' => 'Xhosa',
'br' => 'Breton',
'ka' => 'Georgian',
'pa' => 'Punjabi',
'pl' => 'Polish',
'pt' => 'Portuguese',
'pt_BR' => 'Brazilian Portuguese',
'ro' => 'Romanian',
'ru' => 'Russian',
'sk' => 'Slovak',
'sl' => 'Slovenian',
'sq' => 'Albanian',
'sr' => 'Serbian',
'sr@Latn' => 'Serbian',
'sr@ije' => 'Serbian Jekavian',
'sv' => 'Swedish',
'ta' => 'Tamil',
'tg' => 'Tajik',
'ang' => 'Old English',
'yo' => 'Yoruba',
'th' => 'Thai',
'tk' => 'Turkmen',
'tr' => 'Turkish',
'uk' => 'Ukrainian',
'uz' => 'Uzbek',
'uz@Latn' => 'Uzbek Latin',
'en_AU' => 'Australian English',
'as' => 'Assamese',
'ia' => 'Interlingua',
'az_IR' => 'Iranian Azerbaijani'
'vi' => 'Vietnamese',
'wa' => 'Wallon',
'xh' => 'Xhosa',
'yi' => 'Yiddish',
'yo' => 'Yoruba',
'zh_CN' => 'Chinese Simplified',
'zh_TW' => 'Chinese Traditional',
'zu' => 'Zulu',
);
print STDERR "Please WAIT, running 'cd po && ../intltool-update --report'\n";
my $report = `cd po && ../intltool-update --report 2>&1`;
my $report = `export LC_ALL=C && cd po && ../intltool-update --report 2>&1`;
#For test to speed up create a fixed report file with the previous command output
#my $report = `export LC_ALL=C && cd po && cat report`;
......
# gcompris - melody
#
# Time-stamp: <2003/12/09 20:54:45 jose>
# Time-stamp: <2005/03/05 jose>
#
# Copyright (C) 2003 Jose Jorge
#
......@@ -50,84 +50,44 @@ class Gcompris_melody:
self.timers = []
self.solution = []
self.kidstry = []
self.in_repeat = 0;
self.in_repeat = 0
self.theme = 0
# Play an intro sound
gcompris.sound.play_ogg("melody/melody")
#
# This list contains the 'theme' for each melody level.
#
self.melodylist = \
[
# Kitchen
[
{'background': "melody/background.jpg", 'hittool': "melody/cursor.png", 'hitofset_x': 50, 'hitofset_y': 50},
[ {'x': 150.0, 'y': 50.0, 'image': "melody/son1.png", 'sound': "melody/son1"},
{'x': 550.0, 'y': 50.0, 'image': "melody/son2.png", 'sound': "melody/son2"},
{'x': 150.0, 'y': 250.0, 'image': "melody/son3.png", 'sound': "melody/son3"},
{'x': 550.0, 'y': 250.0, 'image': "melody/son4.png", 'sound': "melody/son4"} ] ],
# Kitchen2
[
{'background': "melody/background.jpg", 'hittool': "melody/cursor.png", 'hitofset_x': 50, 'hitofset_y': 50},
[ {'x': 150.0, 'y': 50.0, 'image': "melody/son1.png", 'sound': "melody/son1"},
{'x': 550.0, 'y': 50.0, 'image': "melody/son2.png", 'sound': "melody/son2"},
{'x': 150.0, 'y': 250.0, 'image': "melody/son3.png", 'sound': "melody/son3"},
{'x': 550.0, 'y': 250.0, 'image': "melody/son4.png", 'sound': "melody/son4"} ] ],
# Kitchen3
# xylophon
[
{'background': "melody/background.jpg", 'hittool': "melody/cursor.png", 'hitofset_x': 50, 'hitofset_y': 50},
[ {'x': 150.0, 'y': 50.0, 'image': "melody/son1.png", 'sound': "melody/son1"},
{'x': 550.0, 'y': 50.0, 'image': "melody/son2.png", 'sound': "melody/son2"},
{'x': 150.0, 'y': 250.0, 'image': "melody/son3.png", 'sound': "melody/son3"},
{'x': 550.0, 'y': 250.0, 'image': "melody/son4.png", 'sound': "melody/son4"} ] ],
{'theme': "xylofon", 'background': "melody/xylofon/background.png", 'hittool': "melody/xylofon/cursor.png", 'hitofset_x': 50, 'hitofset_y': 50},
[ {'x': 150.0, 'y': 101.0, 'image': "melody/xylofon/son1.png", 'sound': "melody/xylofon/son1"},
{'x': 281.0, 'y': 122.0, 'image': "melody/xylofon/son2.png", 'sound': "melody/xylofon/son2"},
{'x': 412.0, 'y': 140.0, 'image': "melody/xylofon/son3.png", 'sound': "melody/xylofon/son3"},
{'x': 546.0, 'y': 157.0, 'image': "melody/xylofon/son4.png", 'sound': "melody/xylofon/son4"} ] ],
# Kitchen4
# guitar
[
{'background': "melody/background.jpg", 'hittool': "melody/cursor.png", 'hitofset_x': 50, 'hitofset_y': 50},
[ {'x': 150.0, 'y': 50.0, 'image': "melody/son1.png", 'sound': "melody/son1"},
{'x': 550.0, 'y': 50.0, 'image': "melody/son2.png", 'sound': "melody/son2"},
{'x': 150.0, 'y': 250.0, 'image': "melody/son3.png", 'sound': "melody/son3"},
{'x': 550.0, 'y': 250.0, 'image': "melody/son4.png", 'sound': "melody/son4"} ] ],
{'theme': "guitar", 'background': "melody/guitar/background.png", 'hittool': "melody/guitar/cursor.png", 'hitofset_x': 400, 'hitofset_y': -5},
[ {'x': 0, 'y': 170.0, 'image': "melody/guitar/son1.png", 'sound': "melody/guitar/son1"},
{'x': 0, 'y': 230.0, 'image': "melody/guitar/son2.png", 'sound': "melody/guitar/son2"},
{'x': 0, 'y': 290.0, 'image': "melody/guitar/son3.png", 'sound': "melody/guitar/son3"},
{'x': 0, 'y': 350.0, 'image': "melody/guitar/son4.png", 'sound': "melody/guitar/son4"} ] ],
# Kitchen5
[
{'background': "melody/background.jpg", 'hittool': "melody/cursor.png", 'hitofset_x': 50, 'hitofset_y': 50},
[ {'x': 150.0, 'y': 50.0, 'image': "melody/son1.png", 'sound': "melody/son1"},
{'x': 550.0, 'y': 50.0, 'image': "melody/son2.png", 'sound': "melody/son2"},
{'x': 150.0, 'y': 250.0, 'image': "melody/son3.png", 'sound': "melody/son3"},
{'x': 550.0, 'y': 250.0, 'image': "melody/son4.png", 'sound': "melody/son4"} ] ],
# Kitchen6
[
{'background': "melody/background.jpg", 'hittool': "melody/cursor.png", 'hitofset_x': 50, 'hitofset_y': 50},
[ {'x': 150.0, 'y': 50.0, 'image': "melody/son1.png", 'sound': "melody/son1"},
{'x': 550.0, 'y': 50.0, 'image': "melody/son2.png", 'sound': "melody/son2"},
{'x': 150.0, 'y': 250.0, 'image': "melody/son3.png", 'sound': "melody/son3"},
{'x': 550.0, 'y': 250.0, 'image': "melody/son4.png", 'sound': "melody/son4"} ] ],
# Kitchen7
[
{'background': "melody/background.jpg", 'hittool': "melody/cursor.png", 'hitofset_x': 50, 'hitofset_y': 50},
[ {'x': 150.0, 'y': 50.0, 'image': "melody/son1.png", 'sound': "melody/son1"},
{'x': 550.0, 'y': 50.0, 'image': "melody/son2.png", 'sound': "melody/son2"},
{'x': 150.0, 'y': 250.0, 'image': "melody/son3.png", 'sound': "melody/son3"},
{'x': 550.0, 'y': 250.0, 'image': "melody/son4.png", 'sound': "melody/son4"} ] ],
# Kitchen8
# Kitchen
[
{'background': "melody/background.jpg", 'hittool': "melody/cursor.png", 'hitofset_x': 50, 'hitofset_y': 50},
[ {'x': 150.0, 'y': 50.0, 'image': "melody/son1.png", 'sound': "melody/son1"},
{'x': 550.0, 'y': 50.0, 'image': "melody/son2.png", 'sound': "melody/son2"},
{'x': 150.0, 'y': 250.0, 'image': "melody/son3.png", 'sound': "melody/son3"},
{'x': 550.0, 'y': 250.0, 'image': "melody/son4.png", 'sound': "melody/son4"} ] ],
]
{'theme': "tachos", 'background': "melody/tachos/background.jpg", 'hittool': "melody/tachos/cursor.png", 'hitofset_x': 50, 'hitofset_y': 50},
[ {'x': 150.0, 'y': 50.0, 'image': "melody/tachos/son1.png", 'sound': "melody/tachos/son1"},
{'x': 550.0, 'y': 50.0, 'image': "melody/tachos/son2.png", 'sound': "melody/tachos/son2"},
{'x': 150.0, 'y': 250.0, 'image': "melody/tachos/son3.png", 'sound': "melody/tachos/son3"},
{'x': 550.0, 'y': 250.0, 'image': "melody/tachos/son4.png", 'sound': "melody/tachos/son4"} ] ] ]
self.gcomprisBoard.maxlevel = len(self.melodylist)
self.maxtheme = len(self.melodylist)-1
self.gcomprisBoard.maxlevel = 9
# Play an intro sound
gcompris.sound.play_ogg("melody/" + self.melodylist[self.theme][0]['theme'] + "/melody")
gcompris.bar_set(gcompris.BAR_REPEAT|gcompris.BAR_LEVEL)
self.display_current_level()
......@@ -160,7 +120,7 @@ class Gcompris_melody:
def display_current_level(self):
gcompris.set_background(self.gcomprisBoard.canvas.root(),
self.melodylist[self.gcomprisBoard.level-1][0]['background'])
self.melodylist[self.theme][0]['background'])
gcompris.bar_set_level(self.gcomprisBoard)
# Create our rootitem. We put each canvas item in it so at the end we
......@@ -171,7 +131,20 @@ class Gcompris_melody:
y=0.0
)
self.sound_list = self.melodylist[self.gcomprisBoard.level-1][1]
# Put the theme switcher button
self.switch_item = self.rootitem.add(
gnome.canvas.CanvasPixbuf,
pixbuf = gcompris.utils.load_pixmap("melody/switch.png"),
x=10,
y=10
)
self.switch_item.connect("event", self.switch_item_event)
# This item is clickeable and it must be seen
self.switch_item.connect("event", gcompris.utils.item_event_focus)
# Put the sound buttons
self.sound_list = self.melodylist[self.theme][1]
for i in self.sound_list:
self.sound_item = self.rootitem.add(
......@@ -187,14 +160,14 @@ class Gcompris_melody:
self.bang_item = self.rootitem.add(
gnome.canvas.CanvasPixbuf,
pixbuf = gcompris.utils.load_pixmap(self.melodylist[self.gcomprisBoard.level-1][0]['hittool']),
pixbuf = gcompris.utils.load_pixmap(self.melodylist[self.theme][0]['hittool']),
x=0,
y=0
)
self.bang_item.hide()
self.hitofset_x = self.melodylist[self.gcomprisBoard.level-1][0]['hitofset_x']
self.hitofset_y = self.melodylist[self.gcomprisBoard.level-1][0]['hitofset_y']
self.hitofset_x = self.melodylist[self.theme][0]['hitofset_x']
self.hitofset_y = self.melodylist[self.theme][0]['hitofset_y']
self.populate(self.sound_list)
......@@ -284,6 +257,20 @@ class Gcompris_melody:
def key_press(self, keyval):
print("got key %i" % keyval)
# Play sounds with the keys
if ((keyval == gtk.keysyms.KP_1) or (keyval == gtk.keysyms._1)):
print "son1"
self.sound_play(self.melodylist[self.theme][1][0])
if ((keyval == gtk.keysyms.KP_2) or (keyval == gtk.keysyms._2)):
print "son2"
self.sound_play(self.melodylist[self.theme][1][1])
if ((keyval == gtk.keysyms.KP_3) or (keyval == gtk.keysyms._3)):
print "son3"
self.sound_play(self.melodylist[self.theme][1][2])
if ((keyval == gtk.keysyms.KP_4) or (keyval == gtk.keysyms._4)):
print "son4"
self.sound_play(self.melodylist[self.theme][1][3])
return
......@@ -333,7 +320,33 @@ class Gcompris_melody:
if event.type == gtk.gdk.BUTTON_PRESS:
if event.button == 1:
gcompris.sound.play_ogg(sound_struct['sound'])
self.tried(sound_struct)
self.sound_play(sound_struct)
return gtk.FALSE
# ---------------- sound is effectively played -----------------------
def sound_play(self, sound_struct):
gcompris.sound.play_ogg(sound_struct['sound'])
self.tried(sound_struct)
return
# ---------------- theme change on switch events -----------------------
def switch_item_event(self, widget, event):
if self.board_paused or self.in_repeat:
return
# switch the theme
if event.type == gtk.gdk.BUTTON_PRESS:
if event.button == 1:
if self.theme < self.maxtheme:
self.theme += 1
else:
self.theme = 0
print("New melody theme : " + self.melodylist[self.theme][0]['theme'] + ".")
# Apply the changes
self.cleanup()
self.display_current_level()
return gtk.FALSE
/* gcompris - config.c
*
* Time-stamp: <2005/02/09 23:33:24 bruno>
* Time-stamp: <2005/03/11 21:46:17 bruno>
*
* Copyright (C) 2000-2003 Bruno Coudoin
*
......@@ -64,6 +64,7 @@ static gchar *linguas[] = {
"am_ET.UTF-8", N_("Amharic"),
"ar_AE.UTF-8", N_("Arabic"),
"az_AZ.UTF-8", N_("Azerbaijani Turkic"),
"bg_BG.UTF-8", N_("Bulgarian"),
"ca_ES.UTF-8", N_("Catalan"),
"cs_CZ.UTF-8", N_("Czech"),
"da_DK.UTF-8", N_("Danish"),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment