[tuxdroid-svn] r831 - in software/gadgets/flash_management/trunk: . flash_management flash_manageme
Status: Beta
Brought to you by:
ks156
From: Paul_R <c2m...@c2...> - 2008-01-07 08:28:56
|
Author: Paul_R Date: 2008-01-07 09:28:50 +0100 (Mon, 07 Jan 2008) New Revision: 831 Modified: software/gadgets/flash_management/trunk/flash_management.tgf software/gadgets/flash_management/trunk/flash_management/Scripts/Python/GUI/widget/other.pyp software/gadgets/flash_management/trunk/flash_management/settings.xml software/gadgets/flash_management/trunk/flash_management/strings.xml Log: * Added the english help file * Fix a bug in the wav format detection. Modified: software/gadgets/flash_management/trunk/flash_management/Scripts/Python/GUI/widget/other.pyp =================================================================== --- software/gadgets/flash_management/trunk/flash_management/Scripts/Python/GUI/widget/other.pyp 2008-01-04 16:59:01 UTC (rev 830) +++ software/gadgets/flash_management/trunk/flash_management/Scripts/Python/GUI/widget/other.pyp 2008-01-07 08:28:50 UTC (rev 831) @@ -126,7 +126,7 @@ wavs.wav_sizes=[] for i in range(17): wavfile = wave.open('/opt/tuxdroid/apps/tuxgi/sounds/%d.wav'%(i+1), 'r') - if wavfile.getsampwidth() != 1 and wavfile.getframerate() != 8000: + if wavfile.getsampwidth() != 1 or wavfile.getframerate() != 8000: dialog = GdgDialog(_me.string('Warning'), _me.string('FileSample')) wavfile.close() return @@ -197,7 +197,9 @@ if str(self.get_widget("soundInternalChooser").get_filename())=="None": return path = str(self.get_widget("soundInternalChooser").get_filename()) wavfile = wave.open(path, 'r') - if wavfile.getsampwidth() != 1 and wavfile.getframerate() != 8000: + print wavfile.getsampwidth() + print wavfile.getframerate() + if wavfile.getsampwidth() != 1 or wavfile.getframerate() != 8000: dialog = GdgDialog(_me.string('Warning'), _me.string('FileSample')) wavfile.close() return @@ -227,6 +229,14 @@ index = self.__path[0] if str(self.get_widget("soundInternalChooser").get_filename())=="None": return path = self.get_widget("soundInternalChooser").get_filename() + wavfile = wave.open(path, 'r') + if wavfile.getsampwidth() != 1 or wavfile.getframerate() != 8000: + dialog = GdgDialog(_me.string('Warning'), _me.string('FileSample')) + wavfile.close() + return + else: + wavfile.close() + #Add size to the table f = open(path,'rb') wh = f.read(44) Modified: software/gadgets/flash_management/trunk/flash_management/settings.xml =================================================================== --- software/gadgets/flash_management/trunk/flash_management/settings.xml 2008-01-04 16:59:01 UTC (rev 830) +++ software/gadgets/flash_management/trunk/flash_management/settings.xml 2008-01-07 08:28:50 UTC (rev 831) @@ -10,7 +10,7 @@ <visible type='bool'>False</visible> </selftest> <widget> - <visible type='bool'>True</visible> + <visible type='bool'>False</visible> </widget> </gui_state> <have_main_part type='bool'>False</have_main_part> Modified: software/gadgets/flash_management/trunk/flash_management/strings.xml =================================================================== --- software/gadgets/flash_management/trunk/flash_management/strings.xml 2008-01-04 16:59:01 UTC (rev 830) +++ software/gadgets/flash_management/trunk/flash_management/strings.xml 2008-01-07 08:28:50 UTC (rev 831) @@ -23,8 +23,30 @@ <gui_conf_update_title type='str'>Update</gui_conf_update_title> <gui_conf_version_lb type='str'>Version</gui_conf_version_lb> <gui_conf_window_title type='str'>Parameters</gui_conf_window_title> - <help_text type='str'> - </help_text> + <help_text type='str'>--= Flash Memory Management =-- + +With this gadget you can modify the sound flash memory content of Tux. +The sound files to store in the Tux memory need to be in wave format with follwoing specifications: 8Khz frequency, 8 bits resolution and mono. + +The gadget has two parts. In the first part you can create the sounds list and store them on the Tux sound memory chip. +The check box 'Include originals' will automatically load the original Tux sounds into the list. These sounds are used in several gadgets, the gadget manager and for the stand alone behavior of Tux. +This function allows to easily replace the official Tux sounds with customized ones, and it also makes it easy to restore the sound memory to it's original state. + +New sound files can be added to the list by selecting the desired wave file and clicking the 'Add' button. + +The sounds list order can be changed by dragging a sound in the list and dropping it on the desired location. +A sound can be deleted by selecting it in the list and clicking the 'Remove' button. +The 'Replace' button will replace the sound in the list with the one you selected. + +When you are done configuring the list, you can flash the sounds in the memory of Tux. Click the 'Store' button, and a progress bar will display the flashing process. + +The part 'Local wave files', let's you play the stored sounds. This can help to test if the sounds are stored correctly. + +Note : +Sound files can be easily converted using sox to make them compatible with Tux (http://sox.sourceforge.net/). + +For example: +sox 'file.mp3' -c 1 -r 8000 -b 'file.wav'</help_text> <lblSoundExternal type='str'>Play external wave file</lblSoundExternal> <lblSoundExternalFile type='str'>File :</lblSoundExternalFile> <lblSoundExternalPlay type='str'>Play</lblSoundExternalPlay> Modified: software/gadgets/flash_management/trunk/flash_management.tgf =================================================================== (Binary files differ) |