diff options
author | Muriel de Souza Godoi <muriel@laptop.org> | 2007-11-29 18:26:26 (GMT) |
---|---|---|
committer | Muriel de Souza Godoi <muriel@laptop.org> | 2007-11-29 18:26:26 (GMT) |
commit | 635e5e5ae55b00e4085a838beae7fd30bd8a3124 (patch) | |
tree | 0c0bcd9074579e5a5305fe9cfb5689da34dd22d4 | |
parent | dad22b884a1850563e115b7ec6dcdd06d39e276a (diff) |
Adds support to record ogg files and add mime-type icon
-rw-r--r-- | cardlist.py | 8 | ||||
-rw-r--r-- | createcardpanel.py | 5 | ||||
-rw-r--r-- | csound/univorc.csd | 2 | ||||
-rw-r--r-- | demos/drumgit.zip | bin | 687926 -> 577355 bytes | |||
-rw-r--r-- | icons/activity-memorize.svg | 14 | ||||
-rwxr-xr-x | icons/application-x-memorize-project.svg | 81 | ||||
-rw-r--r-- | model.py | 2 |
7 files changed, 104 insertions, 8 deletions
diff --git a/cardlist.py b/cardlist.py index 05518ec..daa9de1 100644 --- a/cardlist.py +++ b/cardlist.py @@ -149,9 +149,9 @@ class CardList(gtk.EventBox): asnd = self.pairs[pair].get_sound(1) if asnd != None: if equal_pairs: - asndfile = 'snd'+str(pair)+'.wav' + asndfile = 'snd'+str(pair)+'.ogg' else: - asndfile = 'asnd'+str(pair)+'.wav' + asndfile = 'asnd'+str(pair)+'.ogg' _logger.error(asndfile+': '+ asnd) zip.write(asnd, join('sounds', asndfile)) pair_card.set_property('asnd', asndfile) @@ -160,9 +160,9 @@ class CardList(gtk.EventBox): bsnd = self.pairs[pair].get_sound(2) if bsnd != None: if equal_pairs: - bsndfile = 'snd'+str(pair)+'.wav' + bsndfile = 'snd'+str(pair)+'.ogg' else: - bsndfile = 'bsnd'+str(pair)+'.wav' + bsndfile = 'bsnd'+str(pair)+'.ogg' zip.write(bsnd, join('sounds', bsndfile)) _logger.error(bsndfile+': '+ bsnd) pair_card.set_property('bsnd', bsndfile) diff --git a/createcardpanel.py b/createcardpanel.py index 626c4f4..a1782a4 100644 --- a/createcardpanel.py +++ b/createcardpanel.py @@ -19,7 +19,7 @@ import gtk from os import environ -from os.path import join, dirname +from os.path import join, dirname, basename import shutil import tempfile @@ -280,7 +280,7 @@ class CardEditor(gtk.EventBox): dst = join(self.temp_folder, basename(index)) shutil.copy(index, dst) self.set_snd(dst) - _logger.error('Audio Loaded: '+dst) + _logger.debug('Audio Loaded: '+dst) def set_snd(self, snd): self.snd = snd @@ -291,6 +291,7 @@ class CardEditor(gtk.EventBox): def clean(self): self.textentry.set_text('') self.card.set_pixbuf(None) + self.snd = None self.emit('has-text', False) self.emit('has-picture', False) diff --git a/csound/univorc.csd b/csound/univorc.csd index d34a2de..5e3232c 100644 --- a/csound/univorc.csd +++ b/csound/univorc.csd @@ -3,7 +3,7 @@ -+rtaudio=alsa -odac -m0 -d -b2048 -B4096 </CsOptions> <CsInstruments> -sr=22050 +sr=16000 ksmps=100 nchnls=2 diff --git a/demos/drumgit.zip b/demos/drumgit.zip Binary files differindex f544d19..6d0dc77 100644 --- a/demos/drumgit.zip +++ b/demos/drumgit.zip diff --git a/icons/activity-memorize.svg b/icons/activity-memorize.svg new file mode 100644 index 0000000..4eaf312 --- /dev/null +++ b/icons/activity-memorize.svg @@ -0,0 +1,14 @@ +<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' [ + <!ENTITY stroke_color "#010101"> + <!ENTITY fill_color "#FFFFFF"> +]><svg enable-background="new 0 0 55 55" height="55px" version="1.1" viewBox="0 0 55 55" width="55px" x="0px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px"><g display="block" id="activity-memorize"> + <rect display="inline" fill="&stroke_color;" height="10" stroke="&stroke_color;" stroke-width="3.5" width="10" x="7.291" y="7.833"/> + <rect display="inline" fill="&fill_color;" height="10" stroke="&stroke_color;" stroke-width="3.5" width="10" x="22.625" y="7.833"/> + <rect display="inline" fill="&stroke_color;" height="10" stroke="&stroke_color;" stroke-width="3.5" width="10" x="37.375" y="7.833"/> + <rect display="inline" fill="&stroke_color;" height="10" stroke="&stroke_color;" stroke-width="3.5" width="10" x="7.291" y="22.75"/> + <rect display="inline" fill="&stroke_color;" height="10" stroke="&stroke_color;" stroke-width="3.5" width="10" x="22.625" y="22.75"/> + <rect display="inline" fill="&fill_color;" height="10" stroke="&stroke_color;" stroke-width="3.5" width="10" x="37.375" y="22.75"/> + <rect display="inline" fill="&fill_color;" height="10" stroke="&stroke_color;" stroke-width="3.5" width="10" x="7.291" y="37.625"/> + <rect display="inline" fill="&fill_color;" height="10" stroke="&stroke_color;" stroke-width="3.5" width="10" x="22.625" y="37.625"/> + <rect display="inline" fill="&fill_color;" height="10" stroke="&stroke_color;" stroke-width="3.5" width="10" x="37.375" y="37.625"/> +</g></svg> diff --git a/icons/application-x-memorize-project.svg b/icons/application-x-memorize-project.svg new file mode 100755 index 0000000..00a996a --- /dev/null +++ b/icons/application-x-memorize-project.svg @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> + <!ENTITY stroke_color "#020202"> + <!ENTITY fill_color "#B2B2B2"> +]> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://web.resource.org/cc/" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="42" + height="42" + id="svg2" + sodipodi:version="0.32" + inkscape:version="0.45" + version="1.0" + sodipodi:docname="score.svg" + sodipodi:docbase="/home/msgodoi/olpc/sugar-jhbuild/build/share/activities/Memorize.activity" + inkscape:output_extension="org.inkscape.output.svg.inkscape" + sodipodi:modified="true"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + gridtolerance="10000" + guidetolerance="10" + objecttolerance="10" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="12.238095" + inkscape:cx="21" + inkscape:cy="21" + inkscape:document-units="px" + inkscape:current-layer="layer1" + width="42px" + height="42px" + inkscape:window-width="806" + inkscape:window-height="718" + inkscape:window-x="580" + inkscape:window-y="114" /> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <rect + style="fill:&fill_color;;fill-opacity:1;fill-rule:evenodd;stroke:&stroke_color;;stroke-width:3.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="rect7017" + width="30.046175" + height="30.046175" + x="1.9769126" + y="1.9769124" + ry="4.5299301" /> + <rect + style="fill:&fill_color;;fill-opacity:1;fill-rule:evenodd;stroke:&stroke_color;;stroke-width:3.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="rect3133" + width="30.046175" + height="30.046175" + x="9.9769125" + y="9.9769125" + ry="4.5299301" /> + </g> +</svg> @@ -329,7 +329,7 @@ class Model(object): if color == None: color = profile.get_color().to_string() _logger.debug('Save new game in datastore') - + # Saves the zip in datastore gameObject = datastore.create() gameObject.metadata['title'] = title |