[tuxdroid-svn] r826 - in software/gadgets/flash_management/trunk: . flash_management flash_manageme
Status: Beta
Brought to you by:
ks156
From: Paul_R <c2m...@c2...> - 2008-01-04 14:00:12
|
Author: Paul_R Date: 2008-01-04 15:00:09 +0100 (Fri, 04 Jan 2008) New Revision: 826 Modified: software/gadgets/flash_management/trunk/flash_management.tgf software/gadgets/flash_management/trunk/flash_management/Scripts/Python/GUI/conf/other.glade software/gadgets/flash_management/trunk/flash_management/Scripts/Python/GUI/conf/other.pyp software/gadgets/flash_management/trunk/flash_management/Scripts/Python/GUI/widget/other.glade software/gadgets/flash_management/trunk/flash_management/Scripts/Python/GUI/widget/other.pyp software/gadgets/flash_management/trunk/flash_management/Strings/fr_ALL.xml software/gadgets/flash_management/trunk/flash_management/strings.xml Log: * Minor changes on the widget GUI. Removed the notification part on the conf GUI * Changed some strings * Added the french help Modified: software/gadgets/flash_management/trunk/flash_management/Scripts/Python/GUI/conf/other.glade =================================================================== (Binary files differ) Modified: software/gadgets/flash_management/trunk/flash_management/Scripts/Python/GUI/conf/other.pyp =================================================================== --- software/gadgets/flash_management/trunk/flash_management/Scripts/Python/GUI/conf/other.pyp 2008-01-04 13:49:15 UTC (rev 825) +++ software/gadgets/flash_management/trunk/flash_management/Scripts/Python/GUI/conf/other.pyp 2008-01-04 14:00:09 UTC (rev 826) @@ -53,16 +53,6 @@ txt = _me.string('gui_conf_remote_set_bt') self.get_widget("button_remote").set_label(txt) - # Update Frame - txt = _me.string('gui_conf_update_title') - self.get_widget("label12").set_text(txt) - - txt = "%s : " % _me.string('gui_conf_delay_lb') - self.get_widget("label13").set_text(txt) - - value = _me.get_var('notify_delay') - self.get_widget("delay_spinbutton").set_value(value) - # Bottom buttons txt = _me.string('gui_conf_cancel_bt') self.get_widget("label6").set_text(txt) @@ -89,7 +79,6 @@ """ On button 'accept' clicked """ - _me.set_var('notify_delay', int(self.get_widget("delay_spinbutton").get_value())) self.get_widget("window1").destroy() def on_cancel_clicked(self, widget, *args): Modified: software/gadgets/flash_management/trunk/flash_management/Scripts/Python/GUI/widget/other.glade =================================================================== --- software/gadgets/flash_management/trunk/flash_management/Scripts/Python/GUI/widget/other.glade 2008-01-04 13:49:15 UTC (rev 825) +++ software/gadgets/flash_management/trunk/flash_management/Scripts/Python/GUI/widget/other.glade 2008-01-04 14:00:09 UTC (rev 826) @@ -659,6 +659,18 @@ <property name="spacing">0</property> <child> + <widget class="GtkFixed" id="fixed13"> + <property name="width_request">2</property> + <property name="visible">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> <widget class="GtkScrolledWindow" id="scrolledwindow1"> <property name="width_request">320</property> <property name="visible">True</property> @@ -685,42 +697,6 @@ <property name="visible">True</property> <child> - <widget class="GtkButton" id="btnSoundClear"> - <property name="width_request">72</property> - <property name="height_request">27</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Clear list</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_wave_internal_clist_bt_clicked"/> - </widget> - <packing> - <property name="x">20</property> - <property name="y">116</property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="btnSoundStore"> - <property name="width_request">72</property> - <property name="height_request">27</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Store</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_wave_internal_store_bt_clicked"/> - </widget> - <packing> - <property name="x">96</property> - <property name="y">116</property> - </packing> - </child> - - <child> <widget class="GtkFileChooserButton" id="soundInternalChooser"> <property name="width_request">185</property> <property name="height_request">27</property> @@ -740,29 +716,8 @@ </child> <child> - <widget class="GtkCheckButton" id="chkSoundOriginal"> - <property name="width_request">148</property> - <property name="height_request">24</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_incl_orig_toggled" last_modification_time="Mon, 16 Apr 2007 10:51:02 GMT"/> - </widget> - <packing> - <property name="x">19</property> - <property name="y">18</property> - </packing> - </child> - - <child> <widget class="GtkProgressBar" id="progressbar1"> - <property name="width_request">216</property> + <property name="width_request">240</property> <property name="height_request">16</property> <property name="visible">True</property> <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property> @@ -778,7 +733,7 @@ <child> <widget class="GtkButton" id="btnSoundAdd"> - <property name="width_request">72</property> + <property name="width_request">80</property> <property name="height_request">27</property> <property name="visible">True</property> <property name="can_focus">True</property> @@ -796,7 +751,7 @@ <child> <widget class="GtkButton" id="btnSoundRemove"> - <property name="width_request">72</property> + <property name="width_request">80</property> <property name="height_request">27</property> <property name="visible">True</property> <property name="can_focus">True</property> @@ -807,14 +762,14 @@ <signal name="clicked" handler="on_wave_internal_remove_bt_clicked"/> </widget> <packing> - <property name="x">96</property> + <property name="x">102</property> <property name="y">82</property> </packing> </child> <child> <widget class="GtkButton" id="btnSoundModify"> - <property name="width_request">72</property> + <property name="width_request">80</property> <property name="height_request">27</property> <property name="visible">True</property> <property name="can_focus">True</property> @@ -825,14 +780,50 @@ <signal name="clicked" handler="on_btnSoundModify_clicked" last_modification_time="Mon, 05 Nov 2007 14:45:42 GMT"/> </widget> <packing> - <property name="x">172</property> + <property name="x">184</property> <property name="y">82</property> </packing> </child> <child> + <widget class="GtkButton" id="btnSoundClear"> + <property name="width_request">80</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Clear list</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_wave_internal_clist_bt_clicked"/> + </widget> + <packing> + <property name="x">20</property> + <property name="y">116</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="btnSoundStore"> + <property name="width_request">80</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Store</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_wave_internal_store_bt_clicked"/> + </widget> + <packing> + <property name="x">102</property> + <property name="y">116</property> + </packing> + </child> + + <child> <widget class="GtkLabel" id="lblSoundState"> - <property name="width_request">216</property> + <property name="width_request">240</property> <property name="height_request">41</property> <property name="visible">True</property> <property name="label" translatable="yes">label3</property> @@ -855,6 +846,27 @@ <property name="y">168</property> </packing> </child> + + <child> + <widget class="GtkCheckButton" id="chkSoundOriginal"> + <property name="width_request">148</property> + <property name="height_request">24</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_incl_orig_toggled" last_modification_time="Mon, 16 Apr 2007 10:51:02 GMT"/> + </widget> + <packing> + <property name="x">19</property> + <property name="y">18</property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> 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 13:49:15 UTC (rev 825) +++ software/gadgets/flash_management/trunk/flash_management/Scripts/Python/GUI/widget/other.pyp 2008-01-04 14:00:09 UTC (rev 826) @@ -24,7 +24,9 @@ def new(self): self.widget_window = True - self.get_widget("window1").set_title(_me.string('name_to_read')) + self.get_widget("window1").set_title(_me.string('name_to_read')) + wavs.wav_paths=[] + wavs.wav_sizes=[] thread.start_new_thread(self.update, ()) def on_window1_destroy(self, widget, *args): @@ -124,8 +126,6 @@ wavs.wav_sizes=[] for i in range(17): wavfile = wave.open('/opt/tuxdroid/apps/tuxgi/sounds/%d.wav'%(i+1), 'r') - print wavfile.getsampwidth() - print wavfile.getframerate() if wavfile.getsampwidth() != 1 and wavfile.getframerate() != 8000: dialog = GdgDialog(_me.string('Warning'), _me.string('FileSample')) wavfile.close() @@ -197,8 +197,6 @@ if str(self.get_widget("soundInternalChooser").get_filename())=="None": return path = str(self.get_widget("soundInternalChooser").get_filename()) wavfile = wave.open(path, 'r') - print wavfile.getsampwidth() - print wavfile.getframerate() if wavfile.getsampwidth() != 1 and wavfile.getframerate() != 8000: dialog = GdgDialog(_me.string('Warning'), _me.string('FileSample')) wavfile.close() @@ -343,7 +341,7 @@ self.get_widget('lblSoundState').set_text(_me.string('soundProg')+str(i+1)) tux.cmd.sound_storing() #while tux.status.sound_record()[0] != 1: - #print 'wait' + # print 'wait' tux.sys.wait(0.2) tux.sys.shell("aplay -D %s %s"%(soundcard, sound_table[i])) #while tux.status.sound_record()[0] != 2: @@ -406,7 +404,7 @@ self.get_widget('lblSoundState').set_text(_me.string('Succeeded')) self.__sound_mutex.release() - + def on_disconnected(self): self.disconnected = True tux.sys.shell('pkill aplay') Modified: software/gadgets/flash_management/trunk/flash_management/Strings/fr_ALL.xml =================================================================== --- software/gadgets/flash_management/trunk/flash_management/Strings/fr_ALL.xml 2008-01-04 13:49:15 UTC (rev 825) +++ software/gadgets/flash_management/trunk/flash_management/Strings/fr_ALL.xml 2008-01-04 14:00:09 UTC (rev 826) @@ -6,7 +6,7 @@ <Warning type='str'>Attention</Warning> <btnSoundAdd type='str'>Ajouter</btnSoundAdd> <btnSoundClear type='str'>Purger</btnSoundClear> - <btnSoundModify type='str'>Modifier</btnSoundModify> + <btnSoundModify type='str'>Remplacer</btnSoundModify> <btnSoundPlayNum type='str'>Lire</btnSoundPlayNum> <btnSoundRemove type='str'>Enlever</btnSoundRemove> <btnSoundStore type='str'>Ecrire</btnSoundStore> @@ -23,11 +23,34 @@ <gui_conf_update_title type='str'>Mise à jour</gui_conf_update_title> <gui_conf_version_lb type='str'>Version</gui_conf_version_lb> <gui_conf_window_title type='str'>Paramètres</gui_conf_window_title> - <help_text type='str'> - </help_text> - <lblSleepDelay type='str'>Activer la veille après une période d'inactivité de </lblSleepDelay> - <lblSleepStateSleep type='str'>Tux est actuellement en veille</lblSleepStateSleep> - <lblSleepStateWork type='str'>Tux n'est pas en veille pour le moment</lblSleepStateWork> + <help_text type='str'>--= Gestion de la mémoire flash =-- + +Ce gadget vous permet de changer les sons contenus dans la mémoire de Tux. +Les fichiers pouvant être enregistré dans la mémoire doivent être des fichiers waves, avec une fréquence d'échantillonnage de 8kHz et une résolution de 8 bits, en mono. + +Ce gadget se présente en deux sections. La première section permet de créer une liste de sons, et des les programmer dans Tux. +La case 'Fichiers originaux' permet le chargement automatiquement dans la liste des sons d'origines de Tux. Ces sons sont utilisés dans un bon nombre de gadgets, par le manager ainsi que par Tux lui-même. +Vous pouvez bien évidemment remplacer ces sons par les vôtres, ou simplement reprendre la liste par défaut. + +Il est également possible de charger un fichier directement dans la liste. Pour cela, il suffit de spécifier le fichier, et d'appuyer sur le bouton 'ajouter'. + +Tous les sons peuvent être réorganisés dans la liste, en les sélectionnant et en changeant leurs emplacements. +Vous pouvez également supprimer un fichier, en le selectionnant dans la liste et en appuyant sur le bouton 'enlever'. +Enfin, vous avez la possibilité de remplacer un son contenu dans la liste par celui que vous aurez spécifié. + +Lorsque la liste est configurée, vous pourrez programmer les sons dans Tux. Il vous suffira d'appuyer sur le bouton 'Ecrire'. +Cette opération nécessite un certain temps, dépendant du nombre de sons à programmer. + +La section 'Lire un wave local' permet d'écouter un son enregistrer dans la mémoire de Tux. Vous pourrez alors vérifier que la programmation s'est déroulée correctement. + + +Note : +Vous pouvez très facilement convertir vos fichiers afin de les rendrent compatibles avec Tux en utilisant le logiciel sox (http://sox.sourceforge.net/). + +Exemple de conversion avec Sox : +sox 'file.mp3' -c 1 -r 8000 -b 'file.wav' + +</help_text> <lblSoundExternal type='str'>Lire un wave externe</lblSoundExternal> <lblSoundExternalFile type='str'>Fichier :</lblSoundExternalFile> <lblSoundExternalPlay type='str'>Lecture</lblSoundExternalPlay> @@ -38,9 +61,7 @@ <lblTabConfig type='str'>Configuration</lblTabConfig> <lblTabSound type='str'>Audio</lblTabSound> <lblTabVersion type='str'>Versions</lblTabVersion> - <lblUsedChannel type='str'>Votre wifi utilise le cannal :</lblUsedChannel> <lblVersions type='str'>Versions installées</lblVersions> - <lblWifiAvoidance type='str'>Eviter le canal wifi n° :</lblWifiAvoidance> <name_to_read type='str'>Gestion de la mémoire flash</name_to_read> <norf type='str'>Pas de connexion RF</norf> <nowavs type='str'>Pas de fichier à enregistrer</nowavs> @@ -50,7 +71,7 @@ <soundProg1 type='str'>Enregistrement du son ...</soundProg1> <soundTOC type='str'>Ecriture des index</soundTOC> <speaker_name type='str'>Bruno8k</speaker_name> - <toobig type='str'>Il y a trop de fichiers</toobig> + <toobig type='str'>La durée dépasse 70 sec.</toobig> <treeFile type='str'>Fichier</treeFile> <treeVersionProg type='str'>Composant</treeVersionProg> <treeVersionVer type='str'>Version</treeVersionVer> Modified: software/gadgets/flash_management/trunk/flash_management/strings.xml =================================================================== --- software/gadgets/flash_management/trunk/flash_management/strings.xml 2008-01-04 13:49:15 UTC (rev 825) +++ software/gadgets/flash_management/trunk/flash_management/strings.xml 2008-01-04 14:00:09 UTC (rev 826) @@ -6,7 +6,7 @@ <Warning type='str'>Warning</Warning> <btnSoundAdd type='str'>Add</btnSoundAdd> <btnSoundClear type='str'>Clear list</btnSoundClear> - <btnSoundModify type='str'>Modify</btnSoundModify> + <btnSoundModify type='str'>Replace</btnSoundModify> <btnSoundPlayNum type='str'>Play</btnSoundPlayNum> <btnSoundRemove type='str'>Remove</btnSoundRemove> <btnSoundStore type='str'>Store</btnSoundStore> @@ -25,9 +25,6 @@ <gui_conf_window_title type='str'>Parameters</gui_conf_window_title> <help_text type='str'> </help_text> - <lblSleepDelay type='str'>Active the sleep mode after a inactivity period of</lblSleepDelay> - <lblSleepStateSleep type='str'>Tux is currently sleeping</lblSleepStateSleep> - <lblSleepStateWork type='str'>Tux isn't in sleep mode</lblSleepStateWork> <lblSoundExternal type='str'>Play external wave file</lblSoundExternal> <lblSoundExternalFile type='str'>File :</lblSoundExternalFile> <lblSoundExternalPlay type='str'>Play</lblSoundExternalPlay> @@ -38,9 +35,7 @@ <lblTabConfig type='str'>Configuration</lblTabConfig> <lblTabSound type='str'>Audio</lblTabSound> <lblTabVersion type='str'>Versions</lblTabVersion> - <lblUsedChannel type='str'>Your wifi use the channel :</lblUsedChannel> <lblVersions type='str'>Installed versions</lblVersions> - <lblWifiAvoidance type='str'>Avoid the wifi channel number :</lblWifiAvoidance> <name_to_read type='str'>Flash memory management</name_to_read> <norf type='str'>Tux cannot be found. Please connect the dongle and/or switch on Tux</norf> @@ -51,7 +46,7 @@ <soundProg1 type='str'>Recording ...</soundProg1> <soundTOC type='str'>Writing indexes ...</soundTOC> <speaker_name type='str'>Ryan8k</speaker_name> - <toobig type='str'>Wavs files are too big ...</toobig> + <toobig type='str'>The total duration exceeds 70 sec.</toobig> <treeFile type='str'>File</treeFile> <treeVersionProg type='str'>Component</treeVersionProg> <treeVersionVer type='str'>Version</treeVersionVer> Modified: software/gadgets/flash_management/trunk/flash_management.tgf =================================================================== (Binary files differ) |