tux-droid-svn Mailing List for Tux Droid CE (Page 209)
Status: Beta
Brought to you by:
ks156
You can subscribe to this list here.
2007 |
Jan
|
Feb
(32) |
Mar
(108) |
Apr
(71) |
May
(38) |
Jun
(128) |
Jul
(1) |
Aug
(14) |
Sep
(77) |
Oct
(104) |
Nov
(90) |
Dec
(71) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(81) |
Feb
(18) |
Mar
(40) |
Apr
(102) |
May
(151) |
Jun
(74) |
Jul
(151) |
Aug
(257) |
Sep
(447) |
Oct
(379) |
Nov
(404) |
Dec
(430) |
2009 |
Jan
(173) |
Feb
(236) |
Mar
(519) |
Apr
(300) |
May
(112) |
Jun
(232) |
Jul
(314) |
Aug
(58) |
Sep
(203) |
Oct
(293) |
Nov
(26) |
Dec
(109) |
2010 |
Jan
(19) |
Feb
(25) |
Mar
(33) |
Apr
(1) |
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Paul_R <c2m...@c2...> - 2007-12-20 08:23:45
|
Author: Paul_R Date: 2007-12-20 09:23:46 +0100 (Thu, 20 Dec 2007) New Revision: 805 Modified: software/gadgets/tux_controller/trunk/TuxController.tgf software/gadgets/tux_controller/trunk/TuxController/Strings/fr_ALL.xml Log: * Added the known issue on the french help Modified: software/gadgets/tux_controller/trunk/TuxController/Strings/fr_ALL.xml =================================================================== --- software/gadgets/tux_controller/trunk/TuxController/Strings/fr_ALL.xml 2007-12-20 08:19:50 UTC (rev 804) +++ software/gadgets/tux_controller/trunk/TuxController/Strings/fr_ALL.xml 2007-12-20 08:23:46 UTC (rev 805) @@ -33,7 +33,10 @@ Yeux Fleche haut Rouge Bec OK Vert Ailes Fleche bas Bleu -Rotation Gauche / droite Jaune</help_text> +Rotation Gauche / droite Jaune + +Limitations : +Pour le moment, le LEDs ne sont pas représentées individuellement sur les images.</help_text> <lblBatteryL type='str'>Niveau des batteries</lblBatteryL> <lblConf type='str'>Divers</lblConf> <lblEyes type='str'>Yeux</lblEyes> Modified: software/gadgets/tux_controller/trunk/TuxController.tgf =================================================================== (Binary files differ) |
From: Paul_R <c2m...@c2...> - 2007-12-20 08:20:09
|
Author: Paul_R Date: 2007-12-20 09:19:50 +0100 (Thu, 20 Dec 2007) New Revision: 804 Modified: software/gadgets/tux_controller/trunk/TuxController.tgf software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/main.pyp software/gadgets/tux_controller/trunk/TuxController/strings.xml Log: * Added the english help file, and the tooltips translations. * Improve the main window destroy function. Modified: software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp =================================================================== --- software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp 2007-12-18 10:44:29 UTC (rev 803) +++ software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp 2007-12-20 08:19:50 UTC (rev 804) @@ -82,7 +82,7 @@ ''' When the window is destroyed, don't forget to remove the monitoring vectors ''' - pass + _me.get_funct('on_standby')() def binding(self): ''' Modified: software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/main.pyp =================================================================== --- software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/main.pyp 2007-12-18 10:44:29 UTC (rev 803) +++ software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/main.pyp 2007-12-20 08:19:50 UTC (rev 804) @@ -27,6 +27,7 @@ tux.event.on_remote_bt[K_GREEN] = None tux.event.on_remote_bt[K_BLUE] = None tux.event.on_remote_bt[K_YELLOW] = None + tux.sys.wait(0.5) tux.cmd.eyes_off() tux.cmd.spinl_off() tux.cmd.spinr_off() @@ -57,4 +58,5 @@ [['none', 'none', 'Flash'], tux.cmd.sound_play, (2,)], ] _me.voice_recognition.set_rules(rules) +_me.insert_funct('on_standby', on_standby) start_gadget() Modified: software/gadgets/tux_controller/trunk/TuxController/strings.xml =================================================================== --- software/gadgets/tux_controller/trunk/TuxController/strings.xml 2007-12-18 10:44:29 UTC (rev 803) +++ software/gadgets/tux_controller/trunk/TuxController/strings.xml 2007-12-20 08:19:50 UTC (rev 804) @@ -19,8 +19,28 @@ <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'>-- Tux Controller gadget -- + +With this gadget Tux can be controlled directly. The window exists out of 2 parts: +The left part, displaying Tux, allows to send simple commands. +In the right part more advanced settings can be specified. After setting the number +of movements and the speed, the movements are started by clicking the gear button. +The right window part can be hidden by deselecting 'Advanced view' on the left. + +You can also make Tux say a text, using the Text To Speech engine. This part is found +in the lower portion of the window. Click the 'TTS' arrow to expand the text field. It's +also possible to change the language or voice in the advanced view. + +The movements can also be actuated, using the remote control buttons : + +Part : Simple mov : Adv mov : +Eyes Arrow down Red +Beak OK Green +Wings Arrow up Blue +Spin Left / right Yellow + +Known issue: +Actuating the left or right LED separately is not displayed in the gadget window.</help_text> <lblBatteryL type='str'>Battery level</lblBatteryL> <lblConf type='str'>Misc</lblConf> <lblEyes type='str'>Eyes</lblEyes> @@ -42,42 +62,42 @@ <speaker_name type='str'>Ryan8k</speaker_name> <tabControl type='str'>Control</tabControl> <tabStatus type='str'>Status</tabStatus> - <toolAdvanced type='str'>Monter/Cacher les propriété avancées</toolAdvanced> - <toolBattery type='str'>Niveau de la batterie</toolBattery> - <toolEyesClose type='str'>Fermer les yeux</toolEyesClose> - <toolEyesOpen type='str'>Ouvrir les yeux</toolEyesOpen> - <toolEyesRun type='str'>Ce bouton actionne les yeux -en utilisant les paramètres définis.</toolEyesRun> - <toolLEDLeft type='str'>Allumer/Eteindre la LED gauche</toolLEDLeft> - <toolLEDRight type='str'>Allumer/Eteindre la LED droite</toolLEDRight> - <toolLEDRun type='str'>Ce bouton fait clignoter les LEDs -en utilisant les paramètres définis.</toolLEDRun> - <toolLEDslide type='str'>Vous pouvez régler ici la fréquence de -clignotement des LEDs</toolLEDslide> - <toolLEDspin type='str'>Réglage du nombre de clignotement.</toolLEDspin> - <toolLang type='str'>Configurer la langue TTS</toolLang> - <toolLight type='str'>Niveau de lumière</toolLight> - <toolMouthClose type='str'>Fermer le bec</toolMouthClose> - <toolMouthOpen type='str'>Ouvrir le bec</toolMouthOpen> - <toolMouthRun type='str'>Ce bouton actionne le bec -en utilisant les paramètres définis.</toolMouthRun> - <toolMove type='str'>Nombre de mouvements</toolMove> - <toolPWM type='str'>Réglage de la vitesse</toolPWM> - <toolPitch type='str'>Configurer la hauteur du son</toolPitch> - <toolSound type='str'>Niveau sonore</toolSound> - <toolSpinDir type='str'>Choix du sens de rotation</toolSpinDir> - <toolSpinLeft type='str'>Tourner vers la gauche</toolSpinLeft> - <toolSpinRight type='str'>Tourner vers la droite</toolSpinRight> - <toolSpinRun type='str'>Ce bouton fait tourner Tux en -utilisant les paramètres définis.</toolSpinRun> - <toolStopAll type='str'>Ce bouton arrête tous les mouvements.</toolStopAll> - <toolTTS type='str'>Dire la phrase</toolTTS> - <toolTTSClear type='str'>Effacer la zone de texte</toolTTSClear> - <toolTTSText type='str'>Entrer le texte ici</toolTTSText> - <toolWingsDown type='str'>Baisser les ailes</toolWingsDown> - <toolWingsRun type='str'>Ce bouton fait bouger les ailes -en utilisant les paramètres définis.</toolWingsRun> - <toolWingsUp type='str'>Lever les ailes</toolWingsUp> + <toolAdvanced type='str'>Hide/Expand advanced view</toolAdvanced> + <toolBattery type='str'>Battery level</toolBattery> + <toolEyesClose type='str'>Close the eyes</toolEyesClose> + <toolEyesOpen type='str'>Open the eyes</toolEyesOpen> + <toolEyesRun type='str'>This button actuates the eyes +using the defined settings</toolEyesRun> + <toolLEDLeft type='str'>Turn on/off the left LED</toolLEDLeft> + <toolLEDRight type='str'>Turn on/off the right LED</toolLEDRight> + <toolLEDRun type='str'>This button makes the LED's blink +using the defined settings</toolLEDRun> + <toolLEDslide type='str'>Here you can modify the blinking +frequency of the eyes</toolLEDslide> + <toolLEDspin type='str'>Set the number of eye blinks</toolLEDspin> + <toolLang type='str'>Configure the TTS language</toolLang> + <toolLight type='str'>Light level</toolLight> + <toolMouthClose type='str'>Close the beak</toolMouthClose> + <toolMouthOpen type='str'>Open the beak</toolMouthOpen> + <toolMouthRun type='str'>This button actuates the beak +using the defined setting</toolMouthRun> + <toolMove type='str'>Number of movements</toolMove> + <toolPWM type='str'>Set the speed</toolPWM> + <toolPitch type='str'>Configure the sound volume</toolPitch> + <toolSound type='str'>Sound level</toolSound> + <toolSpinDir type='str'>Choose the spinning direction</toolSpinDir> + <toolSpinLeft type='str'>Spin to the left</toolSpinLeft> + <toolSpinRight type='str'>Spin to the right</toolSpinRight> + <toolSpinRun type='str'>This button makes Tux spin +using the defined setting</toolSpinRun> + <toolStopAll type='str'>This button stops all movements</toolStopAll> + <toolTTS type='str'>Say the text</toolTTS> + <toolTTSClear type='str'>Clear the text field</toolTTSClear> + <toolTTSText type='str'>Enter the text here</toolTTSText> + <toolWingsDown type='str'>Lower the wings</toolWingsDown> + <toolWingsRun type='str'>This button makes the wings move +using the defined setting</toolWingsRun> + <toolWingsUp type='str'>Raise the wings</toolWingsUp> <vr_Eyes type='str'>Eyes</vr_Eyes> <vr_Flash type='str'>Flash</vr_Flash> <vr_Hide type='str'>Hide</vr_Hide> Modified: software/gadgets/tux_controller/trunk/TuxController.tgf =================================================================== (Binary files differ) |
From: Paul_R <c2m...@c2...> - 2007-12-18 10:44:41
|
Author: Paul_R Date: 2007-12-18 11:44:29 +0100 (Tue, 18 Dec 2007) New Revision: 803 Modified: software/gadgets/micro_monitor/trunk/micro_monitor.tgf software/gadgets/micro_monitor/trunk/micro_monitor/Scripts/Python/main.pyp software/gadgets/micro_monitor/trunk/micro_monitor/Strings/fr_ALL.xml software/gadgets/micro_monitor/trunk/micro_monitor/about.xml software/gadgets/micro_monitor/trunk/micro_monitor/settings.xml software/gadgets/micro_monitor/trunk/micro_monitor/strings.xml Log: * Removed 'dict' as global variable. Modified: software/gadgets/micro_monitor/trunk/micro_monitor/Scripts/Python/main.pyp =================================================================== --- software/gadgets/micro_monitor/trunk/micro_monitor/Scripts/Python/main.pyp 2007-12-18 07:32:04 UTC (rev 802) +++ software/gadgets/micro_monitor/trunk/micro_monitor/Scripts/Python/main.pyp 2007-12-18 10:44:29 UTC (rev 803) @@ -24,12 +24,11 @@ gadgets['micro_monitor'].notify.set_active(True) _me.set_param('stdby', False) - tux.cmd.mouth_open() + tux.cmd.mouth_open() _me.set_param('dict', gdg_dict) tux.event.on_remote_bt[K_STANDBY] = on_standby _me.gui('widget').show_from_main() _me.run_main_loop() - _me.insert_funct('on_standby', on_standby) start_gadget() Modified: software/gadgets/micro_monitor/trunk/micro_monitor/Strings/fr_ALL.xml =================================================================== --- software/gadgets/micro_monitor/trunk/micro_monitor/Strings/fr_ALL.xml 2007-12-18 07:32:04 UTC (rev 802) +++ software/gadgets/micro_monitor/trunk/micro_monitor/Strings/fr_ALL.xml 2007-12-18 10:44:29 UTC (rev 803) @@ -1,13 +1,33 @@ <?xml version='1.0' encoding='UTF-8'?> <strings> - <at_gui_widget_lblSpyLevel type='str'>Niveau</at_gui_widget_lblSpyLevel> + <Duration type='str'>Durée</Duration> + <File type='str'>Fichier</File> + <Location type='str'>Sauver les sons :</Location> <No type='str'>Non</No> - <at_gui_widget_chkDog type='str'>Activer le mode chien de garde</at_gui_widget_chkDog> - <at_gui_conf_label13 type='str'>Delay (sec) :</at_gui_conf_label13> - <at_gui_conf_label12 type='str'>Configuration</at_gui_conf_label12> + <Play type='str'>Lecture</Play> <RightClic type='str'>Pour lire un son qui a été enregistré, faites un clic droit sur le son, et sélectionnez 'Lecture'</RightClic> + <Settings type='str'>Configuration</Settings> + <Show type='str'>Ne plus afficher ce message</Show> + <Standby type='str'>Ceci va mettre fin à l'exécution de ce gadget. Toutes les autres notifications vont être réactivées. +Plus aucun événement relatif au son seront notifiés. +Continuer ?</Standby> + <Startup type='str'>Ce gadget a un système de notification exclusif. Tant que la fenêtre de ce gadget est ouverte, toutes les autres notifications sont désactivées.</Startup> + <Time type='str'>Heure</Time> + <Yes type='str'>Oui</Yes> + <at_gui_conf_label12 type='str'>Configuration</at_gui_conf_label12> + <at_gui_conf_label13 type='str'>Delay (sec) :</at_gui_conf_label13> + <at_gui_conf_label5 type='str'>Accept</at_gui_conf_label5> + <at_gui_conf_label6 type='str'>Cancel</at_gui_conf_label6> + <at_gui_widget_cbbDog type='str'>Chien de garde</at_gui_widget_cbbDog> + <at_gui_widget_cbbRecord type='str'>Sons enregistrés</at_gui_widget_cbbRecord> + <at_gui_widget_cbbSpy type='str'>Mode espion</at_gui_widget_cbbSpy> + <at_gui_widget_chkDog type='str'>Activer le mode chien de garde</at_gui_widget_chkDog> + <at_gui_widget_chkDogDefault type='str'>Utiliser un script :</at_gui_widget_chkDogDefault> + <at_gui_widget_chkSpy type='str'>Activer le mode espion</at_gui_widget_chkSpy> + <at_gui_widget_lblDogLevel type='str'>Niveau</at_gui_widget_lblDogLevel> + <at_gui_widget_lblSpyLevel type='str'>Niveau</at_gui_widget_lblSpyLevel> <help_text type='str'>-- Moniteur de micro -- Le gadget 'Moniteur de micro' affiche l'énergie sonore perçue par le micro de Tux. @@ -24,28 +44,8 @@ Le mode espion permet d'enregistrer le son lorsqu'il dépasse le seuil. Les sons enregistrés peuvent être à tous moment écoutés par simple clic droit sur un son se trouvant dans le tableau, et en sélectionnant 'Lecture'. Dans la fenêtre de configuration de ce gadget, accessible à partir du 'Manager', vous pouvez spécifier l'emplacement dans lequel les sons doivent être enregistrés. </help_text> + <lblSample type='str'>Nombre de points : </lblSample> + <name_to_read type='str'>Moniteur de micro</name_to_read> + <speaker_name type='str'>Bruno8k</speaker_name> <vr_Sound type='str'>Sound</vr_Sound> - <Play type='str'>Lecture</Play> - <at_gui_widget_cbbDog type='str'>Chien de garde</at_gui_widget_cbbDog> - <at_gui_conf_label6 type='str'>Cancel</at_gui_conf_label6> - <at_gui_conf_label5 type='str'>Accept</at_gui_conf_label5> - <Settings type='str'>Configuration</Settings> - <Standby type='str'>Ceci va mettre fin à l'exécution de ce gadget. Toutes les autres notifications vont être réactivées. -Plus aucun événement relatif au son seront notifiés. -Continuer ?</Standby> - <at_gui_widget_chkDogDefault type='str'>Utiliser un script :</at_gui_widget_chkDogDefault> - <at_gui_widget_lblDogLevel type='str'>Niveau</at_gui_widget_lblDogLevel> - <Time type='str'>Heure</Time> - <at_gui_widget_cbbSpy type='str'>Mode espion</at_gui_widget_cbbSpy> - <speaker_name type='str'>Bruno8k</speaker_name> - <at_gui_widget_cbbRecord type='str'>Sons enregistrés</at_gui_widget_cbbRecord> - <name_to_read type='str'>Moniteur de micro</name_to_read> - <Show type='str'>Ne plus afficher ce message</Show> - <Startup type='str'>Ce gadget a un système de notification exclusif. Tant que la fenêtre de ce gadget est ouverte, toutes les autres notifications sont désactivées.</Startup> - <File type='str'>Fichier</File> - <at_gui_widget_chkSpy type='str'>Activer le mode espion</at_gui_widget_chkSpy> - <Duration type='str'>Durée</Duration> - <lblSample type='str'>Nombre de points : </lblSample> - <Yes type='str'>Oui</Yes> - <Location type='str'>Sauver les sons :</Location> </strings> Modified: software/gadgets/micro_monitor/trunk/micro_monitor/about.xml =================================================================== --- software/gadgets/micro_monitor/trunk/micro_monitor/about.xml 2007-12-18 07:32:04 UTC (rev 802) +++ software/gadgets/micro_monitor/trunk/micro_monitor/about.xml 2007-12-18 10:44:29 UTC (rev 803) @@ -1,8 +1,8 @@ <?xml version='1.0' encoding='UTF-8'?> <about> <gadget_author type='str'>Paul Rathgeb</gadget_author> - <gadget_version type='str'>0.0.1</gadget_version> <gadget_description type='str'> </gadget_description> <gadget_name type='str'>micro_monitor</gadget_name> + <gadget_version type='str'>0.0.1</gadget_version> </about> Modified: software/gadgets/micro_monitor/trunk/micro_monitor/settings.xml =================================================================== --- software/gadgets/micro_monitor/trunk/micro_monitor/settings.xml 2007-12-18 07:32:04 UTC (rev 802) +++ software/gadgets/micro_monitor/trunk/micro_monitor/settings.xml 2007-12-18 10:44:29 UTC (rev 803) @@ -1,45 +1,44 @@ <?xml version='1.0' encoding='UTF-8'?> <settings> - <parameters> - <dogBehavior type='str'> - </dogBehavior> - <Sample type='float'>400.0</Sample> - <chkDogBehavior type='bool'>False</chkDogBehavior> - <SpyThreshold type='int'>30</SpyThreshold> - <Standby type='bool'>False</Standby> - <MainScript type='str'>None</MainScript> - <chkSpy type='bool'>False</chkSpy> - <chkDog type='bool'>True</chkDog> - <Threshold type='float'>30.0</Threshold> - <dict/> - <chkSpyRecord type='bool'>False</chkSpyRecord> - <chkDogDefault type='bool'>False</chkDogDefault> - <Path type='str'>/tmp</Path> - <DogThreshold type='int'>30</DogThreshold> - <Startup type='bool'>False</Startup> - <BehaviorPath type='str'> - </BehaviorPath> - </parameters> <general> - <have_settings_part type='bool'>True</have_settings_part> + <framework_version type='str'>0.0.0</framework_version> <gui_state> - <widget> - <visible type='bool'>True</visible> - </widget> <conf> <visible type='bool'>False</visible> </conf> + <widget> + <visible type='bool'>True</visible> + </widget> </gui_state> + <have_main_part type='bool'>True</have_main_part> + <have_settings_part type='bool'>True</have_settings_part> + <have_widget_part type='bool'>False</have_widget_part> <language type='str'>en_US</language> + <main_priority type='int'>4</main_priority> + <menu_active type='bool'>True</menu_active> <notified type='bool'>False</notified> <notify_delay type='int'>1</notify_delay> - <framework_version type='str'>0.0.0</framework_version> - <menu_active type='bool'>True</menu_active> - <have_widget_part type='bool'>False</have_widget_part> - <speaker type='int'>3</speaker> - <pitch type='int'>100</pitch> - <have_main_part type='bool'>True</have_main_part> - <main_priority type='int'>4</main_priority> <notify_priority type='int'>4</notify_priority> + <pitch type='int'>100</pitch> + <speaker type='int'>3</speaker> </general> + <parameters> + <BehaviorPath type='str'> + </BehaviorPath> + <DogThreshold type='int'>30</DogThreshold> + <MainScript type='str'>None</MainScript> + <Path type='str'>/tmp</Path> + <Sample type='float'>400.0</Sample> + <SpyThreshold type='int'>30</SpyThreshold> + <Standby type='bool'>False</Standby> + <Startup type='bool'>False</Startup> + <Threshold type='float'>30.0</Threshold> + <chkDog type='bool'>True</chkDog> + <chkDogBehavior type='bool'>False</chkDogBehavior> + <chkDogDefault type='bool'>False</chkDogDefault> + <chkSpy type='bool'>False</chkSpy> + <chkSpyRecord type='bool'>False</chkSpyRecord> + <dogBehavior type='str'> + </dogBehavior> + </parameters> </settings> Modified: software/gadgets/micro_monitor/trunk/micro_monitor/strings.xml =================================================================== --- software/gadgets/micro_monitor/trunk/micro_monitor/strings.xml 2007-12-18 07:32:04 UTC (rev 802) +++ software/gadgets/micro_monitor/trunk/micro_monitor/strings.xml 2007-12-18 10:44:29 UTC (rev 803) @@ -1,12 +1,32 @@ <?xml version='1.0' encoding='UTF-8'?> <strings> - <at_gui_widget_lblSpyLevel type='str'>Threshold level</at_gui_widget_lblSpyLevel> + <Duration type='str'>Duration</Duration> + <File type='str'>File</File> + <Location type='str'>Save recorded files to :</Location> <No type='str'>No</No> - <at_gui_widget_chkDog type='str'>Enable guard dog mode</at_gui_widget_chkDog> - <at_gui_conf_label13 type='str'>Delay (sec) :</at_gui_conf_label13> - <at_gui_conf_label12 type='str'>Settings</at_gui_conf_label12> + <Play type='str'>Play</Play> <RightClic type='str'>To play a recorded sound, right click a sound and select 'play'</RightClic> + <Settings type='str'>Settings</Settings> + <Show type='str'>Don't show this message again.</Show> + <Standby type='str'>This will stop the gadget execution, and restart all the other notifications. +No more sound events will be notified. +Proceed ?</Standby> + <Startup type='str'>This gadget has an exclusive priority. As long the Micro Monitor gadget window is opened, all other gadget notifications are disabled.</Startup> + <Time type='str'>Time</Time> + <Yes type='str'>Yes</Yes> + <at_gui_conf_label12 type='str'>Settings</at_gui_conf_label12> + <at_gui_conf_label13 type='str'>Delay (sec) :</at_gui_conf_label13> + <at_gui_conf_label5 type='str'>Accept</at_gui_conf_label5> + <at_gui_conf_label6 type='str'>Cancel</at_gui_conf_label6> + <at_gui_widget_cbbDog type='str'>Guard dog mode</at_gui_widget_cbbDog> + <at_gui_widget_cbbRecord type='str'>Recorded files</at_gui_widget_cbbRecord> + <at_gui_widget_cbbSpy type='str'>Spy mode</at_gui_widget_cbbSpy> + <at_gui_widget_chkDog type='str'>Enable guard dog mode</at_gui_widget_chkDog> + <at_gui_widget_chkDogDefault type='str'>Use an external script</at_gui_widget_chkDogDefault> + <at_gui_widget_chkSpy type='str'>Enable spy mode</at_gui_widget_chkSpy> + <at_gui_widget_lblDogLevel type='str'>Threshold level</at_gui_widget_lblDogLevel> + <at_gui_widget_lblSpyLevel type='str'>Threshold level</at_gui_widget_lblSpyLevel> <help_text type='str'>-- Micro Monitor Gadget -- The 'Micro monitor' gadget displays the signal strength registered with the Tux microphone. This gadget has an exclusive priority. Meaning, as long as the gadget window is open, all other gadget notifications and functions are disabled. When the window is closed all other gadget notifications will be restored, but this will also stop the Micro Monitor functions. @@ -19,28 +39,8 @@ - 'Spy' mode - This mode will record all the sounds exceeding the threshold. To listen to recorded sounds, select 'Recorded files' in the combo box and right click the displayed files in the list. In the settings window, accessed by right clicking the 'Micro Monitor' gadget in the manager window, you can specify the location to store the recorded sounds.</help_text> + <lblSample type='str'>Sample rate : </lblSample> + <name_to_read type='str'>Micro monitor</name_to_read> + <speaker_name type='str'>Ryan8k</speaker_name> <vr_Sound type='str'>Sound</vr_Sound> - <Play type='str'>Play</Play> - <at_gui_widget_cbbDog type='str'>Guard dog mode</at_gui_widget_cbbDog> - <at_gui_conf_label6 type='str'>Cancel</at_gui_conf_label6> - <at_gui_conf_label5 type='str'>Accept</at_gui_conf_label5> - <Settings type='str'>Settings</Settings> - <Standby type='str'>This will stop the gadget execution, and restart all the other notifications. -No more sound events will be notified. -Proceed ?</Standby> - <at_gui_widget_chkDogDefault type='str'>Use an external script</at_gui_widget_chkDogDefault> - <at_gui_widget_lblDogLevel type='str'>Threshold level</at_gui_widget_lblDogLevel> - <Time type='str'>Time</Time> - <at_gui_widget_cbbSpy type='str'>Spy mode</at_gui_widget_cbbSpy> - <speaker_name type='str'>Ryan8k</speaker_name> - <at_gui_widget_cbbRecord type='str'>Recorded files</at_gui_widget_cbbRecord> - <name_to_read type='str'>Micro monitor</name_to_read> - <Show type='str'>Don't show this message again.</Show> - <Startup type='str'>This gadget has an exclusive priority. As long the Micro Monitor gadget window is opened, all other gadget notifications are disabled.</Startup> - <File type='str'>File</File> - <at_gui_widget_chkSpy type='str'>Enable spy mode</at_gui_widget_chkSpy> - <Duration type='str'>Duration</Duration> - <lblSample type='str'>Sample rate : </lblSample> - <Yes type='str'>Yes</Yes> - <Location type='str'>Save recorded files to :</Location> </strings> Modified: software/gadgets/micro_monitor/trunk/micro_monitor.tgf =================================================================== (Binary files differ) |
From: jerome <c2m...@c2...> - 2007-12-18 07:32:33
|
Author: jerome Date: 2007-12-18 08:32:04 +0100 (Tue, 18 Dec 2007) New Revision: 802 Modified: software/gadgets/rss_feeder/trunk/rss_feeder.tgf Log: * bug fixes: When adding a new feed without having toggled "read this feed now" that doesn't work after havin added a new gui ( bug fixes ) Modified: software/gadgets/rss_feeder/trunk/rss_feeder.tgf =================================================================== (Binary files differ) |
From: jerome <c2m...@c2...> - 2007-12-17 13:46:35
|
Author: jerome Date: 2007-12-17 14:46:27 +0100 (Mon, 17 Dec 2007) New Revision: 801 Modified: software/gadgets/rss_feeder/trunk/rss_feeder.tgf software/gadgets/rss_feeder/trunk/rss_feeder/about.xml software/gadgets/rss_feeder/trunk/rss_feeder/settings.xml software/gadgets/rss_feeder/trunk/rss_feeder/strings.xml Log: * Fixed a bug when modify an item into the treeView of RSS list. * Add a protection when no network interface is present. * Add a gui to indicate the progression of the registring. * Add a gui when user has entered a bad url. Modified: software/gadgets/rss_feeder/trunk/rss_feeder/about.xml =================================================================== --- software/gadgets/rss_feeder/trunk/rss_feeder/about.xml 2007-12-17 13:25:30 UTC (rev 800) +++ software/gadgets/rss_feeder/trunk/rss_feeder/about.xml 2007-12-17 13:46:27 UTC (rev 801) @@ -1,7 +1,7 @@ <?xml version='1.0' encoding='UTF-8'?> <about> <gadget_author type='str'>jer...@ky...</gadget_author> + <gadget_description type='str'>An rss feeder for tux droid.</gadget_description> + <gadget_name type='str'>rss_reader</gadget_name> <gadget_version type='str'>0.0.1</gadget_version> - <gadget_name type='str'>rss_feeder</gadget_name> - <gadget_description type='str'>An rss feeder for tux droid.</gadget_description> </about> Modified: software/gadgets/rss_feeder/trunk/rss_feeder/settings.xml =================================================================== --- software/gadgets/rss_feeder/trunk/rss_feeder/settings.xml 2007-12-17 13:25:30 UTC (rev 800) +++ software/gadgets/rss_feeder/trunk/rss_feeder/settings.xml 2007-12-17 13:46:27 UTC (rev 801) @@ -1,61 +1,61 @@ <?xml version='1.0' encoding='UTF-8'?> <settings> + <general> + <framework_version type='str'>0.1.1</framework_version> + <gui_state> + <conf> + <visible type='bool'>False</visible> + </conf> + <widget> + <visible type='bool'>False</visible> + </widget> + </gui_state> + <have_main_part type='bool'>False</have_main_part> + <have_settings_part type='bool'>False</have_settings_part> + <have_widget_part type='bool'>True</have_widget_part> + <language type='str'>en_US</language> + <main_priority type='int'>1</main_priority> + <menu_active type='bool'>True</menu_active> + <notified type='bool'>True</notified> + <notify_delay type='int'>60</notify_delay> + <notify_priority type='int'>5</notify_priority> + <pitch type='int'>100</pitch> + <speaker type='int'>4</speaker> + </general> <parameters> - <tts_message type='str'>An RSS feed has been updated</tts_message> - <hidden_in_manager type='bool'>False</hidden_in_manager> - <wav_path type='str'>empty</wav_path> + <automated_translation type='bool'>True</automated_translation> <behavior_path type='str'>empty</behavior_path> - <automated_translation type='bool'>True</automated_translation> + <busy type='bool'>False</busy> + <check_at_startup type='bool'>False</check_at_startup> + <feeds_values/> <first_launch type='bool'>True</first_launch> - <to_read> - <date type='bool'>True</date> - <title type='bool'>True</title> - <name type='bool'>False</name> - <summary type='bool'>False</summary> - </to_read> + <hidden_in_manager type='bool'>False</hidden_in_manager> <log_enable type='bool'>True</log_enable> + <log_text type='str'>No log text for the moment.</log_text> + <notification_type> + <behavior type='bool'>False</behavior> + <nothing type='bool'>True</nothing> + <personnal type='bool'>False</personnal> + <tts type='bool'>False</tts> + <wav type='bool'>False</wav> + </notification_type> <number_to_update type='int'>4</number_to_update> - <text_to_speak type='str'> - </text_to_speak> - <check_at_startup type='bool'>False</check_at_startup> - <feeds_values/> - <busy type='bool'>False</busy> <rss_list> <tux_portail> + <date type='str'>never</date> <to_update type='bool'>True</to_update> <url type='str'>http://tuxisalive.com/releases/RSS</url> - <date type='str'>never</date> </tux_portail> </rss_list> - <log_text type='str'>No log text for the moment.</log_text> - <notification_type> - <nothing type='bool'>True</nothing> - <wav type='bool'>False</wav> - <behavior type='bool'>False</behavior> - <tts type='bool'>False</tts> - <personnal type='bool'>False</personnal> - </notification_type> + <text_to_speak type='str'> + </text_to_speak> + <to_read> + <date type='bool'>True</date> + <name type='bool'>False</name> + <summary type='bool'>False</summary> + <title type='bool'>True</title> + </to_read> + <tts_message type='str'>An RSS feed has been updated</tts_message> + <wav_path type='str'>empty</wav_path> </parameters> - <general> - <have_settings_part type='bool'>False</have_settings_part> - <gui_state> - <widget> - <visible type='bool'>False</visible> - </widget> - <conf> - <visible type='bool'>False</visible> - </conf> - </gui_state> - <language type='str'>en_US</language> - <notified type='bool'>True</notified> - <notify_delay type='int'>60</notify_delay> - <framework_version type='str'>0.1.1</framework_version> - <menu_active type='bool'>True</menu_active> - <have_widget_part type='bool'>True</have_widget_part> - <speaker type='int'>4</speaker> - <pitch type='int'>100</pitch> - <have_main_part type='bool'>False</have_main_part> - <main_priority type='int'>1</main_priority> - <notify_priority type='int'>5</notify_priority> - </general> </settings> Modified: software/gadgets/rss_feeder/trunk/rss_feeder/strings.xml =================================================================== --- software/gadgets/rss_feeder/trunk/rss_feeder/strings.xml 2007-12-17 13:25:30 UTC (rev 800) +++ software/gadgets/rss_feeder/trunk/rss_feeder/strings.xml 2007-12-17 13:46:27 UTC (rev 801) @@ -1,71 +1,74 @@ <?xml version='1.0' encoding='UTF-8'?> <strings> + <at_gui_gui_add_checkbutton1 type='str'>Read this feed now</at_gui_gui_add_checkbutton1> + <at_gui_gui_add_label1 type='str'>Add a new feed</at_gui_gui_add_label1> + <at_gui_gui_add_label5 type='str'>Ok</at_gui_gui_add_label5> + <at_gui_gui_add_label6 type='str'>Cancel</at_gui_gui_add_label6> + <at_gui_gui_add_label_name type='str'>Rss name: </at_gui_gui_add_label_name> + <at_gui_gui_add_label_url type='str'>Rss url:</at_gui_gui_add_label_url> + <at_gui_gui_modify_label1 type='str'>Modify a feed</at_gui_gui_modify_label1> + <at_gui_gui_modify_label2 type='str'>Feed Name:</at_gui_gui_modify_label2> + <at_gui_gui_modify_label3 type='str'>Feed url</at_gui_gui_modify_label3> + <at_gui_gui_modify_label4 type='str'>Ok</at_gui_gui_modify_label4> + <at_gui_gui_modify_label5 type='str'>Cancel</at_gui_gui_modify_label5> + <at_gui_no_internet_label1 type='str'>Rss reader notification.</at_gui_no_internet_label1> + <at_gui_no_internet_label2 type='str'>Close</at_gui_no_internet_label2> + <at_gui_no_internet_label3 type='str'>Sorry, I can't find any Internet connection for this computer. Make sure that you get connected, and try again.</at_gui_no_internet_label3> + <at_gui_no_values_label1 type='str'>Rss error notification</at_gui_no_values_label1> + <at_gui_no_values_label2 type='str'>An error has been found, you must set all entry to add a new feed.</at_gui_no_values_label2> + <at_gui_no_values_label3 type='str'>Ok</at_gui_no_values_label3> + <at_gui_popup_no_test_button1 type='str'>Ok/Cancel</at_gui_popup_no_test_button1> + <at_gui_popup_no_test_label1 type='str'>Test notification</at_gui_popup_no_test_label1> + <at_gui_popup_no_test_label2 type='str'>No test available for this notification option</at_gui_popup_no_test_label2> + <at_gui_widget_checkbutton1 type='str'>Updated or added new name</at_gui_widget_checkbutton1> <at_gui_widget_checkbutton10 type='str'>Automated translation</at_gui_widget_checkbutton10> - <gui_conf_remote_title type='str'>Remote</gui_conf_remote_title> - <gui_conf_description_lb type='str'>Description</gui_conf_description_lb> + <at_gui_widget_checkbutton2 type='str'>News title that have changed or added</at_gui_widget_checkbutton2> + <at_gui_widget_checkbutton3 type='str'>News Summary</at_gui_widget_checkbutton3> + <at_gui_widget_checkbutton8 type='str'>Check for updated feeds at Gadget Manager startup</at_gui_widget_checkbutton8> + <at_gui_widget_checkbutton9 type='str'>Date of update</at_gui_widget_checkbutton9> + <at_gui_widget_label1 type='str'>Add</at_gui_widget_label1> + <at_gui_widget_label10 type='str'>Delay</at_gui_widget_label10> + <at_gui_widget_label11 type='str'>Apply</at_gui_widget_label11> + <at_gui_widget_label12 type='str'>Cancel</at_gui_widget_label12> + <at_gui_widget_label13 type='str'>Update feed after (in sec)</at_gui_widget_label13> + <at_gui_widget_label15 type='str'>Modify</at_gui_widget_label15> + <at_gui_widget_label17 type='str'>Misc options</at_gui_widget_label17> + <at_gui_widget_label18 type='str'>Apply</at_gui_widget_label18> + <at_gui_widget_label19 type='str'>Cancel</at_gui_widget_label19> + <at_gui_widget_label2 type='str'>Delete</at_gui_widget_label2> <at_gui_widget_label20 type='str'>Number of news by RSS feed to update: </at_gui_widget_label20> - <at_gui_gui_add_label_name type='str'>Rss name: </at_gui_gui_add_label_name> + <at_gui_widget_label21 type='str'>What do you want Tux Droid to read?</at_gui_widget_label21> + <at_gui_widget_label3 type='str'>Apply</at_gui_widget_label3> + <at_gui_widget_label4 type='str'>Cancel</at_gui_widget_label4> + <at_gui_widget_label5 type='str'>Feeds</at_gui_widget_label5> + <at_gui_widget_label6 type='str'>Notification</at_gui_widget_label6> + <at_gui_widget_label7 type='str'>Options</at_gui_widget_label7> + <at_gui_widget_label8 type='str'>Notification type</at_gui_widget_label8> + <at_gui_widget_label9 type='str'>Test it</at_gui_widget_label9> + <at_gui_widget_radiobutton1 type='str'>Behavior</at_gui_widget_radiobutton1> + <at_gui_widget_radiobutton2 type='str'>TTS message</at_gui_widget_radiobutton2> + <at_gui_widget_radiobutton3 type='str'>Wav sound</at_gui_widget_radiobutton3> <at_gui_widget_radiobutton4 type='str'>Do nothing</at_gui_widget_radiobutton4> + <at_gui_widget_radiobutton5 type='str'>Custom notification :</at_gui_widget_radiobutton5> + <bad_name type='str'>This name is already used.</bad_name> + <gui_conf_about_title type='str'>About</gui_conf_about_title> <gui_conf_accept_bt type='str'>Accept</gui_conf_accept_bt> - <at_gui_widget_radiobutton5 type='str'>Custom notification :</at_gui_widget_radiobutton5> + <gui_conf_author_lb type='str'>Author</gui_conf_author_lb> + <gui_conf_cancel_bt type='str'>Cancel</gui_conf_cancel_bt> + <gui_conf_current_bind_lb type='str'>Current</gui_conf_current_bind_lb> + <gui_conf_delay_lb type='str'>Delay (sec)</gui_conf_delay_lb> + <gui_conf_description_lb type='str'>Description</gui_conf_description_lb> + <gui_conf_remote_set_bt type='str'>Set</gui_conf_remote_set_bt> + <gui_conf_remote_title type='str'>Remote</gui_conf_remote_title> + <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> - <at_gui_gui_modify_label2 type='str'>Feed Name:</at_gui_gui_modify_label2> + <name_to_read type='str'>Rss reader</name_to_read> + <speaker_name type='str'>Ryan8k</speaker_name> <tree_cb_column type='str'>Update</tree_cb_column> - <bad_name type='str'>This name is already used.</bad_name> <tree_date_column type='str'>Last update</tree_date_column> - <gui_conf_version_lb type='str'>Version</gui_conf_version_lb> - <gui_conf_update_title type='str'>Update</gui_conf_update_title> - <gui_conf_window_title type='str'>Parameters</gui_conf_window_title> - <gui_conf_cancel_bt type='str'>Cancel</gui_conf_cancel_bt> - <at_gui_popup_no_test_label2 type='str'>No test available for this notification option</at_gui_popup_no_test_label2> - <at_gui_gui_modify_label3 type='str'>Feed url</at_gui_gui_modify_label3> - <gui_conf_delay_lb type='str'>Delay (sec)</gui_conf_delay_lb> - <gui_conf_about_title type='str'>About</gui_conf_about_title> - <at_gui_popup_no_test_button1 type='str'>Ok/Cancel</at_gui_popup_no_test_button1> <tree_name_column type='str'>Name</tree_name_column> - <at_gui_gui_add_checkbutton1 type='str'>Read this feed now</at_gui_gui_add_checkbutton1> - <at_gui_widget_label19 type='str'>Cancel</at_gui_widget_label19> - <at_gui_widget_label18 type='str'>Apply</at_gui_widget_label18> - <at_gui_widget_label2 type='str'>Delete</at_gui_widget_label2> - <at_gui_widget_label13 type='str'>Update feed after (in sec)</at_gui_widget_label13> - <at_gui_widget_label12 type='str'>Cancel</at_gui_widget_label12> - <at_gui_widget_label11 type='str'>Apply</at_gui_widget_label11> - <at_gui_widget_label10 type='str'>Delay</at_gui_widget_label10> - <at_gui_widget_label17 type='str'>Misc options</at_gui_widget_label17> - <at_gui_widget_label15 type='str'>Modify</at_gui_widget_label15> - <gui_conf_current_bind_lb type='str'>Current</gui_conf_current_bind_lb> - <at_gui_widget_checkbutton9 type='str'>Date of update</at_gui_widget_checkbutton9> - <gui_conf_author_lb type='str'>Author</gui_conf_author_lb> - <at_gui_widget_checkbutton3 type='str'>News Summary</at_gui_widget_checkbutton3> - <at_gui_widget_checkbutton2 type='str'>News title that have changed or added</at_gui_widget_checkbutton2> - <at_gui_widget_checkbutton1 type='str'>Updated or added new name</at_gui_widget_checkbutton1> - <at_gui_widget_label21 type='str'>What do you want Tux Droid to read?</at_gui_widget_label21> <tree_url_column type='str'>Url</tree_url_column> - <at_gui_widget_radiobutton1 type='str'>Behavior</at_gui_widget_radiobutton1> - <at_gui_widget_radiobutton2 type='str'>TTS message</at_gui_widget_radiobutton2> - <speaker_name type='str'>Ryan8k</speaker_name> - <gui_conf_remote_set_bt type='str'>Set</gui_conf_remote_set_bt> - <at_gui_gui_add_label_url type='str'>Rss url:</at_gui_gui_add_label_url> - <at_gui_widget_label9 type='str'>Test it</at_gui_widget_label9> - <at_gui_widget_label8 type='str'>Notification type</at_gui_widget_label8> - <at_gui_widget_label7 type='str'>Options</at_gui_widget_label7> - <at_gui_widget_label6 type='str'>Notification</at_gui_widget_label6> - <at_gui_widget_label5 type='str'>Feeds</at_gui_widget_label5> - <at_gui_widget_label4 type='str'>Cancel</at_gui_widget_label4> - <at_gui_widget_label3 type='str'>Apply</at_gui_widget_label3> - <name_to_read type='str'>Rss feeder</name_to_read> - <at_gui_widget_label1 type='str'>Add</at_gui_widget_label1> - <at_gui_gui_modify_label1 type='str'> - </at_gui_gui_modify_label1> - <at_gui_widget_radiobutton3 type='str'>Wav sound</at_gui_widget_radiobutton3> - <at_gui_popup_no_test_label1 type='str'> - </at_gui_popup_no_test_label1> - <at_gui_gui_modify_label5 type='str'>Cancel</at_gui_gui_modify_label5> - <at_gui_gui_modify_label4 type='str'>Ok</at_gui_gui_modify_label4> - <at_gui_widget_checkbutton8 type='str'>Check for updated feeds at Gadget Manager startup</at_gui_widget_checkbutton8> - <at_gui_gui_add_label1 type='str'> - </at_gui_gui_add_label1> - <at_gui_gui_add_label5 type='str'>Ok</at_gui_gui_add_label5> - <at_gui_gui_add_label6 type='str'>Cancel</at_gui_gui_add_label6> </strings> Modified: software/gadgets/rss_feeder/trunk/rss_feeder.tgf =================================================================== (Binary files differ) |
From: Paul_R <c2m...@c2...> - 2007-12-17 13:25:42
|
Author: Paul_R Date: 2007-12-17 14:25:30 +0100 (Mon, 17 Dec 2007) New Revision: 800 Modified: software/gadgets/settings/trunk/settings.tgf software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp software/gadgets/settings/trunk/settings/Strings/fr_ALL.xml software/gadgets/settings/trunk/settings/about.xml software/gadgets/settings/trunk/settings/settings.xml software/gadgets/settings/trunk/settings/strings.xml Log: * Changed the name of the gadget + minor changes Modified: software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp =================================================================== --- software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp 2007-12-17 09:35:17 UTC (rev 799) +++ software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp 2007-12-17 13:25:30 UTC (rev 800) @@ -8,7 +8,6 @@ import time import threading - class Window(SimpleGladeApp): def __init__(self, path=_me.get_path('root') + '/Scripts/Python/GUI/widget/other.glade', @@ -21,7 +20,6 @@ self.__tree_mutex = threading.Lock() self.my_dict = {} - def new(self): self.widget_window = True self.get_widget("window1").set_title(_me.string('name_to_read')) @@ -30,11 +28,9 @@ def on_window1_destroy(self, widget, *args): pass - #------------------------------------------------------------ # This function update all labels and create the GUI -#------------------------------------------------------------ - +#------------------------------------------------------------ def update(self): self.SoundLabelUpdate() @@ -77,7 +73,6 @@ self.gadget_viewer.append_column(self.event_column) self.gadget_viewer.set_reorderable(True) self.gadget_viewer.set_rules_hint(True) - #self.gadget_viewer.connect("button_press_event", self.on_tree_button_pressed) self.gadget_viewer.get_selection().connect("changed",self.on_row_selected) self.value_list.connect("row-changed", self.on_row_changed) self.get_widget("scrolledwindow1").add(self.gadget_viewer) @@ -195,7 +190,6 @@ self.refresh_wav_list() self.refresh_flag = False - #-------------------------------------------------------------------------- # On "remove" button clicked #-------------------------------------------------------------------------- @@ -207,7 +201,6 @@ self.refresh_wav_list() self.refresh_flag = False - #-------------------------------------------------------------------------- # On "modify" button clicked #-------------------------------------------------------------------------- @@ -241,6 +234,7 @@ self.my_dict[filename] = wavs.wav_paths[i] self.value_list.append([(i+1),str(filename)]) i += 1 + #-------------------------------------------------------------------------- # On "clear" internal wave file list button clicked #-------------------------------------------------------------------------- @@ -252,14 +246,12 @@ self.refresh_wav_list() self.refresh_flag = False - #-------------------------------------------------------------------------- # On "store" button clicked #-------------------------------------------------------------------------- def on_wave_internal_store_bt_clicked(self, widget, *args): thread.start_new_thread(self.sound_storing,()) - #-------------------------------------------------------------------------- # Store sound function #-------------------------------------------------------------------------- @@ -273,15 +265,18 @@ if tux.status.rf_state() == 0: self.__sound_mutex.release() - print 'no RF connexion' + self.get_widget('lblSoundState').show() + self.get_widget('lblSoundState').set_text(_me.string('norf')) return if len(wavs.wav_sizes)==0: self.__sound_mutex.release() - print 'no wavs to store' + self.get_widget('lblSoundState').show() + self.get_widget('lblSoundState').set_text(_me.string('nowavs')) return if not wavs.wavs_merging("merged.wav"): self.__sound_mutex.release() - print "Sound storing : Error : file merged is too big" + self.get_widget('lblSoundState').show() + self.get_widget('lblSoundState').set_text(_me.string('toobig')) return try: @@ -296,7 +291,7 @@ pass if audio and behavior: - + ## If tuxaudio and tuxcore are up to date, use the new processus fraction = float(len(wavs.wav_paths) + 2) fraction = 1 / fraction current = fraction @@ -437,72 +432,3 @@ def on_wave_internal_play10_clicked(self, widget, *args): thread.start_new_thread(tux.cmd.sound_play,(10,0,)) - - - -class GdgText(object): - - def __init__(self, title, message, block = False, center_justify = False): - self.message = message - self.title = title - self.__center_justify = center_justify - thread.start_new_thread(self.__show_async, ()) - - def __show_async(self): - self.__show() - - def __show(self): - dialogue = gtk.Dialog(self.title, None, gtk.DIALOG_MODAL, ()) - _me.set_param('dialog', dialogue) - - dialogue.set_property("width-request", 650) - dialogue.set_property("height-request", 400) - if gadgets.has_key('Manager'): - dialogue.set_icon_from_file(gadgets['Manager'].icons['gadget.png']) - bt_alone = dialogue.add_button("Close", gtk.RESPONSE_APPLY) - - def on_click_close(obj): - dialogue.destroy() - _me.set_param('dialog', None) - - bt_alone.connect("clicked", on_click_close) - - text_tree_store = gtk.TreeStore(str) - text_view = gtk.TreeView(text_tree_store) - - text_renderer = gtk.CellRendererText() - text_column = gtk.TreeViewColumn('',text_renderer, text=0) - text_column.add_attribute(text_renderer, 'text', 0) - text_view.append_column(text_column) - - - scroll = gtk.ScrolledWindow() - scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_ALWAYS) - scroll.add(text_view) - scroll.show_all() - - box = gtk.HBox(spacing = 5) - box.set_border_width(5) - box.show() - dialogue.vbox.pack_start(box) - - box.pack_start(scroll) - - def __async(): - time.sleep(0.2) - text_tree_store.append(None, [self.message]) - - gtk.gdk.threads_enter() - thread.start_new_thread(__async, ()) - dialogue.run() - gtk.gdk.threads_leave() - - - - - - - - - - Modified: software/gadgets/settings/trunk/settings/Strings/fr_ALL.xml =================================================================== --- software/gadgets/settings/trunk/settings/Strings/fr_ALL.xml 2007-12-17 09:35:17 UTC (rev 799) +++ software/gadgets/settings/trunk/settings/Strings/fr_ALL.xml 2007-12-17 13:25:30 UTC (rev 800) @@ -1,73 +1,12 @@ <?xml version='1.0' encoding='UTF-8'?> <strings> - <Close type='str'>Fermer</Close> - <Connect type='str'>Connectez l'alimentation de tux puis -appuyez sur 'oui'.</Connect> - <Disconnect type='str'>Déconnectez l'alimentation de tux -puis appuyez sur 'oui'.</Disconnect> - <Eyes type='str'>Est-ce que les yeux sont correctement fermés ?</Eyes> - <FVersion type='str'>Pas de version trouvée</FVersion> - <Firmware type='str'>Assurer-vous que le gadget 'firmware updater' est correctement installé</Firmware> - <IDErrorOverflow type='str'>L'ID doit être compris entre 1 et 65534</IDErrorOverflow> - <IR type='str'>Après avoir appuyer sur le bouton 'oui', appuyez -sur les touches '1', '2' et '3' de la télécommande. - -Vous avez 15 secondes pour realiser cette opération.</IR> - <In type='str'>Voulez-vous tester l'entrée son de Tux? -Vous devez connecter un périphérique -d'entrée dans le connecteur bleu.</In> - <Iwlist type='str'>iwlist n'a pas été trouvé. -Assurez-vous que le paquet 'wireless tools' est correctement installé sur votre ordinateur. -(http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html#latest)</Iwlist> - <Mic type='str'>Après avoir fermer cette fenêtre, dîtes -quelque chose à Tux.</Mic> - <Out type='str'>Voulez-vous tester la sortie son de Tux? -Vous devez connecter des haut-parleurs -dans la prise verte.</Out> - <SVN type='str'>SVN</SVN> - <Selftest type='str'>Ceci est un programme de test pour votre Tux. - -Veuillez suivre les étapes en effectuant les -tâches qui vous serons demandée. - -A la fin de ce test, vous trouverez un fichier -de log à l'emplacement suivant : - -</Selftest> - <Settingsgadget type='str'>Gadget de configuration</Settingsgadget> - <Sound type='str'>Avez vous correctement entendu le son ?</Sound> - <Sound1 type='str'>Assurez vous que le réglage de volume soit -au maximum.</Sound1> - <Start type='str'>Début</Start> - <StartSpin type='str'>La prochaine test est celui des moteurs -faisant tourner Tux. -Afin de faire ce test dans les meilleures -conditions, merci de faire un peu de place -autour du Tux.</StartSpin> - <Switch type='str'>Après avoir appuyé sur le bouton 'Oui', -pressez successivement sur les ailes puis -sur la tête. - -Vous vez 15 secondes pour realiser cette -opération.</Switch> - <Warning type='str'>Attention</Warning> - <btnCancelT type='str'>Non</btnCancelT> - <btnID type='str'>Changer l'ID</btnID> - <btnOKT type='str'>Oui</btnOKT> - <btnSelfTest type='str'>Démarrer les tests</btnSelfTest> - <btnSleepSleep type='str'>Mettre en veille</btnSleepSleep> - <btnSleepWakeup type='str'>Reveiller</btnSleepWakeup> + <Settingsgadget type='str'>Gestion de la mémoire son</Settingsgadget> <btnSoundAdd type='str'>Ajouter</btnSoundAdd> <btnSoundClear type='str'>Purger</btnSoundClear> <btnSoundModify type='str'>Modifier</btnSoundModify> - <btnSoundPlayMic type='str'>Lire</btnSoundPlayMic> <btnSoundPlayNum type='str'>Lire</btnSoundPlayNum> - <btnSoundRecordMic type='str'>Enregistrer</btnSoundRecordMic> <btnSoundRemove type='str'>Enlever</btnSoundRemove> <btnSoundStore type='str'>Ecrire</btnSoundStore> - <btnStopT type='str'>Stop</btnStopT> - <btnUpdate type='str'>Verifier les mises à jour</btnUpdate> - <chkSleepEnable type='str'>Permettre la mise en veille</chkSleepEnable> <chkSoundOriginal type='str'>Fichier originaux</chkSoundOriginal> <gui_conf_about_title type='str'>A propos</gui_conf_about_title> <gui_conf_accept_bt type='str'>Valider</gui_conf_accept_bt> @@ -83,20 +22,6 @@ <gui_conf_window_title type='str'>Paramètres</gui_conf_window_title> <help_text type='str'> </help_text> - <itemCPU type='str'>Flasher les processeurs</itemCPU> - <itemChangeLog type='str'>Voir les changements</itemChangeLog> - <itemDescription type='str'>Voir la description</itemDescription> - <lblConfigID type='str'>Configuration de l'ID</lblConfigID> - <lblConfigSleep type='str'>Configuration de la veille</lblConfigSleep> - <lblConfigTest type='str'>Auto tests</lblConfigTest> - <lblConfigWifi type='str'>Configuration wifi</lblConfigWifi> - <lblCurrentIDName type='str'>Le nom acteul est : </lblCurrentIDName> - <lblCurrentIDNum type='str'>L'ID actuel est : </lblCurrentIDNum> - <lblCurrentIDNumError type='str'>Pas d'ID trouvé.</lblCurrentIDNumError> - <lblIDName type='str'>Nom du Tux : </lblIDName> - <lblIDNum type='str'>ID de Tux : </lblIDNum> - <lblLocal type='str'>Versions disponibles</lblLocal> - <lblNoChannel type='str'>Pas de connexion wifi trouvée</lblNoChannel> <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> @@ -113,13 +38,16 @@ <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'>Parametres de Tux</name_to_read> + <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> <official type='str'>Version officielle</official> <soundErase type='str'>Effacement de la mémoire ...</soundErase> <soundProg type='str'>Ecriture du son n° : </soundProg> <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> <treeFile type='str'>Fichier</treeFile> <treeVersionProg type='str'>Composant</treeVersionProg> <treeVersionVer type='str'>Version</treeVersionVer> Modified: software/gadgets/settings/trunk/settings/about.xml =================================================================== (Binary files differ) Modified: software/gadgets/settings/trunk/settings/settings.xml =================================================================== --- software/gadgets/settings/trunk/settings/settings.xml 2007-12-17 09:35:17 UTC (rev 799) +++ software/gadgets/settings/trunk/settings/settings.xml 2007-12-17 13:25:30 UTC (rev 800) @@ -14,7 +14,7 @@ </widget> </gui_state> <have_main_part type='bool'>False</have_main_part> - <have_settings_part type='bool'>True</have_settings_part> + <have_settings_part type='bool'>False</have_settings_part> <have_widget_part type='bool'>True</have_widget_part> <language type='str'>en_US</language> <main_priority type='int'>0</main_priority> Modified: software/gadgets/settings/trunk/settings/strings.xml =================================================================== --- software/gadgets/settings/trunk/settings/strings.xml 2007-12-17 09:35:17 UTC (rev 799) +++ software/gadgets/settings/trunk/settings/strings.xml 2007-12-17 13:25:30 UTC (rev 800) @@ -1,70 +1,12 @@ <?xml version='1.0' encoding='UTF-8'?> <strings> - <Close type='str'>Close</Close> - <Connect type='str'>Please connect the power plug and -click the 'Yes' button</Connect> - <Disconnect type='str'>Please disconnect the power plug and -click the 'Yes' button.</Disconnect> - <Eyes type='str'>Are the eyes closed correctly?</Eyes> - <FVersion type='str'>Version can't be read</FVersion> - <Firmware type='str'>Make sure the firmware updater gadget is correctly installed.</Firmware> - <IDErrorOverflow type='str'>The ID must be included between 1 and 65534.</IDErrorOverflow> - <IR type='str'>After clicking the 'Yes' button, push the -keys '1', '2' and '3' on the remote control. - -You have 15 seconds to do this test.</IR> - <In type='str'>Would you like to test the sound input interface? - -To do this, you need to plug an input device -into the blue connector on the back of Tux Droid -and then click 'Yes'.</In> - <Iwlist type='str'>iwlist package is not found. -Make sure the wireless tools package is installed on your computer. -(http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html#latest)</Iwlist> - <Mic type='str'>After clicking the 'Yes' button, say something -to Tux Droid.</Mic> - <Out type='str'>Would you like to test the sound output interface? - -To do this, you need to plug speakers or headphones -into the green connector, and click the 'Yes' button.</Out> - <SVN type='str'>SVN</SVN> - <Selftest type='str'>This is a self test program for Tux Droid. - -Please follow the instructions and do the -requested tests. - -At the end, a log file can be found here : -</Selftest> - <Settingsgadget type='str'>Settings gadget</Settingsgadget> - <Sound type='str'>Have you heard the sound ?</Sound> - <Sound1 type='str'>Make sure that the sound volume control dial on -the back of Tux Droid is at the maximum.</Sound1> - <Start type='str'>Start</Start> - <StartSpin type='str'>The next step is to test the spin motors. -To perfom correctly this task, please clear -the surface around Tux. -</StartSpin> - <Switch type='str'>After clicking the 'Yes' button, push on -the wings and on the head button. -You have 15 seconds to do this test.</Switch> - <Warning type='str'>Warning</Warning> - <btnCancelT type='str'>No</btnCancelT> - <btnID type='str'>Change ID</btnID> - <btnOKT type='str'>Yes</btnOKT> - <btnSelfTest type='str'>Start self test</btnSelfTest> - <btnSleepSleep type='str'>Sleep</btnSleepSleep> - <btnSleepWakeup type='str'>Wakeup</btnSleepWakeup> + <Settingsgadget type='str'>Sound memory management</Settingsgadget> <btnSoundAdd type='str'>Add</btnSoundAdd> <btnSoundClear type='str'>Clear list</btnSoundClear> <btnSoundModify type='str'>Modify</btnSoundModify> - <btnSoundPlayMic type='str'>Play</btnSoundPlayMic> <btnSoundPlayNum type='str'>Play</btnSoundPlayNum> - <btnSoundRecordMic type='str'>Record</btnSoundRecordMic> <btnSoundRemove type='str'>Remove</btnSoundRemove> <btnSoundStore type='str'>Store</btnSoundStore> - <btnStopT type='str'>Stop</btnStopT> - <btnUpdate type='str'>Check for updates</btnUpdate> - <chkSleepEnable type='str'>Enable sleep mode</chkSleepEnable> <chkSoundOriginal type='str'>Include originals</chkSoundOriginal> <gui_conf_about_title type='str'>About</gui_conf_about_title> <gui_conf_accept_bt type='str'>Accept</gui_conf_accept_bt> @@ -80,20 +22,6 @@ <gui_conf_window_title type='str'>Parameters</gui_conf_window_title> <help_text type='str'> </help_text> - <itemCPU type='str'>Flash the CPUs</itemCPU> - <itemChangeLog type='str'>Show ChangeLog</itemChangeLog> - <itemDescription type='str'>Show the description</itemDescription> - <lblConfigID type='str'>ID configuration</lblConfigID> - <lblConfigSleep type='str'>Sleep configuration</lblConfigSleep> - <lblConfigTest type='str'>Self tests</lblConfigTest> - <lblConfigWifi type='str'>Wifi configuration</lblConfigWifi> - <lblCurrentIDName type='str'>The current name is : </lblCurrentIDName> - <lblCurrentIDNum type='str'>The current ID is : </lblCurrentIDNum> - <lblCurrentIDNumError type='str'>Unable to read the current ID.</lblCurrentIDNumError> - <lblIDName type='str'>Tux's name : </lblIDName> - <lblIDNum type='str'>Tux's ID : </lblIDNum> - <lblLocal type='str'>Available versions</lblLocal> - <lblNoChannel type='str'>No wifi connection found</lblNoChannel> <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> @@ -110,13 +38,16 @@ <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'>Tux settings</name_to_read> + <name_to_read type='str'>Flash memory management</name_to_read> + <norf type='str'>No RF connection detected</norf> + <nowavs type='str'>No wavs to store</nowavs> <official type='str'>Official version</official> <soundErase type='str'>Erasing flash ...</soundErase> <soundProg type='str'>Programming sound n° : </soundProg> <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> <treeFile type='str'>File</treeFile> <treeVersionProg type='str'>Component</treeVersionProg> <treeVersionVer type='str'>Version</treeVersionVer> Modified: software/gadgets/settings/trunk/settings.tgf =================================================================== (Binary files differ) |
From: Paul_R <c2m...@c2...> - 2007-12-17 09:35:25
|
Author: Paul_R Date: 2007-12-17 10:35:17 +0100 (Mon, 17 Dec 2007) New Revision: 799 Modified: software/gadgets/tux_controller/trunk/TuxController.tgf software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.glade software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/main.pyp software/gadgets/tux_controller/trunk/TuxController/Strings/fr_ALL.xml software/gadgets/tux_controller/trunk/TuxController/about.xml software/gadgets/tux_controller/trunk/TuxController/settings.xml software/gadgets/tux_controller/trunk/TuxController/strings.xml Log: * Added the french help Modified: software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.glade =================================================================== --- software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.glade 2007-12-14 16:42:38 UTC (rev 798) +++ software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.glade 2007-12-17 09:35:17 UTC (rev 799) @@ -789,26 +789,6 @@ </child> <child> - <widget class="GtkHScale" id="slideLED"> - <property name="width_request">160</property> - <property name="height_request">32</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="draw_value">True</property> - <property name="value_pos">GTK_POS_RIGHT</property> - <property name="digits">0</property> - <property name="update_policy">GTK_UPDATE_CONTINUOUS</property> - <property name="inverted">False</property> - <property name="adjustment">150 1 255 1 0 0</property> - <signal name="value_changed" handler="on_slideLED_value_changed" last_modification_time="Thu, 15 Nov 2007 08:37:21 GMT"/> - </widget> - <packing> - <property name="x">160</property> - <property name="y">13</property> - </packing> - </child> - - <child> <widget class="GtkVSeparator" id="vseparator18"> <property name="width_request">16</property> <property name="height_request">50</property> @@ -845,6 +825,52 @@ <property name="y">3</property> </packing> </child> + + <child> + <widget class="GtkHScale" id="slideLED"> + <property name="width_request">160</property> + <property name="height_request">32</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="draw_value">True</property> + <property name="value_pos">GTK_POS_RIGHT</property> + <property name="digits">0</property> + <property name="update_policy">GTK_UPDATE_CONTINUOUS</property> + <property name="inverted">False</property> + <property name="adjustment">150 1 255 1 0 0</property> + <signal name="value_changed" handler="on_slideLED_value_changed" last_modification_time="Thu, 15 Nov 2007 08:37:21 GMT"/> + </widget> + <packing> + <property name="x">160</property> + <property name="y">16</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="lblFrequency"> + <property name="width_request">144</property> + <property name="height_request">16</property> + <property name="visible">True</property> + <property name="label" translatable="yes">label19</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="x">160</property> + <property name="y">8</property> + </packing> + </child> </widget> <packing> <property name="left_attach">1</property> @@ -1300,26 +1326,6 @@ </child> <child> - <widget class="GtkHScale" id="slideWings"> - <property name="width_request">160</property> - <property name="height_request">32</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="draw_value">True</property> - <property name="value_pos">GTK_POS_RIGHT</property> - <property name="digits">0</property> - <property name="update_policy">GTK_UPDATE_CONTINUOUS</property> - <property name="inverted">False</property> - <property name="adjustment">5 1 5 1 0 0</property> - <signal name="value_changed" handler="on_slideWings_value_changed" last_modification_time="Thu, 15 Nov 2007 08:42:15 GMT"/> - </widget> - <packing> - <property name="x">160</property> - <property name="y">55</property> - </packing> - </child> - - <child> <widget class="GtkVSeparator" id="vseparator15"> <property name="width_request">16</property> <property name="height_request">136</property> @@ -1368,6 +1374,52 @@ <property name="y">3</property> </packing> </child> + + <child> + <widget class="GtkHScale" id="slideWings"> + <property name="width_request">160</property> + <property name="height_request">32</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="draw_value">True</property> + <property name="value_pos">GTK_POS_RIGHT</property> + <property name="digits">0</property> + <property name="update_policy">GTK_UPDATE_CONTINUOUS</property> + <property name="inverted">False</property> + <property name="adjustment">5 1 5 1 0 0</property> + <signal name="value_changed" handler="on_slideWings_value_changed" last_modification_time="Thu, 15 Nov 2007 08:42:15 GMT"/> + </widget> + <packing> + <property name="x">160</property> + <property name="y">55</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="lblWingsPWM"> + <property name="width_request">144</property> + <property name="height_request">16</property> + <property name="visible">True</property> + <property name="label" translatable="yes">label19</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="x">160</property> + <property name="y">47</property> + </packing> + </child> </widget> <packing> <property name="left_attach">1</property> @@ -1488,26 +1540,6 @@ </child> <child> - <widget class="GtkHScale" id="slideSpin"> - <property name="width_request">160</property> - <property name="height_request">32</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="draw_value">True</property> - <property name="value_pos">GTK_POS_RIGHT</property> - <property name="digits">0</property> - <property name="update_policy">GTK_UPDATE_CONTINUOUS</property> - <property name="inverted">False</property> - <property name="adjustment">5 1 5 1 0 0</property> - <signal name="value_changed" handler="on_slideSpin_value_changed" last_modification_time="Thu, 15 Nov 2007 08:42:21 GMT"/> - </widget> - <packing> - <property name="x">160</property> - <property name="y">26</property> - </packing> - </child> - - <child> <widget class="GtkVSeparator" id="vseparator17"> <property name="width_request">16</property> <property name="height_request">77</property> @@ -1597,6 +1629,52 @@ <property name="y">58</property> </packing> </child> + + <child> + <widget class="GtkHScale" id="slideSpin"> + <property name="width_request">160</property> + <property name="height_request">32</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="draw_value">True</property> + <property name="value_pos">GTK_POS_RIGHT</property> + <property name="digits">0</property> + <property name="update_policy">GTK_UPDATE_CONTINUOUS</property> + <property name="inverted">False</property> + <property name="adjustment">5 1 5 1 0 0</property> + <signal name="value_changed" handler="on_slideSpin_value_changed" last_modification_time="Thu, 15 Nov 2007 08:42:21 GMT"/> + </widget> + <packing> + <property name="x">160</property> + <property name="y">26</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="lblSpinPWM"> + <property name="width_request">144</property> + <property name="height_request">16</property> + <property name="visible">True</property> + <property name="label" translatable="yes">label19</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="x">160</property> + <property name="y">18</property> + </packing> + </child> </widget> <packing> <property name="left_attach">1</property> @@ -2385,29 +2463,12 @@ <signal name="changed" handler="on_spinPitch_changed" last_modification_time="Tue, 11 Dec 2007 12:18:41 GMT"/> </widget> <packing> - <property name="x">216</property> - <property name="y">103</property> + <property name="x">112</property> + <property name="y">101</property> </packing> </child> <child> - <widget class="GtkComboBoxEntry" id="comboboxentry1"> - <property name="width_request">216</property> - <property name="height_request">27</property> - <property name="visible">True</property> - <property name="items" translatable="yes"> </property> - <property name="add_tearoffs">False</property> - <property name="has_frame">True</property> - <property name="focus_on_click">True</property> - <signal name="changed" handler="on_comboboxentry1_changed" last_modification_time="Tue, 11 Dec 2007 12:01:54 GMT"/> - </widget> - <packing> - <property name="x">56</property> - <property name="y">59</property> - </packing> - </child> - - <child> <widget class="GtkLabel" id="lblTTSConf"> <property name="width_request">16</property> <property name="height_request">134</property> @@ -2435,8 +2496,8 @@ <child> <widget class="GtkLabel" id="lblPitch"> - <property name="width_request">152</property> - <property name="height_request">24</property> + <property name="width_request">56</property> + <property name="height_request">25</property> <property name="visible">True</property> <property name="label" translatable="yes"> </property> <property name="use_underline">False</property> @@ -2458,6 +2519,23 @@ <property name="y">103</property> </packing> </child> + + <child> + <widget class="GtkComboBoxEntry" id="comboboxentry1"> + <property name="width_request">216</property> + <property name="height_request">28</property> + <property name="visible">True</property> + <property name="items" translatable="yes"> </property> + <property name="add_tearoffs">False</property> + <property name="has_frame">True</property> + <property name="focus_on_click">True</property> + <signal name="changed" handler="on_comboboxentry1_changed" last_modification_time="Tue, 11 Dec 2007 12:01:54 GMT"/> + </widget> + <packing> + <property name="x">56</property> + <property name="y">59</property> + </packing> + </child> </widget> <packing> <property name="left_attach">1</property> Modified: software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp =================================================================== --- software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp 2007-12-14 16:42:38 UTC (rev 798) +++ software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp 2007-12-17 09:35:17 UTC (rev 799) @@ -82,28 +82,7 @@ ''' When the window is destroyed, don't forget to remove the monitoring vectors ''' - tux.monitoring.remove(self.light_idx) - tux.monitoring.remove(self.sound_idx) - tux.monitoring.remove(self.battery_idx) - tux.event.on_left_blue_led_on = None - tux.event.on_left_blue_led_off = None - tux.event.on_right_blue_led_on = None - tux.event.on_right_blue_led_off = None - tux.event.on_eyes_open = None - tux.event.on_eyes_closed = None - tux.event.on_mouth_open = None - tux.event.on_mouth_close = None - tux.event.on_spin_stop = None - tux.event.on_power_unplugged = None - tux.event.on_remote_bt[K_UP] = None - tux.event.on_remote_bt[K_DOWN] = None - tux.event.on_remote_bt[K_OK] = None - tux.event.on_remote_bt[K_LEFT] = None - tux.event.on_remote_bt[K_RIGHT] = None - tux.event.on_remote_bt[K_RED] = None - tux.event.on_remote_bt[K_GREEN] = None - tux.event.on_remote_bt[K_BLUE] = None - tux.event.on_remote_bt[K_YELLOW] = None + pass def binding(self): ''' @@ -137,13 +116,18 @@ - self.battery_idx = tux.monitoring.insert(0x25, self.on_battery_level) - self.light_idx = tux.monitoring.insert(0x1B, self.on_light_level) + battery_idx = tux.monitoring.insert(0x25, self.on_battery_level) + light_idx = tux.monitoring.insert(0x1B, self.on_light_level) + tux.micro.on() - self.sound_idx = tux.monitoring.insert(0xF0, self.on_microphone_energy) + sound_idx = tux.monitoring.insert(0xF0, self.on_microphone_energy) tux.sys.wait(0.1) + _me.set_param('batt', battery_idx) + _me.set_param('light', light_idx) + _me.set_param('sound', sound_idx) + def update_status(self): ''' This function update the status when the gadget is starting. @@ -330,6 +314,10 @@ self.get_widget('lblTTSConf').set_label(_me.string('lblTTSConf')) self.get_widget('lblPitch').set_label(_me.string('lblPitch')) + self.get_widget('lblFrequency').set_label(_me.string('lblFrequency')) + self.get_widget('lblWingsPWM').set_label(_me.string('lblPWM')) + self.get_widget('lblSpinPWM').set_label(_me.string('lblPWM')) + self.get_widget('radSpinDirLeft').set_label(_me.string('radSpinDirLeft')) self.get_widget('radSpinDirRight').set_label(_me.string('radSpinDirRight')) @@ -513,32 +501,30 @@ def on_btnSpinLeft_pressed(self, widget, *args): if tux.status.power_plug(): self.get_widget('imgSpin').set_from_pixbuf(self.spin_transfo) + thread.start_new_thread(self.__wait2, ()) return self.get_widget('imgSpin').set_from_pixbuf(self.spin_left) tux.cmd.spinl_on_free(0) def on_btnSpinLeft_released(self, widget, *args): - if tux.status.power_plug(): - self.get_widget('imgSpin').set_from_pixbuf(self.spin_transfo) - return tux.cmd.spinl_on_free(1) def on_btnSpinRight_pressed(self, widget, *args): if tux.status.power_plug(): self.get_widget('imgSpin').set_from_pixbuf(self.spin_transfo) + thread.start_new_thread(self.__wait2, ()) return self.get_widget('imgSpin').set_from_file(self.path+'spin_right.png') tux.cmd.spinr_on_free(0) def on_btnSpinRight_released(self, widget, *args): - if tux.status.power_plug(): - self.get_widget('imgSpin').set_from_pixbuf(self.spin_transfo) - return tux.cmd.spinr_on_free(1) def on_btnSpinRun_clicked(self, widget, *args): if tux.status.power_plug(): self.get_widget('imgSpin').set_from_pixbuf(self.spin_transfo) + thread.start_new_thread(self.__wait2, ()) + return if self.__spin_active == False: self.__spin_active = True @@ -686,10 +672,18 @@ tux.cmd.mouth_on(2) def on_key_left(self): + if tux.status.power_plug(): + self.get_widget('imgSpin').set_from_pixbuf(self.spin_transfo) + thread.start_new_thread(self.__wait2, ()) + return self.get_widget('imgSpin').set_from_pixbuf(self.spin_right) tux.cmd.spinr_on(4) def on_key_right(self): + if tux.status.power_plug(): + self.get_widget('imgSpin').set_from_pixbuf(self.spin_transfo) + thread.start_new_thread(self.__wait2, ()) + return self.get_widget('imgSpin').set_from_pixbuf(self.spin_left) tux.cmd.spinl_on(4) @@ -736,7 +730,6 @@ def __update_eyes_buttons(self): - print '3' if _me.get_param('generalStop'): return False tux.sys.wait(0.2) @@ -753,7 +746,6 @@ def __update_mouth_buttons(self): - print '2' if _me.get_param('generalStop'): return False tux.sys.wait(0.2) @@ -770,7 +762,6 @@ def __update_wings_buttons(self): - print '1' if _me.get_param('generalStop'): return False tux.sys.wait(0.2) @@ -786,4 +777,6 @@ return True - + def __wait2(self): + tux.sys.wait(2) + self.get_widget('imgSpin').set_from_pixbuf(self.spin_off) Modified: software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/main.pyp =================================================================== --- software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/main.pyp 2007-12-14 16:42:38 UTC (rev 798) +++ software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/main.pyp 2007-12-17 09:35:17 UTC (rev 799) @@ -5,12 +5,32 @@ import time def on_standby(): + tux.monitoring.remove(_me.get_param('batt')) + tux.monitoring.remove(_me.get_param('light')) + tux.monitoring.remove(_me.get_param('sound')) + tux.event.on_left_blue_led_on = None + tux.event.on_left_blue_led_off = None + tux.event.on_right_blue_led_on = None + tux.event.on_right_blue_led_off = None + tux.event.on_eyes_open = None + tux.event.on_eyes_closed = None + tux.event.on_mouth_open = None + tux.event.on_mouth_close = None + tux.event.on_spin_stop = None + tux.event.on_power_unplugged = None + tux.event.on_remote_bt[K_UP] = None + tux.event.on_remote_bt[K_DOWN] = None + tux.event.on_remote_bt[K_OK] = None + tux.event.on_remote_bt[K_LEFT] = None + tux.event.on_remote_bt[K_RIGHT] = None + tux.event.on_remote_bt[K_RED] = None + tux.event.on_remote_bt[K_GREEN] = None + tux.event.on_remote_bt[K_BLUE] = None + tux.event.on_remote_bt[K_YELLOW] = None tux.cmd.eyes_off() tux.cmd.spinl_off() tux.cmd.spinr_off() tux.cmd.mouth_off() - tux.sys.wait(1) - tux.cmd.eyes_close() tux.cmd.raw(0x31, 0, 0, 0) tux.cmd.eyes_open() tux.cmd.mouth_close() Modified: software/gadgets/tux_controller/trunk/TuxController/Strings/fr_ALL.xml =================================================================== --- software/gadgets/tux_controller/trunk/TuxController/Strings/fr_ALL.xml 2007-12-14 16:42:38 UTC (rev 798) +++ software/gadgets/tux_controller/trunk/TuxController/Strings/fr_ALL.xml 2007-12-17 09:35:17 UTC (rev 799) @@ -1,87 +1,102 @@ <?xml version='1.0' encoding='UTF-8'?> <strings> - <vr_Panel type='str'>Panneau</vr_Panel> - <toolWingsUp type='str'>Lever les ailes</toolWingsUp> - <toolMove type='str'>Nombre de mouvements</toolMove> + <Count type='str'>mouv.</Count> + <Second type='str'>sec.</Second> + <TTS type='str'>Lire</TTS> + <TTSClear type='str'>Effacer</TTSClear> <chkShow type='str'>Commandes avancées</chkShow> + <colStatus type='str'>Statut</colStatus> + <colValue type='str'>Valeur</colValue> + <gui_conf_about_title type='str'>A propos</gui_conf_about_title> + <gui_conf_accept_bt type='str'>Valider</gui_conf_accept_bt> + <gui_conf_author_lb type='str'>Auteur</gui_conf_author_lb> + <gui_conf_cancel_bt type='str'>Annuler</gui_conf_cancel_bt> + <gui_conf_current_bind_lb type='str'>Assignation</gui_conf_current_bind_lb> + <gui_conf_delay_lb type='str'>Délai (sec)</gui_conf_delay_lb> <gui_conf_description_lb type='str'>Description</gui_conf_description_lb> - <toolTTSText type='str'>Entrer le texte ici</toolTTSText> - <lblPitch type='str'>Hauteur du son : </lblPitch> - <lblStop type='str'>Arrêter tous les mouvements</lblStop> - <radSpinDirRight type='str'>A droite</radSpinDirRight> - <gui_conf_accept_bt type='str'>Valider</gui_conf_accept_bt> - <lblLED type='str'>LEDs</lblLED> - <help_text type='str'> - </help_text> - <vr_Wings type='str'>Ailes</vr_Wings> - <tabControl type='str'>Contrôle</tabControl> - <vr_Show type='str'>Afficher</vr_Show> - <lblTTSConf type='str'>Configuration TTS</lblTTSConf> - <toolLEDspin type='str'>Réglage du nombre de clignotement.</toolLEDspin> + <gui_conf_remote_set_bt type='str'>Set</gui_conf_remote_set_bt> <gui_conf_remote_title type='str'>Télécommande</gui_conf_remote_title> - <toolTTSClear type='str'>Effacer la zone de texte</toolTTSClear> - <toolLEDRight type='str'>Allumer/Eteindre la LED droite</toolLEDRight> - <toolMouthRun type='str'>Ce bouton actionne le bec -en utilisant les paramètres définis.</toolMouthRun> + <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_update_title type='str'>Mise à jour</gui_conf_update_title> - <vr_Eyes type='str'>Yeux</vr_Eyes> + <gui_conf_window_title type='str'>Paramètres</gui_conf_window_title> + <help_text type='str'>-- Gadget Contrôler le robot -- + +Ce gadget permet de contrôler Tux. La fenêtre se compose de deux parties : +La partie de gauche permet de visualiser Tux, ainsi que de lui de faire des mouvements simples. +La partie de droite permet de parametrer d'une manière plus évoluée des mouvements. Après avoir configurer le nombre de mouvements ainsi que la vitesse, les mouvements sont déclenché grâce au bouton représenté par un engrennage. Cette partie peut être masquée en décochant la case 'Commande avancée'. + +Ce gadget permet également de paramêtrer un texte qui sera dit par Tux. Cette partie se trouve en bas de l'écran, en activant la flèche 'TTS'. Il est également possible de changer de locuteur par le panneau de commandes avancées. + +Enfin, les mouvements peuvent être déclenchés grâce à la télécommande : + +Partie: Mv simple : Mv évolués : +Yeux Fleche haut Rouge +Bec OK Vert +Ailes Fleche bas Bleu +Rotation Gauche / droite Jaune</help_text> + <lblBatteryL type='str'>Niveau des batteries</lblBatteryL> <lblConf type='str'>Divers</lblConf> - <TTS type='str'>Lire</TTS> - <toolEyesClose type='str'>Fermer les yeux</toolEyesClose> - <toolLEDLeft type='str'>Allumer/Eteindre la LED gauche</toolLEDLeft> - <gui_conf_delay_lb type='str'>Délai (sec)</gui_conf_delay_lb> + <lblEyes type='str'>Yeux</lblEyes> + <lblFrequency type='str'>Fréquence</lblFrequency> + <lblLED type='str'>LEDs</lblLED> + <lblLightL type='str'>Niveau de lumière</lblLightL> + <lblMouth type='str'>Bec</lblMouth> + <lblPWM type='str'>Vitesse</lblPWM> + <lblPitch type='str'>Pitch : </lblPitch> + <lblSoundL type='str'>Niveau de son</lblSoundL> + <lblSpin type='str'>Rotation</lblSpin> + <lblStop type='str'>Arrêter tous les mouvements</lblStop> <lblTTS type='str'>TTS</lblTTS> - <gui_conf_about_title type='str'>A propos</gui_conf_about_title> - <lblBatteryL type='str'>Niveau des batteries</lblBatteryL> - <toolTTS type='str'>Dire la phrase</toolTTS> + <lblTTSConf type='str'>Configuration TTS</lblTTSConf> + <lblWings type='str'>Ailes</lblWings> + <name_to_read type='str'>Commande du robot</name_to_read> <radSpinDirLeft type='str'>A gauche</radSpinDirLeft> - <toolStopAll type='str'>Ce bouton arrête tous les mouvements.</toolStopAll> - <lblWings type='str'>Ailes</lblWings> - <toolMouthClose type='str'>Fermer le bec</toolMouthClose> + <radSpinDirRight type='str'>A droite</radSpinDirRight> + <speaker_name type='str'>Bruno8k</speaker_name> + <tabControl type='str'>Contrôle</tabControl> + <tabStatus type='str'>Statuts</tabStatus> + <toolAdvanced type='str'>Monter/Cacher les propriété avancées</toolAdvanced> <toolBattery type='str'>Niveau de la batterie</toolBattery> - <Count type='str'>mouv.</Count> - <vr_Flash type='str'>Flash</vr_Flash> - <toolWingsDown type='str'>Baisser les ailes</toolWingsDown> + <toolEyesClose type='str'>Fermer les yeux</toolEyesClose> + <toolEyesOpen type='str'>Ouvrir les yeux</toolEyesOpen> + <toolEyesRun type='str'>Ce bouton fait actionne les yeux +en utilisant les paramêtres définis.</toolEyesRun> + <toolLEDLeft type='str'>Allumer/Eteindre la LED gauche</toolLEDLeft> + <toolLEDRight type='str'>Allumer/Eteindre la LED droite</toolLEDRight> + <toolLEDRun type='str'>Ce bouton fait clignoter les LEDs +en utilisant les paramêtres définis.</toolLEDRun> <toolLEDslide type='str'>Vous pouvez régler ici la fréquence de clignotement des LEDs</toolLEDslide> + <toolLEDspin type='str'>Réglage du nombre de clignotement.</toolLEDspin> + <toolLang type='str'>Configurer la langue TTS</toolLang> + <toolLight type='str'>Niveau de lumière</toolLight> + <toolMouthClose type='str'>Fermer le bec</toolMouthClose> + <toolMouthOpen type='str'>Ouvrir le bec</toolMouthOpen> + <toolMouthRun type='str'>Ce bouton actionne le bec +en utilisant les paramètres définis.</toolMouthRun> + <toolMove type='str'>Nombre de mouvements</toolMove> + <toolPWM type='str'>Réglage de la vitesse</toolPWM> + <toolPitch type='str'>Configurer la hauteur du son</toolPitch> + <toolSound type='str'>Niveau sonore</toolSound> + <toolSpinDir type='str'>Choix du sens de rotation</toolSpinDir> + <toolSpinLeft type='str'>Tourner vers la gauche</toolSpinLeft> + <toolSpinRight type='str'>Tourner vers la droite</toolSpinRight> <toolSpinRun type='str'>Ce bouton fait tourner Tux en utilisant les paramètres définis.</toolSpinRun> - <toolPWM type='str'>Réglage de la vitesse</toolPWM> - <gui_conf_current_bind_lb type='str'>Assignation</gui_conf_current_bind_lb> - <gui_conf_author_lb type='str'>Auteur</gui_conf_author_lb> - <toolEyesRun type='str'>Ce bouton fait actionne les yeux -en utilisant les paramêtres définis.</toolEyesRun> - <toolLEDRun type='str'>Ce bouton fait clignoter les LEDs -en utilisant les paramêtres définis.</toolLEDRun> + <toolStopAll type='str'>Ce bouton arrête tous les mouvements.</toolStopAll> + <toolTTS type='str'>Dire la phrase</toolTTS> + <toolTTSClear type='str'>Effacer la zone de texte</toolTTSClear> + <toolTTSText type='str'>Entrer le texte ici</toolTTSText> + <toolWingsDown type='str'>Baisser les ailes</toolWingsDown> <toolWingsRun type='str'>Ce bouton fait bouger les ailes en utilisant les paramètres définis.</toolWingsRun> - <colValue type='str'>Valeur</colValue> - <lblSpin type='str'>Rotation</lblSpin> - <tabStatus type='str'>Statuts</tabStatus> - <toolMouthOpen type='str'>Ouvrir le bec</toolMouthOpen> - <speaker_name type='str'>Bruno8k</speaker_name> + <toolWingsUp type='str'>Lever les ailes</toolWingsUp> + <vr_Eyes type='str'>Yeux</vr_Eyes> + <vr_Flash type='str'>Flash</vr_Flash> <vr_Hide type='str'>Cacher</vr_Hide> - <gui_conf_remote_set_bt type='str'>Set</gui_conf_remote_set_bt> - <toolSound type='str'>Niveau sonore</toolSound> - <toolLight type='str'>Niveau de lumière</toolLight> - <gui_conf_cancel_bt type='str'>Annuler</gui_conf_cancel_bt> - <name_to_read type='str'>Commande du robot</name_to_read> - <gui_conf_window_title type='str'>Paramètres</gui_conf_window_title> - <toolEyesOpen type='str'>Ouvrir les yeux</toolEyesOpen> - <toolLang type='str'>Configurer la langue TTS</toolLang> - <lblLightL type='str'>Niveau de lumière</lblLightL> - <toolSpinRight type='str'>Tourner vers la droite</toolSpinRight> - <lblEyes type='str'>Yeux</lblEyes> - <lblMouth type='str'>Bec</lblMouth> - <Second type='str'>sec.</Second> + <vr_Leds type='str'>Leds</vr_Leds> <vr_Mouth type='str'>Bouche</vr_Mouth> - <colStatus type='str'>Statut</colStatus> - <vr_Leds type='str'>Leds</vr_Leds> - <toolSpinLeft type='str'>Tourner vers la gauche</toolSpinLeft> - <toolSpinDir type='str'>Choix du sens de rotation</toolSpinDir> - <lblSoundL type='str'>Niveau de son</lblSoundL> - <toolPitch type='str'>Configurer la hauteur du son</toolPitch> - <toolAdvanced type='str'>Monter/Cacher les propriété avancées</toolAdvanced> - <TTSClear type='str'>Effacer</TTSClear> + <vr_Panel type='str'>Panneau</vr_Panel> + <vr_Show type='str'>Afficher</vr_Show> + <vr_Wings type='str'>Ailes</vr_Wings> </strings> Modified: software/gadgets/tux_controller/trunk/TuxController/about.xml =================================================================== --- software/gadgets/tux_controller/trunk/TuxController/about.xml 2007-12-14 16:42:38 UTC (rev 798) +++ software/gadgets/tux_controller/trunk/TuxController/about.xml 2007-12-17 09:35:17 UTC (rev 799) @@ -1,7 +1,7 @@ <?xml version='1.0' encoding='UTF-8'?> <about> - <gadget_name type='str'>tux_controller</gadget_name> <gadget_author type='str'>Paul Rathgeb</gadget_author> <gadget_description type='str'>Empty gadget for Tux Droid.</gadget_description> - <gadget_version type='str'>0.0.1</gadget_version> + <gadget_name type='str'>tux_controller</gadget_name> + <gadget_version type='str'>0.1.0</gadget_version> </about> Modified: software/gadgets/tux_controller/trunk/TuxController/settings.xml =================================================================== --- software/gadgets/tux_controller/trunk/TuxController/settings.xml 2007-12-14 16:42:38 UTC (rev 798) +++ software/gadgets/tux_controller/trunk/TuxController/settings.xml 2007-12-17 09:35:17 UTC (rev 799) @@ -1,32 +1,32 @@ <?xml version='1.0' encoding='UTF-8'?> <settings> - <parameters> - <hidden_in_manager type='bool'>False</hidden_in_manager> - <speaker type='int'>3</speaker> - <pitch type='int'>100</pitch> - </parameters> <general> - <have_settings_part type='bool'>True</have_settings_part> + <framework_version type='str'>0.0.0</framework_version> <gui_state> + <conf> + <visible type='bool'>False</visible> + </conf> <widget> - <y type='int'>160</y> <visible type='bool'>True</visible> <x type='int'>295</x> + <y type='int'>160</y> </widget> - <conf> - <visible type='bool'>False</visible> - </conf> </gui_state> + <have_main_part type='bool'>True</have_main_part> + <have_settings_part type='bool'>True</have_settings_part> + <have_widget_part type='bool'>False</have_widget_part> <language type='str'>en_US</language> + <main_priority type='int'>4</main_priority> + <menu_active type='bool'>True</menu_active> <notified type='bool'>False</notified> <notify_delay type='int'>60</notify_delay> - <framework_version type='str'>0.0.0</framework_version> - <menu_active type='bool'>True</menu_active> - <have_widget_part type='bool'>False</have_widget_part> + <notify_priority type='int'>4</notify_priority> + <pitch type='int'>100</pitch> <speaker type='int'>3</speaker> + </general> + <parameters> + <hidden_in_manager type='bool'>False</hidden_in_manager> <pitch type='int'>100</pitch> - <have_main_part type='bool'>True</have_main_part> - <main_priority type='int'>4</main_priority> - <notify_priority type='int'>4</notify_priority> - </general> + <speaker type='int'>3</speaker> + </parameters> </settings> Modified: software/gadgets/tux_controller/trunk/TuxController/strings.xml =================================================================== --- software/gadgets/tux_controller/trunk/TuxController/strings.xml 2007-12-14 16:42:38 UTC (rev 798) +++ software/gadgets/tux_controller/trunk/TuxController/strings.xml 2007-12-17 09:35:17 UTC (rev 799) @@ -1,87 +1,89 @@ <?xml version='1.0' encoding='UTF-8'?> <strings> - <toolWingsUp type='str'>Lever les ailes</toolWingsUp> - <lblLightL type='str'>Light level</lblLightL> - <toolMove type='str'>Nombre de mouvements</toolMove> + <Count type='str'>count</Count> + <Second type='str'>sec.</Second> + <TTS type='str'>Play</TTS> + <TTSClear type='str'>Clear</TTSClear> + <chkShow type='str'>Advanced view</chkShow> + <colStatus type='str'>Status</colStatus> + <colValue type='str'>Value</colValue> + <gui_conf_about_title type='str'>About</gui_conf_about_title> + <gui_conf_accept_bt type='str'>Accept</gui_conf_accept_bt> + <gui_conf_author_lb type='str'>Author</gui_conf_author_lb> <gui_conf_cancel_bt type='str'>Cancel</gui_conf_cancel_bt> - <chkShow type='str'>Advanced view</chkShow> + <gui_conf_current_bind_lb type='str'>Current</gui_conf_current_bind_lb> + <gui_conf_delay_lb type='str'>Delay (sec)</gui_conf_delay_lb> <gui_conf_description_lb type='str'>Description</gui_conf_description_lb> - <toolTTSText type='str'>Entrer le texte ici</toolTTSText> - <lblPitch type='str'>Pitch : </lblPitch> - <lblStop type='str'>Stop all movements</lblStop> - <radSpinDirRight type='str'>Spin right</radSpinDirRight> - <gui_conf_accept_bt type='str'>Accept</gui_conf_accept_bt> <gui_conf_remote_set_bt type='str'>Set</gui_conf_remote_set_bt> - <lblLED type='str'>LEDs</lblLED> + <gui_conf_remote_title type='str'>Remote</gui_conf_remote_title> + <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> - <vr_Wings type='str'>Wings</vr_Wings> - <tabControl type='str'>Control</tabControl> - <vr_Show type='str'>Show</vr_Show> - <lblTTSConf type='str'>TTS configuration</lblTTSConf> - <toolLEDspin type='str'>Réglage du nombre de clignotement.</toolLEDspin> - <gui_conf_remote_title type='str'>Remote</gui_conf_remote_title> - <toolTTSClear type='str'>Effacer la zone de texte</toolTTSClear> - <toolLEDRight type='str'>Allumer/Eteindre la LED droite</toolLEDRight> - <toolMouthRun type='str'>Ce bouton actionne le bec -en utilisant les paramètres définis.</toolMouthRun> - <gui_conf_version_lb type='str'>Version</gui_conf_version_lb> - <gui_conf_update_title type='str'>Update</gui_conf_update_title> - <vr_Eyes type='str'>Eyes</vr_Eyes> + <lblBatteryL type='str'>Battery level</lblBatteryL> <lblConf type='str'>Misc</lblConf> - <TTS type='str'>Play</TTS> - <toolEyesClose type='str'>Fermer les yeux</toolEyesClose> - <gui_conf_delay_lb type='str'>Delay (sec)</gui_conf_delay_lb> + <lblEyes type='str'>Eyes</lblEyes> + <lblFrequency type='str'>Frequency</lblFrequency> + <lblLED type='str'>LEDs</lblLED> + <lblLightL type='str'>Light level</lblLightL> + <lblMouth type='str'>Beak</lblMouth> + <lblPWM type='str'>Speed</lblPWM> + <lblPitch type='str'>Pitch : </lblPitch> + <lblSoundL type='str'>Sound level</lblSoundL> + <lblSpin type='str'>Spinning</lblSpin> + <lblStop type='str'>Stop all movements</lblStop> <lblTTS type='str'>TTS</lblTTS> - <gui_conf_about_title type='str'>About</gui_conf_about_title> - <lblBatteryL type='str'>Battery level</lblBatteryL> - <toolTTS type='str'>Dire la phrase</toolTTS> + <lblTTSConf type='str'>TTS configuration</lblTTSConf> + <lblWings type='str'>Wings</lblWings> + <name_to_read type='str'>Controller</name_to_read> <radSpinDirLeft type='str'>Spin left</radSpinDirLeft> - <toolStopAll type='str'>Ce bouton arrête tous les mouvements.</toolStopAll> - <lblWings type='str'>Wings</lblWings> + <radSpinDirRight type='str'>Spin right</radSpinDirRight> <speaker_name type='str'>Ryan8k</speaker_name> - <Count type='str'>count</Count> + <tabControl type='str'>Control</tabControl> <tabStatus type='str'>Status</tabStatus> - <vr_Flash type='str'>Flash</vr_Flash> - <TTSClear type='str'>Clear</TTSClear> - <toolWingsDown type='str'>Baisser les ailes</toolWingsDown> - <gui_conf_window_title type='str'>Parameters</gui_conf_window_title> - <lblSoundL type='str'>Sound level</lblSoundL> - <toolPWM type='str'>Réglage de la vitesse</toolPWM> - <gui_conf_current_bind_lb type='str'>Current</gui_conf_current_bind_lb> - <gui_conf_author_lb type='str'>Author</gui_conf_author_lb> + <toolAdvanced type='str'>Monter/Cacher les propriété avancées</toolAdvanced> + <toolBattery type='str'>Niveau de la batterie</toolBattery> + <toolEyesClose type='str'>Fermer les yeux</toolEyesClose> + <toolEyesOpen type='str'>Ouvrir les yeux</toolEyesOpen> <toolEyesRun type='str'>Ce bouton actionne les yeux en utilisant les paramètres définis.</toolEyesRun> + <toolLEDLeft type='str'>Allumer/Eteindre la LED gauche</toolLEDLeft> + <toolLEDRight type='str'>Allumer/Eteindre la LED droite</toolLEDRight> <toolLEDRun type='str'>Ce bouton fait clignoter les LEDs en utilisant les paramètres définis.</toolLEDRun> - <colValue type='str'>Value</colValue> - <toolSpinRun type='str'>Ce bouton fait tourner Tux en -utilisant les paramètres définis.</toolSpinRun> - <toolMouthOpen type='str'>Ouvrir le bec</toolMouthOpen> - <toolMouthClose type='str'>Fermer le bec</toolMouthClose> - <vr_Hide type='str'>Hide</vr_Hide> <toolLEDslide type='str'>Vous pouvez régler ici la fréquence de clignotement des LEDs</toolLEDslide> + <toolLEDspin type='str'>Réglage du nombre de clignotement.</toolLEDspin> + <toolLang type='str'>Configurer la langue TTS</toolLang> + <toolLight type='str'>Niveau de lumière</toolLight> + <toolMouthClose type='str'>Fermer le bec</toolMouthClose> + <toolMouthOpen type='str'>Ouvrir le bec</toolMouthOpen> + <toolMouthRun type='str'>Ce bouton actionne le bec +en utilisant les paramètres définis.</toolMouthRun> + <toolMove type='str'>Nombre de mouvements</toolMove> + <toolPWM type='str'>Réglage de la vitesse</toolPWM> + <toolPitch type='str'>Configurer la hauteur du son</toolPitch> <toolSound type='str'>Niveau sonore</toolSound> - <toolLight type='str'>Niveau de lumière</toolLight> - <toolLEDLeft type='str'>Allumer/Eteindre la LED gauche</toolLEDLeft> - <name_to_read type='str'>Controller</name_to_read> - <lblSpin type='str'>Spinning</lblSpin> - <toolAdvanced type='str'>Monter/Cacher les propriété avancées</toolAdvanced> - <toolBattery type='str'>Niveau de la batterie</toolBattery> - <vr_Panel type='str'>Panel</vr_Panel> + <toolSpinDir type='str'>Choix du sens de rotation</toolSpinDir> + <toolSpinLeft type='str'>Tourner vers la gauche</toolSpinLeft> <toolSpinRight type='str'>Tourner vers la droite</toolSpinRight> - <lblMouth type='str'>Beak</lblMouth> - <lblEyes type='str'>Eyes</lblEyes> - <Second type='str'>sec.</Second> - <vr_Mouth type='str'>Mouth</vr_Mouth> - <colStatus type='str'>Status</colStatus> - <vr_Leds type='str'>Leds</vr_Leds> - <toolSpinLeft type='str'>Tourner vers la gauche</toolSpinLeft> - <toolSpinDir type='str'>Choix du sens de rotation</toolSpinDir> + <toolSpinRun type='str'>Ce bouton fait tourner Tux en +utilisant les paramètres définis.</toolSpinRun> + <toolStopAll type='str'>Ce bouton arrête tous les mouvements.</toolStopAll> + <toolTTS type='str'>Dire la phrase</toolTTS> + <toolTTSClear type='str'>Effacer la zone de texte</toolTTSClear> + <toolTTSText type='str'>Entrer le texte ici</toolTTSText> + <toolWingsDown type='str'>Baisser les ailes</toolWingsDown> <toolWingsRun type='str'>Ce bouton fait bouger les ailes en utilisant les paramètres définis.</toolWingsRun> - <toolPitch type='str'>Configurer la hauteur du son</toolPitch> - <toolEyesOpen type='str'>Ouvrir les yeux</toolEyesOpen> - <toolLang type='str'>Configurer la langue TTS</toolLang> + <toolWingsUp type='str'>Lever les ailes</toolWingsUp> + <vr_Eyes type='str'>Eyes</vr_Eyes> + <vr_Flash type='str'>Flash</vr_Flash> + <vr_Hide type='str'>Hide</vr_Hide> + <vr_Leds type='str'>Leds</vr_Leds> + <vr_Mouth type='str'>Mouth</vr_Mouth> + <vr_Panel type='str'>Panel</vr_Panel> + <vr_Show type='str'>Show</vr_Show> + <vr_Wings type='str'>Wings</vr_Wings> </strings> Modified: software/gadgets/tux_controller/trunk/TuxController.tgf =================================================================== (Binary files differ) |
From: jaguarondi <c2m...@c2...> - 2007-12-14 16:42:44
|
Author: jaguarondi Date: 2007-12-14 17:42:38 +0100 (Fri, 14 Dec 2007) New Revision: 798 Modified: firmware/tuxcore/trunk/led.c firmware/tuxcore/trunk/led.h firmware/tuxcore/trunk/main.c firmware/tuxcore/trunk/parser.c firmware/tuxdefs/api.h firmware/tuxdefs/config.h Log: * Now sending LED status and did some cleanup. Modified: firmware/tuxcore/trunk/led.c =================================================================== --- firmware/tuxcore/trunk/led.c 2007-12-14 13:34:39 UTC (rev 797) +++ firmware/tuxcore/trunk/led.c 2007-12-14 16:42:38 UTC (rev 798) @@ -31,6 +31,8 @@ /** Buffer the LEDs values before being applied on the I/O port. */ uint8_t leds_buffer = 0; +/** Flag set when the LED status changed. */ +bool led_f; /** Left LED status structure. */ led_t left_led = @@ -294,6 +296,8 @@ { if (!led->var.speed_cnt) { + /* LED status is changing. */ + led_f = true; if (led->command.setpoint > led->status.intensity) { if (led->status.intensity + led->command.step @@ -355,7 +359,7 @@ This function should be called at a regular interval, which is the time basis for the delays. */ -static inline void control_call(led_t *led) +static inline void control_effects(led_t *led) { /* Do we need fading? */ if (led->status.fading) @@ -388,9 +392,18 @@ */ void led_control(bool mask) { - control_call(&left_led); - control_call(&right_led); + static bool previous_mask = false; + if (previous_mask != mask) + { + previous_mask = mask; + /* LED status is changing. */ + led_f = true; + } + + control_effects(&left_led); + control_effects(&right_led); + /* This circumvent the bug we have when the OCR values are too low (<5 it * seems), interrupt priority of the comparisons is higher than the * overflow so when 2 interrupts occurs nearly simultaneously, the compare Modified: firmware/tuxcore/trunk/led.h =================================================================== --- firmware/tuxcore/trunk/led.h 2007-12-14 13:34:39 UTC (rev 797) +++ firmware/tuxcore/trunk/led.h 2007-12-14 16:42:38 UTC (rev 798) @@ -74,6 +74,7 @@ extern led_t left_led; extern led_t right_led; +extern bool led_f; void led_init(void); void led_shutdown(void); Modified: firmware/tuxcore/trunk/main.c =================================================================== --- firmware/tuxcore/trunk/main.c 2007-12-14 13:34:39 UTC (rev 797) +++ firmware/tuxcore/trunk/main.c 2007-12-14 16:42:38 UTC (rev 798) @@ -276,6 +276,19 @@ FifoPut(statusFifo, spin_move_counter); FifoPut(statusFifo, gStatus.pos); FifoPut(statusFifo, 0); + if (led_f) + { + led_f = false; + FifoPut(statusFifo, STATUS_LED_CMD); + FifoPut(statusFifo, left_led.status.intensity); + FifoPut(statusFifo, right_led.status.intensity); + FifoPut(statusFifo, left_led.status.fading | + (left_led.status.pulsing << 1) | + (right_led.status.fading << 2) | + (right_led.status.pulsing << 3) | + /* Also add the mask. */ + (cond_flags.eyes_closed << 4)); + } if (sensorsStatus & LIGHT_FLAG) /* send light measurement */ { sensorsStatus &= ~LIGHT_FLAG; Modified: firmware/tuxcore/trunk/parser.c =================================================================== --- firmware/tuxcore/trunk/parser.c 2007-12-14 13:34:39 UTC (rev 797) +++ firmware/tuxcore/trunk/parser.c 2007-12-14 16:42:38 UTC (rev 798) @@ -133,11 +133,11 @@ stop_spinning(); } /* Leds */ - else if (command[0] == LED_BLINK_RANGE_CMD) + else if (command[0] == LED_PULSE_RANGE_CMD) { led_pulse_range(command[1], command[2], command[3]); } - else if (command[0] == LED_BLINK_CMD) + else if (command[0] == LED_PULSE_CMD) { led_pulse(command[1], command[2], command[3]); } Modified: firmware/tuxdefs/api.h =================================================================== --- firmware/tuxdefs/api.h 2007-12-14 13:34:39 UTC (rev 797) +++ firmware/tuxdefs/api.h 2007-12-14 16:42:38 UTC (rev 798) @@ -197,16 +197,16 @@ * @{ */ /** - * Set the rate and step which determine the speed of the fading effect. + * Set the speed and step which determine the speed of the fading effect. * - * The fading increases or decreases the intensity by 'step' each 'rate' times + * The fading increases or decreases the intensity by 'step' each 'speed' times * 4ms. * * Parameters: * - 1 - LEDs affected by the command, either left, right or both. * The values are defined in LEDS_t. - * - 2 - rate of the fading effect, the time base is 4ms. - * A value from 1 to 255 will change the rate, + * - 2 - speed of the fading effect, the time base is 4ms. + * A value from 1 to 255 will change the speed, * 0 will leave it unaffected. * - 3 - step of the fading effect. * A value from 1 to 255 will change the step, @@ -216,7 +216,7 @@ /** * Set both LEDs to a given intensity with a fading effect controlled by - * 'rate' and 'step'. + * 'speed' and 'step'. * * Parameters: * - 1 - Which LEDs. @@ -226,32 +226,59 @@ #define LED_SET_CMD 0xD1 /** - * Set the intensity boundaries for the blink command. + * Set the intensity boundaries for the pulse command. * * Parameters: * - 1 - Which LEDs. * - 2 - Maximum intensity. * - 3 - Minimum intensity. */ -#define LED_BLINK_RANGE_CMD 0xD2 +#define LED_PULSE_RANGE_CMD 0xD2 /** - * Blink LEDs 'number' times with a frequency determined by 'pulse_width'. + * Pulse LEDs 'number' times with a frequency determined by 'pulse_width'. * * Parameters: * - 1 - Which LEDs * - 2 - Number of toggles the LED should do. - * - 3 - Pulse width of the blinking effect. Affected by the fading effect. + * - 3 - Pulse width of the pulsing effect. 0 is ignored. The value from 1 + * to 255 represents half the delay, in 4ms unit, between 2 pulses. * * The pulse width won't be shorter than what is set for the fading effect, - * even if you set a low value here. + * even if you set a low value here. If the pulse width is larger than the + * fading period, then a pause will occur after fading in order to meet the + * pulse width. */ -#define LED_BLINK_CMD 0xD3 +#define LED_PULSE_CMD 0xD3 /*! @} */ +/** + * \name Status and return values + * These commands are sent by tux to the computer instead of the opposite and + * usually represent tux's status. + * @{ */ + +/** + * LEDs status, both intensities and whether any effect is ongoing. + * + * Parameters: + * - 1 - Intensity of the left LED + * - 2 - Intensity of the right LED + * - 3 - Effects status + * - .0: Left LED fading + * - .1: Left LED pulsing + * - .3: Right LED fading + * - .4: Right LED pulsing + * - .5: LED mask, if set the LEDs are not lit even though the + * intensity is non zero. + */ +#define STATUS_LED_CMD 0xCE + /*! @} */ +/*! @} */ + /** States of the audio recording (flash programming) process */ typedef enum audiorec_status { Modified: firmware/tuxdefs/config.h =================================================================== --- firmware/tuxdefs/config.h 2007-12-14 13:34:39 UTC (rev 797) +++ firmware/tuxdefs/config.h 2007-12-14 16:42:38 UTC (rev 798) @@ -50,28 +50,28 @@ /* Head button event */ #define HEAD_E_SEQ {\ 0, LED_FADE_SPEED_CMD, 3, 1, 10, \ - 0, LED_BLINK_CMD, 3, 2, 30, /* blink led's once */\ + 0, LED_PULSE_CMD, 3, 2, 30, /* Pulse LEDs once */\ END_OF_ACTIONS\ } /* Left flipper button event */ #define LEFT_FLIP_E_SEQ {\ 0, LED_FADE_SPEED_CMD, 3, 1, 10, \ - 0, LED_BLINK_CMD, 3, 2, 30, /* blink led's once */\ + 0, LED_PULSE_CMD, 3, 2, 30, /* Pulse LEDs once */\ END_OF_ACTIONS\ } /* Right flipper event */ #define RIGHT_FLIP_E_SEQ {\ 0, LED_FADE_SPEED_CMD, 3, 1, 10, \ - 0, LED_BLINK_CMD, 3, 2, 30, /* blink led's once */\ + 0, LED_PULSE_CMD, 3, 2, 30, /* Pulse LEDs once */\ END_OF_ACTIONS\ } /* Start charging event */ #define CHARGER_START_E_SEQ {\ 0, MOVE_MOUTH_CMD, 2, 0, 0, /* move the mouth */\ - 0, LED_BLINK_CMD, 3, 4, 50, /* blink led's twice */\ + 0, LED_PULSE_CMD, 3, 4, 50, /* Pulse LEDs twice */\ 0, PLAY_SOUND_CMD, 3, 0, 0, /* play a sound */\ END_OF_ACTIONS\ } |
From: remi <c2m...@c2...> - 2007-12-14 13:34:46
|
Author: remi Date: 2007-12-14 14:34:39 +0100 (Fri, 14 Dec 2007) New Revision: 797 Added: api/python/branches/0.2/ api/python/branches/0.2/branches/ api/python/branches/0.2/tags/ api/python/branches/0.2/trunk/ api/python/branches/0.2/trunk/AUTHORS api/python/branches/0.2/trunk/CHANGES api/python/branches/0.2/trunk/COPYING api/python/branches/0.2/trunk/README api/python/branches/0.2/trunk/TODO api/python/branches/0.2/trunk/tux.py api/python/branches/0.2/trunk/tuxapi_class.py api/python/branches/0.2/trunk/tuxapi_const.py api/python/branches/0.2/trunk/tuxapi_wav_merger.py Log: ADD: python api 0.2.X branche Added: api/python/branches/0.2/trunk/AUTHORS =================================================================== --- api/python/branches/0.2/trunk/AUTHORS (rev 0) +++ api/python/branches/0.2/trunk/AUTHORS 2007-12-14 13:34:39 UTC (rev 797) @@ -0,0 +1,7 @@ +$Id: $ + +Tux python API was written by: + + R Jocaille <rem...@c2...> + +Contributors: Added: api/python/branches/0.2/trunk/CHANGES =================================================================== --- api/python/branches/0.2/trunk/CHANGES (rev 0) +++ api/python/branches/0.2/trunk/CHANGES 2007-12-14 13:34:39 UTC (rev 797) @@ -0,0 +1,40 @@ +$Id: CHANGES 317 2007-05-12 11:57:43Z jaguarondi $ + +Approximate change log by version. + +(For more detailed changes, see svn log.) + +---------------------------------------------------------------------- +Current: + +Version 0.2.0: + + * The api was completely remade. I Kept the changes made by Neimad lately. + Sorry for this brutal update. + * I have implemented the 'join()' suggestion from Damien for the threads too. + Consequently, this api is not fully compatible with the last one. + * A documentation system based on the docstring has been implemented and you + can build this with the function 'tux.misc.build_documentation'. + See 'tux.misc.doc(tux.misc.build_documentation)'. + See 'tux.misc.doc(tux)' too + +Version 0.1.2: + + * Alsa tux card device name is now constructed by the api for example, + it is used for playing a sound with "aplay" + * Fixed a typo in api/python/trunk/tuxapi_class.py + * New boolean variable "print_warnings" has been added for print or not + of the warning messages. + * print_api_version() command has been moved. + +Version 0.1.1: + + * Added a limitation of the wav file to store the sounds in the local flash to 70 seconds. + * New functions and events are added. + * Minor modifications. + +Version 0.1.0: + + * Initial public release. + Most functions are implmeneted and should work with tuxdaemon 0.2.0 + Added: api/python/branches/0.2/trunk/COPYING =================================================================== --- api/python/branches/0.2/trunk/COPYING (rev 0) +++ api/python/branches/0.2/trunk/COPYING 2007-12-14 13:34:39 UTC (rev 797) @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. Added: api/python/branches/0.2/trunk/README =================================================================== --- api/python/branches/0.2/trunk/README (rev 0) +++ api/python/branches/0.2/trunk/README 2007-12-14 13:34:39 UTC (rev 797) @@ -0,0 +1,19 @@ +$Id: README 118 2007-03-01 16:26:31Z jaguarondi $ + +Tux Droid Python API +This is the Python API that can be used to communicate with the Tux Droid +daemon. + +To install it, you only need to copy it to: + + /opt/tuxdroid/api/python/ + + Check this how-to for more information on the installation of the daemon and the API: + + http://www.tuxisalive.com/documentation/how-to/daemon-and-api-setup + +For all information about tuxdroid, please visit: + + http://www.tuxisalive.com + + Added: api/python/branches/0.2/trunk/TODO =================================================================== --- api/python/branches/0.2/trunk/TODO (rev 0) +++ api/python/branches/0.2/trunk/TODO 2007-12-14 13:34:39 UTC (rev 797) @@ -0,0 +1,6 @@ +$Id: TODO 164 2007-03-14 14:36:16Z jaguarondi $ + +- Add documentation with Doxygen or something more adapted to python. + +- Create a regular python package/module out of this API. + Added: api/python/branches/0.2/trunk/tux.py =================================================================== --- api/python/branches/0.2/trunk/tux.py (rev 0) +++ api/python/branches/0.2/trunk/tux.py 2007-12-14 13:34:39 UTC (rev 797) @@ -0,0 +1,41 @@ +#!/usr/bin/python +# -*- coding: latin-1 -*- + +import sys +from tuxapi_const import * +import tuxapi_class +import tuxapi_wav_merger +import signal +import atexit + +global tux + +# If run as main, print version banner. Otherwise, keep quiet. +if __name__ == "__main__": + misc = tuxapi_class.TUXmisc(None) + misc.print_api_version() + del misc + # Trick to detect whether python is in interactive mode + if not 'readline' in sys.modules: + print "For interactive use, run: python -i tux.py" + sys.exit(0) + +tux=tuxapi_class.TUXTCPCommunicator() +wavs=tuxapi_wav_merger.WavMerger(tux) +tux.daemon.connect() +tux.tts.connect() +tux.daemon.set_my_client_name("Py Client") +tux.print_warnings=True +tux.daemon.auto_connect(True) +tux.tts.auto_connect(True) + +def exit(signum,frame): + sys.exit(signum) + +def my_exitfunct(): + tux.destroy() + +signal.signal(signal.SIGTERM, exit) +signal.signal(signal.SIGINT, exit) +atexit.register(my_exitfunct) + Added: api/python/branches/0.2/trunk/tuxapi_class.py =================================================================== --- api/python/branches/0.2/trunk/tuxapi_class.py (rev 0) +++ api/python/branches/0.2/trunk/tuxapi_class.py 2007-12-14 13:34:39 UTC (rev 797) @@ -0,0 +1,5717 @@ +#!/usr/bin/python + +# ----------------------------------------------------------------------------- +# Tux Droid - API Class +# Copyright (C) 2007 C2ME Sa <rem...@c2...> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. +# ----------------------------------------------------------------------------- +# $Id: tuxapi_class.py 192 2007-03-22 14:25:37Z remi $ +# ----------------------------------------------------------------------------- + +import sys +import os +import time +import socket +import thread +import threading +import string +import signal +import subprocess +import math +from tuxapi_const import * +from copy import deepcopy + +#============================================================================== +# Constants +#============================================================================== + +api_version ="0.2.3 (SVN/UNRELEASED)" +TCPIP_FRAME_LENGTH = 16 + +#============================================================================== +# EventControl - class +#============================================================================== +class EventControl(object): + + def __init__(self): + self.__funct_ptr_list = [] + self.__fifo_list = [] + self.__list_mutex = threading.Lock() + self.__threads_list = [] + + def destroy(self): + for my_thread in self.__threads_list: + if my_thread.isAlive(): + my_thread.join() + + def connect(self, funct_ptr): + self.__list_mutex.acquire() + idx = len(self.__funct_ptr_list) + self.__funct_ptr_list.append(funct_ptr) + self.__list_mutex.release() + return idx + + def push(self): + self.__list_mutex.acquire() + self.__fifo_list.append(self.__funct_ptr_list) + self.__list_mutex.release() + self.clear() + + def pop(self): + if len(self.__fifo_list) > 0: + self.__list_mutex.acquire() + self.__funct_ptr_list = self.__fifo_list.pop() + self.__list_mutex.release() + + def clear(self): + self.__list_mutex.acquire() + self.__funct_ptr_list = [] + self.__list_mutex.release() + + def disconnect(self, idx): + self.__list_mutex.acquire() + self.__funct_ptr_list[idx] = None + self.__list_mutex.release() + + def __refresh_threads_list(self): + nl = [] + for t in self.__threads_list: + if t.isAlive(): + nl.append(t) + self.__threads_list = nl + + def __run(self, funct_ptr, idx, fargs): + try: + funct_ptr(*fargs) + except: + self.__list_mutex.acquire() + self.__funct_ptr_list[idx] == None + self.__list_mutex.release() + + def notify(self, *fargs): + self.__list_mutex.acquire() + if len(self.__funct_ptr_list) == 0: + self.__list_mutex.release() + return + try: + funct_ptr_list = self.__funct_ptr_list + except: + self.__list_mutex.release() + return + self.__list_mutex.release() + for idx, funct_ptr in enumerate(funct_ptr_list): + if funct_ptr != None: + self.__refresh_threads_list() + t=threading.Thread(target=self.__run, args=(funct_ptr, idx, fargs)) + t.setName('EventControl') + t.start() + self.__threads_list.append(t) + +#============================================================================== +# TUXTCPCommunicator class +#============================================================================== +class TUXTCPCommunicator(object): + """ + Main class of tux object + + Sub class of this class: + "cmd" as class : Class which manages the tux commands + "connect" as class : Class which manages connection functions + "daemon" as class : Class which manages the daemon commands + "event" as class : Class which manages the events + "hw" as class : Class which manages the tux hardware + "micro" as class : Class which manages the microphone functions + "misc" as class : Class which manages the miscellaneous + functions + "monitoring" as class : Class which manages the monitoring + "status" as class : Class which manages the request of a + status + "sys" as class : Class which manages the system functions + "tts" as class : Class which manages the text to speech + "wav" as class : Class which manages the wav functions + + Global variables of this class: + "my_name" as string : Name of the api instance + "print_status" as boolean : Allow to print the raw statuses + "print_warnings" as boolean : Allow to print the warnings + + Comments: + Call the destroying function at the end of your script for closing + the api correctly. + >>> tux.destroy() + + "tts" class is compatible with "tuxttsd" v 0.3.0 or more recent + """ + #-------------------------------------------------------------------------- + # Constructor of class + #-------------------------------------------------------------------------- + def __init__(self,deprecated_p=5000,deprecated_a='localhost'): + """ + Constructor of class + + Example: + >>> tux=TUXTCPCommunicator() + """ + self.sock = None + self.main_thread_list=[] + self.exit_flag=False + self.tcp_mutex=threading.Lock() + self.print_warnings_mutex=threading.Lock() + self.my_name="Tux client" + self.print_status=False + self.print_warnings=True + self.print_debug_thread=False + self.lock_list = [] + self.lock_list_mutex = threading.Lock() + self.tcp_data_fifo_lock = [] + self.tcp_data_fifo_lock_mutex = threading.Lock() + self.tcp_data_fifo_event = [] + self.tcp_data_fifo_event_mutex = threading.Lock() + self.event=TUXevent(self) + self.cmd=TUXcmd(self) + self.connect=TUXconnect(self) + self.sys=TUXsys(self) + self.daemon=TUXdaemon(self) + self.sdaemon=self.daemon + self.status=TUXStatus(self) + self.hw=TUXhw(self) + self.tts=TUXtts(self) + self.misc=TUXmisc(self) + self.monitoring = TUXmonitoring(self) + self.wav = TUXwav(self) + self.micro = TUXmicro(self) + self._switches = [] + self.api_version = api_version + + self.connected=False #deprecated + t=threading.Thread(target=self.daemon._loop_auto_connect) + t.setName('daemon._loop_auto_connect') + t.start() + self.main_thread_list.append(t) + t=threading.Thread(target=self.tts._loop_auto_connect) + t.setName('tts._loop_auto_connect') + t.start() + self.main_thread_list.append(t) + + #-------------------------------------------------------------------------- + # Destructor of class + #-------------------------------------------------------------------------- + def destroy(self): + if self.exit_flag: return + self.daemon.auto_connect(False) + self.tts.auto_connect(False) + self.daemon.disconnect() + self.tts.disconnect() + self.tts.destroy() + self.daemon._tcp_threads_join() + self.tts._tcp_threads_join() + self.micro.destroy() + self.wav.destroy() + self.exit_flag=True + for main_thread in self.main_thread_list: + if self.print_debug_thread: + print "'%s' has been released"%main_thread.getName() + if main_thread.isAlive(): + main_thread.join() + self=None + print "Tux object has been destroyed" + + #-------------------------------------------------------------------------- + # Send a frame to tuxd + #-------------------------------------------------------------------------- + def _sock_send_frame(self, frame): + try: + self.sock.send(frame) + except: + pass + + #-------------------------------------------------------------------------- + # SYSTEM function + #-------------------------------------------------------------------------- + def _loop_tux_tcp_msg(self): + """ + Not a user function + """ + while self.daemon.connected: + try: + tmp_tcp_data=self.sock.recv(16) + except socket.timeout: + time.sleep(0.01) + continue + except socket.error: + self.sock.close() + self.daemon.connected=False + time.sleep(0.01) + continue + if len(tmp_tcp_data)<16: + time.sleep(0.01) + continue + self.tcp_data_fifo_lock_mutex.acquire() + self.tcp_data_fifo_lock.append(tmp_tcp_data) + self.tcp_data_fifo_lock_mutex.release() + self.tcp_data_fifo_event_mutex.acquire() + self.tcp_data_fifo_event.append(tmp_tcp_data) + self.tcp_data_fifo_event_mutex.release() + if self.print_status: + struct_data = ["%.2x" % ord(datae) for datae in tmp_tcp_data] + print " ".join(struct_data) + time.sleep(0.01) + + #-------------------------------------------------------------------------- + # SYSTEM function + #-------------------------------------------------------------------------- + def _loop_lock_list(self): + """ + Not a user function + self.lock_list + self.lock_list_mutex + self.tcp_data_fifo_lock + self.tcp_data_fifo_lock_mutex + """ + while self.daemon.connected: + # get a private lock_list from the class lock_list + self.lock_list_mutex.acquire() + lock_list = self.lock_list + self.lock_list_mutex.release() + # get a private data_fifo from the class data_fifo + self.tcp_data_fifo_lock_mutex.acquire() + if len(self.tcp_data_fifo_lock) > 0: + data_fifo = self.tcp_data_fifo_lock.pop(0) + else: + data_fifo = (chr(99))*16 + self.tcp_data_fifo_lock_mutex.release() + # get the time now in seconds + now = self.sys.time() + # check the whole of the lock elements + # lock[0] : list of data to match + # lock[1] : condition mutex + # lock[2] : data returned + for i,lock in enumerate(lock_list): + # for the whole of the lock data + for lock_data in lock[0]: + # if the lock data is matched + if lock_data[0] in [ord(data_fifo[0]), 999]\ + and lock_data[1] in [ord(data_fifo[1]), 999]\ + and lock_data[2] in [ord(data_fifo[2]), 999]\ + and lock_data[3] in [ord(data_fifo[3]), 999]\ + and lock_data[4] in [ord(data_fifo[4]), 999]\ + and lock_data[5] in [ord(data_fifo[5]), 999]\ + and lock_data[6] in [ord(data_fifo[6]), 999]\ + and lock_data[7] in [ord(data_fifo[7]), 999]\ + and lock_data[8] in [ord(data_fifo[8]), 999]\ + and lock_data[9] in [ord(data_fifo[9]), 999]\ + and lock_data[10] in [ord(data_fifo[10]), 999]\ + and lock_data[11] in [ord(data_fifo[11]), 999]\ + and lock_data[12] in [ord(data_fifo[12]), 999]\ + and lock_data[13] in [ord(data_fifo[13]), 999]\ + and lock_data[14] in [ord(data_fifo[14]), 999]\ + and lock_data[15] in [ord(data_fifo[15]), 999]: + # return the data ones who have unblocked the lock + lock[2].append(data_fifo) + # unblock the lock + lock[1].acquire() + lock[1].notify() + lock[1].release() + lock_list.pop(i) + continue + time.sleep(0.01) + # kill the whole of the lock elements from the list + self._close_lock_list() + + #-------------------------------------------------------------------------- + # SYSTEM function + #-------------------------------------------------------------------------- + def _close_lock_list(self): + self.lock_list_mutex.acquire() + # unblock the whole of the lock elements + for i,lock in enumerate(self.lock_list): + lock[1].acquire() + lock[1].notify() + lock[1].release() + self.lock_list = [] + self.lock_list_mutex.release() + + #-------------------------------------------------------------------------- + # SYSTEM function + #-------------------------------------------------------------------------- + def _insert_lock_in_list(self,data_to_match_list,cond_lock_mutex, \ + returned_data): + # lock[0] : list of the possible frames to match + # lock[1] : condition mutex + # lock[2] : data returned + lock = [] + lock.append(data_to_match_list) + lock.append(cond_lock_mutex) + lock.append(returned_data) + self.lock_list_mutex.acquire() + self.lock_list.append(lock) + self.lock_list_mutex.release() + + #-------------------------------------------------------------------------- + # SYSTEM function + #-------------------------------------------------------------------------- + def _loop_tux_data_dispatching(self): + """ + Not a user function + """ + while self.daemon.connected: + data = () + self.tcp_data_fifo_event_mutex.acquire() + if len(self.tcp_data_fifo_event) > 0: + data = self.tcp_data_fifo_event.pop(0) + else: + self.tcp_data_fifo_event_mutex.release() + time.sleep(0.003) + continue + self.tcp_data_fifo_event_mutex.release() + self._dispatch_data_main(data) + time.sleep(0.003) + + #-------------------------------------------------------------------------- + # SYSTEM function + #-------------------------------------------------------------------------- + def _dispatch_data_main(self,data): + """ + Not a user function + """ + # from daemon + if ord(data[0])==SOURCE_SUB_DAEMON: + self._dispatch_data_from_daemon(data) + # from tux droid + if ord(data[0])==SOURCE_TUX: + self._dispatch_data_from_tux(data) + + #-------------------------------------------------------------------------- + # SYSTEM function + #-------------------------------------------------------------------------- + def _dispatch_data_from_daemon(self,data): + """ + Not a user function + """ + # data type command + if ord(data[2])==DATA_TP_CMD: + if ord(data[3])==SUBDATA_TP_STRUCT: + # daemon close + if ord(data[4])==SUB_D_CMD_STRUC_DISCONNECT_CLIENT: + self.daemon.disconnect() + + #-------------------------------------------------------------------------- + # SYSTEM function + #-------------------------------------------------------------------------- + def _dispatch_data_from_tux(self,data): + """ + Not a user function + """ + # data type response + if ord(data[2])==DATA_TP_RSP: + if ord(data[3])==SUBDATA_TP_STATUS: + #Head button + if ord(data[4])==DATAS_STATUS_HEAD_PUSH_SWITCH: + if ord(data[5])==1: + if self.event.on_head_bt_pushed!=None: + self.event.on_head_bt_pushed() + if self.event.on_bt_pushed!=None: + self.event.on_bt_pushed() + else: + if self.event.on_head_bt_released!=None: + self.event.on_head_bt_released() + if self.event.on_bt_released!=None: + self.event.on_bt_released() + #Left wing button + if ord(data[4])==DATAS_STATUS_LEFT_WING_PUSH: + if ord(data[5])==1: + if self.event.on_lwing_bt_pushed!=None: + self.event.on_lwing_bt_pushed() + if self.event.on_bt_pushed!=None: + self.event.on_bt_pushed() + else: + if self.event.on_lwing_bt_released!=None: + self.event.on_lwing_bt_released() + if self.event.on_bt_released!=None: + self.event.on_bt_released() + #Right wing button + if ord(data[4])==DATAS_STATUS_RIGHT_WING_PUSH: + if ord(data[5])==1: + if self.event.on_rwing_bt_pushed!=None: + self.event.on_rwing_bt_pushed() + if self.event.on_bt_pushed!=None: + self.event.on_bt_pushed() + else: + if self.event.on_rwing_bt_released!=None: + self.event.on_rwing_bt_released() + if self.event.on_bt_released!=None: + self.event.on_bt_released() + #Remote button + if ord(data[4])==DATAS_STATUS_IR_CODE: + if self.event.on_remote_bt[ord(data[5])]!=None: + thread.start_new_thread( \ + self.event.on_remote_bt[ord(data[5])], ()) + #self.event.on_remote_bt[ord(data[5])]() + if self.event.on_remote!=None: + thread.start_new_thread( \ + self.event.on_remote, (ord(data[5]),)) + #self.event.on_remote(ord(data[5])) + #Mouth open + if ord(data[4])==DATAS_STATUS_MOUTH_OPEN_POSITION: + if ord(data[5])==0: + if self.event.on_mouth_open!=None: + self.event.on_mouth_open() + #Mouth close + if ord(data[4])==DATAS_STATUS_MOUTH_CLOSED_POSITION: + if ord(data[5])==0: + if self.event.on_mouth_close!=None: + self.event.on_mouth_close() + #Ledl + if ord(data[4])==DATAS_STATUS_LEFT_BLUE_LED: + if ord(data[5])==1: + if self.event.on_left_blue_led_on!=None: + self.event.on_left_blue_led_on() + else: + if self.event.on_left_blue_led_off!=None: + self.event.on_left_blue_led_off() + #Ledr + if ord(data[4])==DATAS_STATUS_RIGHT_BLUE_LED: + if ord(data[5])==1: + if self.event.on_right_blue_led_on!=None: + self.event.on_right_blue_led_on() + else: + if self.event.on_right_blue_led_off!=None: + self.event.on_right_blue_led_off() + #Eyes open/close + if ord(data[4])==DATAS_STATUS_EYES_CLOSED_POSITION_SWITCH: + if ord(data[5])==0: + if self.event.on_eyes_close!=None: + self.event.on_eyes_close() + else: + if self.event.on_eyes_open!=None: + self.event.on_eyes_open() + #Power plug switch + if ord(data[4])==DATAS_STATUS_POWER_PLUG_SWITCH: + if ord(data[5])==1: + if self.event.on_power_plugged!=None: + self.event.on_power_plugged() + else: + if self.event.on_power_unplugged!=None: + self.event.on_power_unplugged() + #RF status + if ord(data[4])==DATAS_STATUS_RF_CONNECTED: + if ord(data[5])==1: + self.status.rf_connected=True + if self.event.on_rf_connected!=None: + self.event.on_rf_connected() + else: + self.status.rf_connected=False + if self.event.on_rf_disconnected!=None: + self.event.on_rf_disconnected() + #PONG + if ord(data[4])==DATAS_STATUS_PONG: + if self.event.on_pong_received!=None: + rcv=ord(data[6]) + rem=ord(data[5]) + avg=int((100*rcv)/(200-rem)) + self.event.on_pong_received(rcv,rem,avg) + #mouth stop + if ord(data[4])==DATAS_STATUS_MOUTH_POSITION_COUNTER: + if ord(data[5])==0: + if self.event.on_mouth_stop!=None: + self.event.on_mouth_stop() + #eyes stop + if ord(data[4])==DATAS_STATUS_EYES_POSITION_COUNTER: + if ord(data[5])==0: + if self.event.on_eyes_stop!=None: + self.event.on_eyes_stop() + + #wings stop + if ord(data[4])==DATAS_STATUS_WINGS_POSITION_COUNTER: + if ord(data[5])==0: + if self.event.on_wings_stop!=None: + self.event.on_wings_stop() + #spin stop + if ord(data[4])==DATAS_STATUS_SPIN_POSITION_COUNTER: + if ord(data[5])==0: + if self.event.on_spin_stop!=None: + self.event.on_spin_stop() + #on status + if self.event.on_status!=None: + self.event.on_status(data) + #on monitoring + self.monitoring.check_events(data) + + for switch in self._switches: + try: + switch._notify(ord(data[4]), ord(data[5])) + except: + pass + + + #-------------------------------------------------------------------------- + # Deprecated functions + #-------------------------------------------------------------------------- + def explicit_status(self,frame): + """ + Deprecated : see 'tux.status.to_string' + """ + return self.status.to_string(frame) + + def connect_to_daemon(self): + """ + Deprecated : see 'tux.daemon.connect' + """ + return self.daemon.connect() + + def disconnect_from_daemon(self): + """ + Deprecated : see 'tux.daemon.disconnect' + """ + self.daemon.disconnect() + +#============================================================================== +# TUXTCPCommunicator - connect - class +#============================================================================== +class TUXconnect(object): + """ + Class which manages connection functions + + Functions list for the users: + tux.connect.disconnect_from_tux + tux.connect.connect_to_tux + tux.connect.random_connect_to_tux + tux.connect.id_request + tux.connect.id_lookup + tux.connect.change_id + tux.connect.sleep + tux.connect.wakeup + tux.connect.avoid_wifi + """ + + #-------------------------------------------------------------------------- + # Constructor of the class + #-------------------------------------------------------------------------- + def __init__(self,parent): + """ + Constructor of the class + """ + self.parent=parent + + #-------------------------------------------------------------------------- + # Send a connection command and wait for the result + #-------------------------------------------------------------------------- + def tux_connection(self, connection_command, connection_args=[]): + """ + Not a user function + """ + if not self.parent.daemon.connected: + return 0 + data=[DEST_TUX, SD_DEFAULT, USB_CONNECTION_CMD, 0, connection_command] + data.extend(connection_args) + if len(data) > TCPIP_FRAME_LENGTH: + return False + # Fill up the end of the frame with 0 + data.extend([0] * (TCPIP_FRAME_LENGTH - len(data))) + self.parent._sock_send_frame("".join( [chr(x) for x in data] )) + return self.parent.status.rsp_status(connection_command, timeout=5) + + #-------------------------------------------------------------------------- + # Disconnect from tux + #-------------------------------------------------------------------------- + def disconnect_from_tux(self): + """ + Disconnect from tux + + Parameters: + "seconds" as float : Time to wait in seconds + + Example: + >>> tux.sys.wait(2.4) + """ + ack_frame = self.tux_connection(TUX_CONNECTION_DISCONNECT) + if not ack_frame or ord(ack_frame[5]) != TUX_CONNECTION_ACK: + return False + + return True + + #-------------------------------------------------------------------------- + # Connect to a tux by its ID + #-------------------------------------------------------------------------- + def connect_to_tux(self, id): + """ + Connect to a tux by its ID + + Parameters: + "id" as uint16 : ID of the tux you want to connect to + 0 and 0xFFFF (65536) are not valid ID's + + Returns: + "True" if the command has been sent successfully, + "False" otherwise. + + Example: + >>> tux.connect.connect_to_tux(300) + """ + # 0 is an invalid id and 0xFFFF is reserved + assert 0 < id < 0xFFFF + id_msb = id >> 8 + id_lsb = id & 0xFF + ack_frame = self.tux_connection(TUX_CONNECTION_CONNECT, + [id_msb, id_lsb]) + if not ack_frame or ord(ack_frame[5]) != TUX_CONNECTION_ACK: + return False + + return True + + #-------------------------------------------------------------------------- + # Connect to the first tux discovered + #-------------------------------------------------------------------------- + def random_connect_to_tux(self): + """ + Connect to the first tux discovered + + Catch any disconnected tux, request it's ID and connect to it. + + Returns: + "True" if the command has been sent successfully, + "False" otherwise. + + """ + ack_frame = self.tux_connection(TUX_CONNECTION_RANDOM) + if not ack_frame or ord(ack_frame[5]) != TUX_CONNECTION_ACK: + return False + + return True + + #-------------------------------------------------------------------------- + # Get the ID of the first disconnected tux which is discoverred + #-------------------------------------------------------------------------- + def id_request(self): + """ + Get the ID of tux currently connected + + Returns: + "id" as uint16 (0 < id < 65536) if the command has been sent + successfully, + "False" otherwise. + """ + ack_frame = self.tux_connection(TUX_CONNECTION_ID_REQUEST) + if ack_frame and ord(ack_frame[5]) == TUX_CONNECTION_ACK: + return (ord(ack_frame[6])*256) + ord(ack_frame[7]) + + return False + + #-------------------------------------------------------------------------- + # Get the ID of the first disconnected tux which is discoverred + #-------------------------------------------------------------------------- + def id_lookup(self): + """ + Get the ID of the first disconnected tux which is discoverred + + The first disconnected tux that will detect this command will reply + with it's ID and disconnect immediately. You can then connect to + that tux with the ID you just got. + + In order to get the ID's of more than one disconnected tux, you have + to issue this command multiple times until you don't get any new ID. + + Returns: + "id" as uint16 (0 < id < 65536) if the command has been sent + successfully, + "False" otherwise. + """ + ack_frame = self.tux_connection(TUX_CONNECTION_ID_LOOKUP) + if ack_frame and ord(ack_frame[5]) == TUX_CONNECTION_ACK: + return (ord(ack_frame[6])*256) + ord(ack_frame[7]) + + return False + + #-------------------------------------------------------------------------- + # Changes the ID of a disconnected tux + #-------------------------------------------------------------------------- + def change_id(self, id): + """ + Changes the ID of a disconnected tux + + You have to push on the head button of tux for XXX seconds while + sending this command in order to validate the ID change request, this + in order to avoid stealing a tux too easily. + + Parameters: + "id" as uint16 : new ID you want to set to your tux + 0 and 0xFFFF (65536) are not valid ID's + + Returns: + "True" if the command has been sent successfully, + "False" otherwise. + """ + assert 0 < id < 0xFFFF + id_msb = id >> 8 + id_lsb = id % 256 + ack_frame = self.tux_connection(TUX_CONNECTION_CHANGE_ID, + [id_msb, id_lsb]) + if not ack_frame or ord(ack_frame[5]) != TUX_CONNECTION_ACK: + return False + + return True + + #-------------------------------------------------------------------------- + # Set tux in sleep mode + #-------------------------------------------------------------------------- + def sleep(self): + """ + Set tux in sleep mode + + Returns: + "True" if the command has been sent successfully, + "False" otherwise. + """ + ack_frame = self.tux_connection(TUX_CONNECTION_SLEEP) + if not ack_frame or ord(ack_frame[5]) != TUX_CONNECTION_ACK: + return False + + return True + + #-------------------------------------------------------------------------- + # Wake-up a tux if it's in sleep mode. + #-------------------------------------------------------------------------- + def wakeup(self, id): + """ + Wake-up a tux if it's in sleep mode. + + Parameters: + "id" as uint16 : ID of the tux you want to wake-up + 0 and 0xFFFF (65536) are not valid ID's + + Returns: + "True" if the command has been sent successfully, + "False" otherwise. + """ + assert 0 < id < 0xFFFF + id_msb = id >> 8 + id_lsb = id % 256 + ack_frame = self.tux_connection(TUX_CONNECTION_WAKEUP, + [id_msb, id_lsb]) + if not ack_frame or ord(ack_frame[5]) != TUX_CONNECTION_ACK: + return False + + return True + + #-------------------------------------------------------------------------- + # Configure the RF module to avoid a given wifi channel + #-------------------------------------------------------------------------- + def avoid_wifi(self, channel): + """ + Configure the RF module to avoid a given wifi channel + + + Parameters: + "channel" : wifi channel number that tux should avoid using + Channels from 1 to 14 are valid wifi channels. Set the wifi + channel to 0 to disable channel avoidance and use the + complete range of frequencies. + + Returns: + "True" if the command has been sent successfully, + "False" otherwise. + """ + ack_frame = self.tux_connection(TUX_CONNECTION_WIRELESS_CHANNEL, + [channel]) + if not ack_frame or ord(ack_frame[5]) != TUX_CONNECTION_ACK: + return False + + return True + + +#============================================================================== +# TUXTCPCommunicator - sys - class +#============================================================================== +class TUXsys(object): + """ + Class which manages the system functions + + Functions list for the users: + tux.sys.add_time_event + tux.sys.clear_time_events + tux.sys.delayed_function + tux.sys.delete_time_event + tux.sys.looped_function + tux.sys.shell + tux.sys.shell_free + tux.sys.time + tux.sys.wait + """ + + #-------------------------------------------------------------------------- + # Constructor of class + #-------------------------------------------------------------------------- + def __init__(self,parent): + """ + Constructor of class + """ + self.parent = parent + self.events_list = [[0,'NONE',9999,99,99,99,99,99]] + self.__time_event_mutex = threading.Lock() + + #-------------------------------------------------------------------------- + # Get the current time in seconds + #-------------------------------------------------------------------------- + def time(self): + """ + Get the current time in seconds + + Return an integer + + Example: + >>> var=tux.sys.time() + """ + return (time.localtime()[3]*3600)+(time.localtime()[4]*60)+ \ + time.localtime()[5] + + #-------------------------------------------------------------------------- + # Wait a time in seconds + #-------------------------------------------------------------------------- + def wait(self,seconds): + """ + Wait a time in seconds + + Parameters: + "seconds" as float : Time to wait in seconds + + Example: + >>> tux.sys.wait(2.4) + """ + time.sleep(seconds) + + #-------------------------------------------------------------------------- + # Execute a shell command + #-------------------------------------------------------------------------- + def shell(self,command): + """ + Execute a shell command + + Parameters: + "command" as string : Shell command + + Example: + >>> tux.sys.shell('ls -al') + """ + os.system(command) + + #-------------------------------------------------------------------------- + # Execute a shell command in free mode ... [truncated message content] |
From: Paul_R <c2m...@c2...> - 2007-12-14 12:10:18
|
Author: Paul_R Date: 2007-12-14 13:10:08 +0100 (Fri, 14 Dec 2007) New Revision: 796 Modified: software/gadgets/settings/trunk/settings.tgf software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.glade software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp software/gadgets/settings/trunk/settings/Scripts/Python/notify.pyp software/gadgets/settings/trunk/settings/Strings/fr_ALL.xml software/gadgets/settings/trunk/settings/about.xml software/gadgets/settings/trunk/settings/settings.xml software/gadgets/settings/trunk/settings/strings.xml Log: * Changed the widget GUI Removed the versions and config tab Modified: software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.glade =================================================================== --- software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.glade 2007-12-14 11:27:13 UTC (rev 795) +++ software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.glade 2007-12-14 12:10:08 UTC (rev 796) @@ -3,9 +3,9 @@ <glade-interface> -<widget class="GtkWindow" id="window1"> +<widget class="GtkWindow" id="window3"> <property name="width_request">650</property> - <property name="height_request">475</property> + <property name="height_request">405</property> <property name="visible">True</property> <property name="title" translatable="yes">Tux Droid Interface</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> @@ -23,943 +23,654 @@ <signal name="destroy" handler="on_window1_destroy"/> <child> - <widget class="GtkNotebook" id="notebook1"> + <widget class="GtkVBox" id="vbox3"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="show_tabs">True</property> - <property name="show_border">True</property> - <property name="tab_pos">GTK_POS_TOP</property> - <property name="scrollable">False</property> - <property name="enable_popup">False</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> <child> - <widget class="GtkVBox" id="vbox3"> + <widget class="GtkFrame" id="frame9"> + <property name="border_width">2</property> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_OUT</property> <child> - <widget class="GtkFrame" id="frame8"> - <property name="border_width">2</property> + <widget class="GtkAlignment" id="alignment9"> <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_OUT</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> <child> - <widget class="GtkAlignment" id="alignment8"> + <widget class="GtkFixed" id="fixed9"> + <property name="height_request">267</property> <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> <child> - <widget class="GtkFixed" id="fixed8"> + <widget class="GtkSpinButton" id="spinbutton8"> + <property name="width_request">42</property> + <property name="height_request">27</property> <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="climb_rate">1</property> + <property name="digits">0</property> + <property name="numeric">False</property> + <property name="update_policy">GTK_UPDATE_ALWAYS</property> + <property name="snap_to_ticks">False</property> + <property name="wrap">False</property> + <property name="adjustment">1 1 255 1 10 10</property> + </widget> + <packing> + <property name="x">471</property> + <property name="y">63</property> + </packing> + </child> - <child> - <widget class="GtkLabel" id="lblSoundExternalFile"> - <property name="width_request">71</property> - <property name="height_request">20</property> - <property name="visible">True</property> - <property name="label" translatable="yes">File name</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_RIGHT</property> - <property name="wrap">True</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="x">0</property> - <property name="y">5</property> - </packing> - </child> + <child> + <widget class="GtkToolItem" id="toolitem1"> + <property name="width_request">50</property> + <property name="height_request">50</property> + <property name="visible">True</property> + <property name="visible_horizontal">True</property> + <property name="visible_vertical">True</property> + <property name="is_important">False</property> + </widget> + <packing> + <property name="x">24</property> + <property name="y">168</property> + </packing> + </child> - <child> - <widget class="GtkFileChooserButton" id="soundExternalChooser"> - <property name="width_request">200</property> - <property name="height_request">27</property> - <property name="visible">True</property> - <property name="title" translatable="yes">Select wave file</property> - <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property> - <property name="local_only">True</property> - <property name="show_hidden">False</property> - <property name="do_overwrite_confirmation">False</property> - <property name="width_chars">-1</property> - <signal name="selection_changed" handler="on_wave_external_changed"/> - </widget> - <packing> - <property name="x">80</property> - <property name="y">2</property> - </packing> - </child> + <child> + <widget class="GtkProgressBar" id="progressbar1"> + <property name="width_request">360</property> + <property name="height_request">16</property> + <property name="visible">True</property> + <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property> + <property name="fraction">0</property> + <property name="pulse_step">0.25</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + </widget> + <packing> + <property name="x">0</property> + <property name="y">232</property> + </packing> + </child> - <child> - <widget class="GtkButton" id="btnSoundExternalPlay"> - <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">Play</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_external_play_bt_clicked"/> - </widget> - <packing> - <property name="x">289</property> - <property name="y">1</property> - </packing> - </child> + <child> + <widget class="GtkButton" id="btnSoundModify"> + <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">Modify</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_btnSoundModify_clicked" last_modification_time="Mon, 05 Nov 2007 14:45:42 GMT"/> + </widget> + <packing> + <property name="x">392</property> + <property name="y">96</property> + </packing> + </child> - <child> - <widget class="GtkButton" id="btnAddMemory"> - <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">button1</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_btnAddMemory_clicked" last_modification_time="Tue, 27 Nov 2007 13:38:43 GMT"/> - </widget> - <packing> - <property name="x">383</property> - <property name="y">1</property> - </packing> - </child> + <child> + <widget class="GtkButton" id="btnSoundAdd"> + <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">Add</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_add_bt_clicked"/> </widget> + <packing> + <property name="x">392</property> + <property name="y">32</property> + </packing> </child> - </widget> - </child> - <child> - <widget class="GtkLabel" id="lblSoundExternal"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Play external wave file</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> + <child> + <widget class="GtkButton" id="btnSoundRemove"> + <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">Remove</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_remove_bt_clicked"/> + </widget> + <packing> + <property name="x">392</property> + <property name="y">64</property> + </packing> + </child> - <child> - <widget class="GtkFrame" id="frame9"> - <property name="border_width">2</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_OUT</property> + <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">476</property> + <property name="y">32</property> + </packing> + </child> - <child> - <widget class="GtkAlignment" id="alignment9"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> + <child> + <widget class="GtkFileChooserButton" id="soundInternalChooser"> + <property name="width_request">200</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="title" translatable="yes">Select wave file</property> + <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property> + <property name="local_only">True</property> + <property name="show_hidden">False</property> + <property name="do_overwrite_confirmation">False</property> + <property name="width_chars">-1</property> + <signal name="selection_changed" handler="on_wave_internal_changed"/> + </widget> + <packing> + <property name="x">392</property> + <property name="y">0</property> + </packing> + </child> <child> - <widget class="GtkFixed" id="fixed9"> - <property name="height_request">206</property> + <widget class="GtkScrolledWindow" id="scrolledwindow2"> + <property name="width_request">384</property> + <property name="height_request">224</property> <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + <property name="window_placement">GTK_CORNER_TOP_LEFT</property> <child> - <widget class="GtkSpinButton" id="spinbutton8"> - <property name="width_request">42</property> - <property name="height_request">27</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">False</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">1 1 255 1 10 10</property> - </widget> - <packing> - <property name="x">471</property> - <property name="y">63</property> - </packing> + <placeholder/> </child> + </widget> + <packing> + <property name="x">0</property> + <property name="y">0</property> + </packing> + </child> - <child> - <widget class="GtkToolItem" id="toolitem1"> - <property name="width_request">50</property> - <property name="height_request">50</property> - <property name="visible">True</property> - <property name="visible_horizontal">True</property> - <property name="visible_vertical">True</property> - <property name="is_important">False</property> - </widget> - <packing> - <property name="x">24</property> - <property name="y">168</property> - </packing> - </child> + <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">392</property> + <property name="y">128</property> + </packing> + </child> - <child> - <widget class="GtkProgressBar" id="progressbar1"> - <property name="width_request">360</property> - <property name="height_request">16</property> - <property name="visible">True</property> - <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property> - <property name="fraction">0</property> - <property name="pulse_step">0.25</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - </widget> - <packing> - <property name="x">0</property> - <property name="y">160</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">520</property> + <property name="y">128</property> + </packing> + </child> - <child> - <widget class="GtkFileChooserButton" id="soundInternalChooser"> - <property name="width_request">200</property> - <property name="height_request">27</property> - <property name="visible">True</property> - <property name="title" translatable="yes">Select wave file</property> - <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property> - <property name="local_only">True</property> - <property name="show_hidden">False</property> - <property name="do_overwrite_confirmation">False</property> - <property name="width_chars">-1</property> - <signal name="selection_changed" handler="on_wave_internal_changed"/> - </widget> - <packing> - <property name="x">392</property> - <property name="y">0</property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="btnSoundAdd"> - <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">Add</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_add_bt_clicked"/> - </widget> - <packing> - <property name="x">392</property> - <property name="y">32</property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="btnSoundRemove"> - <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">Remove</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_remove_bt_clicked"/> - </widget> - <packing> - <property name="x">392</property> - <property name="y">64</property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="btnSoundModify"> - <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">Modify</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_btnSoundModify_clicked" last_modification_time="Mon, 05 Nov 2007 14:45:42 GMT"/> - </widget> - <packing> - <property name="x">392</property> - <property name="y">96</property> - </packing> - </child> - - <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">392</property> - <property name="y">128</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">520</property> - <property name="y">128</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">476</property> - <property name="y">32</property> - </packing> - </child> - - <child> - <widget class="GtkScrolledWindow" id="scrolledwindow1"> - <property name="width_request">376</property> - <property name="height_request">152</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> - <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - <property name="window_placement">GTK_CORNER_TOP_LEFT</property> - - <child> - <placeholder/> - </child> - </widget> - <packing> - <property name="x">0</property> - <property name="y">0</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="lblSoundState"> - <property name="width_request">360</property> - <property name="height_request">16</property> - <property name="visible">True</property> - <property name="label" translatable="yes">label3</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">True</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="x">0</property> - <property name="y">184</property> - </packing> - </child> + <child> + <widget class="GtkLabel" id="lblSoundState"> + <property name="width_request">360</property> + <property name="height_request">16</property> + <property name="visible">True</property> + <property name="label" translatable="yes">label3</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">True</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> + <packing> + <property name="x">0</property> + <property name="y">256</property> + </packing> </child> </widget> </child> + </widget> + </child> - <child> - <widget class="GtkLabel" id="lblSoundStore"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Store wave files locally</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> + <child> + <widget class="GtkLabel" id="lblSoundStore"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Store wave files locally</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="type">label_item</property> </packing> </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + <child> + <widget class="GtkFrame" id="frame10"> + <property name="border_width">2</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_OUT</property> + <child> - <widget class="GtkFrame" id="frame10"> - <property name="border_width">2</property> + <widget class="GtkAlignment" id="alignment10"> <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_OUT</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> <child> - <widget class="GtkAlignment" id="alignment10"> + <widget class="GtkFixed" id="fixed10"> + <property name="height_request">62</property> <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> <child> - <widget class="GtkFixed" id="fixed10"> + <widget class="GtkSpinButton" id="spinbutton7"> + <property name="width_request">56</property> + <property name="height_request">27</property> <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="climb_rate">1</property> + <property name="digits">0</property> + <property name="numeric">False</property> + <property name="update_policy">GTK_UPDATE_ALWAYS</property> + <property name="snap_to_ticks">False</property> + <property name="wrap">False</property> + <property name="adjustment">1 1 255 1 10 10</property> + </widget> + <packing> + <property name="x">536</property> + <property name="y">2</property> + </packing> + </child> - <child> - <widget class="GtkSpinButton" id="spinbutton7"> - <property name="width_request">56</property> - <property name="height_request">27</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">False</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">1 1 255 1 10 10</property> - </widget> - <packing> - <property name="x">536</property> - <property name="y">2</property> - </packing> - </child> + <child> + <widget class="GtkButton" id="btnSound3"> + <property name="width_request">60</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">3</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_play3_clicked"/> + </widget> + <packing> + <property name="x">160</property> + <property name="y">2</property> + </packing> + </child> - <child> - <widget class="GtkButton" id="btnSound3"> - <property name="width_request">60</property> - <property name="height_request">27</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">3</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_play3_clicked"/> - </widget> - <packing> - <property name="x">160</property> - <property name="y">2</property> - </packing> - </child> + <child> + <widget class="GtkButton" id="btnSound4"> + <property name="width_request">60</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">4</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_internat_play4_clicked"/> + </widget> + <packing> + <property name="x">240</property> + <property name="y">2</property> + </packing> + </child> - <child> - <widget class="GtkButton" id="btnSound4"> - <property name="width_request">60</property> - <property name="height_request">27</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">4</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_internat_play4_clicked"/> - </widget> - <packing> - <property name="x">240</property> - <property name="y">2</property> - </packing> - </child> + <child> + <widget class="GtkButton" id="btnSound5"> + <property name="width_request">60</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">5</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_play5_clicked"/> + </widget> + <packing> + <property name="x">320</property> + <property name="y">2</property> + </packing> + </child> - <child> - <widget class="GtkButton" id="btnSound5"> - <property name="width_request">60</property> - <property name="height_request">27</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">5</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_play5_clicked"/> - </widget> - <packing> - <property name="x">320</property> - <property name="y">2</property> - </packing> - </child> + <child> + <widget class="GtkButton" id="btnSound6"> + <property name="width_request">60</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">6</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_play6_clicked"/> + </widget> + <packing> + <property name="x">0</property> + <property name="y">35</property> + </packing> + </child> - <child> - <widget class="GtkButton" id="btnSound6"> - <property name="width_request">60</property> - <property name="height_request">27</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">6</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_play6_clicked"/> - </widget> - <packing> - <property name="x">0</property> - <property name="y">35</property> - </packing> - </child> + <child> + <widget class="GtkButton" id="btnSound8"> + <property name="width_request">60</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">8</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_play8_clicked"/> + </widget> + <packing> + <property name="x">160</property> + <property name="y">35</property> + </packing> + </child> - <child> - <widget class="GtkButton" id="btnSound1"> - <property name="width_request">60</property> - <property name="height_request">27</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">1</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_play1_clicked"/> - </widget> - <packing> - <property name="x">0</property> - <property name="y">2</property> - </packing> - </child> + <child> + <widget class="GtkButton" id="btnSound7"> + <property name="width_request">60</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">7</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_play7_clicked"/> + </widget> + <packing> + <property name="x">80</property> + <property name="y">35</property> + </packing> + </child> - <child> - <widget class="GtkButton" id="btnSound8"> - <property name="width_request">60</property> - <property name="height_request">27</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">8</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_play8_clicked"/> - </widget> - <packing> - <property name="x">160</property> - <property name="y">35</property> - </packing> - </child> + <child> + <widget class="GtkButton" id="btnSound9"> + <property name="width_request">60</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">9</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_play9_clicked"/> + </widget> + <packing> + <property name="x">240</property> + <property name="y">35</property> + </packing> + </child> - <child> - <widget class="GtkButton" id="btnSound7"> - <property name="width_request">60</property> - <property name="height_request">27</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">7</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_play7_clicked"/> - </widget> - <packing> - <property name="x">80</property> - <property name="y">35</property> - </packing> - </child> + <child> + <widget class="GtkButton" id="btnSound10"> + <property name="width_request">60</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">10</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_play10_clicked"/> + </widget> + <packing> + <property name="x">320</property> + <property name="y">35</property> + </packing> + </child> - <child> - <widget class="GtkButton" id="btnSound9"> - <property name="width_request">60</property> - <property name="height_request">27</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">9</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_play9_clicked"/> - </widget> - <packing> - <property name="x">240</property> - <property name="y">35</property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="btnSound10"> - <property name="width_request">60</property> - <property name="height_request">27</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">10</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_play10_clicked"/> - </widget> - <packing> - <property name="x">320</property> - <property name="y">35</property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="btnSound2"> - <property name="width_request">60</property> - <property name="height_request">27</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">2 + <child> + <widget class="GtkButton" id="btnSound2"> + <property name="width_request">60</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">2 </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_play2_clicked" last_modification_time="Mon, 05 Nov 2007 14:41:30 GMT"/> - </widget> - <packing> - <property name="x">80</property> - <property name="y">2</property> - </packing> - </child> + <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_play2_clicked" last_modification_time="Mon, 05 Nov 2007 14:41:30 GMT"/> + </widget> + <packing> + <property name="x">80</property> + <property name="y">2</property> + </packing> + </child> - <child> - <widget class="GtkLabel" id="lblSoundLocalSelect"> - <property name="width_request">133</property> - <property name="height_request">17</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Select sound</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_RIGHT</property> - <property name="wrap">True</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="x">400</property> - <property name="y">8</property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="btnSoundPlayNum"> - <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">Play</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_play_bt_clicked"/> - </widget> - <packing> - <property name="x">520</property> - <property name="y">35</property> - </packing> - </child> + <child> + <widget class="GtkButton" id="btnSound1"> + <property name="width_request">60</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">1</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_play1_clicked"/> </widget> + <packing> + <property name="x">0</property> + <property name="y">2</property> + </packing> </child> - </widget> - </child> - <child> - <widget class="GtkLabel" id="lblSoundLocal"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Play local wave files</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="frame11"> - <property name="border_width">2</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_OUT</property> - - <child> - <widget class="GtkAlignment" id="alignment11"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> - <child> - <widget class="GtkFixed" id="fixed11"> + <widget class="GtkButton" id="btnSoundPlayNum"> + <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">Play</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_play_bt_clicked"/> + </widget> + <packing> + <property name="x">520</property> + <property name="y">35</property> + </packing> + </child> - <child> - <widget class="GtkButton" id="btnSoundRecordMic"> - <property name="width_request">90</property> - <property name="height_request">27</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Record</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_mic_record_bt_clicked"/> - </widget> - <packing> - <property name="x">0</property> - <property name="y">3</property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="btnSoundPlayMic"> - <property name="width_request">90</property> - <property name="height_request">27</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Play</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_mic_play_bt_clicked"/> - </widget> - <packing> - <property name="x">104</property> - <property name="y">3</property> - </packing> - </child> + <child> + <widget class="GtkLabel" id="lblSoundLocalSelect"> + <property name="width_request">133</property> + <property name="height_request">17</property> + <property name="visible">True</property> + <property name="label" translatable="yes">Select sound</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_RIGHT</property> + <property name="wrap">True</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> + <packing> + <property name="x">400</property> + <property name="y">8</property> + </packing> </child> </widget> </child> + </widget> + </child> - <child> - <widget class="GtkLabel" id="lblSoundMic"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Microphone</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> + <child> + <widget class="GtkLabel" id="lblSoundLocal"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Play local wave files</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="type">label_item</property> </packing> </child> </widget> <packing> - <property name="tab_expand">False</property> - <property name="tab_fill">True</property> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> </packing> </child> + </widget> + </child> +</widget> - <child> - <widget class="GtkLabel" id="lblTabSound"> - <property name="visible">True</property> - <property name="label" translatable="yes">Audio</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">tab</property> - </packing> - </child> +<widget class="GtkWindow" id="window1"> + <property name="width_request">0</property> + <property name="height_request">301</property> + <property name="visible">True</property> + <property name="title" translatable="yes">window2</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</property> + <property name="resizable">False</property> + <property name="destroy_with_parent">False</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> + <child> + <widget class="GtkVBox" id="vbox4"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + <child> - <widget class="GtkVBox" id="vbox2"> + <widget class="GtkHBox" id="hbox1"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">0</property> <child> - <widget class="GtkVBox" id="vbox4"> + <widget class="GtkHBox" id="hbox2"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">0</property> <child> - <widget class="GtkFrame" id="frame12"> + <widget class="GtkScrolledWindow" id="scrolledwindow1"> + <property name="width_request">320</property> <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> <property name="shadow_type">GTK_SHADOW_NONE</property> + <property name="window_placement">GT... [truncated message content] |
From: Paul_R <c2m...@c2...> - 2007-12-14 11:27:14
|
Author: Paul_R Date: 2007-12-14 12:27:13 +0100 (Fri, 14 Dec 2007) New Revision: 795 Added: software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/gear-off.png software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/spin_off_charging.png Modified: software/gadgets/tux_controller/trunk/TuxController.tgf software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/battery.png software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/light.png software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/microphone.png software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.glade software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/main.pyp software/gadgets/tux_controller/trunk/TuxController/Strings/fr_ALL.xml software/gadgets/tux_controller/trunk/TuxController/about.xml software/gadgets/tux_controller/trunk/TuxController/strings.xml Log: * Added new images * Added functions to stop the movements Modified: software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/battery.png =================================================================== (Binary files differ) Added: software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/gear-off.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/gear-off.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/light.png =================================================================== (Binary files differ) Modified: software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/microphone.png =================================================================== (Binary files differ) Added: software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/spin_off_charging.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/spin_off_charging.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.glade =================================================================== --- software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.glade 2007-12-14 10:40:27 UTC (rev 794) +++ software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.glade 2007-12-14 11:27:13 UTC (rev 795) @@ -685,7 +685,7 @@ <property name="update_policy">GTK_UPDATE_ALWAYS</property> <property name="snap_to_ticks">False</property> <property name="wrap">False</property> - <property name="adjustment">1 0 255 1 10 10</property> + <property name="adjustment">1 0 127 1 10 10</property> </widget> <packing> <property name="x">70</property> @@ -872,7 +872,7 @@ <property name="update_policy">GTK_UPDATE_ALWAYS</property> <property name="snap_to_ticks">False</property> <property name="wrap">False</property> - <property name="adjustment">1 0 255 1 10 10</property> + <property name="adjustment">1 0 127 1 10 10</property> </widget> <packing> <property name="x">72</property> @@ -1040,7 +1040,7 @@ <property name="update_policy">GTK_UPDATE_ALWAYS</property> <property name="snap_to_ticks">False</property> <property name="wrap">False</property> - <property name="adjustment">1 0 255 1 10 10</property> + <property name="adjustment">1 0 127 1 10 10</property> </widget> <packing> <property name="x">70</property> @@ -1208,7 +1208,7 @@ <property name="update_policy">GTK_UPDATE_ALWAYS</property> <property name="snap_to_ticks">False</property> <property name="wrap">False</property> - <property name="adjustment">1 0 255 1 10 10</property> + <property name="adjustment">1 0 127 1 10 10</property> </widget> <packing> <property name="x">70</property> @@ -1396,7 +1396,7 @@ <property name="update_policy">GTK_UPDATE_ALWAYS</property> <property name="snap_to_ticks">False</property> <property name="wrap">False</property> - <property name="adjustment">1 0 255 1 10 10</property> + <property name="adjustment">1 0 127 1 10 10</property> </widget> <packing> <property name="x">70</property> Modified: software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp =================================================================== --- software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp 2007-12-14 10:40:27 UTC (rev 794) +++ software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp 2007-12-14 11:27:13 UTC (rev 795) @@ -24,7 +24,7 @@ def new(self): global __led_toggled_by_event __led_toggled_by_event = False - + _me.set_param('generalStop', False) self.get_widget("window1").set_title(_me.string('name_to_read')) self.create_tooltips() thread.start_new_thread(self.update,()) @@ -44,6 +44,19 @@ _me.voice_recognition.set_rules(rules) def update(self): + self.__eyes_active = False + self.__eyes_stop = False + self.__eyes_infinite = False + self.__mouth_active = False + self.__mouth_stop = False + self.__mouth_infinite = False + self.__wings_active = False + self.__wings_stop = False + self.__wings_infinite = False + self.__spin_active = False + self.__spin_stop = False + self.__spin_infinite = False + _me.set_var('pitch', _me.get_param('pitch')) _me.set_var('speaker', _me.get_param('speaker')) @@ -57,8 +70,6 @@ self.update_labels() self.update_pix() - - tux.cmd.raw(0x31, 0, 0, 0) self.update_status() @@ -83,6 +94,7 @@ tux.event.on_mouth_open = None tux.event.on_mouth_close = None tux.event.on_spin_stop = None + tux.event.on_power_unplugged = None tux.event.on_remote_bt[K_UP] = None tux.event.on_remote_bt[K_DOWN] = None tux.event.on_remote_bt[K_OK] = None @@ -110,6 +122,7 @@ tux.event.on_mouth_open = self.on_mouth_open tux.event.on_mouth_close = self.on_mouth_close tux.event.on_spin_stop = self.on_spin_stop + tux.event.on_power_unplugged = self.on_unplugged tux.event.on_remote_bt[K_UP] = self.on_key_up #eyes tux.event.on_remote_bt[K_DOWN] = self.on_key_down #wings @@ -123,6 +136,7 @@ tux.event.on_remote_bt[K_STOP] = self.StopAll + self.battery_idx = tux.monitoring.insert(0x25, self.on_battery_level) self.light_idx = tux.monitoring.insert(0x1B, self.on_light_level) @@ -165,6 +179,7 @@ self.spin_left = gtk.gdk.pixbuf_new_from_file(self.path+'spin_left.png') self.spin_right = gtk.gdk.pixbuf_new_from_file(self.path+'spin_right.png') self.spin_off = gtk.gdk.pixbuf_new_from_file(self.path+'spin_off.png') + self.spin_transfo = gtk.gdk.pixbuf_new_from_file(self.path+'spin_off_charging.png') self.beak_open = gtk.gdk.pixbuf_new_from_file(self.path+'beak_open.png') self.beak_closed = gtk.gdk.pixbuf_new_from_file(self.path+'beak_closed.png') self.up = gtk.gdk.pixbuf_new_from_file(self.path+'up.png') @@ -172,6 +187,7 @@ self.right = gtk.gdk.pixbuf_new_from_file(self.path+'right.png') self.left = gtk.gdk.pixbuf_new_from_file(self.path+'left.png') self.run = gtk.gdk.pixbuf_new_from_file(self.path+'run.png') + self.stop = gtk.gdk.pixbuf_new_from_file(self.path+'gear-off.png') self.get_widget('imgLEDRun').set_from_pixbuf(self.run) @@ -190,6 +206,8 @@ self.get_widget('imgSpinLeft').set_from_pixbuf(self.left) self.get_widget('imgSpinRight').set_from_pixbuf(self.right) self.get_widget('imgSpinRun').set_from_pixbuf(self.run) + + self.get_widget('imgStopAll').set_from_pixbuf(self.stop) self.show_tab() if tux.status.rled(): @@ -329,7 +347,6 @@ self.cb_voice.set_spk(speaker) def on_comboboxentry1_changed(self, widget, *args): - spk_id, skp_lang = self.cb_voice.get_current_spk_conf() tux.tts.select_voice(spk_id, self.get_widget('spinPitch').get_value()) _me.set_param('speaker', spk_id) @@ -358,29 +375,42 @@ self.hide_tab() def __stop_all(self): - if tux.status.eyes_motor(): + if self.__eyes_active: tux.cmd.eyes_off() - tux.sys.wait(0.2) - tux.cmd.eyes_close() + self.__eyes_active = False + self.__eyes_stop = True + self.__eyes_infinite = False + self.get_widget('imgEyesRun').set_from_pixbuf(self.run) tux.cmd.eyes_open() - if tux.status.mouth_motor(): + if self.__mouth_active: tux.cmd.mouth_off() - tux.cmd.mouth_open() - tux.sys.wait(0.2) + self.__mouth_active = False + self.__mouth_stop = True + self.__mouth_infinite = False + self.get_widget('imgMouthRun').set_from_pixbuf(self.run) tux.cmd.mouth_close() - if tux.status.wings_motor(): + + if self.__wings_active: tux.cmd.wings_off() - tux.sys.wait(0.2) - tux.cmd.raw(0x31, 0, 0, 0) + self.__wings_active = False + self.__wings_stop = True + self.__wings_infinite = False + self.get_widget('imgWingsRun').set_from_pixbuf(self.run) self.get_widget('imgWings').set_from_pixbuf(self.wings_down) - - tux.cmd.spinl_off() - tux.cmd.spinr_off() + tux.cmd.raw(0x3A, 0, 0, 0) + if self.__spin_active: + self.__spin_active = False + self.__spin_infinite = False + self.get_widget('imgSpinRun').set_from_pixbuf(self.run) + self.get_widget('imgSpin').set_from_pixbuf(self.spin_off) + tux.cmd.spinl_off() + tux.cmd.spinr_off() + def on_btnStopAll_clicked(self, widget, *args): thread.start_new_thread(self.__stop_all, ()) @@ -400,9 +430,29 @@ tux.cmd.eyes_close() def on_btnEyesRun_clicked(self, widget, *args): - value = self.get_widget('spinEyes').get_value() - value = value * 2 - tux.cmd.eyes_on_free(int(value)) + if self.__mouth_active: + tux.cmd.mouth_off() + self.__mouth_active = False + self.__mouth_stop = True + self.__mouth_infinite = False + self.get_widget('imgMouthRun').set_from_pixbuf(self.run) + + if self.__eyes_active == False: + self.__eyes_active = True + self.get_widget('imgEyesRun').set_from_pixbuf(self.stop) + value = self.get_widget('spinEyes').get_value() + value = value * 2 + if value == 0: + self.__eyes_infinite = True + tux.cmd.eyes_on_free(int(value)) + tux.sys.looped_function(self.__update_eyes_buttons, 0.2) + else: + tux.cmd.eyes_off() + self.__eyes_active = False + self.__eyes_stop = True + self.__eyes_infinite = False + self.get_widget('imgEyesRun').set_from_pixbuf(self.run) + def on_btnMouthClose_released(self, widget, *args): tux.cmd.mouth_close() @@ -411,9 +461,28 @@ tux.cmd.mouth_open() def on_btnMouthRun_clicked(self, widget, *args): - value = self.get_widget('spinMouth').get_value() - value = value * 2 - tux.cmd.mouth_on_free(int(value)) + if self.__eyes_active: + tux.cmd.eyes_off() + self.__eyes_active = False + self.__eyes_stop = True + self.__eyes_infinite = False + self.get_widget('imgEyesRun').set_from_pixbuf(self.run) + + if self.__mouth_active == False: + self.__mouth_active = True + self.get_widget('imgMouthRun').set_from_pixbuf(self.stop) + value = self.get_widget('spinMouth').get_value() + value = value * 2 + if value == 0: + self.__mouth_infinite = True + tux.cmd.mouth_on_free(int(value)) + tux.sys.looped_function(self.__update_mouth_buttons, 0.2) + else: + tux.cmd.mouth_off() + self.__mouth_active = False + self.__mouth_stop = True + self.__mouth_infinite = False + self.get_widget('imgMouthRun').set_from_pixbuf(self.run) def on_btnWingsUp_released(self, widget, *args): self.get_widget('imgWings').set_from_file(self.path+'wings_up.png') @@ -424,44 +493,76 @@ tux.cmd.raw(0x3A, 0, 0, 0) def on_btnWingsRun_clicked(self, widget, *args): - value = self.get_widget('spinWings').get_value() - value = value * 2 - freq = self.get_widget('slideWings').get_value() - tux.cmd.wings_on_free(int(value), int(freq)) + if self.__wings_active == False: + self.__wings_active = True + self.get_widget('imgWingsRun').set_from_pixbuf(self.stop) + value = self.get_widget('spinWings').get_value() + value = value * 2 + if value == 0: + self.__wings_infinite = True + freq = self.get_widget('slideWings').get_value() + tux.cmd.wings_on_free(int(value), int(freq)) + tux.sys.looped_function(self.__update_wings_buttons, 0.2) + else: + tux.cmd.wings_off() + self.__wings_active = False + self.__wings_stop = True + self.__wings_infinite = False + self.get_widget('imgWingsRun').set_from_pixbuf(self.run) def on_btnSpinLeft_pressed(self, widget, *args): - if tux.status.charger_state(): + if tux.status.power_plug(): + self.get_widget('imgSpin').set_from_pixbuf(self.spin_transfo) return self.get_widget('imgSpin').set_from_pixbuf(self.spin_left) tux.cmd.spinl_on_free(0) def on_btnSpinLeft_released(self, widget, *args): - if tux.status.charger_state(): + if tux.status.power_plug(): + self.get_widget('imgSpin').set_from_pixbuf(self.spin_transfo) return tux.cmd.spinl_on_free(1) def on_btnSpinRight_pressed(self, widget, *args): - if tux.status.charger_state(): + if tux.status.power_plug(): + self.get_widget('imgSpin').set_from_pixbuf(self.spin_transfo) return self.get_widget('imgSpin').set_from_file(self.path+'spin_right.png') tux.cmd.spinr_on_free(0) def on_btnSpinRight_released(self, widget, *args): - if tux.status.charger_state(): + if tux.status.power_plug(): + self.get_widget('imgSpin').set_from_pixbuf(self.spin_transfo) return tux.cmd.spinr_on_free(1) def on_btnSpinRun_clicked(self, widget, *args): - if tux.status.charger_state(): + if tux.status.power_plug(): + self.get_widget('imgSpin').set_from_pixbuf(self.spin_transfo) return - value = self.get_widget('spinSpin').get_value() - freq = self.get_widget('slideSpin').get_value() - if self.get_widget('radSpinDirLeft').get_active(): - tux.cmd.spinl_on_free(int(value), int(freq)) - self.get_widget('imgSpin').set_from_pixbuf(self.spin_left) + if self.__spin_active == False: + self.__spin_active = True + + value = self.get_widget('spinSpin').get_value() + if value == 0: + self.__spin_infite = True + + freq = self.get_widget('slideSpin').get_value() + if self.get_widget('radSpinDirLeft').get_active(): + tux.cmd.spinl_on_free(int(value), int(freq)) + self.get_widget('imgSpin').set_from_pixbuf(self.spin_left) + else: + tux.cmd.spinr_on_free(int(value), int(freq)) + self.get_widget('imgSpin').set_from_pixbuf(self.spin_right) + self.get_widget('imgSpinRun').set_from_pixbuf(self.stop) + else: - tux.cmd.spinr_on_free(int(value), int(freq)) - self.get_widget('imgSpin').set_from_pixbuf(self.spin_right) + tux.cmd.spinl_off() + tux.cmd.spinr_off() + self.__spin_active = False + self.__spin_stop = True + self.__spin_infinite = False + self.get_widget('imgSpinRun').set_from_pixbuf(self.run) ## chkLEDRight @@ -552,11 +653,13 @@ def on_eyes_close(self): self.get_widget('imgLed').set_from_pixbuf(self.eyes_close) + def on_eyes_open(self): tux.status.lled() tux.status.rled() + def on_mouth_open(self): self.get_widget('imgMouth').set_from_pixbuf(self.beak_open) @@ -565,8 +668,11 @@ def on_spin_stop(self): self.get_widget('imgSpin').set_from_pixbuf(self.spin_off) + self.__spin_active = False + self.get_widget('imgSpinRun').set_from_pixbuf(self.run) - + def on_unplugged(self): + self.get_widget('imgSpin').set_from_pixbuf(self.spin_off) #-------------------------------- # Remote events #-------------------------------- @@ -628,4 +734,56 @@ self.get_widget('lblSound').set_text('%.1f%s'%(val*100, '%')) self.get_widget('SoundLevel').set_fraction(val) + + def __update_eyes_buttons(self): + print '3' + if _me.get_param('generalStop'): + return False + tux.sys.wait(0.2) + if self.__eyes_stop: + self.__eyes_stop = False + return False + + if tux.status.eyes_counter() == 0 and self.__eyes_active == True and self.__eyes_infinite == False: + self.__eyes_active = False + self.get_widget('imgEyesRun').set_from_pixbuf(self.run) + return False + + return True + + + def __update_mouth_buttons(self): + print '2' + if _me.get_param('generalStop'): + return False + tux.sys.wait(0.2) + if self.__mouth_stop: + self.__mouth_stop = False + return False + + if tux.status.mouth_counter() == 0 and self.__mouth_active == True and self.__mouth_infinite == False: + self.__mouth_active = False + self.get_widget('imgMouthRun').set_from_pixbuf(self.run) + return False + + return True + + def __update_wings_buttons(self): + print '1' + if _me.get_param('generalStop'): + return False + tux.sys.wait(0.2) + if self.__wings_stop: + self.__wings_stop = False + return False + + if tux.status.wings_counter() == 0 and self.__wings_active == True and self.__wings_infinite == False: + self.__wings_active = False + self.get_widget('imgWingsRun').set_from_pixbuf(self.run) + return False + + return True + + + Modified: software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/main.pyp =================================================================== --- software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/main.pyp 2007-12-14 10:40:27 UTC (rev 794) +++ software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/main.pyp 2007-12-14 11:27:13 UTC (rev 795) @@ -5,12 +5,17 @@ import time def on_standby(): + tux.cmd.eyes_off() + tux.cmd.spinl_off() + tux.cmd.spinr_off() + tux.cmd.mouth_off() + tux.sys.wait(1) tux.cmd.eyes_close() tux.cmd.raw(0x31, 0, 0, 0) tux.cmd.eyes_open() tux.cmd.mouth_close() - + _me.set_param('generalStop', True) tux.event.on_remote_bt[K_STANDBY] = None _me.gui('widget').hide_from_main() _me.exit_main_loop() Modified: software/gadgets/tux_controller/trunk/TuxController/Strings/fr_ALL.xml =================================================================== --- software/gadgets/tux_controller/trunk/TuxController/Strings/fr_ALL.xml 2007-12-14 10:40:27 UTC (rev 794) +++ software/gadgets/tux_controller/trunk/TuxController/Strings/fr_ALL.xml 2007-12-14 11:27:13 UTC (rev 795) @@ -1,5 +1,6 @@ <?xml version='1.0' encoding='UTF-8'?> <strings> + <vr_Panel type='str'>Panneau</vr_Panel> <toolWingsUp type='str'>Lever les ailes</toolWingsUp> <toolMove type='str'>Nombre de mouvements</toolMove> <chkShow type='str'>Commandes avancées</chkShow> @@ -24,9 +25,8 @@ en utilisant les paramètres définis.</toolMouthRun> <gui_conf_version_lb type='str'>Version</gui_conf_version_lb> <gui_conf_update_title type='str'>Mise à jour</gui_conf_update_title> + <vr_Eyes type='str'>Yeux</vr_Eyes> <lblConf type='str'>Divers</lblConf> - <gui_conf_cancel_bt type='str'>Annuler</gui_conf_cancel_bt> - <vr_Panel type='str'>Panneau</vr_Panel> <TTS type='str'>Lire</TTS> <toolEyesClose type='str'>Fermer les yeux</toolEyesClose> <toolLEDLeft type='str'>Allumer/Eteindre la LED gauche</toolLEDLeft> @@ -39,9 +39,9 @@ <toolStopAll type='str'>Ce bouton arrête tous les mouvements.</toolStopAll> <lblWings type='str'>Ailes</lblWings> <toolMouthClose type='str'>Fermer le bec</toolMouthClose> + <toolBattery type='str'>Niveau de la batterie</toolBattery> <Count type='str'>mouv.</Count> <vr_Flash type='str'>Flash</vr_Flash> - <TTSClear type='str'>Effacer</TTSClear> <toolWingsDown type='str'>Baisser les ailes</toolWingsDown> <toolLEDslide type='str'>Vous pouvez régler ici la fréquence de clignotement des LEDs</toolLEDslide> @@ -50,7 +50,8 @@ <toolPWM type='str'>Réglage de la vitesse</toolPWM> <gui_conf_current_bind_lb type='str'>Assignation</gui_conf_current_bind_lb> <gui_conf_author_lb type='str'>Auteur</gui_conf_author_lb> - <lblSoundL type='str'>Niveau de son</lblSoundL> + <toolEyesRun type='str'>Ce bouton fait actionne les yeux +en utilisant les paramêtres définis.</toolEyesRun> <toolLEDRun type='str'>Ce bouton fait clignoter les LEDs en utilisant les paramêtres définis.</toolLEDRun> <toolWingsRun type='str'>Ce bouton fait bouger les ailes @@ -64,11 +65,11 @@ <gui_conf_remote_set_bt type='str'>Set</gui_conf_remote_set_bt> <toolSound type='str'>Niveau sonore</toolSound> <toolLight type='str'>Niveau de lumière</toolLight> - <vr_Eyes type='str'>Yeux</vr_Eyes> + <gui_conf_cancel_bt type='str'>Annuler</gui_conf_cancel_bt> <name_to_read type='str'>Commande du robot</name_to_read> <gui_conf_window_title type='str'>Paramètres</gui_conf_window_title> <toolEyesOpen type='str'>Ouvrir les yeux</toolEyesOpen> - <toolBattery type='str'>Niveau de la batterie</toolBattery> + <toolLang type='str'>Configurer la langue TTS</toolLang> <lblLightL type='str'>Niveau de lumière</lblLightL> <toolSpinRight type='str'>Tourner vers la droite</toolSpinRight> <lblEyes type='str'>Yeux</lblEyes> @@ -79,9 +80,8 @@ <vr_Leds type='str'>Leds</vr_Leds> <toolSpinLeft type='str'>Tourner vers la gauche</toolSpinLeft> <toolSpinDir type='str'>Choix du sens de rotation</toolSpinDir> - <toolEyesRun type='str'>Ce bouton fait actionne les yeux -en utilisant les paramêtres définis.</toolEyesRun> + <lblSoundL type='str'>Niveau de son</lblSoundL> <toolPitch type='str'>Configurer la hauteur du son</toolPitch> <toolAdvanced type='str'>Monter/Cacher les propriété avancées</toolAdvanced> - <toolLang type='str'>Configurer la langue TTS</toolLang> + <TTSClear type='str'>Effacer</TTSClear> </strings> Modified: software/gadgets/tux_controller/trunk/TuxController/about.xml =================================================================== --- software/gadgets/tux_controller/trunk/TuxController/about.xml 2007-12-14 10:40:27 UTC (rev 794) +++ software/gadgets/tux_controller/trunk/TuxController/about.xml 2007-12-14 11:27:13 UTC (rev 795) @@ -1,7 +1,7 @@ <?xml version='1.0' encoding='UTF-8'?> <about> + <gadget_name type='str'>tux_controller</gadget_name> <gadget_author type='str'>Paul Rathgeb</gadget_author> + <gadget_description type='str'>Empty gadget for Tux Droid.</gadget_description> <gadget_version type='str'>0.0.1</gadget_version> - <gadget_description type='str'>Empty gadget for Tux Droid.</gadget_description> - <gadget_name type='str'>tux_controller</gadget_name> </about> Modified: software/gadgets/tux_controller/trunk/TuxController/strings.xml =================================================================== --- software/gadgets/tux_controller/trunk/TuxController/strings.xml 2007-12-14 10:40:27 UTC (rev 794) +++ software/gadgets/tux_controller/trunk/TuxController/strings.xml 2007-12-14 11:27:13 UTC (rev 795) @@ -1,7 +1,9 @@ <?xml version='1.0' encoding='UTF-8'?> <strings> <toolWingsUp type='str'>Lever les ailes</toolWingsUp> + <lblLightL type='str'>Light level</lblLightL> <toolMove type='str'>Nombre de mouvements</toolMove> + <gui_conf_cancel_bt type='str'>Cancel</gui_conf_cancel_bt> <chkShow type='str'>Advanced view</chkShow> <gui_conf_description_lb type='str'>Description</gui_conf_description_lb> <toolTTSText type='str'>Entrer le texte ici</toolTTSText> @@ -9,6 +11,7 @@ <lblStop type='str'>Stop all movements</lblStop> <radSpinDirRight type='str'>Spin right</radSpinDirRight> <gui_conf_accept_bt type='str'>Accept</gui_conf_accept_bt> + <gui_conf_remote_set_bt type='str'>Set</gui_conf_remote_set_bt> <lblLED type='str'>LEDs</lblLED> <help_text type='str'> </help_text> @@ -24,12 +27,10 @@ en utilisant les paramètres définis.</toolMouthRun> <gui_conf_version_lb type='str'>Version</gui_conf_version_lb> <gui_conf_update_title type='str'>Update</gui_conf_update_title> + <vr_Eyes type='str'>Eyes</vr_Eyes> <lblConf type='str'>Misc</lblConf> - <vr_Eyes type='str'>Eyes</vr_Eyes> - <vr_Panel type='str'>Panel</vr_Panel> <TTS type='str'>Play</TTS> <toolEyesClose type='str'>Fermer les yeux</toolEyesClose> - <toolLEDLeft type='str'>Allumer/Eteindre la LED gauche</toolLEDLeft> <gui_conf_delay_lb type='str'>Delay (sec)</gui_conf_delay_lb> <lblTTS type='str'>TTS</lblTTS> <gui_conf_about_title type='str'>About</gui_conf_about_title> @@ -37,16 +38,15 @@ <toolTTS type='str'>Dire la phrase</toolTTS> <radSpinDirLeft type='str'>Spin left</radSpinDirLeft> <toolStopAll type='str'>Ce bouton arrête tous les mouvements.</toolStopAll> - <lblWings type='str'>WIngs</lblWings> - <toolMouthClose type='str'>Fermer le bec</toolMouthClose> - <toolBattery type='str'>Niveau de la batterie</toolBattery> + <lblWings type='str'>Wings</lblWings> + <speaker_name type='str'>Ryan8k</speaker_name> <Count type='str'>count</Count> + <tabStatus type='str'>Status</tabStatus> <vr_Flash type='str'>Flash</vr_Flash> + <TTSClear type='str'>Clear</TTSClear> <toolWingsDown type='str'>Baisser les ailes</toolWingsDown> - <toolLEDslide type='str'>Vous pouvez régler ici la fréquence de -clignotement des LEDs</toolLEDslide> - <toolSpinRun type='str'>Ce bouton fait tourner Tux en -utilisant les paramètres définis.</toolSpinRun> + <gui_conf_window_title type='str'>Parameters</gui_conf_window_title> + <lblSoundL type='str'>Sound level</lblSoundL> <toolPWM type='str'>Réglage de la vitesse</toolPWM> <gui_conf_current_bind_lb type='str'>Current</gui_conf_current_bind_lb> <gui_conf_author_lb type='str'>Author</gui_conf_author_lb> @@ -54,34 +54,34 @@ en utilisant les paramètres définis.</toolEyesRun> <toolLEDRun type='str'>Ce bouton fait clignoter les LEDs en utilisant les paramètres définis.</toolLEDRun> - <toolWingsRun type='str'>Ce bouton fait bouger les ailes -en utilisant les paramètres définis.</toolWingsRun> <colValue type='str'>Value</colValue> - <lblSpin type='str'>Spinning</lblSpin> - <tabStatus type='str'>Status</tabStatus> + <toolSpinRun type='str'>Ce bouton fait tourner Tux en +utilisant les paramètres définis.</toolSpinRun> <toolMouthOpen type='str'>Ouvrir le bec</toolMouthOpen> - <speaker_name type='str'>Ryan8k</speaker_name> + <toolMouthClose type='str'>Fermer le bec</toolMouthClose> <vr_Hide type='str'>Hide</vr_Hide> - <gui_conf_remote_set_bt type='str'>Set</gui_conf_remote_set_bt> + <toolLEDslide type='str'>Vous pouvez régler ici la fréquence de +clignotement des LEDs</toolLEDslide> <toolSound type='str'>Niveau sonore</toolSound> <toolLight type='str'>Niveau de lumière</toolLight> - <gui_conf_cancel_bt type='str'>Cancel</gui_conf_cancel_bt> + <toolLEDLeft type='str'>Allumer/Eteindre la LED gauche</toolLEDLeft> <name_to_read type='str'>Controller</name_to_read> - <gui_conf_window_title type='str'>Parameters</gui_conf_window_title> - <toolEyesOpen type='str'>Ouvrir les yeux</toolEyesOpen> - <toolLang type='str'>Configurer la langue TTS</toolLang> - <lblLightL type='str'>Light level</lblLightL> + <lblSpin type='str'>Spinning</lblSpin> + <toolAdvanced type='str'>Monter/Cacher les propriété avancées</toolAdvanced> + <toolBattery type='str'>Niveau de la batterie</toolBattery> + <vr_Panel type='str'>Panel</vr_Panel> <toolSpinRight type='str'>Tourner vers la droite</toolSpinRight> + <lblMouth type='str'>Beak</lblMouth> <lblEyes type='str'>Eyes</lblEyes> - <lblMouth type='str'>Beak</lblMouth> <Second type='str'>sec.</Second> <vr_Mouth type='str'>Mouth</vr_Mouth> <colStatus type='str'>Status</colStatus> <vr_Leds type='str'>Leds</vr_Leds> <toolSpinLeft type='str'>Tourner vers la gauche</toolSpinLeft> <toolSpinDir type='str'>Choix du sens de rotation</toolSpinDir> - <lblSoundL type='str'>Sound level</lblSoundL> + <toolWingsRun type='str'>Ce bouton fait bouger les ailes +en utilisant les paramètres définis.</toolWingsRun> <toolPitch type='str'>Configurer la hauteur du son</toolPitch> - <toolAdvanced type='str'>Monter/Cacher les propriété avancées</toolAdvanced> - <TTSClear type='str'>Clear</TTSClear> + <toolEyesOpen type='str'>Ouvrir les yeux</toolEyesOpen> + <toolLang type='str'>Configurer la langue TTS</toolLang> </strings> Modified: software/gadgets/tux_controller/trunk/TuxController.tgf =================================================================== (Binary files differ) |
From: Paul_R <c2m...@c2...> - 2007-12-14 10:40:28
|
Author: Paul_R Date: 2007-12-14 11:40:27 +0100 (Fri, 14 Dec 2007) New Revision: 794 Added: software/gadgets/micro_monitor/ Removed: software/gadgets/sound_monitor/ Log: * Changed the gadget directory Copied: software/gadgets/micro_monitor (from rev 793, software/gadgets/sound_monitor) |
From: Paul_R <c2m...@c2...> - 2007-12-14 10:38:30
|
Author: Paul_R Date: 2007-12-14 11:38:27 +0100 (Fri, 14 Dec 2007) New Revision: 793 Added: software/gadgets/sound_monitor/trunk/micro_monitor.tgf software/gadgets/sound_monitor/trunk/micro_monitor/ Removed: software/gadgets/sound_monitor/trunk/audio_monitor.tgf software/gadgets/sound_monitor/trunk/audio_monitor/ Modified: software/gadgets/sound_monitor/trunk/micro_monitor/Scripts/Python/main.pyp software/gadgets/sound_monitor/trunk/micro_monitor/about.xml Log: * Changed the gadget name Deleted: software/gadgets/sound_monitor/trunk/audio_monitor.tgf =================================================================== (Binary files differ) Copied: software/gadgets/sound_monitor/trunk/micro_monitor (from rev 792, software/gadgets/sound_monitor/trunk/audio_monitor) Modified: software/gadgets/sound_monitor/trunk/micro_monitor/Scripts/Python/main.pyp =================================================================== --- software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/main.pyp 2007-12-14 09:20:39 UTC (rev 792) +++ software/gadgets/sound_monitor/trunk/micro_monitor/Scripts/Python/main.pyp 2007-12-14 10:38:27 UTC (rev 793) @@ -6,7 +6,7 @@ for keys in gdg_dict: gadgets[keys].notify.set_active(gdg_dict[keys]) - gadgets['sound_monitor'].notify.set_active(False) + gadgets['micro_monitor'].notify.set_active(False) tux.micro.off() tux.cmd.mouth_close() tux.event.on_remote_bt[K_STANDBY] = None @@ -18,11 +18,11 @@ def start_gadget(): gdg_dict = {} for Gdgname in gadgets.keys(): - if Gdgname != 'sound_monitor' and Gdgname != 'Manager': + if Gdgname != 'micro_monitor' and Gdgname != 'Manager': gdg_dict[Gdgname] = gadgets[Gdgname].get_var('notified') gadgets[Gdgname].notify.set_active(False) - gadgets['sound_monitor'].notify.set_active(True) + gadgets['micro_monitor'].notify.set_active(True) _me.set_param('stdby', False) tux.cmd.mouth_open() _me.set_param('dict', gdg_dict) Modified: software/gadgets/sound_monitor/trunk/micro_monitor/about.xml =================================================================== --- software/gadgets/sound_monitor/trunk/audio_monitor/about.xml 2007-12-14 09:20:39 UTC (rev 792) +++ software/gadgets/sound_monitor/trunk/micro_monitor/about.xml 2007-12-14 10:38:27 UTC (rev 793) @@ -2,7 +2,7 @@ <about> <gadget_author type='str'>Paul Rathgeb</gadget_author> <gadget_version type='str'>0.0.1</gadget_version> - <gadget_name type='str'>sound_monitor</gadget_name> <gadget_description type='str'> </gadget_description> + <gadget_name type='str'>micro_monitor</gadget_name> </about> Added: software/gadgets/sound_monitor/trunk/micro_monitor.tgf =================================================================== (Binary files differ) Property changes on: software/gadgets/sound_monitor/trunk/micro_monitor.tgf ___________________________________________________________________ Name: svn:executable + * Name: svn:mime-type + application/octet-stream |
From: remi <c2m...@c2...> - 2007-12-14 09:20:38
|
Author: remi Date: 2007-12-14 10:20:39 +0100 (Fri, 14 Dec 2007) New Revision: 792 Removed: tux_lib/tux_usb/trunk/test.py Log: RM: a bad file ... Deleted: tux_lib/tux_usb/trunk/test.py =================================================================== --- tux_lib/tux_usb/trunk/test.py 2007-12-14 09:19:09 UTC (rev 791) +++ tux_lib/tux_usb/trunk/test.py 2007-12-14 09:20:39 UTC (rev 792) @@ -1,296 +0,0 @@ -from ctypes import * -import time -import sys -import threading - -# ---------------------------------------------------------------------------- -# _TUX_USB.so library wrapping -# ---------------------------------------------------------------------------- -lib = CDLL("./_TUX_USB.so") - -usb_check_TuxDroid = lib.usb_check_TuxDroid -usb_check_TuxDroid.restype = c_uint - -usb_capture_TuxDroid = lib.usb_capture_TuxDroid -usb_capture_TuxDroid.restype = c_uint - -usb_write_TuxDroid = lib.usb_write_TuxDroid -usb_write_TuxDroid.restype = c_uint - -usb_read_TuxDroid = lib.usb_read_TuxDroid -usb_read_TuxDroid.restype = c_uint - -usb_close_TuxDroid = lib.usb_close_TuxDroid -usb_close_TuxDroid.restype = c_uint - -get_connected = lib.get_connected -get_connected.restype = c_uint - -set_connected = lib.set_connected -set_connected.restype = None - -library_init = lib.library_init -library_init.restype = None - -start = lib.start -start.restype = None - -stop = lib.stop -stop.restype = None - -FRAME_CALLBACK = CFUNCTYPE(None, POINTER(c_uint8)) -set_frame_callback = lib.set_frame_callback -set_frame_callback.restype = None -set_frame_callback.argtypes = [FRAME_CALLBACK] - -DONGLE_DISCONNECT_CALLBACK = CFUNCTYPE(None) -set_disconnect_dongle_callback = lib.set_disconnect_dongle_callback -set_disconnect_dongle_callback.restype = None -set_disconnect_dongle_callback.argtypes = [DONGLE_DISCONNECT_CALLBACK] - -def test_funct(test): - print test[3] - -def disconnected(): - print 'dongle disconnected' - -set_frame_callback(FRAME_CALLBACK(test_funct)) -set_disconnect_dongle_callback(DONGLE_DISCONNECT_CALLBACK(disconnected)) - -library_init() - -start() - -time.sleep(10) - -stop() -sys.exit(0) - -# ---------------------------------------------------------------------------- -# TUXUsbInterface constants -# ---------------------------------------------------------------------------- -CAPTURE_RETURN_NO_DONGLE = 0 -CAPTURE_RETURN_FIRMWARE_TO_OLD = 1 -CAPTURE_RETURN_DEVICE_NOT_HANDLED = 2 -CAPTURE_RETURN_SUCCESS = 3 -CLOSE_RETURN_INTERFACE_NOT_RELEASED = 0 -CLOSE_RETURN_DEVICE_NOT_CLOSED = 1 -CLOSE_RETURN_SUCCESS = 2 -DATA_WRITE_LENGTH = 5 -READ_LOOP_INTERVAL = 0.1 - -# ---------------------------------------------------------------------------- -# TUXUsbInterface class -# ---------------------------------------------------------------------------- -class TUXUsbInterface(object): - - def __init__(self): - self.__connected = False - self.__connected_mutex = threading.Lock() - self.__on_frame = None - self.__on_dongle_disconnect = None - self.__read_loop_thread = None - self.__debug = False - self.__read_write_mutex = threading.Lock() - self.__CallBack_mutex = threading.Lock() - self.__messages_mutex = threading.Lock() - - def destroy(self): - self.stop() - - def get_connected(self): - self.__connected_mutex.acquire() - connected = self.__connected - self.__connected_mutex.release() - return connected - - def __set_connected(self, value): - self.__connected_mutex.acquire() - self.__connected = value - self.__connected_mutex.release() - - def set_frame_CallBack(self, funct): - self.__CallBack_mutex.acquire() - self.__on_frame = funct - self.__CallBack_mutex.release() - - def __get_frame_CallBack(self): - self.__CallBack_mutex.acquire() - funct = self.__on_frame - self.__CallBack_mutex.release() - return funct - - def set_dongle_remove_CallBack(self, funct): - self.__CallBack_mutex.acquire() - self.__on_dongle_disconnect = funct - self.__CallBack_mutex.release() - - def __get_dongle_remove_CallBack(self): - self.__CallBack_mutex.acquire() - funct = self.__on_dongle_disconnect - self.__CallBack_mutex.release() - return funct - - def set_debug(self, value): - self.__debug = value - - def start(self): - if self.get_connected(): - return False - ret = usb_capture_TuxDroid() - if ret == CAPTURE_RETURN_NO_DONGLE: - self.__print_warning('Dongle not found.') - return False - elif ret == CAPTURE_RETURN_FIRMWARE_TO_OLD: - self.__print_warning('Your dongle firmware is too old.') - return False - elif ret == CAPTURE_RETURN_DEVICE_NOT_HANDLED: - self.__print_warning("Device can't be handled.") - return False - else: - self.__print_debug('The interface is started.') - self.__set_connected(True) - t = threading.Thread(target = self.__read_loop) - t.start() - self.__read_loop_thread = t - time.sleep(0.1) - return True - - def stop(self): - if not self.get_connected(): - return True - self.__set_connected(False) - if self.__read_loop_thread != None: - if self.__read_loop_thread.isAlive(): - self.__read_loop_thread.join() - ret = usb_close_TuxDroid() - if ret == CLOSE_RETURN_INTERFACE_NOT_RELEASED: - self.__print_warning("The interface can't be released.") - return False - elif ret == CLOSE_RETURN_DEVICE_NOT_CLOSED: - self.__print_warning("The device can't be closed.") - return False - else: - self.__print_debug('The interface is stopped.') - return True - - def dongle_present(self): - if usb_check_TuxDroid() == 0: - value = False - self.__connected_mutex.acquire() - self.__connected = value - self.__connected_mutex.release() - else: - value = True - return value - - def write(self, data = [0, 0x9A, 6, 25, 0]): - if not self.get_connected(): - return False - if len(data) != DATA_WRITE_LENGTH: - self.__print_warning("Write : Bad data length.") - return False - for val in data: - if str(type(val)) != "<type 'int'>": - self.__print_warning("Write : Bad data type.") - return False - t_char = tuple(data) - self.__read_write_mutex.acquire() - ret = usb_write_TuxDroid((c_uint8 * len(t_char))(*t_char), DATA_WRITE_LENGTH) - self.__read_write_mutex.release() - if ret != DATA_WRITE_LENGTH: - self.__print_warning("Write : Usb error.") - return False - else: - self.__print_debug('Write ok.') - return True - - def __write(self, data = [0, 0x9A, 6, 25, 0]): - if not self.get_connected(): - return False - if len(data) != DATA_WRITE_LENGTH: - self.__print_warning("Write : Bad data length.") - return False - for val in data: - if str(type(val)) != "<type 'int'>": - self.__print_warning("Write : Bad data type.") - return False - t_char = tuple(data) - ret = usb_write_TuxDroid((c_uint8 * len(t_char))(*t_char), DATA_WRITE_LENGTH) - if ret != DATA_WRITE_LENGTH: - self.__print_warning("Write : Usb error.") - return False - else: - self.__print_debug('Write ok.') - return True - - def __read(self): - t = [0] * 64 - t_char = tuple(t) - data = (c_uint8 * len(t_char))(*t_char) - if not self.get_connected(): - return t - self.__read_write_mutex.acquire() - if not self.__write([1, 1, 0, 0, 0]): - self.__read_write_mutex.release() - return t - ret = usb_read_TuxDroid(data) - self.__read_write_mutex.release() - res = [] - for i in range(64): - res.append(data[i]) - return res - - def __read_loop(self): - time.sleep(0.01) - check_counter = 0 - initial_timeout = time.time() - current_timeout = initial_timeout - while True: - current_timeout += READ_LOOP_INTERVAL - if not self.get_connected(): - self.__print_debug('End of read loop.') - break - if check_counter >= 9: - if not self.dongle_present(): - self.__print_debug('End of read loop.') - if self.__get_dongle_remove_CallBack() != None: - t = threading.Thread(target = self.__get_dongle_remove_CallBack()) - t.start() - break - check_counter = 0 - else: - check_counter += 1 - data = self.__read() - if self.__get_frame_CallBack() != None: - t = threading.Thread(target = self.__get_frame_CallBack(), args = (data, )) - t.start() - while time.time() < current_timeout: - time.sleep(0.005) - - def __print_debug(self, msg): - self.__messages_mutex.acquire() - if self.__debug: - print 'TUXUsbInterface [DEBUG] : %s' % msg - self.__messages_mutex.release() - - def __print_warning(self, msg): - self.__messages_mutex.acquire() - print 'TUXUsbInterface [WARNING] : %s' % msg - self.__messages_mutex.release() - - -def frame_CallBack(data): - print 'packet number :', data[3] - -def dongle_remove_CallBack(): - print 'Dongle is removed !' - -ti = TUXUsbInterface() -ti.set_frame_CallBack(frame_CallBack) -ti.set_dongle_remove_CallBack(dongle_remove_CallBack) -ti.set_debug(True) -ti.start() -time.sleep(5) -ti.write() -ti.stop() |
From: remi <c2m...@c2...> - 2007-12-14 09:19:11
|
Author: remi Date: 2007-12-14 10:19:09 +0100 (Fri, 14 Dec 2007) New Revision: 791 Added: tux_lib/ tux_lib/tux_usb/ tux_lib/tux_usb/branches/ tux_lib/tux_usb/tags/ tux_lib/tux_usb/trunk/ tux_lib/tux_usb/trunk/Makefile tux_lib/tux_usb/trunk/python/ tux_lib/tux_usb/trunk/python/_TUX_USB.so tux_lib/tux_usb/trunk/python/test_tux_usb_with_callback.py tux_lib/tux_usb/trunk/python/test_tux_usb_without_callback.py tux_lib/tux_usb/trunk/python/tux_usb.py tux_lib/tux_usb/trunk/test.py tux_lib/tux_usb/trunk/tux_usb.c tux_lib/tux_usb/trunk/tux_usb.h Log: ADD: tux_lib base and tux_usb library Added: tux_lib/tux_usb/trunk/Makefile =================================================================== --- tux_lib/tux_usb/trunk/Makefile (rev 0) +++ tux_lib/tux_usb/trunk/Makefile 2007-12-14 09:19:09 UTC (rev 791) @@ -0,0 +1,4 @@ +make: + gcc -c tux_usb.c -I"/usr/local/include" -I"/usr/include/glib-2.0" -I"/usr/lib/glib-2.0/include" + ld -shared tux_usb.o -o _TUX_USB.so -lusb -lglib-2.0 -lgthread-2.0 + rm tux_usb.o Added: tux_lib/tux_usb/trunk/python/_TUX_USB.so =================================================================== (Binary files differ) Property changes on: tux_lib/tux_usb/trunk/python/_TUX_USB.so ___________________________________________________________________ Name: svn:executable + * Name: svn:mime-type + application/octet-stream Added: tux_lib/tux_usb/trunk/python/test_tux_usb_with_callback.py =================================================================== --- tux_lib/tux_usb/trunk/python/test_tux_usb_with_callback.py (rev 0) +++ tux_lib/tux_usb/trunk/python/test_tux_usb_with_callback.py 2007-12-14 09:19:09 UTC (rev 791) @@ -0,0 +1,22 @@ +from tux_usb import * +import time + +def on_frame(data): + print 'RF status :', data[1],'frame count :', data[3] + +def on_dongle_disconnected(): + print 'dongle disconnected' + +def on_debug_message(level, message): + if level >= DEBUG_LEVEL_ERROR: + print DEBUG_STRINGS[level], ':', message + +TUX_USB_set_frame_callback(on_frame) +TUX_USB_set_disconnect_dongle_callback(on_dongle_disconnected) +TUX_USB_set_debug_msg_callback(on_debug_message) +TUX_USB_init() +if TUX_USB_start(): + time.sleep(1) + TUX_USB_write([0, 0x9A, 6, 25, 0]) + time.sleep(1) + TUX_USB_stop() Added: tux_lib/tux_usb/trunk/python/test_tux_usb_without_callback.py =================================================================== --- tux_lib/tux_usb/trunk/python/test_tux_usb_without_callback.py (rev 0) +++ tux_lib/tux_usb/trunk/python/test_tux_usb_without_callback.py 2007-12-14 09:19:09 UTC (rev 791) @@ -0,0 +1,14 @@ +from tux_usb import * +import time + +def print_frame(data): + print 'RF status :', data[1],'frame count :', data[3] + +TUX_USB_init() +if TUX_USB_capture(): + TUX_USB_write([0, 0x9A, 6, 25, 0]) + for i in range(100): + data = TUX_USB_read() + print_frame(data) + time.sleep(0.1) + TUX_USB_release() Added: tux_lib/tux_usb/trunk/python/tux_usb.py =================================================================== --- tux_lib/tux_usb/trunk/python/tux_usb.py (rev 0) +++ tux_lib/tux_usb/trunk/python/tux_usb.py 2007-12-14 09:19:09 UTC (rev 791) @@ -0,0 +1,193 @@ +# ----------------------------------------------------------------------------- +# Tux Droid - USB Interface +# Copyright (C) 2007 C2ME Sa <rem...@c2...> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. +# ----------------------------------------------------------------------------- + +from ctypes import * + +TUX_SEND_LENGTH = 5 +TUX_RECEIVE_LENGTH = 64 + +DEBUG_LEVEL_FRAME = 0 +DEBUG_LEVEL_DEBUG = 1 +DEBUG_LEVEL_INFO = 2 +DEBUG_LEVEL_WARNING = 3 +DEBUG_LEVEL_ERROR = 4 + +DEBUG_STRINGS = [ + "FRAME", + "DEBUG", + "INFO", + "WARNING ", + "ERROR" +] + +# ---------------------------------------------------------------------------- +# Library import +# ---------------------------------------------------------------------------- +lib = CDLL("./_TUX_USB.so") + +tux_usb_dongle_present = lib.tux_usb_dongle_present +tux_usb_dongle_present.restype = c_uint + +tux_usb_connected = lib.tux_usb_connected +tux_usb_connected.restype = c_uint + +tux_usb_init = lib.tux_usb_init +tux_usb_init.restype = None + +tux_usb_capture = lib.tux_usb_capture +tux_usb_capture.restype = c_uint + +tux_usb_release = lib.tux_usb_release +tux_usb_release.restype = c_uint + +tux_usb_start = lib.tux_usb_start +tux_usb_start.restype = c_uint + +tux_usb_stop = lib.tux_usb_stop +tux_usb_stop.restype = c_uint + +tux_usb_read = lib.tux_usb_read +tux_usb_read.restype = c_uint + +tux_usb_write = lib.tux_usb_write +tux_usb_write.restype = c_uint + +tux_usb_reset = lib.tux_usb_reset +tux_usb_reset.restype = None + +FRAME_CALLBACK = CFUNCTYPE(None, POINTER(c_uint8)) +set_frame_callback = lib.set_frame_callback +set_frame_callback.restype = None +set_frame_callback.argtypes = [FRAME_CALLBACK] + +DONGLE_DISCONNECT_CALLBACK = CFUNCTYPE(None) +set_disconnect_dongle_callback = lib.set_disconnect_dongle_callback +set_disconnect_dongle_callback.restype = None +set_disconnect_dongle_callback.argtypes = [DONGLE_DISCONNECT_CALLBACK] + +DEBUG_MSG_CALLBACK = CFUNCTYPE(None, c_int, c_char_p) +set_debug_msg_callback = lib.set_debug_msg_callback +set_debug_msg_callback.restype = None +set_debug_msg_callback.argtypes = [DEBUG_MSG_CALLBACK] + +# ---------------------------------------------------------------------------- +# Library wrapping +# ---------------------------------------------------------------------------- + +# =============================================== +def TUX_USB_dongle_present(): +# =============================================== + if tux_usb_dongle_present() == 0: + return False + else: + return True + +# =============================================== +def TUX_USB_connected(): +# =============================================== + if tux_usb_connected() == 0: + return False + else: + return True + +# =============================================== +def TUX_USB_init(): +# =============================================== + tux_usb_init() + +# =============================================== +def TUX_USB_capture(): +# =============================================== + if tux_usb_capture() == 0: + return False + else: + return True + +# =============================================== +def TUX_USB_release(): +# =============================================== + if tux_usb_release() == 0: + return False + else: + return True + +# =============================================== +def TUX_USB_start(): +# =============================================== + if tux_usb_start() == 0: + return False + else: + return True + +# =============================================== +def TUX_USB_stop(): +# =============================================== + if tux_usb_stop() == 0: + return False + else: + return True + +# =============================================== +def TUX_USB_read(): +# =============================================== + t = [0] * 64 + t_char = tuple(t) + data = (c_uint8 * len(t_char))(*t_char) + if tux_usb_read(data) == 0: + return t + else: + res = [] + for i in range(64): + res.append(data[i]) + return res + +# =============================================== +def TUX_USB_write(data = [0, 0x9A, 6, 25, 0]): +# =============================================== + if len(data) != TUX_SEND_LENGTH: + return False + for val in data: + if str(type(val)) != "<type 'int'>": + return False + t_char = tuple(data) + if tux_usb_write((c_uint8 * len(t_char))(*t_char)) == 0: + return False + else: + return True + +# =============================================== +def TUX_USB_reset(): +# =============================================== + tux_usb_reset() + +# =============================================== +def TUX_USB_set_frame_callback(funct): +# =============================================== + set_frame_callback(FRAME_CALLBACK(funct)) + +# =============================================== +def TUX_USB_set_disconnect_dongle_callback(funct): +# =============================================== + set_disconnect_dongle_callback(DONGLE_DISCONNECT_CALLBACK(funct)) + +# =============================================== +def TUX_USB_set_debug_msg_callback(funct): +# =============================================== + set_debug_msg_callback(DEBUG_MSG_CALLBACK(funct)) Added: tux_lib/tux_usb/trunk/test.py =================================================================== --- tux_lib/tux_usb/trunk/test.py (rev 0) +++ tux_lib/tux_usb/trunk/test.py 2007-12-14 09:19:09 UTC (rev 791) @@ -0,0 +1,296 @@ +from ctypes import * +import time +import sys +import threading + +# ---------------------------------------------------------------------------- +# _TUX_USB.so library wrapping +# ---------------------------------------------------------------------------- +lib = CDLL("./_TUX_USB.so") + +usb_check_TuxDroid = lib.usb_check_TuxDroid +usb_check_TuxDroid.restype = c_uint + +usb_capture_TuxDroid = lib.usb_capture_TuxDroid +usb_capture_TuxDroid.restype = c_uint + +usb_write_TuxDroid = lib.usb_write_TuxDroid +usb_write_TuxDroid.restype = c_uint + +usb_read_TuxDroid = lib.usb_read_TuxDroid +usb_read_TuxDroid.restype = c_uint + +usb_close_TuxDroid = lib.usb_close_TuxDroid +usb_close_TuxDroid.restype = c_uint + +get_connected = lib.get_connected +get_connected.restype = c_uint + +set_connected = lib.set_connected +set_connected.restype = None + +library_init = lib.library_init +library_init.restype = None + +start = lib.start +start.restype = None + +stop = lib.stop +stop.restype = None + +FRAME_CALLBACK = CFUNCTYPE(None, POINTER(c_uint8)) +set_frame_callback = lib.set_frame_callback +set_frame_callback.restype = None +set_frame_callback.argtypes = [FRAME_CALLBACK] + +DONGLE_DISCONNECT_CALLBACK = CFUNCTYPE(None) +set_disconnect_dongle_callback = lib.set_disconnect_dongle_callback +set_disconnect_dongle_callback.restype = None +set_disconnect_dongle_callback.argtypes = [DONGLE_DISCONNECT_CALLBACK] + +def test_funct(test): + print test[3] + +def disconnected(): + print 'dongle disconnected' + +set_frame_callback(FRAME_CALLBACK(test_funct)) +set_disconnect_dongle_callback(DONGLE_DISCONNECT_CALLBACK(disconnected)) + +library_init() + +start() + +time.sleep(10) + +stop() +sys.exit(0) + +# ---------------------------------------------------------------------------- +# TUXUsbInterface constants +# ---------------------------------------------------------------------------- +CAPTURE_RETURN_NO_DONGLE = 0 +CAPTURE_RETURN_FIRMWARE_TO_OLD = 1 +CAPTURE_RETURN_DEVICE_NOT_HANDLED = 2 +CAPTURE_RETURN_SUCCESS = 3 +CLOSE_RETURN_INTERFACE_NOT_RELEASED = 0 +CLOSE_RETURN_DEVICE_NOT_CLOSED = 1 +CLOSE_RETURN_SUCCESS = 2 +DATA_WRITE_LENGTH = 5 +READ_LOOP_INTERVAL = 0.1 + +# ---------------------------------------------------------------------------- +# TUXUsbInterface class +# ---------------------------------------------------------------------------- +class TUXUsbInterface(object): + + def __init__(self): + self.__connected = False + self.__connected_mutex = threading.Lock() + self.__on_frame = None + self.__on_dongle_disconnect = None + self.__read_loop_thread = None + self.__debug = False + self.__read_write_mutex = threading.Lock() + self.__CallBack_mutex = threading.Lock() + self.__messages_mutex = threading.Lock() + + def destroy(self): + self.stop() + + def get_connected(self): + self.__connected_mutex.acquire() + connected = self.__connected + self.__connected_mutex.release() + return connected + + def __set_connected(self, value): + self.__connected_mutex.acquire() + self.__connected = value + self.__connected_mutex.release() + + def set_frame_CallBack(self, funct): + self.__CallBack_mutex.acquire() + self.__on_frame = funct + self.__CallBack_mutex.release() + + def __get_frame_CallBack(self): + self.__CallBack_mutex.acquire() + funct = self.__on_frame + self.__CallBack_mutex.release() + return funct + + def set_dongle_remove_CallBack(self, funct): + self.__CallBack_mutex.acquire() + self.__on_dongle_disconnect = funct + self.__CallBack_mutex.release() + + def __get_dongle_remove_CallBack(self): + self.__CallBack_mutex.acquire() + funct = self.__on_dongle_disconnect + self.__CallBack_mutex.release() + return funct + + def set_debug(self, value): + self.__debug = value + + def start(self): + if self.get_connected(): + return False + ret = usb_capture_TuxDroid() + if ret == CAPTURE_RETURN_NO_DONGLE: + self.__print_warning('Dongle not found.') + return False + elif ret == CAPTURE_RETURN_FIRMWARE_TO_OLD: + self.__print_warning('Your dongle firmware is too old.') + return False + elif ret == CAPTURE_RETURN_DEVICE_NOT_HANDLED: + self.__print_warning("Device can't be handled.") + return False + else: + self.__print_debug('The interface is started.') + self.__set_connected(True) + t = threading.Thread(target = self.__read_loop) + t.start() + self.__read_loop_thread = t + time.sleep(0.1) + return True + + def stop(self): + if not self.get_connected(): + return True + self.__set_connected(False) + if self.__read_loop_thread != None: + if self.__read_loop_thread.isAlive(): + self.__read_loop_thread.join() + ret = usb_close_TuxDroid() + if ret == CLOSE_RETURN_INTERFACE_NOT_RELEASED: + self.__print_warning("The interface can't be released.") + return False + elif ret == CLOSE_RETURN_DEVICE_NOT_CLOSED: + self.__print_warning("The device can't be closed.") + return False + else: + self.__print_debug('The interface is stopped.') + return True + + def dongle_present(self): + if usb_check_TuxDroid() == 0: + value = False + self.__connected_mutex.acquire() + self.__connected = value + self.__connected_mutex.release() + else: + value = True + return value + + def write(self, data = [0, 0x9A, 6, 25, 0]): + if not self.get_connected(): + return False + if len(data) != DATA_WRITE_LENGTH: + self.__print_warning("Write : Bad data length.") + return False + for val in data: + if str(type(val)) != "<type 'int'>": + self.__print_warning("Write : Bad data type.") + return False + t_char = tuple(data) + self.__read_write_mutex.acquire() + ret = usb_write_TuxDroid((c_uint8 * len(t_char))(*t_char), DATA_WRITE_LENGTH) + self.__read_write_mutex.release() + if ret != DATA_WRITE_LENGTH: + self.__print_warning("Write : Usb error.") + return False + else: + self.__print_debug('Write ok.') + return True + + def __write(self, data = [0, 0x9A, 6, 25, 0]): + if not self.get_connected(): + return False + if len(data) != DATA_WRITE_LENGTH: + self.__print_warning("Write : Bad data length.") + return False + for val in data: + if str(type(val)) != "<type 'int'>": + self.__print_warning("Write : Bad data type.") + return False + t_char = tuple(data) + ret = usb_write_TuxDroid((c_uint8 * len(t_char))(*t_char), DATA_WRITE_LENGTH) + if ret != DATA_WRITE_LENGTH: + self.__print_warning("Write : Usb error.") + return False + else: + self.__print_debug('Write ok.') + return True + + def __read(self): + t = [0] * 64 + t_char = tuple(t) + data = (c_uint8 * len(t_char))(*t_char) + if not self.get_connected(): + return t + self.__read_write_mutex.acquire() + if not self.__write([1, 1, 0, 0, 0]): + self.__read_write_mutex.release() + return t + ret = usb_read_TuxDroid(data) + self.__read_write_mutex.release() + res = [] + for i in range(64): + res.append(data[i]) + return res + + def __read_loop(self): + time.sleep(0.01) + check_counter = 0 + initial_timeout = time.time() + current_timeout = initial_timeout + while True: + current_timeout += READ_LOOP_INTERVAL + if not self.get_connected(): + self.__print_debug('End of read loop.') + break + if check_counter >= 9: + if not self.dongle_present(): + self.__print_debug('End of read loop.') + if self.__get_dongle_remove_CallBack() != None: + t = threading.Thread(target = self.__get_dongle_remove_CallBack()) + t.start() + break + check_counter = 0 + else: + check_counter += 1 + data = self.__read() + if self.__get_frame_CallBack() != None: + t = threading.Thread(target = self.__get_frame_CallBack(), args = (data, )) + t.start() + while time.time() < current_timeout: + time.sleep(0.005) + + def __print_debug(self, msg): + self.__messages_mutex.acquire() + if self.__debug: + print 'TUXUsbInterface [DEBUG] : %s' % msg + self.__messages_mutex.release() + + def __print_warning(self, msg): + self.__messages_mutex.acquire() + print 'TUXUsbInterface [WARNING] : %s' % msg + self.__messages_mutex.release() + + +def frame_CallBack(data): + print 'packet number :', data[3] + +def dongle_remove_CallBack(): + print 'Dongle is removed !' + +ti = TUXUsbInterface() +ti.set_frame_CallBack(frame_CallBack) +ti.set_dongle_remove_CallBack(dongle_remove_CallBack) +ti.set_debug(True) +ti.start() +time.sleep(5) +ti.write() +ti.stop() Added: tux_lib/tux_usb/trunk/tux_usb.c =================================================================== --- tux_lib/tux_usb/trunk/tux_usb.c (rev 0) +++ tux_lib/tux_usb/trunk/tux_usb.c 2007-12-14 09:19:09 UTC (rev 791) @@ -0,0 +1,428 @@ +/* + * Tux Droid - USB Interface + * Copyright (C) 2007 C2ME Sa <rem...@c2...> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + */ + +/*_____________________ I N C L U D E S_____________________________________*/ +#include <stdio.h> +#include <stdlib.h> +#include <usb.h> +#include <sys/poll.h> +#include <glib.h> +#include <glib-object.h> +#include <sys/time.h> +#include "tux_usb.h" +/*_____________________ V A R I A B L E S __________________________________*/ +usb_dev_handle *tux_handle = NULL; +struct usb_device *tux_device = NULL; +static pthread_mutex_t __connected_mutex; +static pthread_mutex_t __read_write_mutex; +static pthread_mutex_t __callback_mutex; +static int usb_connected = 0; +GThread *read_loop_thread; +GError *error=NULL; +frame_callback_t frame_callback_function; +dongle_disconnect_callback_t dongle_disconnect_function; +msg_callback_t debug_msg_function; +/*_____________________ F U N C T I O N S __________________________________*/ + +void set_debug_msg_callback(msg_callback_t funct) +{ + pthread_mutex_lock(&__callback_mutex); + debug_msg_function = funct; + pthread_mutex_unlock(&__callback_mutex); +} + +void send_debug_msg(int level, char *msg) +{ + if(debug_msg_function) + debug_msg_function(level, msg); +} + +void set_frame_callback(frame_callback_t funct) +{ + pthread_mutex_lock(&__callback_mutex); + frame_callback_function = funct; + pthread_mutex_unlock(&__callback_mutex); +} + +void set_disconnect_dongle_callback(dongle_disconnect_callback_t funct) +{ + pthread_mutex_lock(&__callback_mutex); + dongle_disconnect_function = funct; + pthread_mutex_unlock(&__callback_mutex); +} + +void tux_usb_init(void) +{ + pthread_mutex_init(&__connected_mutex, NULL); + pthread_mutex_init(&__read_write_mutex, NULL); + pthread_mutex_init(&__callback_mutex, NULL); + if(!g_thread_supported()) + { + g_thread_init(NULL); + }else{ + send_debug_msg(DEBUG_LEVEL_ERROR, "G_thread NOT supported"); + } +} + +int tux_usb_connected(void) +{ + int ret = 0; + pthread_mutex_lock(&__connected_mutex); + ret = usb_connected; + pthread_mutex_unlock(&__connected_mutex); + return ret; +} + +void set_connected(int value) +{ + pthread_mutex_lock(&__connected_mutex); + usb_connected = value; + pthread_mutex_unlock(&__connected_mutex); +} + +int tux_usb_dongle_present(void) +{ + struct usb_bus *bus; + struct usb_device *tux_dev; + + usb_init(); + usb_find_busses(); + usb_find_devices(); + + for (bus = usb_busses; bus; bus = bus->next) + for (tux_dev = bus->devices; tux_dev; tux_dev = tux_dev->next) + if (tux_dev->descriptor.idVendor == TUX_VID + && tux_dev->descriptor.idProduct == TUX_PID) + return 1; + + return 0; +} + +struct usb_device *usb_find_TuxDroid(void) +{ + struct usb_bus *bus; + struct usb_device *tux_dev; + + usb_init(); + usb_find_busses(); + usb_find_devices(); + + for (bus = usb_busses; bus; bus = bus->next) + for (tux_dev = bus->devices; tux_dev; tux_dev = tux_dev->next) + if (tux_dev->descriptor.idVendor == TUX_VID + && tux_dev->descriptor.idProduct == TUX_PID) + { + send_debug_msg(DEBUG_LEVEL_DEBUG, "Fux found"); + return tux_dev; + } + send_debug_msg(DEBUG_LEVEL_ERROR, "Fux not found"); + return NULL; +} + +static struct usb_dev_handle *usb_open_TuxDroid(struct usb_device *tux_dev) +{ + usb_dev_handle *tux_hdl; + int error; + + /* Open usb device */ + tux_hdl = usb_open(tux_dev); + + if (!tux_hdl) + { + send_debug_msg(DEBUG_LEVEL_ERROR, "Can't open device"); + return NULL; + } + + /* Setting configuration is normally not necessary as the snd-usb-audio + * will already have that done at this point. But in case we don't have usb + * sound support, it may help to set the configuration. */ + if (usb_set_configuration(tux_hdl, 1) < 0) + { + send_debug_msg(DEBUG_LEVEL_DEBUG, "Couldn't set config 1:\n"\ + " Another module may have claimed an interface "\ + "already, see dmesg|tail."); + } + + /* Claim device interface */ + error = usb_claim_interface(tux_hdl, TUX_INTERFACE); + if (error != 0) + { + /*usb_detach_kernel_driver_np(tux_hdl, TUX_INTERFACE); */ + error = usb_claim_interface(tux_hdl, TUX_INTERFACE); + if (error != 0) + { + send_debug_msg(DEBUG_LEVEL_ERROR, "Can't claim interface"); + return NULL; + } + } + return tux_hdl; +} + +int tux_usb_capture(void) +{ + send_debug_msg(DEBUG_LEVEL_DEBUG, "Capturing USB device"); + + tux_device = usb_find_TuxDroid(); + if (!tux_device) + return 0; + + /* Old firmware should be discarded here */ + if (tux_device->descriptor.bcdDevice < 0x030) + { + send_debug_msg(DEBUG_LEVEL_ERROR, "Can't claim interface"); + return 0; + } + + send_debug_msg(DEBUG_LEVEL_DEBUG, "Fux found on the USB bus"); + + /* Get Device handle */ + tux_handle = usb_open_TuxDroid(tux_device); + if (tux_handle == NULL) + { + send_debug_msg(DEBUG_LEVEL_ERROR, "You must load the daemon in root mode"); + return 0; + } + + send_debug_msg(DEBUG_LEVEL_DEBUG, "Fux USB device opened"); + + set_connected(1); + return 1; +} + +int tux_usb_release(void) +{ + if (usb_release_interface(tux_handle, TUX_INTERFACE) < 0) + { + send_debug_msg(DEBUG_LEVEL_ERROR, "Failed releasing USB interface"); + return 0; + } + + if (usb_close(tux_handle) < 0) + { + send_debug_msg(DEBUG_LEVEL_ERROR, "Failed closing USB device"); + return 0; + } + + set_connected(0); + return 1; +} + +int usb_write_TuxDroid(const void *buf, int size) +{ + return usb_interrupt_write(tux_handle, TUX_WRITE_EP, (char *)buf, size, + TUX_WRITE_TIMEOUT); +} + +int usb_read_TuxDroid(void *buf) +{ + return usb_interrupt_read(tux_handle, TUX_READ_EP, (char *)buf, TUX_RECEIVE_LENGTH, + TUX_READ_TIMEOUT); +} + +int tux_usb_write(const void *buff) +{ + int ret; + char frame_msg[256]; + void *buf2; + unsigned char dest; + unsigned char cmd; + unsigned char param1; + unsigned char param2; + unsigned char param3; + + if (!tux_usb_connected()) + return 0; + + pthread_mutex_lock(&__read_write_mutex); + ret = usb_write_TuxDroid(buff, TUX_SEND_LENGTH); + pthread_mutex_unlock(&__read_write_mutex); + + buf2 = buff; + dest = *(unsigned char *)buf2++; + cmd = *(unsigned char *)buf2++; + param1 = *(unsigned char *)buf2++; + param2 = *(unsigned char *)buf2++; + param3 = *(unsigned char *)buf2++; + sprintf(frame_msg, "WRITE [Dest: 0x%.2x Cmd: 0x%.2x Param1 : 0x%.2x Param2 : 0x%.2x Param3 : 0x%.2x]", + dest, + cmd, + param1, + param2, + param3); + send_debug_msg(DEBUG_LEVEL_DEBUG, frame_msg); + + return 1; +} + +int tux_usb_read(void *buf) +{ + int ret; + char data_send[5] = {1, 1, 0, 0, 0}; + char frame_msg[256]; + void *buf2; + unsigned char rf_state; + unsigned char cmd_state; + unsigned char fc_state; + + if (!tux_usb_connected()) + return 0; + + pthread_mutex_lock(&__read_write_mutex); + ret = usb_write_TuxDroid(data_send, TUX_SEND_LENGTH); + if (!ret) + { + pthread_mutex_unlock(&__read_write_mutex); + send_debug_msg(DEBUG_LEVEL_ERROR, "Failed to write on USB device."); + return 0; + } + + ret = usb_read_TuxDroid((char *)buf); + pthread_mutex_unlock(&__read_write_mutex); + if (!ret) + { + send_debug_msg(DEBUG_LEVEL_ERROR, "Failed to read on USB device."); + return 0; + } + buf2 = buf; + buf2++; + rf_state = *(unsigned char *)buf2++; + cmd_state = *(unsigned char *)buf2++; + fc_state = *(unsigned char *)buf2++; + sprintf(frame_msg, "READ [RF_st: %d CMD_st: %d NB_frames : %d idx : %d]", + rf_state, + cmd_state, + fc_state, + ret); + send_debug_msg(DEBUG_LEVEL_FRAME, frame_msg); + return 1; +} + +double get_time(void) +{ + double result; + struct timeval tv; + struct timezone tz; + + gettimeofday(&tv, &tz); + result = ((float)tv.tv_usec / 1000000) + (float)tv.tv_sec; + return result; +} + +void read_usb_loop(void) +{ + int check_counter = 0; + double initial_timeout = 0.0; + double current_timeout = 0.0; + unsigned char data[64] = { [0 ... 63] = 0 }; + + initial_timeout = get_time(); + current_timeout = initial_timeout; + + while (1) + { + current_timeout += TUX_READ_LOOP_INTERVAL; + + if (!tux_usb_connected()) + break; + + if (check_counter >= 9) + { + if (!tux_usb_dongle_present()) + { + set_connected(0); + tux_usb_release(); + // Disconnect CallBack + send_debug_msg(DEBUG_LEVEL_WARNING, "Fux is disconnected"); + pthread_mutex_lock(&__callback_mutex); + if (dongle_disconnect_function) + dongle_disconnect_function(); + pthread_mutex_unlock(&__callback_mutex); + break; + } + check_counter = 0; + }else{ + check_counter++; + } + + tux_usb_read(data); + // Frame CallBack + pthread_mutex_lock(&__callback_mutex); + if (frame_callback_function) + frame_callback_function(data); + pthread_mutex_unlock(&__callback_mutex); + + while (get_time() < current_timeout) + usleep(1000); + } + + send_debug_msg(DEBUG_LEVEL_DEBUG, "End of read loop"); +} + +void start_loop(void) +{ + if ((read_loop_thread = g_thread_create((GThreadFunc)read_usb_loop, NULL, TRUE, &error)) == NULL ) + { + send_debug_msg(DEBUG_LEVEL_ERROR, "Thread creation failed. Read loop can't start"); + } +} + +int tux_usb_start(void) +{ + if (tux_usb_connected()) + { + send_debug_msg(DEBUG_LEVEL_INFO, "Tux usb is already started"); + return 0; + } + + if (!tux_usb_capture()) + { + send_debug_msg(DEBUG_LEVEL_INFO, "Tux usb can't start"); + return 0; + } + + start_loop(); + usleep(100000); + send_debug_msg(DEBUG_LEVEL_INFO, "Tux usb start"); + return 1; +} + +int tux_usb_stop(void) +{ + if (!tux_usb_connected()) + return 1; + + set_connected(0); + + usleep(500000); + + if (!tux_usb_release()) + { + send_debug_msg(DEBUG_LEVEL_INFO, "Tux usb can't stop"); + return 0; + } + + send_debug_msg(DEBUG_LEVEL_INFO, "Tux usb stop"); + return 1; +} + +void tux_usb_reset(void) +{ + usb_reset(tux_handle); +} Added: tux_lib/tux_usb/trunk/tux_usb.h =================================================================== --- tux_lib/tux_usb/trunk/tux_usb.h (rev 0) +++ tux_lib/tux_usb/trunk/tux_usb.h 2007-12-14 09:19:09 UTC (rev 791) @@ -0,0 +1,61 @@ +/* + * Tux Droid - USB Interface + * Copyright (C) 2007 C2ME Sa <rem...@c2...> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + */ + +/*_____________________ D E F I N E S ______________________________________*/ +#define TUX_PID 0xFF07 +#define TUX_VID 0x03EB +#define TUX_INTERFACE 0x03 +#define TUX_SEND_LENGTH 0x05 +#define TUX_RECEIVE_LENGTH 64 +#define TUX_WRITE_EP 0x05 +#define TUX_READ_EP 0x84 +#define TUX_WRITE_TIMEOUT 1000 +#define TUX_READ_TIMEOUT 1000 +#define TUX_READ_LOOP_INTERVAL 0.1 +/*Debug level messages*/ +#define DEBUG_LEVEL_FRAME 0 +#define DEBUG_LEVEL_DEBUG 1 +#define DEBUG_LEVEL_INFO 2 +#define DEBUG_LEVEL_WARNING 3 +#define DEBUG_LEVEL_ERROR 4 +/*_____________________ T Y P E _ D E F ____________________________________*/ +typedef void(*dongle_disconnect_callback_t)(void); +typedef void(*frame_callback_t)(char *data); +typedef void(*msg_callback_t)(int, char *data); +/*_____________________ F U N C T I O N S __________________________________*/ +/* Library initialisation */ +extern void tux_usb_init(void); +/* Device capture and release */ +extern int tux_usb_capture(void); +extern int tux_usb_release(void); +/* Callback set*/ +extern void set_frame_callback(frame_callback_t funct); +extern void set_disconnect_dongle_callback(dongle_disconnect_callback_t funct); +extern void set_debug_msg_callback(msg_callback_t funct); +/* Read and write */ +extern int tux_usb_write(const void *buff); +extern int tux_usb_read(void *buf); +/* Frame callback loop (automatic capture and release of device) */ +extern int tux_usb_start(void); +extern int tux_usb_stop(void); +/* Misc */ +extern int tux_usb_connected(void); +extern int tux_usb_dongle_present(void); +extern void tux_usb_reset(void); |
Author: remi Date: 2007-12-14 09:27:46 +0100 (Fri, 14 Dec 2007) New Revision: 790 Added: software/gadgets/scene_editor/ software/gadgets/scene_editor/branches/ software/gadgets/scene_editor/tags/ software/gadgets/scene_editor/trunk/ software/gadgets/scene_editor/trunk/SceneEditor.tgf software/gadgets/scene_editor/trunk/SceneEditor/ software/gadgets/scene_editor/trunk/SceneEditor/Data/ software/gadgets/scene_editor/trunk/SceneEditor/Data/Behaviors/ software/gadgets/scene_editor/trunk/SceneEditor/Data/Filters/ software/gadgets/scene_editor/trunk/SceneEditor/Data/template.tsc software/gadgets/scene_editor/trunk/SceneEditor/Pictures/ software/gadgets/scene_editor/trunk/SceneEditor/Pictures/Icons/ software/gadgets/scene_editor/trunk/SceneEditor/Pictures/Icons/gadget.png software/gadgets/scene_editor/trunk/SceneEditor/Scripts/ software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/ software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/GUI/ software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/GUI/conf/ software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/GUI/conf/other.glade software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/GUI/conf/other.pyp software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/GUI/scene_parameters/ software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/GUI/scene_parameters/other.glade software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/GUI/scene_parameters/other.pyp software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/GUI/widget/ software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/GUI/widget/other.glade software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/GUI/widget/other.pyp software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/init.pyp software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/main.pyp software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/notify.pyp software/gadgets/scene_editor/trunk/SceneEditor/Strings/ software/gadgets/scene_editor/trunk/SceneEditor/Strings/fr_ALL.xml software/gadgets/scene_editor/trunk/SceneEditor/about.xml software/gadgets/scene_editor/trunk/SceneEditor/parts.xml software/gadgets/scene_editor/trunk/SceneEditor/settings.xml software/gadgets/scene_editor/trunk/SceneEditor/strings.xml Log: ADD: Scene editor gadget Added: software/gadgets/scene_editor/trunk/SceneEditor/Data/template.tsc =================================================================== (Binary files differ) Property changes on: software/gadgets/scene_editor/trunk/SceneEditor/Data/template.tsc ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software/gadgets/scene_editor/trunk/SceneEditor/Pictures/Icons/gadget.png =================================================================== (Binary files differ) Property changes on: software/gadgets/scene_editor/trunk/SceneEditor/Pictures/Icons/gadget.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/GUI/conf/other.glade =================================================================== --- software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/GUI/conf/other.glade (rev 0) +++ software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/GUI/conf/other.glade 2007-12-14 08:27:46 UTC (rev 790) @@ -0,0 +1,409 @@ +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> + +<glade-interface> + +<widget class="GtkWindow" id="window1"> + <property name="height_request">159</property> + <property name="visible">True</property> + <property name="title" translatable="yes">Parameters</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</property> + <property name="resizable">False</property> + <property name="destroy_with_parent">False</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> + + <child> + <widget class="GtkVBox" id="vbox1"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkFrame" id="frame4"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_IN</property> + + <child> + <widget class="GtkAlignment" id="alignment7"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkFixed" id="fixed5"> + <property name="visible">True</property> + + <child> + <widget class="GtkLabel" id="label_remote"> + <property name="width_request">336</property> + <property name="height_request">16</property> + <property name="visible">True</property> + <property name="label" translatable="yes">Current : None</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">True</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="x">0</property> + <property name="y">0</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button_remote"> + <property name="width_request">62</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Set</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_button_remote_clicked" last_modification_time="Sat, 22 Sep 2007 00:55:36 GMT"/> + </widget> + <packing> + <property name="x">256</property> + <property name="y">0</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label11"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Remote</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="frame5"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_IN</property> + + <child> + <widget class="GtkAlignment" id="alignment8"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkFixed" id="fixed6"> + <property name="visible">True</property> + + <child> + <widget class="GtkSpinButton" id="delay_spinbutton"> + <property name="width_request">120</property> + <property name="height_request">24</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="climb_rate">1</property> + <property name="digits">0</property> + <property name="numeric">False</property> + <property name="update_policy">GTK_UPDATE_ALWAYS</property> + <property name="snap_to_ticks">False</property> + <property name="wrap">False</property> + <property name="adjustment">1 1 3600 1 10 10</property> + </widget> + <packing> + <property name="x">88</property> + <property name="y">0</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label13"> + <property name="width_request">336</property> + <property name="height_request">16</property> + <property name="visible">True</property> + <property name="label" translatable="yes">Delay (sec) :</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">True</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="x">0</property> + <property name="y">0</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label12"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Updates</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkFixed" id="fixed3"> + <property name="visible">True</property> + + <child> + <widget class="GtkButton" id="button2"> + <property name="width_request">96</property> + <property name="height_request">32</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_accept_clicked" last_modification_time="Wed, 11 Jul 2007 19:53:32 GMT"/> + + <child> + <widget class="GtkAlignment" id="alignment4"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox2"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image2"> + <property name="visible">True</property> + <property name="stock">gtk-apply</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label5"> + <property name="visible">True</property> + <property name="label" translatable="yes">Accept</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="x">256</property> + <property name="y">0</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button3"> + <property name="width_request">96</property> + <property name="height_request">32</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_cancel_clicked" last_modification_time="Thu, 09 Aug 2007 13:50:03 GMT"/> + + <child> + <widget class="GtkAlignment" id="alignment5"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox3"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image3"> + <property name="visible">True</property> + <property name="stock">gtk-cancel</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label6"> + <property name="visible">True</property> + <property name="label" translatable="yes">Cancel</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="x">152</property> + <property name="y">0</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + </child> +</widget> + +</glade-interface> Added: software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/GUI/conf/other.pyp =================================================================== --- software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/GUI/conf/other.pyp (rev 0) +++ software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/GUI/conf/other.pyp 2007-12-14 08:27:46 UTC (rev 790) @@ -0,0 +1,86 @@ +bindtextdomain("params", "") + +class Window(SimpleGladeApp): + + def __init__(self, + path=_me.get_path('root') + '/Scripts/Python/GUI/conf/other.glade', + root="window1", + domain="params", **kwargs): + """ + Constructor + """ + SimpleGladeApp.__init__(self, path, root, domain, **kwargs) + + def new(self): + """ + On new window + """ + self.updates_commons() + self.updates_specifics() + + def updates_commons(self): + """ + Updates common widgets + """ + # Window title + txt = "%s : %s" % (_me.string('name_to_read'), + _me.string('gui_conf_window_title')) + self.get_widget("window1").set_title(txt) + + # Remote Frame + txt = _me.string('gui_conf_remote_title') + self.get_widget("label11").set_text(txt) + + txt = "%s : None" % _me.string('gui_conf_current_bind_lb') + self.get_widget("label_remote").set_text(txt) + + 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) + + txt = _me.string('gui_conf_accept_bt') + self.get_widget("label5").set_text(txt) + + def updates_specifics(self): + """ + Updates specific widgets + """ + pass + + def on_button_remote_clicked(self, widget, *args): + """ + On button 'set' remote clicked + """ + def remote_set_caption(): + tux.sys.wait(0.1) + gadgets['Manager'].gui('remote').window.set_captions(gadgets[_me.get_name()]) + if gadgets.has_key('Manager'): + if not gadgets['Manager'].gui('remote').showed(): + gadgets['Manager'].gui('remote').show() + thread.start_new_thread(remote_set_caption, ()) + + def on_accept_clicked(self, widget, *args): + """ + 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): + """ + On button 'cancel' clicked + """ + self.get_widget("window1").destroy() Added: software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/GUI/scene_parameters/other.glade =================================================================== --- software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/GUI/scene_parameters/other.glade (rev 0) +++ software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/GUI/scene_parameters/other.glade 2007-12-14 08:27:46 UTC (rev 790) @@ -0,0 +1,658 @@ +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> + +<glade-interface> + +<widget class="GtkWindow" id="window1"> + <property name="width_request">366</property> + <property name="visible">True</property> + <property name="title" translatable="yes">Widget</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</property> + <property name="resizable">False</property> + <property name="destroy_with_parent">False</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> + <signal name="destroy" handler="on_window1_destroy" last_modification_time="Thu, 13 Dec 2007 13:39:41 GMT"/> + + <child> + <widget class="GtkVBox" id="vbox2"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkTable" id="table1"> + <property name="visible">True</property> + <property name="n_rows">8</property> + <property name="n_columns">2</property> + <property name="homogeneous">False</property> + <property name="row_spacing">0</property> + <property name="column_spacing">0</property> + + <child> + <widget class="GtkLabel" id="label5"> + <property name="visible">True</property> + <property name="label" translatable="yes">Name :</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label6"> + <property name="visible">True</property> + <property name="label" translatable="yes">Author :</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label7"> + <property name="visible">True</property> + <property name="label" translatable="yes">Version :</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label8"> + <property name="visible">True</property> + <property name="label" translatable="yes">Keywords :</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label9"> + <property name="visible">True</property> + <property name="label" translatable="yes">Category :</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label10"> + <property name="width_request">152</property> + <property name="visible">True</property> + <property name="label" translatable="yes">Sub-category :</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label11"> + <property name="visible">True</property> + <property name="label" translatable="yes">Length :</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">6</property> + <property name="bottom_attach">7</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label12"> + <property name="height_request">26</property> + <property name="visible">True</property> + <property name="label" translatable="yes">Description :</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">7</property> + <property name="bottom_attach">8</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="entry1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="entry2"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="entry3"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="entry4"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="entry5"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="entry6"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="entry7"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">False</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">6</property> + <property name="bottom_attach">7</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkFixed" id="fixed1"> + <property name="visible">True</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">7</property> + <property name="bottom_attach">8</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + </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="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property> + <property name="shadow_type">GTK_SHADOW_IN</property> + <property name="window_placement">GTK_CORNER_TOP_LEFT</property> + + <child> + <widget class="GtkTextView" id="textview1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="overwrite">False</property> + <property name="accepts_tab">True</property> + <property name="justification">GTK_JUSTIFY_LEFT</property> + <property name="wrap_mode">GTK_WRAP_NONE</property> + <property name="cursor_visible">True</property> + <property name="pixels_above_lines">0</property> + <property name="pixels_below_lines">0</property> + <property name="pixels_inside_wrap">0</property> + <property name="left_margin">0</property> + <property name="right_margin">0</property> + <property name="indent">0</property> + <property name="text" translatable="yes"></property> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkHBox" id="hbox1"> + <property name="border_width">3</property> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkFixed" id="fixed2"> + <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="GtkButton" id="apply_bt"> + <property name="width_request">120</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_apply_bt_clicked" last_modification_time="Thu, 13 Dec 2007 15:40:06 GMT"/> + + <child> + <widget class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox2"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image1"> + <property name="visible">True</property> + <property name="stock">gtk-apply</property> + <property name="icon_size">1</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label13"> + <property name="visible">True</property> + <property name="label" translatable="yes">Apply</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="cancel_bt"> + <property name="width_request">120</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_cancel_bt_clicked" last_modification_time="Thu, 13 Dec 2007 15:40:00 GMT"/> + + <child> + <widget class="GtkAlignment" id="alignment2"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox3"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image2"> + <property name="visible">True</property> + <property name="stock">gtk-stop</property> + <property name="icon_size">1</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label14"> + <property name="visible">True</property> + <property name="label" translatable="yes">Cancel</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + </child> +</widget> + +</glade-interface> Added: software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/GUI/scene_parameters/other.pyp =================================================================== --- software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/GUI/scene_parameters/other.pyp (rev 0) +++ software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/GUI/scene_parameters/other.pyp 2007-12-14 08:27:46 UTC (rev 790) @@ -0,0 +1,45 @@ +bindtextdomain("params", "") + +class Window(SimpleGladeApp): + + def __init__(self, + path=_me.get_path('root') + '/Scripts/Python/GUI/scene_parameters/other.glade', + root="window1", + domain="params", **kwargs): + SimpleGladeApp.__init__(self, path, root, domain, **kwargs) + + def new(self): + self.get_widget("window1").set_title(_me.string('at_gui_widget_properties1')) + self._scene = _me.get_param('scene') + if self._scene == None: + self.get_widget("window1").destroy() + return + self.get_widget('entry1').set_text(self._scene.name) + self.get_widget('entry2').set_text(self._scene.author) + self.get_widget('entry3').set_text(self._scene.version) + self.get_widget('entry4').set_text(str(self._scene.keywords)) + self.get_widget('entry5').set_text(self._scene.category) + self.get_widget('entry6').set_text(self._scene.sub_category) + self.get_widget('entry7').set_text(str(self._scene.length)) + buff = self.get_widget('textview1').get_buffer() + buff.set_text(self._scene.description) + + def on_window1_destroy(self, widget, *args): + pass + + def on_apply_bt_clicked(self, widget, *args): + if self._scene == None: + return + self._scene.name = self.get_widget('entry1').get_text() + self._scene.author = self.get_widget('entry2').get_text() + self._scene.version = self.get_widget('entry3').get_text() + self._scene.keywords = eval(self.get_widget('entry4').get_text()) + self._scene.category = self.get_widget('entry5').get_text() + self._scene.sub_category = self.get_widget('entry6').get_text() + self._scene.length =float(eval(self.get_widget('entry7').get_text())) + buff = self.get_widget('textview1').get_buffer() + self._scene.description = buff.get_text(*buff.get_bounds()) + self.get_widget("window1").destroy() + + def on_cancel_bt_clicked(self, widget, *args): + self.get_widget("window1").destroy() Added: software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/GUI/widget/other.glade =================================================================== --- software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/GUI/widget/other.glade (rev 0) +++ software/gadgets/scene_editor/trunk/SceneEditor/Scripts/Python/GUI/widget/other.glade 2007-12-14 08:27:46 UTC (rev 790) @@ -0,0 +1,2695 @@ +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> + +<glade-interface> + +<widget class="GtkWindow" id="window1"> + <property name="visible">True</property> + <property name="title" translatable="yes">Widget</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</property> + <property name="resizable">False</property> + <property name="destroy_with_parent">False</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> + <signal name="destroy" handler="on_window1_destroy" last_modification_time="Thu, 29 Nov 2007 09:22:50 GMT"/> + + <child> + <widget class="GtkVBox" id="vbox1"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkMenuBar" id="menubar1"> + <property name="visible">True</property> + <property name="pack_direction">GTK_PACK_DIRECTION_LTR</property> + <property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property> + + <child> + <widget class="GtkMenuItem" id="menuitem1"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Fichier</property> + <property name="use_underline">True</property> + + <child> + <widget class="GtkMenu" id="menuitem1_menu"> + + <child> + <widget class="GtkImageMenuItem" id="nouveau1"> + <property name="visible">True</property> + <property name="label">gtk-new</property> + <property name="use_stock">True</property> + <signal name="activate" handler="on_nouveau1_activate" last_modification_time="Mon, 03 Dec 2007 11:05:46 GMT"/> + </widget> + </child> + + <child> + <widget class="GtkImageMenuItem" id="ouvrir1"> + <property name="visible">True</property> + <property name="label">gtk-open</property> + <property name="use_stock">True</property> + <signal name="activate" handler="on_ouvrir1_activate" last_modification_time="Mon, 03 Dec 2007 11:05:46 GMT"/> + </widget> + </child> + + <child> + <widget class="GtkImageMenuItem" id="enregistrer1"> + <property name="visible">True</property> + <property name="label">gtk-save</property> + <property name="use_stock">True</property> + <signal name="activate" handler="on_enregistrer1_activate" last_modification_time="Mon, 03 Dec 2007 11:05:46 GMT"/> + </widget> + </child> + + <child> + <widget class="GtkImageMenuItem" id="enregistrer_sous1"> + <property name="visible">True</property> + <property name="label">gtk-save-as</property> + <property name="use_stock">True</property> + <signal name="activate" handler="on_enregistrer_sous1_activate" last_modification_time="Mon, 03 Dec 2007 11:05:46 GMT"/> + </widget> + </child> + + <child> + <widget class="GtkSeparatorMenuItem" id="séparateur1"> + <property name="visible">True</property> + </widget> + </child> + + <child> + <widget class="GtkImageMenuItem" id="properties1"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Propriétés</property> + <property name="use_underline">True</property> + <signal name="activate" handler="on_properties1_activate" last_modification_time="Mon, 03 Dec 2007 15:29:54 GMT"/> + + <child internal-child="image"> + <widget class="GtkImage" id="image12"> + <property name="visible">True</property> + <property name="stock">gtk-properties</property> + <property name="icon_size">1</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkSeparatorMenuItem" id="separatormenuitem1"> + <property name="visible">True</property> + </widget> + </child> + + <child> + <widget class="GtkImageMenuItem" id="quitter1"> + <property name="visible">True</property> + <property name="label">gtk-quit</property> + <property name="use_stock">True</property> + <signal name="activate" handler="on_quitter1_activate" last_modification_time="Mon, 03 Dec 2007 11:05:46 GMT"/> + </widget> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkMenuItem" id="help1"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Aide</property> + <property name="use_underline">True</property> + <signal name="activate" handler="on_help1_activate" last_modification_time="Mon, 03 Dec 2007 15:29:29 GMT"/> + + <child> + <widget class="GtkMenu" id="help1_menu"> + + <child> + <widget class="GtkImageMenuItem" id="a_propos1"> + <property name="visible">True</property> + <property name="label" translatable="yes">A _propos</property> + <property name="use_underline">True</property> + <signal name="activate" handler="on_a_propos1_activate" last_modification_time="Mon, 03 Dec 2007 13:38:22 GMT"/> + + <child internal-child="image"> + <widget class="GtkImage" id="image13"> + <property name="visible">True</property> + <property name="stock">gtk-about</property> + <property name="icon_size">1</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + </child> + </widget> + </child> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkFixed" id="fixed2"> + <property name="width_request">640</property> + <property name="height_request">300</property> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkHBox" id="hbox1"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkVBox" id="vbox4"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkFrame" id="frame3"> + <property name="border_width">5</property> + <property name="width_request">140</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_IN</property> + + <child> + <widget class="GtkAlignment" id="alignment9"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkVBox" id="vbox5"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <pr... [truncated message content] |
From: Paul_R <c2m...@c2...> - 2007-12-13 12:00:13
|
Author: Paul_R Date: 2007-12-13 11:59:55 +0100 (Thu, 13 Dec 2007) New Revision: 789 Modified: software/gadgets/sound_monitor/trunk/audio_monitor.tgf software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/GUI/widget/other.pyp software/gadgets/sound_monitor/trunk/audio_monitor/about.xml software/gadgets/sound_monitor/trunk/audio_monitor/settings.xml Log: * Minor changes on the treeview Modified: software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/GUI/widget/other.pyp =================================================================== --- software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/GUI/widget/other.pyp 2007-12-13 10:23:02 UTC (rev 788) +++ software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/GUI/widget/other.pyp 2007-12-13 10:59:55 UTC (rev 789) @@ -157,7 +157,7 @@ def show_gadget_popup(self, status_icon, button, activate_time): menu = gtk.Menu() - item = gtk.CheckMenuItem(_me.string('Play')) + item = gtk.MenuItem(_me.string('Play')) item.connect("activate", self.read_sound) menu.append(item) Modified: software/gadgets/sound_monitor/trunk/audio_monitor/about.xml =================================================================== --- software/gadgets/sound_monitor/trunk/audio_monitor/about.xml 2007-12-13 10:23:02 UTC (rev 788) +++ software/gadgets/sound_monitor/trunk/audio_monitor/about.xml 2007-12-13 10:59:55 UTC (rev 789) @@ -1,8 +1,8 @@ <?xml version='1.0' encoding='UTF-8'?> <about> + <gadget_author type='str'>Paul Rathgeb</gadget_author> + <gadget_version type='str'>0.0.1</gadget_version> <gadget_name type='str'>sound_monitor</gadget_name> - <gadget_author type='str'>Paul Rathgeb</gadget_author> <gadget_description type='str'> </gadget_description> - <gadget_version type='str'>0.0.1</gadget_version> </about> Modified: software/gadgets/sound_monitor/trunk/audio_monitor/settings.xml =================================================================== --- software/gadgets/sound_monitor/trunk/audio_monitor/settings.xml 2007-12-13 10:23:02 UTC (rev 788) +++ software/gadgets/sound_monitor/trunk/audio_monitor/settings.xml 2007-12-13 10:59:55 UTC (rev 789) @@ -1,24 +1,24 @@ <?xml version='1.0' encoding='UTF-8'?> <settings> <parameters> - <chkDog type='bool'>True</chkDog> + <dogBehavior type='str'> + </dogBehavior> + <Sample type='float'>400.0</Sample> <chkDogBehavior type='bool'>False</chkDogBehavior> - <BehaviorPath type='str'> - </BehaviorPath> <SpyThreshold type='int'>30</SpyThreshold> <Standby type='bool'>False</Standby> + <MainScript type='str'>None</MainScript> <chkSpy type='bool'>False</chkSpy> - <MainScript type='str'>None</MainScript> - <Sample type='float'>400.0</Sample> - <chkDogDefault type='bool'>False</chkDogDefault> + <chkDog type='bool'>True</chkDog> + <Threshold type='float'>30.0</Threshold> <dict/> <chkSpyRecord type='bool'>False</chkSpyRecord> - <Threshold type='float'>30.0</Threshold> + <chkDogDefault type='bool'>False</chkDogDefault> <Path type='str'>/tmp</Path> <DogThreshold type='int'>30</DogThreshold> <Startup type='bool'>False</Startup> - <dogBehavior type='str'> - </dogBehavior> + <BehaviorPath type='str'> + </BehaviorPath> </parameters> <general> <have_settings_part type='bool'>True</have_settings_part> @@ -31,7 +31,7 @@ </conf> </gui_state> <language type='str'>en_US</language> - <notified type='bool'>True</notified> + <notified type='bool'>False</notified> <notify_delay type='int'>1</notify_delay> <framework_version type='str'>0.0.0</framework_version> <menu_active type='bool'>True</menu_active> Modified: software/gadgets/sound_monitor/trunk/audio_monitor.tgf =================================================================== (Binary files differ) |
From: Paul_R <c2m...@c2...> - 2007-12-13 10:53:33
|
Author: Paul_R Date: 2007-12-13 11:23:02 +0100 (Thu, 13 Dec 2007) New Revision: 788 Modified: software/gadgets/sound_monitor/trunk/audio_monitor.tgf software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/GUI/widget/other.pyp software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/notify.pyp software/gadgets/sound_monitor/trunk/audio_monitor/about.xml software/gadgets/sound_monitor/trunk/audio_monitor/settings.xml Log: * Improved the notifiy actuator function * Fixed a bug which display a **critical** error in terminal Modified: software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/GUI/widget/other.pyp =================================================================== --- software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/GUI/widget/other.pyp 2007-12-12 15:21:16 UTC (rev 787) +++ software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/GUI/widget/other.pyp 2007-12-13 10:23:02 UTC (rev 788) @@ -24,8 +24,10 @@ def new(self): self.get_widget('scrolledwindow1').set_tooltip_text(_me.string('RightClic')) if _me.get_param('dogBehavior') != None: - self.get_widget('fileDogBehavior').select_filename(_me.get_param('dogBehavior')) - self.get_widget('fileDogBehavior').show() + if os.path.exists(_me.get_param('dogBehavior')): + self.get_widget('fileDogBehavior').select_filename(_me.get_param('dogBehavior')) + self.get_widget('fileDogBehavior').show() + orange = gtk.gdk.Color(65535, 45874, 0, 1) self.get_widget('draw1').modify_bg(gtk.STATE_NORMAL, orange) pink = gtk.gdk.Color(65535, 0, 45874, 1) Modified: software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/notify.pyp =================================================================== --- software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/notify.pyp 2007-12-12 15:21:16 UTC (rev 787) +++ software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/notify.pyp 2007-12-13 10:23:02 UTC (rev 788) @@ -12,11 +12,18 @@ def notify_actuator(): measure = _me.get_param('measure') if _me.get_param('chkDogDefault') == False: - tux.cmd.wings_on_free(10) + tux.cmd.wings_on_free(8) for i in range(5): tux.cmd.sound_play(14) - tux.sys.wait(0.7) - tux.sys.wait(0.5) + try: + while tux.status.sound_play[1] != 0: + tux.sys.wait(0.1) + except: + while tux.status.flash_status()[0] != 0: + tux.sys.wait(0.1) + tux.sys.wait(1) + print 'end' + else: path = _me.get_param('dogBehavior') path = path.replace('%20', ' ') Modified: software/gadgets/sound_monitor/trunk/audio_monitor/about.xml =================================================================== --- software/gadgets/sound_monitor/trunk/audio_monitor/about.xml 2007-12-12 15:21:16 UTC (rev 787) +++ software/gadgets/sound_monitor/trunk/audio_monitor/about.xml 2007-12-13 10:23:02 UTC (rev 788) @@ -1,8 +1,8 @@ <?xml version='1.0' encoding='UTF-8'?> <about> + <gadget_name type='str'>sound_monitor</gadget_name> <gadget_author type='str'>Paul Rathgeb</gadget_author> - <gadget_version type='str'>0.0.1</gadget_version> <gadget_description type='str'> </gadget_description> - <gadget_name type='str'>sound_monitor</gadget_name> + <gadget_version type='str'>0.0.1</gadget_version> </about> Modified: software/gadgets/sound_monitor/trunk/audio_monitor/settings.xml =================================================================== --- software/gadgets/sound_monitor/trunk/audio_monitor/settings.xml 2007-12-12 15:21:16 UTC (rev 787) +++ software/gadgets/sound_monitor/trunk/audio_monitor/settings.xml 2007-12-13 10:23:02 UTC (rev 788) @@ -1,24 +1,24 @@ <?xml version='1.0' encoding='UTF-8'?> <settings> <parameters> - <dogBehavior type='str'> - </dogBehavior> - <Sample type='float'>400.0</Sample> + <chkDog type='bool'>True</chkDog> <chkDogBehavior type='bool'>False</chkDogBehavior> + <BehaviorPath type='str'> + </BehaviorPath> <SpyThreshold type='int'>30</SpyThreshold> <Standby type='bool'>False</Standby> + <chkSpy type='bool'>False</chkSpy> <MainScript type='str'>None</MainScript> - <chkSpy type='bool'>False</chkSpy> - <chkDog type='bool'>True</chkDog> - <Threshold type='float'>30.0</Threshold> + <Sample type='float'>400.0</Sample> + <chkDogDefault type='bool'>False</chkDogDefault> <dict/> <chkSpyRecord type='bool'>False</chkSpyRecord> - <chkDogDefault type='bool'>False</chkDogDefault> + <Threshold type='float'>30.0</Threshold> <Path type='str'>/tmp</Path> <DogThreshold type='int'>30</DogThreshold> <Startup type='bool'>False</Startup> - <BehaviorPath type='str'> - </BehaviorPath> + <dogBehavior type='str'> + </dogBehavior> </parameters> <general> <have_settings_part type='bool'>True</have_settings_part> @@ -31,7 +31,7 @@ </conf> </gui_state> <language type='str'>en_US</language> - <notified type='bool'>False</notified> + <notified type='bool'>True</notified> <notify_delay type='int'>1</notify_delay> <framework_version type='str'>0.0.0</framework_version> <menu_active type='bool'>True</menu_active> Modified: software/gadgets/sound_monitor/trunk/audio_monitor.tgf =================================================================== (Binary files differ) |
From: Paul_R <c2m...@c2...> - 2007-12-12 15:43:01
|
Author: Paul_R Date: 2007-12-12 16:18:32 +0100 (Wed, 12 Dec 2007) New Revision: 786 Modified: software/gadgets/sound_monitor/trunk/audio_monitor.tgf software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/GUI/widget/other.pyp software/gadgets/sound_monitor/trunk/audio_monitor/about.xml software/gadgets/sound_monitor/trunk/audio_monitor/settings.xml Log: * Fixed a bug in the records paths Modified: software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/GUI/widget/other.pyp =================================================================== --- software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/GUI/widget/other.pyp 2007-12-12 14:23:02 UTC (rev 785) +++ software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/GUI/widget/other.pyp 2007-12-12 15:18:32 UTC (rev 786) @@ -121,11 +121,12 @@ if _me.get_param('Path') != None: if os.path.exists(_me.get_param('Path')): self.measure.capture_path = _me.get_param('Path') + ''' else: user = commands.getoutput('echo $USER') self.measure.capture_path = '/home/%s'%user _me.set_param('Path', 'home/%s'%user) - + ''' Modified: software/gadgets/sound_monitor/trunk/audio_monitor/about.xml =================================================================== --- software/gadgets/sound_monitor/trunk/audio_monitor/about.xml 2007-12-12 14:23:02 UTC (rev 785) +++ software/gadgets/sound_monitor/trunk/audio_monitor/about.xml 2007-12-12 15:18:32 UTC (rev 786) @@ -1,8 +1,8 @@ <?xml version='1.0' encoding='UTF-8'?> <about> + <gadget_author type='str'>Paul Rathgeb</gadget_author> + <gadget_version type='str'>0.0.1</gadget_version> <gadget_description type='str'> </gadget_description> - <gadget_author type='str'>Paul Rathgeb</gadget_author> <gadget_name type='str'>sound_monitor</gadget_name> - <gadget_version type='str'>0.0.1</gadget_version> </about> Modified: software/gadgets/sound_monitor/trunk/audio_monitor/settings.xml =================================================================== --- software/gadgets/sound_monitor/trunk/audio_monitor/settings.xml 2007-12-12 14:23:02 UTC (rev 785) +++ software/gadgets/sound_monitor/trunk/audio_monitor/settings.xml 2007-12-12 15:18:32 UTC (rev 786) @@ -1,24 +1,24 @@ <?xml version='1.0' encoding='UTF-8'?> <settings> <parameters> - <chkDog type='bool'>True</chkDog> + <dogBehavior type='str'> + </dogBehavior> + <Sample type='float'>400.0</Sample> <chkDogBehavior type='bool'>False</chkDogBehavior> - <BehaviorPath type='str'> - </BehaviorPath> <SpyThreshold type='int'>30</SpyThreshold> <Standby type='bool'>False</Standby> + <MainScript type='str'>None</MainScript> <chkSpy type='bool'>False</chkSpy> - <MainScript type='str'>None</MainScript> - <Sample type='float'>400.0</Sample> - <chkDogDefault type='bool'>False</chkDogDefault> + <chkDog type='bool'>True</chkDog> + <Threshold type='float'>30.0</Threshold> <dict/> <chkSpyRecord type='bool'>False</chkSpyRecord> - <Threshold type='float'>30.0</Threshold> + <chkDogDefault type='bool'>False</chkDogDefault> <Path type='str'>/tmp</Path> <DogThreshold type='int'>30</DogThreshold> <Startup type='bool'>False</Startup> - <dogBehavior type='str'> - </dogBehavior> + <BehaviorPath type='str'> + </BehaviorPath> </parameters> <general> <have_settings_part type='bool'>True</have_settings_part> Modified: software/gadgets/sound_monitor/trunk/audio_monitor.tgf =================================================================== (Binary files differ) |
From: jerome <c2m...@c2...> - 2007-12-12 15:21:23
|
Author: jerome Date: 2007-12-12 16:21:16 +0100 (Wed, 12 Dec 2007) New Revision: 787 Added: software/gadgets/rss_feeder/trunk/rss_feeder/Data/ software/gadgets/rss_feeder/trunk/rss_feeder/Pictures/ software/gadgets/rss_feeder/trunk/rss_feeder/Scripts/ software/gadgets/rss_feeder/trunk/rss_feeder/Sounds/ software/gadgets/rss_feeder/trunk/rss_feeder/Strings/ software/gadgets/rss_feeder/trunk/rss_feeder/about.xml software/gadgets/rss_feeder/trunk/rss_feeder/parts.xml software/gadgets/rss_feeder/trunk/rss_feeder/settings.xml software/gadgets/rss_feeder/trunk/rss_feeder/strings.xml Modified: software/gadgets/rss_feeder/trunk/rss_feeder.tgf Log: * Fixed some bugs : Problem when put the gadget into the manager for the first time and befora have restarted the manager. * Changed the notify_actuator * Changed the way to get the names of differents feeds. Added: software/gadgets/rss_feeder/trunk/rss_feeder/about.xml =================================================================== --- software/gadgets/rss_feeder/trunk/rss_feeder/about.xml (rev 0) +++ software/gadgets/rss_feeder/trunk/rss_feeder/about.xml 2007-12-12 15:21:16 UTC (rev 787) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<about> + <gadget_author type='str'>jer...@ky...</gadget_author> + <gadget_version type='str'>0.0.1</gadget_version> + <gadget_name type='str'>rss_feeder</gadget_name> + <gadget_description type='str'>An rss feeder for tux droid.</gadget_description> +</about> Added: software/gadgets/rss_feeder/trunk/rss_feeder/parts.xml =================================================================== --- software/gadgets/rss_feeder/trunk/rss_feeder/parts.xml (rev 0) +++ software/gadgets/rss_feeder/trunk/rss_feeder/parts.xml 2007-12-12 15:21:16 UTC (rev 787) @@ -0,0 +1,6 @@ +<?xml version='1.0' encoding='UTF-8'?> +<parts> + <notifications type='bool'>True</notifications> + <parameters_GUI type='bool'>True</parameters_GUI> + <widget_GUI type='bool'>True</widget_GUI> +</parts> Added: software/gadgets/rss_feeder/trunk/rss_feeder/settings.xml =================================================================== --- software/gadgets/rss_feeder/trunk/rss_feeder/settings.xml (rev 0) +++ software/gadgets/rss_feeder/trunk/rss_feeder/settings.xml 2007-12-12 15:21:16 UTC (rev 787) @@ -0,0 +1,61 @@ +<?xml version='1.0' encoding='UTF-8'?> +<settings> + <parameters> + <tts_message type='str'>An RSS feed has been updated</tts_message> + <hidden_in_manager type='bool'>False</hidden_in_manager> + <wav_path type='str'>empty</wav_path> + <behavior_path type='str'>empty</behavior_path> + <automated_translation type='bool'>True</automated_translation> + <first_launch type='bool'>True</first_launch> + <to_read> + <date type='bool'>True</date> + <title type='bool'>True</title> + <name type='bool'>False</name> + <summary type='bool'>False</summary> + </to_read> + <log_enable type='bool'>True</log_enable> + <number_to_update type='int'>4</number_to_update> + <text_to_speak type='str'> + </text_to_speak> + <check_at_startup type='bool'>False</check_at_startup> + <feeds_values/> + <busy type='bool'>False</busy> + <rss_list> + <tux_portail> + <to_update type='bool'>True</to_update> + <url type='str'>http://tuxisalive.com/releases/RSS</url> + <date type='str'>never</date> + </tux_portail> + </rss_list> + <log_text type='str'>No log text for the moment.</log_text> + <notification_type> + <nothing type='bool'>True</nothing> + <wav type='bool'>False</wav> + <behavior type='bool'>False</behavior> + <tts type='bool'>False</tts> + <personnal type='bool'>False</personnal> + </notification_type> + </parameters> + <general> + <have_settings_part type='bool'>False</have_settings_part> + <gui_state> + <widget> + <visible type='bool'>False</visible> + </widget> + <conf> + <visible type='bool'>False</visible> + </conf> + </gui_state> + <language type='str'>en_US</language> + <notified type='bool'>True</notified> + <notify_delay type='int'>60</notify_delay> + <framework_version type='str'>0.1.1</framework_version> + <menu_active type='bool'>True</menu_active> + <have_widget_part type='bool'>True</have_widget_part> + <speaker type='int'>4</speaker> + <pitch type='int'>100</pitch> + <have_main_part type='bool'>False</have_main_part> + <main_priority type='int'>1</main_priority> + <notify_priority type='int'>5</notify_priority> + </general> +</settings> Added: software/gadgets/rss_feeder/trunk/rss_feeder/strings.xml =================================================================== --- software/gadgets/rss_feeder/trunk/rss_feeder/strings.xml (rev 0) +++ software/gadgets/rss_feeder/trunk/rss_feeder/strings.xml 2007-12-12 15:21:16 UTC (rev 787) @@ -0,0 +1,71 @@ +<?xml version='1.0' encoding='UTF-8'?> +<strings> + <at_gui_widget_checkbutton10 type='str'>Automated translation</at_gui_widget_checkbutton10> + <gui_conf_remote_title type='str'>Remote</gui_conf_remote_title> + <gui_conf_description_lb type='str'>Description</gui_conf_description_lb> + <at_gui_widget_label20 type='str'>Number of news by RSS feed to update: </at_gui_widget_label20> + <at_gui_gui_add_label_name type='str'>Rss name: </at_gui_gui_add_label_name> + <at_gui_widget_radiobutton4 type='str'>Do nothing</at_gui_widget_radiobutton4> + <gui_conf_accept_bt type='str'>Accept</gui_conf_accept_bt> + <at_gui_widget_radiobutton5 type='str'>Custom notification :</at_gui_widget_radiobutton5> + <help_text type='str'> + </help_text> + <at_gui_gui_modify_label2 type='str'>Feed Name:</at_gui_gui_modify_label2> + <tree_cb_column type='str'>Update</tree_cb_column> + <bad_name type='str'>This name is already used.</bad_name> + <tree_date_column type='str'>Last update</tree_date_column> + <gui_conf_version_lb type='str'>Version</gui_conf_version_lb> + <gui_conf_update_title type='str'>Update</gui_conf_update_title> + <gui_conf_window_title type='str'>Parameters</gui_conf_window_title> + <gui_conf_cancel_bt type='str'>Cancel</gui_conf_cancel_bt> + <at_gui_popup_no_test_label2 type='str'>No test available for this notification option</at_gui_popup_no_test_label2> + <at_gui_gui_modify_label3 type='str'>Feed url</at_gui_gui_modify_label3> + <gui_conf_delay_lb type='str'>Delay (sec)</gui_conf_delay_lb> + <gui_conf_about_title type='str'>About</gui_conf_about_title> + <at_gui_popup_no_test_button1 type='str'>Ok/Cancel</at_gui_popup_no_test_button1> + <tree_name_column type='str'>Name</tree_name_column> + <at_gui_gui_add_checkbutton1 type='str'>Read this feed now</at_gui_gui_add_checkbutton1> + <at_gui_widget_label19 type='str'>Cancel</at_gui_widget_label19> + <at_gui_widget_label18 type='str'>Apply</at_gui_widget_label18> + <at_gui_widget_label2 type='str'>Delete</at_gui_widget_label2> + <at_gui_widget_label13 type='str'>Update feed after (in sec)</at_gui_widget_label13> + <at_gui_widget_label12 type='str'>Cancel</at_gui_widget_label12> + <at_gui_widget_label11 type='str'>Apply</at_gui_widget_label11> + <at_gui_widget_label10 type='str'>Delay</at_gui_widget_label10> + <at_gui_widget_label17 type='str'>Misc options</at_gui_widget_label17> + <at_gui_widget_label15 type='str'>Modify</at_gui_widget_label15> + <gui_conf_current_bind_lb type='str'>Current</gui_conf_current_bind_lb> + <at_gui_widget_checkbutton9 type='str'>Date of update</at_gui_widget_checkbutton9> + <gui_conf_author_lb type='str'>Author</gui_conf_author_lb> + <at_gui_widget_checkbutton3 type='str'>News Summary</at_gui_widget_checkbutton3> + <at_gui_widget_checkbutton2 type='str'>News title that have changed or added</at_gui_widget_checkbutton2> + <at_gui_widget_checkbutton1 type='str'>Updated or added new name</at_gui_widget_checkbutton1> + <at_gui_widget_label21 type='str'>What do you want Tux Droid to read?</at_gui_widget_label21> + <tree_url_column type='str'>Url</tree_url_column> + <at_gui_widget_radiobutton1 type='str'>Behavior</at_gui_widget_radiobutton1> + <at_gui_widget_radiobutton2 type='str'>TTS message</at_gui_widget_radiobutton2> + <speaker_name type='str'>Ryan8k</speaker_name> + <gui_conf_remote_set_bt type='str'>Set</gui_conf_remote_set_bt> + <at_gui_gui_add_label_url type='str'>Rss url:</at_gui_gui_add_label_url> + <at_gui_widget_label9 type='str'>Test it</at_gui_widget_label9> + <at_gui_widget_label8 type='str'>Notification type</at_gui_widget_label8> + <at_gui_widget_label7 type='str'>Options</at_gui_widget_label7> + <at_gui_widget_label6 type='str'>Notification</at_gui_widget_label6> + <at_gui_widget_label5 type='str'>Feeds</at_gui_widget_label5> + <at_gui_widget_label4 type='str'>Cancel</at_gui_widget_label4> + <at_gui_widget_label3 type='str'>Apply</at_gui_widget_label3> + <name_to_read type='str'>Rss feeder</name_to_read> + <at_gui_widget_label1 type='str'>Add</at_gui_widget_label1> + <at_gui_gui_modify_label1 type='str'> + </at_gui_gui_modify_label1> + <at_gui_widget_radiobutton3 type='str'>Wav sound</at_gui_widget_radiobutton3> + <at_gui_popup_no_test_label1 type='str'> + </at_gui_popup_no_test_label1> + <at_gui_gui_modify_label5 type='str'>Cancel</at_gui_gui_modify_label5> + <at_gui_gui_modify_label4 type='str'>Ok</at_gui_gui_modify_label4> + <at_gui_widget_checkbutton8 type='str'>Check for updated feeds at Gadget Manager startup</at_gui_widget_checkbutton8> + <at_gui_gui_add_label1 type='str'> + </at_gui_gui_add_label1> + <at_gui_gui_add_label5 type='str'>Ok</at_gui_gui_add_label5> + <at_gui_gui_add_label6 type='str'>Cancel</at_gui_gui_add_label6> +</strings> Modified: software/gadgets/rss_feeder/trunk/rss_feeder.tgf =================================================================== (Binary files differ) |
Author: Paul_R Date: 2007-12-12 15:23:02 +0100 (Wed, 12 Dec 2007) New Revision: 785 Modified: software/gadgets/sound_monitor/trunk/audio_monitor.tgf software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/GUI/dialog/other.glade software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/GUI/widget/other.glade software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/GUI/widget/other.pyp software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/main.pyp software/gadgets/sound_monitor/trunk/audio_monitor/Strings/fr_ALL.xml software/gadgets/sound_monitor/trunk/audio_monitor/about.xml software/gadgets/sound_monitor/trunk/audio_monitor/settings.xml software/gadgets/sound_monitor/trunk/audio_monitor/strings.xml Log: * Added the help file * Changed the gadget name : audio monitor -> micro monitor Modified: software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/GUI/dialog/other.glade =================================================================== --- software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/GUI/dialog/other.glade 2007-12-12 13:03:17 UTC (rev 784) +++ software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/GUI/dialog/other.glade 2007-12-12 14:23:02 UTC (rev 785) @@ -4,6 +4,8 @@ <glade-interface> <widget class="GtkWindow" id="window1"> + <property name="width_request">361</property> + <property name="height_request">144</property> <property name="visible">True</property> <property name="title" translatable="yes">window1</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> @@ -21,94 +23,38 @@ <child> <widget class="GtkFixed" id="fixed1"> - <property name="width_request">294</property> - <property name="height_request">200</property> <property name="visible">True</property> <child> - <widget class="GtkButton" id="btnNo"> - <property name="width_request">102</property> - <property name="height_request">29</property> + <widget class="GtkLabel" id="label1"> + <property name="width_request">344</property> + <property name="height_request">96</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_btnNo_clicked" last_modification_time="Tue, 11 Dec 2007 14:56:24 GMT"/> - - <child> - <widget class="GtkAlignment" id="alignment2"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">0</property> - <property name="yscale">0</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">0</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkHBox" id="hbox2"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">2</property> - - <child> - <widget class="GtkImage" id="image2"> - <property name="visible">True</property> - <property name="stock">gtk-cancel</property> - <property name="icon_size">4</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="lblNo"> - <property name="visible">True</property> - <property name="label" translatable="yes">button2</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - </child> - </widget> - </child> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">True</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> - <property name="x">72</property> - <property name="y">160</property> + <property name="x">8</property> + <property name="y">8</property> </packing> </child> <child> <widget class="GtkButton" id="btnYes"> <property name="width_request">102</property> - <property name="height_request">29</property> + <property name="height_request">28</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> @@ -180,12 +126,30 @@ </child> </widget> <packing> - <property name="x">184</property> - <property name="y">160</property> + <property name="x">248</property> + <property name="y">109</property> </packing> </child> <child> + <widget class="GtkButton" id="btnNo"> + <property name="width_request">1</property> + <property name="height_request">1</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">button2</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_btnNo_clicked" last_modification_time="Tue, 11 Dec 2007 14:56:24 GMT"/> + </widget> + <packing> + <property name="x">144</property> + <property name="y">128</property> + </packing> + </child> + + <child> <widget class="GtkCheckButton" id="checkbutton1"> <property name="width_request">272</property> <property name="height_request">21</property> @@ -201,35 +165,9 @@ </widget> <packing> <property name="x">8</property> - <property name="y">136</property> + <property name="y">112</property> </packing> </child> - - <child> - <widget class="GtkLabel" id="label1"> - <property name="width_request">280</property> - <property name="height_request">120</property> - <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">True</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="x">8</property> - <property name="y">8</property> - </packing> - </child> </widget> </child> </widget> Modified: software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/GUI/widget/other.glade =================================================================== (Binary files differ) Modified: software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/GUI/widget/other.pyp =================================================================== --- software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/GUI/widget/other.pyp 2007-12-12 13:03:17 UTC (rev 784) +++ software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/GUI/widget/other.pyp 2007-12-12 14:23:02 UTC (rev 785) @@ -22,6 +22,7 @@ # ########################################################### def new(self): + self.get_widget('scrolledwindow1').set_tooltip_text(_me.string('RightClic')) if _me.get_param('dogBehavior') != None: self.get_widget('fileDogBehavior').select_filename(_me.get_param('dogBehavior')) self.get_widget('fileDogBehavior').show() @@ -176,7 +177,7 @@ # ########################################################### def on_window1_delete_event(self, widget, *args): - return True + _me.get_funct('on_standby')() def on_cbbType_changed(self, widget, *args): if self.get_widget('cbbType').get_active() == 0: Modified: software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/main.pyp =================================================================== --- software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/main.pyp 2007-12-12 13:03:17 UTC (rev 784) +++ software/gadgets/sound_monitor/trunk/audio_monitor/Scripts/Python/main.pyp 2007-12-12 14:23:02 UTC (rev 785) @@ -2,38 +2,19 @@ import time def on_standby(): - _me.set_param('stdby', True) - _me.set_param('string', _me.string('Standby')) - _me.set_param('check', _me.string('Show')) - _me.set_param('btnYes', _me.string('Yes')) - _me.set_param('btnNo', _me.string('No')) - _me.set_param('chkHide', True) - _me.set_param('param', 'Standby') - _me.gui('dialog').show_from_main() + gdg_dict = _me.get_param('dict') + for keys in gdg_dict: + gadgets[keys].notify.set_active(gdg_dict[keys]) + + gadgets['sound_monitor'].notify.set_active(False) + tux.micro.off() + tux.cmd.mouth_close() + tux.event.on_remote_bt[K_STANDBY] = None + tux.monitoring.remove(_me.get_param('monitor_id')) + tux.micro.on_buffer.disconnect(_me.get_param('buffer_idx')) + _me.gui('widget').hide_from_main() + _me.exit_main_loop() - tux.sys.wait(1) - - while _me.gui('dialog').showed(): - tux.sys.wait(0.5) - - - if _me.get_param('return') == False: - _me.set_param('stdby', False) - return - else: - gdg_dict = _me.get_param('dict') - for keys in gdg_dict: - gadgets[keys].notify.set_active(gdg_dict[keys]) - - gadgets['sound_monitor'].notify.set_active(False) - tux.micro.off() - tux.cmd.mouth_close() - tux.event.on_remote_bt[K_STANDBY] = None - tux.monitoring.remove(_me.get_param('monitor_id')) - tux.micro.on_buffer.disconnect(_me.get_param('buffer_idx')) - _me.gui('widget').hide_from_main() - _me.exit_main_loop() - def start_gadget(): gdg_dict = {} for Gdgname in gadgets.keys(): Modified: software/gadgets/sound_monitor/trunk/audio_monitor/Strings/fr_ALL.xml =================================================================== --- software/gadgets/sound_monitor/trunk/audio_monitor/Strings/fr_ALL.xml 2007-12-12 13:03:17 UTC (rev 784) +++ software/gadgets/sound_monitor/trunk/audio_monitor/Strings/fr_ALL.xml 2007-12-12 14:23:02 UTC (rev 785) @@ -5,8 +5,25 @@ <at_gui_widget_chkDog type='str'>Activer le mode chien de garde</at_gui_widget_chkDog> <at_gui_conf_label13 type='str'>Delay (sec) :</at_gui_conf_label13> <at_gui_conf_label12 type='str'>Configuration</at_gui_conf_label12> - <help_text type='str'> - </help_text> + <RightClic type='str'>Pour lire un son qui a été enregistré, +faites un clic droit sur le son, et +sélectionnez 'Lecture'</RightClic> + <help_text type='str'>-- Moniteur de micro -- + +Le gadget 'Moniteur de micro' affiche l'énergie sonore perçue par le micro de Tux. +Ce gadget a une priorité particulière. En effet, lorsque la fenêtre principale est affichée, les notifications des autres gadgets sont arrêtées. +Lorsque vous fermez le gadget, les paramêtres de notification des autres gadgets sont réstaurés, et les notification de ce gadget sont arrêtées. + +Deux modes sont disponnibles : + +- Mode 'Chien de garde' - +Lorsque ce mode est activé, si l'énergie dépasse le seuil, une notification se produit. +Vous pouvez spécifié un script qui ser exécuté lors de la notification. Pour celà, il est nécessaire de cocher la case 'Utiliser un script'. Dans le cas contraire, le comportement par défaut sera utilisé. + +- Mode espion - +Le mode espion permet d'enregistrer le son lorsqu'il dépasse le seuil. Les sons enregistrés peuvent être à tous moment écoutés par simple clic droit sur un son se trouvant dans le tableau, et en sélectionnant 'Lecture'. +Dans la fenêtre de configuration de ce gadget, accessible à partir du 'Manager', vous pouvez spécifier l'emplacement dans lequel les sons doivent être enregistrés. +</help_text> <vr_Sound type='str'>Sound</vr_Sound> <Play type='str'>Lecture</Play> <at_gui_widget_cbbDog type='str'>Chien de garde</at_gui_widget_cbbDog> @@ -22,7 +39,7 @@ <at_gui_widget_cbbSpy type='str'>Mode espion</at_gui_widget_cbbSpy> <speaker_name type='str'>Bruno8k</speaker_name> <at_gui_widget_cbbRecord type='str'>Sons enregistrés</at_gui_widget_cbbRecord> - <name_to_read type='str'>Moniteur de son</name_to_read> + <name_to_read type='str'>Moniteur de micro</name_to_read> <Show type='str'>Ne plus afficher ce message</Show> <Startup type='str'>Ce gadget a un système de notification exclusif. Tant que la fenêtre de ce gadget est ouverte, toutes les autres notifications sont désactivées.</Startup> <File type='str'>Fichier</File> @@ -30,5 +47,5 @@ <Duration type='str'>Durée</Duration> <lblSample type='str'>Nombre de points : </lblSample> <Yes type='str'>Oui</Yes> - <Location type='str'>Selectionner ou les sons doivent être sauvés.</Location> + <Location type='str'>Sauver les sons :</Location> </strings> Modified: software/gadgets/sound_monitor/trunk/audio_monitor/about.xml =================================================================== --- software/gadgets/sound_monitor/trunk/audio_monitor/about.xml 2007-12-12 13:03:17 UTC (rev 784) +++ software/gadgets/sound_monitor/trunk/audio_monitor/about.xml 2007-12-12 14:23:02 UTC (rev 785) @@ -1,8 +1,8 @@ <?xml version='1.0' encoding='UTF-8'?> <about> - <gadget_author type='str'>Paul Rathgeb</gadget_author> - <gadget_version type='str'>0.0.1</gadget_version> <gadget_description type='str'> </gadget_description> + <gadget_author type='str'>Paul Rathgeb</gadget_author> <gadget_name type='str'>sound_monitor</gadget_name> + <gadget_version type='str'>0.0.1</gadget_version> </about> Modified: software/gadgets/sound_monitor/trunk/audio_monitor/settings.xml =================================================================== --- software/gadgets/sound_monitor/trunk/audio_monitor/settings.xml 2007-12-12 13:03:17 UTC (rev 784) +++ software/gadgets/sound_monitor/trunk/audio_monitor/settings.xml 2007-12-12 14:23:02 UTC (rev 785) @@ -1,23 +1,24 @@ <?xml version='1.0' encoding='UTF-8'?> <settings> <parameters> - <dogBehavior type='str'> - </dogBehavior> - <Sample type='float'>400.0</Sample> + <chkDog type='bool'>True</chkDog> <chkDogBehavior type='bool'>False</chkDogBehavior> + <BehaviorPath type='str'> + </BehaviorPath> <SpyThreshold type='int'>30</SpyThreshold> <Standby type='bool'>False</Standby> + <chkSpy type='bool'>False</chkSpy> <MainScript type='str'>None</MainScript> - <chkSpy type='bool'>False</chkSpy> - <chkDog type='bool'>True</chkDog> + <Sample type='float'>400.0</Sample> + <chkDogDefault type='bool'>False</chkDogDefault> + <dict/> + <chkSpyRecord type='bool'>False</chkSpyRecord> <Threshold type='float'>30.0</Threshold> - <chkSpyRecord type='bool'>False</chkSpyRecord> - <chkDogDefault type='bool'>False</chkDogDefault> <Path type='str'>/tmp</Path> <DogThreshold type='int'>30</DogThreshold> <Startup type='bool'>False</Startup> - <BehaviorPath type='str'> - </BehaviorPath> + <dogBehavior type='str'> + </dogBehavior> </parameters> <general> <have_settings_part type='bool'>True</have_settings_part> Modified: software/gadgets/sound_monitor/trunk/audio_monitor/strings.xml =================================================================== --- software/gadgets/sound_monitor/trunk/audio_monitor/strings.xml 2007-12-12 13:03:17 UTC (rev 784) +++ software/gadgets/sound_monitor/trunk/audio_monitor/strings.xml 2007-12-12 14:23:02 UTC (rev 785) @@ -5,8 +5,20 @@ <at_gui_widget_chkDog type='str'>Enable guard dog mode</at_gui_widget_chkDog> <at_gui_conf_label13 type='str'>Delay (sec) :</at_gui_conf_label13> <at_gui_conf_label12 type='str'>Settings</at_gui_conf_label12> - <help_text type='str'> - </help_text> + <RightClic type='str'>To play a recorded sound, right click +a sound and select 'play'</RightClic> + <help_text type='str'>-- Micro Monitor Gadget -- + +The 'Micro monitor' gadget displays the signal strength registered with the Tux microphone. This gadget has an exclusive priority. Meaning, as long as the gadget window is open, all other gadget notifications and functions are disabled. When the window is closed all other gadget notifications will be restored, but this will also stop the Micro Monitor functions. + +Micro Monitor features two modes : + +- 'Guard dog' mode - +When activating this mode, and the incoming sound exceeds the threshold, an alarm will go off. You can specify a custom script for the alarm instead of using the default one. Do to this: enable the check box for 'Use an external script' and select a custom script. + +- 'Spy' mode - +This mode will record all the sounds exceeding the threshold. To listen to recorded sounds, select 'Recorded files' in the combo box and right click the displayed files in the list. +In the settings window, accessed by right clicking the 'Micro Monitor' gadget in the manager window, you can specify the location to store the recorded sounds.</help_text> <vr_Sound type='str'>Sound</vr_Sound> <Play type='str'>Play</Play> <at_gui_widget_cbbDog type='str'>Guard dog mode</at_gui_widget_cbbDog> @@ -22,9 +34,9 @@ <at_gui_widget_cbbSpy type='str'>Spy mode</at_gui_widget_cbbSpy> <speaker_name type='str'>Ryan8k</speaker_name> <at_gui_widget_cbbRecord type='str'>Recorded files</at_gui_widget_cbbRecord> - <name_to_read type='str'>Audio monitor</name_to_read> + <name_to_read type='str'>Micro monitor</name_to_read> <Show type='str'>Don't show this message again.</Show> - <Startup type='str'>This gadget has an exclusive priority, and all notifications are bypassed when the GUI is open.</Startup> + <Startup type='str'>This gadget has an exclusive priority. As long the Micro Monitor gadget window is opened, all other gadget notifications are disabled.</Startup> <File type='str'>File</File> <at_gui_widget_chkSpy type='str'>Enable spy mode</at_gui_widget_chkSpy> <Duration type='str'>Duration</Duration> Modified: software/gadgets/sound_monitor/trunk/audio_monitor.tgf =================================================================== (Binary files differ) |
From: jaguarondi <c2m...@c2...> - 2007-12-12 13:29:39
|
Author: jaguarondi Date: 2007-12-12 14:01:00 +0100 (Wed, 12 Dec 2007) New Revision: 782 Modified: firmware/tuxcore/trunk/led.c firmware/tuxcore/trunk/led.h firmware/tuxcore/trunk/parser.c firmware/tuxcore/trunk/standalone.c Log: * Renamed a couple of variables. Modified: firmware/tuxcore/trunk/led.c =================================================================== --- firmware/tuxcore/trunk/led.c 2007-12-12 11:46:24 UTC (rev 781) +++ firmware/tuxcore/trunk/led.c 2007-12-12 13:01:00 UTC (rev 782) @@ -36,16 +36,16 @@ led_t left_led = { .command.step=2, - .command.rate=1, - .blink.max_intensity = 0xFF, + .command.delay=1, + .pulse.max_intensity = 0xFF, }; /** Right LED status structure. */ led_t right_led = { .command.step=2, - .command.rate=1, - .blink.max_intensity = 0xFF, + .command.delay=1, + .pulse.max_intensity = 0xFF, }; /** @@ -152,19 +152,19 @@ } /** - \brief Blink LEDs + \brief Pulse LEDs \ingroup led \param leds Which LEDs are affected by the command - \param cnt Number of blinks. 0 is ignored, 255 (0xFF) means infinite. - \param pulse_width Blinking pulse width. 0 is ignored. + \param cnt Number of pulses. 0 is ignored, 255 (0xFF) means infinite. + \param pulse_width Pulse width. 0 is ignored. The LEDs will be toggled 'cnt' times. The pulse width can be used to change the toggle frequency. If 'cnt' or 'pulse_width' are set to 0, the register is not updated so the old value is kept. - 'cnt' can be set to 255 to trigger an infinite blinking effect. + 'cnt' can be set to 255 to trigger an infinite pulsing effect. */ -void led_blink(LEDS_t leds, uint8_t const cnt, uint8_t const pulse_width) +void led_pulse(LEDS_t leds, uint8_t const cnt, uint8_t const pulse_width) { /* XXX we should really find a way to optimize this loop for the 2 leds. * We don't want to add a new function call, bu don't want to have the code @@ -184,27 +184,27 @@ leds &= ~LED_RIGHT; led = &right_led; } - led->status.blinking = true; - led->blink.pulse_width = pulse_width; + led->status.pulsing = true; + led->pulse.pulse_width = pulse_width; if (cnt) { - led->blink.count = cnt; + led->pulse.count = cnt; /* We can't simply set the flag here otherwise we alter the ongoing - * blinking. So we need to check for blinking first. */ - if (!led->var.blink_tmr) - led->var.blink_flag = true; + * pulsing. So we need to check for pulsing first. */ + if (!led->var.pulse_tmr) + led->var.pulse_flag = true; } } } /** - \brief Set the intensity boundaries for the blink command. + \brief Set the intensity boundaries for the pulse command. \ingroup led \param leds Which LEDs are affected by the command \param max Maximum intensity \param min Minimum intensity */ -void led_blink_range(LEDS_t leds, uint8_t const max, uint8_t const min) +void led_pulse_range(LEDS_t leds, uint8_t const max, uint8_t const min) { led_t *led = &left_led; @@ -220,19 +220,20 @@ leds &= ~LED_RIGHT; led = &right_led; } - led->blink.max_intensity = max; - led->blink.min_intensity = min; + led->pulse.max_intensity = max; + led->pulse.min_intensity = min; } } /** - \brief Set the rate and step which determine the speed of the fading effect. + \brief Set the delay and step which determine the speed of the fading effect. \ingroup led \param leds Which LEDs are affected by the command - \param rate Rate at which the intensity is changed. See struct led_comand. + \param delay Number of 4ms loops before the intensity is changed. See struct + led_command. \param step Intenisty step applied when fading. */ -void led_set_fade_speed(LEDS_t leds, uint8_t const rate, uint8_t const step) +void led_set_fade_speed(LEDS_t leds, uint8_t const delay, uint8_t const step) { led_t *led = &left_led; @@ -248,8 +249,8 @@ leds &= ~LED_RIGHT; led = &right_led; } - if (rate) - led->command.rate = rate; + if (delay) + led->command.delay = delay; if (step) led->command.step = step; } @@ -291,7 +292,7 @@ */ static void fading(led_t *led) { - if (!led->var.rate_cnt) + if (!led->var.speed_cnt) { if (led->command.setpoint > led->status.intensity) { @@ -318,54 +319,61 @@ else led->status.intensity -= led->command.step; } - led->var.rate_cnt = led->command.rate; + led->var.speed_cnt = led->command.delay; } - /* we decrease in all cases, i.e. if rate == 1, cnt will be set to 0 when + /* we decrease in all cases, i.e. if delay == 1, cnt will be set to 0 when * leaving the function and so will only loop one time */ - led->var.rate_cnt--; + led->var.speed_cnt--; } /** - \brief Handles the blinking effect. + \brief Handles the pulsing effect. \param led Pointer to the led structure - Set the new fading settings if more blinking has to be done. + Set the new fading settings if more pulsing has to be done. */ -static void blinking(led_t *led) +static void pulsing(led_t *led) { - /* Infinite blinking or next blink. */ - if ((led->blink.count == 0xFF) || --led->blink.count) - led->var.blink_tmr = led->blink.pulse_width; + /* Infinite pulsing or next pulse. */ + if ((led->pulse.count == 0xFF) || --led->pulse.count) + led->var.pulse_tmr = led->pulse.pulse_width; else - led->status.blinking = false; - if (led->status.intensity <= led->blink.min_intensity) - led->command.setpoint = led->blink.max_intensity; + led->status.pulsing = false; + if (led->status.intensity <= led->pulse.min_intensity) + led->command.setpoint = led->pulse.max_intensity; else - (led->command.setpoint = led->blink.min_intensity); + (led->command.setpoint = led->pulse.min_intensity); led->status.fading = true; /* Add the intermediate delay between 2 fades. */ - led->var.rate_cnt = led->command.rate; + led->var.speed_cnt = led->command.delay; } +/** + \brief Check when fading or pulsing need to be done. + \param led Pointer to the led structure + + This function should be called at a regular interval, which is the time + basis for the delays. + */ static inline void control_call(led_t *led) { /* Do we need fading? */ if (led->status.fading) fading(led); - /* Check the blinking pulse width. */ - if (led->var.blink_tmr) + /* Check the pulse width. */ + if (led->var.pulse_tmr) { - led->var.blink_tmr--; - if (!led->var.blink_tmr) - led->var.blink_flag = true; + led->var.pulse_tmr--; + if (!led->var.pulse_tmr) + led->var.pulse_flag = true; } if (!led->status.fading) - /* When fading is done, check if we need to blink again. */ - if (led->var.blink_flag) + /* When fading is done, check if we need to pulse again. */ + if (led->var.pulse_flag) { - blinking(led); - led->var.blink_flag = false; + pulsing(led); + led->var.pulse_flag = false; } } @@ -375,8 +383,8 @@ \param mask If set, masking is applied on the LEDs so they don't light. Used when the eyes are closed, it's neater. - This function should be called regularly as it controls the blinking. The - period this function is called will be the unit period of the led blinking. + This function should be called regularly as it controls the pulsing. The + period this function is called will be the unit period of the led pulsing. */ void led_control(bool mask) { Modified: firmware/tuxcore/trunk/led.h =================================================================== --- firmware/tuxcore/trunk/led.h 2007-12-12 11:46:24 UTC (rev 781) +++ firmware/tuxcore/trunk/led.h 2007-12-12 13:01:00 UTC (rev 782) @@ -38,7 +38,7 @@ /** \ingroup led LED status structure holding all information necessary to handle intensity, - fading and blinking effects. + fading and pulsing effects. */ typedef struct led_t { @@ -46,29 +46,29 @@ { uint8_t intensity; bool fading; - bool blinking; + bool pulsing; } status; struct led_command { uint8_t setpoint; - uint8_t rate; + uint8_t delay; uint8_t step; } command; - struct led_blink + struct led_pulse { uint8_t min_intensity; uint8_t max_intensity; - /** Number of times the LEDs should be toggled when blinking. */ + /** Number of times the LEDs should be toggled when pulsing. */ uint8_t count; - /** Delay between 2 toggles of the LEDs when blinking them. */ + /** Delay between 2 toggles of the LEDs when pulsing them. */ uint8_t pulse_width; - } blink; + } pulse; struct led_var { - uint8_t rate_cnt; + uint8_t speed_cnt; /** Timer for the delay between 2 toggles of the LEDs. */ - uint8_t blink_tmr; - bool blink_flag; + uint8_t pulse_tmr; + bool pulse_flag; } var; } led_t; @@ -77,11 +77,11 @@ void led_init(void); void led_shutdown(void); -void led_set_fade_speed(LEDS_t leds, uint8_t const rate, uint8_t const step); +void led_set_fade_speed(LEDS_t leds, uint8_t const delay, uint8_t const step); void led_set_intensity(LEDS_t leds, uint8_t const intensity); -void led_blink_range(LEDS_t leds, uint8_t const max, uint8_t const min); -void blink_led(led_t *const led, uint8_t const cnt, uint8_t const pulse_width); -void led_blink(LEDS_t led, uint8_t const cnt, uint8_t const pulse_width); +void led_pulse_range(LEDS_t leds, uint8_t const max, uint8_t const min); +void pulse_led(led_t *const led, uint8_t const cnt, uint8_t const pulse_width); +void led_pulse(LEDS_t led, uint8_t const cnt, uint8_t const pulse_width); void led_control(bool mask); #endif /* _LED_H_ */ Modified: firmware/tuxcore/trunk/parser.c =================================================================== --- firmware/tuxcore/trunk/parser.c 2007-12-12 11:46:24 UTC (rev 781) +++ firmware/tuxcore/trunk/parser.c 2007-12-12 13:01:00 UTC (rev 782) @@ -135,11 +135,11 @@ /* Leds */ else if (command[0] == LED_BLINK_RANGE_CMD) { - led_blink_range(command[1], command[2], command[3]); + led_pulse_range(command[1], command[2], command[3]); } else if (command[0] == LED_BLINK_CMD) { - led_blink(command[1], command[2], command[3]); + led_pulse(command[1], command[2], command[3]); } else if (command[0] == LED_FADE_SPEED_CMD) { @@ -232,9 +232,9 @@ { led_set_intensity(LED_RIGHT, 0x0); } - else if (command[0] == 0x9A) /* old blink function */ + else if (command[0] == 0x9A) /* old pulse function */ { - led_blink(3, command[1], command[2]); + led_pulse(3, command[1], command[2]); } /* Undefined commands */ Modified: firmware/tuxcore/trunk/standalone.c =================================================================== --- firmware/tuxcore/trunk/standalone.c 2007-12-12 11:46:24 UTC (rev 781) +++ firmware/tuxcore/trunk/standalone.c 2007-12-12 13:01:00 UTC (rev 782) @@ -231,7 +231,7 @@ /* IR feedback signal */ if (tux_config.ir_feedback) - led_blink(LED_BOTH, 2, 4); + led_pulse(LED_BOTH, 2, 4); /* ALT KEYS */ if (alt_mode) @@ -296,10 +296,10 @@ tux_config.ir_feedback = !tux_config.ir_feedback; break; case K_CHANNELPLUS: - led_blink(LED_RIGHT, 1, 0); + led_pulse(LED_RIGHT, 1, 0); break; case K_VOLUMEPLUS: - led_blink(LED_LEFT, 1, 0); + led_pulse(LED_LEFT, 1, 0); break; case K_FASTREWIND: if (spin_PWM) |
From: jaguarondi <c2m...@c2...> - 2007-12-12 13:03:15
|
Author: jaguarondi Date: 2007-12-12 14:03:17 +0100 (Wed, 12 Dec 2007) New Revision: 784 Modified: firmware/tuxcore/trunk/standalone.c Log: * Cleanup. Modified: firmware/tuxcore/trunk/standalone.c =================================================================== --- firmware/tuxcore/trunk/standalone.c 2007-12-12 13:01:57 UTC (rev 783) +++ firmware/tuxcore/trunk/standalone.c 2007-12-12 13:03:17 UTC (rev 784) @@ -49,9 +49,6 @@ uint8_t nbr; } action; -void error(uint8_t en); -uint8_t error_nbr, mb_test_flag; - void loadAction(void) { uint8_t i; @@ -306,12 +303,3 @@ } } } - -void error(uint8_t en) -{ - uint8_t i = 0xFF; - - error_nbr = en; - while (i--) ; - error_nbr = 0; -} |
From: jaguarondi <c2m...@c2...> - 2007-12-12 13:01:58
|
Author: jaguarondi Date: 2007-12-12 14:01:57 +0100 (Wed, 12 Dec 2007) New Revision: 783 Modified: firmware/tuxcore/trunk/standalone.c Log: * Removed an annoying (and buggy ;-) production test in the remote mode. Modified: firmware/tuxcore/trunk/standalone.c =================================================================== --- firmware/tuxcore/trunk/standalone.c 2007-12-12 13:01:00 UTC (rev 782) +++ firmware/tuxcore/trunk/standalone.c 2007-12-12 13:01:57 UTC (rev 783) @@ -206,21 +206,6 @@ spin_move_counter = 0; } - if (remote_mode) - { - /* BT_REMOTE: check buttons with leds */ - if (gStatus. - sw & (GSTATUS_LEFTWINGBTN_MK | GSTATUS_RIGHTWINGBTN_MK | - GSTATUS_HEADBTN_MK)) - led_set_intensity(LED_LEFT, 0xFF); - else - led_set_intensity(LED_LEFT, 0); - if ((gStatus.sw & GSTATUS_POWERPLUGSW_MK)) - led_set_intensity(LED_RIGHT, 0xFF); - else - led_set_intensity(LED_RIGHT, 0); - } - /* IR signal processing */ /* put here things that should be done only once when a button is pushed */ if (gStatus.ir != ir_oldvalue && gStatus.ir & GSTATUS_IR_VALID) |
From: Paul_R <c2m...@c2...> - 2007-12-12 11:46:35
|
Author: Paul_R Date: 2007-12-12 12:46:24 +0100 (Wed, 12 Dec 2007) New Revision: 781 Modified: software/gadgets/settings/trunk/settings.tgf software/gadgets/settings/trunk/settings/Scripts/Python/GUI/selftest/other.glade software/gadgets/settings/trunk/settings/Scripts/Python/GUI/selftest/other.pyp software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp software/gadgets/settings/trunk/settings/Strings/fr_ALL.xml software/gadgets/settings/trunk/settings/about.xml software/gadgets/settings/trunk/settings/settings.xml software/gadgets/settings/trunk/settings/strings.xml Log: * Optimized the english (by Se) * Removed the 'audio in' test * Corrected some bugs in the log file Modified: software/gadgets/settings/trunk/settings/Scripts/Python/GUI/selftest/other.glade =================================================================== --- software/gadgets/settings/trunk/settings/Scripts/Python/GUI/selftest/other.glade 2007-12-12 10:35:05 UTC (rev 780) +++ software/gadgets/settings/trunk/settings/Scripts/Python/GUI/selftest/other.glade 2007-12-12 11:46:24 UTC (rev 781) @@ -18,6 +18,7 @@ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> <property name="urgency_hint">False</property> + <signal name="destroy" handler="on_window1_destroy" last_modification_time="Wed, 12 Dec 2007 11:18:27 GMT"/> <child> <widget class="GtkVBox" id="vbox1"> Modified: software/gadgets/settings/trunk/settings/Scripts/Python/GUI/selftest/other.pyp =================================================================== --- software/gadgets/settings/trunk/settings/Scripts/Python/GUI/selftest/other.pyp 2007-12-12 10:35:05 UTC (rev 780) +++ software/gadgets/settings/trunk/settings/Scripts/Python/GUI/selftest/other.pyp 2007-12-12 11:46:24 UTC (rev 781) @@ -15,10 +15,32 @@ self.ok_flag = False self.cancel_flag = False self.error = [] + gdg_dict = {} + for Gdgname in gadgets.keys(): + if Gdgname != 'Manager': + gdg_dict[Gdgname] = gadgets[Gdgname].get_var('notified') + gadgets[Gdgname].notify.set_active(False) + _me.voice_recognition.off() + _me.set_param('dict', gdg_dict) + print gdg_dict + def new(self): self.get_widget("window1").set_title(_me.string('name_to_read')) thread.start_new_thread(self.update,()) + + def on_window1_destroy(self, widget, *args): + tux.cmd.eyes_open() + tux.cmd.raw(0x31, 0, 0, 0) + tux.cmd.mouth_close() + + gdg_dict = _me.get_param('dict') + for keys in gdg_dict: + print keys + gadgets[keys].notify.set_active(gdg_dict[keys]) + + _me.voice_recognition.on() + self.f.close() #================================================================== # SELF TEST FUNCTIONS @@ -50,7 +72,7 @@ self.tree_store.append(None, [_me.string('Selftest')+'/home/%s/TuxSelftest_%s.txt' %(self.path, self.date)]) self.get_widget('progressbar2T').set_fraction(0) - STEPS = 30.0 + STEPS = 28.0 self.fraction = float(1.0 / STEPS) self.actual_fraction = 0 @@ -71,10 +93,10 @@ self.f = open('/home/%s/TuxSelftest_%s.txt' %(self.path, self.date), 'w') self.f.write('%s : Self test start \n'%time.asctime()) self.f.write('%s : ============================================================= \n'%time.asctime()) - self.f.write('%s : First step - Reset tux \n'%time.asctime()) + self.f.write('%s : Step 1 - Resetting Tux Droid\n'%time.asctime()) self.f.write('%s : ------------------------------------------------------------- \n'%time.asctime()) self.tree_store.clear() - self.tree_store.append(None, ['Reset Tux ...']) + self.tree_store.append(None, ['Resetting Tux Droid ...']) tux.cmd.raw(0x31, 0, 0, 0) tux.cmd.mouth_close() tux.sys.wait(1) @@ -100,7 +122,7 @@ elif tux.status.charger_state() == 2: self.f.write('%s : Trickle mode\n'%time.asctime()) elif tux.status.charger_state() == 3: - self.f.write('%s : Power plug detected, no charge\n'%time.asctime()) + self.f.write('%s : Power plug detected, not charging\n'%time.asctime()) except: if tux.status.power_plug() == 0: self.f.write('%s : Power plug not detected\n'%time.asctime()) @@ -111,7 +133,7 @@ def measure_tests(self): self.f.write('%s :\n'%time.asctime()) - self.f.write('%s : Second step : Measures\n'%time.asctime()) + self.f.write('%s : Step 2 : Measurements\n'%time.asctime()) self.f.write('%s : ------------------------------------------------------------- \n'%time.asctime()) self.tree_store.clear() level1 = tux.status.light_level() @@ -130,7 +152,7 @@ self.f.write('%s : Light level with the eyes closed : %s\n'%(time.asctime(), level2)) if level2 + 10 >= level1: - self.error.append('The light level seems bad') + self.error.append('The light sensor has a problem') self.progress_bar() tux.sys.wait(1) @@ -159,7 +181,7 @@ self.f.write(' with one or more motor(s) running\n') if level2[0] <= level1[0] - 30: - self.error.append('The batteries seems bad') + self.error.append('The batteries have a problem') self.progress_bar() tux.cmd.eyes_close() @@ -168,7 +190,7 @@ def buttons_tests(self): self.f.write('%s :\n'%time.asctime()) - self.f.write('%s : Third step : Buttons\n'%time.asctime()) + self.f.write('%s : Step 3 : Buttons/switches\n'%time.asctime()) self.f.write('%s : ------------------------------------------------------------- \n'%time.asctime()) self.head = [False, False] @@ -178,7 +200,7 @@ self.progress_bar() self.warning(_me.string('Switch')) - self.f.write('%s : Test the switches with the wings low\n'%time.asctime()) + self.f.write('%s : Switch test with the wings in the lower position\n'%time.asctime()) tux.event.on_head_bt_pushed = self.on_head_bt_pushed tux.event.on_lwing_bt_pushed = self.on_lwing_bt_pushed tux.event.on_rwing_bt_pushed = self.on_rwing_bt_pushed @@ -193,19 +215,19 @@ self.progress_bar() - self.f.write('%s : Head button pressed : %s\n'%(time.asctime(), str(self.head[0]))) + self.f.write('%s : Head button pushed : %s\n'%(time.asctime(), str(self.head[0]))) self.f.write('%s : Head button released : %s\n'%(time.asctime(), str(self.head[1]))) - self.f.write('%s : Left wing pressed : %s\n'%(time.asctime(), str(self.lwing[0]))) + self.f.write('%s : Left wing pushed : %s\n'%(time.asctime(), str(self.lwing[0]))) self.f.write('%s : Left wing released : %s\n'%(time.asctime(), str(self.lwing[1]))) - self.f.write('%s : Right wing pressed : %s\n'%(time.asctime(), str(self.rwing[0]))) + self.f.write('%s : Right wing pushed : %s\n'%(time.asctime(), str(self.rwing[0]))) self.f.write('%s : Right wing released : %s\n'%(time.asctime(), str(self.rwing[1]))) if self.head[0] == False or self.head[1] == False: - self.error.append('The head button seems bad') + self.error.append('The head button has a problem') if self.lwing[0] == False or self.lwing[1] == False: - self.error.append('The left wing button seems bad (low position)') + self.error.append('The left wing switch has a problem (in lower position)') if self.rwing[0] == False or self.rwing[1] == False: - self.error.append('The right wing button seems bad (low position)') + self.error.append('The right wing button has a problem (in lower position)') self.progress_bar() @@ -215,7 +237,7 @@ tux.cmd.wings_on(1) self.warning(_me.string('Switch')) - self.f.write('%s : Test the switches with the wings up\n'%time.asctime()) + self.f.write('%s : Switch test with the wings in the upper position\n'%time.asctime()) self.head = [False, False] self.lwing = [False, False] self.rwing = [False, False] @@ -228,23 +250,23 @@ self.progress_bar() - self.f.write('%s : Head button pressed : %s\n'%(time.asctime(), str(self.head[0]))) + self.f.write('%s : Head button pushed : %s\n'%(time.asctime(), str(self.head[0]))) self.f.write('%s : Head button released : %s\n'%(time.asctime(), str(self.head[1]))) - self.f.write('%s : Left wing pressed : %s\n'%(time.asctime(), str(self.lwing[0]))) + self.f.write('%s : Left wing pushed : %s\n'%(time.asctime(), str(self.lwing[0]))) self.f.write('%s : Left wing released : %s\n'%(time.asctime(), str(self.lwing[1]))) - self.f.write('%s : Right wing pressed : %s\n'%(time.asctime(), str(self.rwing[0]))) + self.f.write('%s : Right wing pushed : %s\n'%(time.asctime(), str(self.rwing[0]))) self.f.write('%s : Right wing released : %s\n'%(time.asctime(), str(self.rwing[1]))) if self.head[0] == False or self.head[1] == False: - self.error.append('The head button seems bad') + self.error.append('The head button has a problem') if self.lwing[0] == False or self.lwing[1] == False: - self.error.append('The left wing button seems bad (high position)') + self.error.append('The left wing switch has a problem (in higher position)') if self.rwing[0] == False or self.rwing[1] == False: - self.error.append('The right wing button seems bad (high position)') + self.error.append('The right wing button has a problem (in higher position)') def leds_tests(self): self.f.write('%s :\n'%time.asctime()) - self.f.write('%s : Fourth step : IR and LEDs\n'%time.asctime()) + self.f.write('%s : Step 4 : IR and LEDs\n'%time.asctime()) self.f.write('%s : ------------------------------------------------------------- \n'%time.asctime()) self.f.write('%s : Switch on the LEDs '%time.asctime()) tux.cmd.eyes_open() @@ -288,29 +310,29 @@ timer = time.time() while time.time() <= timer + 15: if self.key1 and self.key2 and self.key3: - self.f.write('%s : Tux received correctly the remote control signal\n'%time.asctime()) + self.f.write('%s : Tux Droid received the remote control signals correctly\n'%time.asctime()) break tux.sys.wait(0.5) if time.time() >= timer + 15: - self.f.write('%s : Tux not received correctly the remote control signal\n'%time.asctime()) - self.error.append('The IR captor seems bad') + self.f.write('%s : Tux Droid did not receive the remote control signals correctly\n'%time.asctime()) + self.error.append('The IR receiver has a problem') self.progress_bar() def sound_tests(self): self.f.write('%s :\n'%time.asctime()) - self.f.write('%s : Fifth step : Sound\n'%time.asctime()) + self.f.write('%s : Step 4 : Sound\n'%time.asctime()) self.f.write('%s : ------------------------------------------------------------- \n'%time.asctime()) if tux.status.sounds_count() == 0: - self.f.write('%s : The sound flash is empty\n'%time.asctime()) + self.f.write('%s : The sound flash memory is empty\n'%time.asctime()) self.tree_store.clear() - self.tree_store.append(None, ['Sound flash empty ...']) + self.tree_store.append(None, ['Sound flash memory empty ...']) self.error.append('The flash memory is empty') else: self.tree_store.clear() - self.tree_store.append(None, ['Playing a sound from the flash memory']) + self.tree_store.append(None, ['Playing a sound from the sound flash memory']) tux.cmd.sound_play(1) try: while tux.status.sound_play()[0] != 0: @@ -325,7 +347,7 @@ self.warning(_me.string('Sound1')) self.tree_store.clear() - self.tree_store.append(None, ['Playing a sound from the flash memory']) + self.tree_store.append(None, ['Playing a sound from the sound flash memory']) tux.cmd.sound_play(1) try: while tux.status.sound_play()[0] != 0: @@ -358,7 +380,7 @@ self.warning(_me.string('Mic')) self.tree_store.clear() - self.tree_store.append(None, ['Recording the microphone']) + self.tree_store.append(None, ['Recording with the microphone']) tux.micro.on() tux.cmd.mouth_open() tux.micro.capture_start('/tmp/capture.wav', 3) @@ -373,8 +395,8 @@ if self.ok_flag == True: self.f.write('%s : Microphone OK\n'%time.asctime()) else: - self.f.write('%s : No micro signal\n'%time.asctime()) - self.error.append('The micro seems bad') + self.f.write('%s : No microphone signal\n'%time.asctime()) + self.error.append('The microphone has a problem') self.progress_bar() @@ -394,7 +416,7 @@ self.f.write('%s : The sound output has not been tested\n'%time.asctime()) self.progress_bar() - + ''' self.question(_me.string('In')) if self.ok_flag == True: tux.sys.wait(5) @@ -406,18 +428,18 @@ self.error.append('No sound input ...') else: self.f.write('%s : The sound input has not been tested\n'%time.asctime()) - + self.progress_bar() - + ''' def motors_tests(self): self.f.write('%s :\n'%time.asctime()) - self.f.write('%s : Sixth step : Motors\n'%time.asctime()) + self.f.write('%s : Step 6 : Motors\n'%time.asctime()) self.f.write('%s : ------------------------------------------------------------- \n'%time.asctime()) self.head = [False, False] self.lwing = [False, False] self.rwing = [False, False] - self.f.write('%s : Reset tux ... '%time.asctime()) + self.f.write('%s : Resetting tux ... '%time.asctime()) tux.cmd.raw(0x31, 0, 0, 0) tux.cmd.mouth_close() tux.sys.wait(1) @@ -440,15 +462,15 @@ self.progress_bar() - self.f.write('%s : Move the wings 8 time'%time.asctime()) + self.f.write('%s : Move the wings 8 times'%time.asctime()) self.tree_store.clear() - self.tree_store.append(None, ['Move the wings 8 time']) + self.tree_store.append(None, ['Move the wings 8 times']) self.send_command(tux.cmd.wings_on(8), tux.status.wings_counter, 0) self.progress_bar() - self.f.write('%s : Left wing pressed : %s\n'%(time.asctime(), str(self.lwing[0]))) - self.f.write('%s : Right wing pressed : %s\n'%(time.asctime(), str(self.rwing[0]))) + self.f.write('%s : Left wing pushed : %s\n'%(time.asctime(), str(self.lwing[0]))) + self.f.write('%s : Right wing pushed : %s\n'%(time.asctime(), str(self.rwing[0]))) if self.lwing[0] == True: self.error.append('Left wing switch pressed while moving') if self.rwing[0] == True: @@ -461,7 +483,7 @@ self.send_command(tux.cmd.eyes_close(), tux.status.eyes_closed, 0) self.progress_bar() - + ''' self.question(_me.string('Eyes')) if self.ok_flag == True: self.f.write('%s : The eyes are correctly closed\n'%time.asctime()) @@ -470,7 +492,7 @@ self.error.append('The eyes are not correctly closed') self.progress_bar() - + ''' self.f.write('%s : Send a command to open the eyes'%time.asctime()) self.tree_store.clear() self.tree_store.append(None, ['Send a command to open the eyes']) @@ -478,40 +500,48 @@ self.progress_bar() - self.f.write('%s : Send a command to open the mouth'%time.asctime()) + self.f.write('%s : Send a command to open the beak'%time.asctime()) self.tree_store.clear() - self.tree_store.append(None, ['Send a command to open the mouth']) + self.tree_store.append(None, ['Send a command to open the beak']) self.send_command(tux.cmd.mouth_open(), tux.status.mouth_closed, 1) self.progress_bar() - self.f.write('%s : Send a command to close the mouth'%time.asctime()) + self.f.write('%s : Send a command to close the beak'%time.asctime()) self.tree_store.clear() - self.tree_store.append(None, ['Send a command to close the mouth']) + self.tree_store.append(None, ['Send a command to close the beak']) self.send_command(tux.cmd.mouth_close(), tux.status.mouth_closed, 0) self.progress_bar() + while(1): + self.warning(_me.string('Disconnect')) + try: + if tux.status.charger_state() == 0: + break + except: + if tux.status.power_plug() == 0: + break - self.warning(_me.string('Disconnect')) + self.warning(_me.string('StartSpin')) - self.f.write('%s : Send a command to spin right'%time.asctime()) + self.f.write('%s : Send a command to spin to the right'%time.asctime()) self.tree_store.clear() - self.tree_store.append(None, ['Send a command to spin right']) + self.tree_store.append(None, ['Send a command to spin to the right']) self.send_command(tux.cmd.spinr_on(4), tux.status.spin_counter, 0) self.progress_bar() - self.f.write('%s : Send a command to spin left'%time.asctime()) + self.f.write('%s : Send a command to spin to the left'%time.asctime()) self.tree_store.clear() - self.tree_store.append(None, ['Send a command to spin left']) + self.tree_store.append(None, ['Send a command to spin to the left']) self.send_command(tux.cmd.spinl_on(4), tux.status.spin_counter, 0) self.progress_bar() - self.f.write('%s : Send a command to shake Tux'%time.asctime()) + self.f.write('%s : Send a command to shake Tux\n'%time.asctime()) self.tree_store.clear() - self.tree_store.append(None, ['Send a command to shake Tux']) + self.tree_store.append(None, ['Send a command to shake Tux ']) tux.sys.wait(1) @@ -565,7 +595,7 @@ self.f.write(str(time.asctime())+' : '+self.error[i]+'\n') self.tree_store.append(None, [self.error[i]]) - self.f.write("%s : Don't forget to see the motors section\n"%time.asctime()) + self.f.write("%s : Don't forget to check the motors section\n"%time.asctime()) self.f.close() self.get_widget('progressbar2T').hide() @@ -594,31 +624,31 @@ def on_head_bt_released(self): self.head[1] = True - self.tree_store.append(None, ['Head clicked']) + self.tree_store.append(None, ['Head button pushed']) def on_lwing_bt_released(self): self.lwing[1] = True - self.tree_store.append(None, ['left wing clicked']) + self.tree_store.append(None, ['left wing pushed']) def on_rwing_bt_released(self): self.rwing[1] = True - self.tree_store.append(None, ['right wing clicked']) + self.tree_store.append(None, ['right wing pushed']) def on_remote(self, key): if key == 1: self.key1 = True - self.f.write("%s : Key '1' pressed\n"%time.asctime()) - self.tree_store.append(None, ['key1 pressed']) + self.f.write("%s : Key '1' pushed\n"%time.asctime()) + self.tree_store.append(None, ['key1 pushed']) elif key == 2: self.key2 = True - self.f.write("%s : Key '2' pressed\n"%time.asctime()) - self.tree_store.append(None, ['key2 pressed']) + self.f.write("%s : Key '2' pushed\n"%time.asctime()) + self.tree_store.append(None, ['key2 pushed']) elif key == 3: self.key3 = True - self.f.write("%s : Key '3' pressed\n"%time.asctime()) - self.tree_store.append(None, ['key3 pressed']) + self.f.write("%s : Key '3' pushed\n"%time.asctime()) + self.tree_store.append(None, ['key3 pushed']) else: - self.f.write("%s : Key '%d' pressed\n"%(time.asctime(), key)) + self.f.write("%s : Key '%d' pushed\n"%(time.asctime(), key)) def send_command(self, command, status, stat_val): for i in range(2): Modified: software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp =================================================================== --- software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp 2007-12-12 10:35:05 UTC (rev 780) +++ software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp 2007-12-12 11:46:24 UTC (rev 781) @@ -819,7 +819,9 @@ self.get_widget('progressbar1').set_fraction(current) current = current + fraction tux.cmd.sound_erase() + tux.sys.wait(1) + while tux.status.sound_record()[0] != 0: tux.sys.wait(0.1) @@ -829,8 +831,12 @@ self.get_widget('progressbar1').set_fraction(current) self.get_widget('lblSoundState').set_text(_me.string('soundProg')+str(i+1)) tux.cmd.sound_storing() + while tux.status.sound_record()[0] != 1: + tux.sys.wait(0.1) tux.sys.shell("aplay -D %s %s"%(soundcard, sound_table[i])) - tux.sys.wait(0.1) + while tux.status.sound_record()[0] != 2: + tux.sys.wait(0.1) + tux.cmd.sound_confirm(True) current = current + fraction tux.sys.wait(0.1) @@ -845,8 +851,6 @@ # On "play" flash sound button clicked #-------------------------------------------------------------------------- def on_wave_internal_play_bt_clicked(self, widget, *args): - if self.__sound_mutex.locked(): - return def _funct(): index=self.get_widget("spinbutton7").get_value() tux.cmd.sound_play(int(index),0) @@ -857,80 +861,60 @@ # On "play flash sound number 1" button clicked #-------------------------------------------------------------------------- def on_wave_internal_play1_clicked(self, widget, *args): - if self.__sound_mutex.locked(): - return thread.start_new_thread(tux.cmd.sound_play,(1,0,)) #-------------------------------------------------------------------------- # On "play flash sound number 2" button clicked #-------------------------------------------------------------------------- def on_wave_internal_play2_clicked(self, widget, *args): - if self.__sound_mutex.locked(): - return thread.start_new_thread(tux.cmd.sound_play,(2,0,)) #-------------------------------------------------------------------------- # On "play flash sound number 3" button clicked #-------------------------------------------------------------------------- def on_wave_internal_play3_clicked(self, widget, *args): - if self.__sound_mutex.locked(): - return thread.start_new_thread(tux.cmd.sound_play,(3,0,)) #-------------------------------------------------------------------------- # On "play flash sound number 4" button clicked #-------------------------------------------------------------------------- def on_wave_internat_play4_clicked(self, widget, *args): - if self.__sound_mutex.locked(): - return thread.start_new_thread(tux.cmd.sound_play,(4,0,)) #-------------------------------------------------------------------------- # On "play flash sound number 5" button clicked #-------------------------------------------------------------------------- def on_wave_internal_play5_clicked(self, widget, *args): - if self.__sound_mutex.locked(): - return thread.start_new_thread(tux.cmd.sound_play,(5,0,)) #-------------------------------------------------------------------------- # On "play flash sound number 6" button clicked #-------------------------------------------------------------------------- def on_wave_internal_play6_clicked(self, widget, *args): - if self.__sound_mutex.locked(): - return thread.start_new_thread(tux.cmd.sound_play,(6,0,)) #-------------------------------------------------------------------------- # On "play flash sound number 7" button clicked #-------------------------------------------------------------------------- def on_wave_internal_play7_clicked(self, widget, *args): - if self.__sound_mutex.locked(): - return thread.start_new_thread(tux.cmd.sound_play,(7,0,)) #-------------------------------------------------------------------------- # On "play flash sound number 8" button clicked #-------------------------------------------------------------------------- def on_wave_internal_play8_clicked(self, widget, *args): - if self.__sound_mutex.locked(): - return thread.start_new_thread(tux.cmd.sound_play,(8,0,)) #-------------------------------------------------------------------------- # On "play flash sound number 9" button clicked #-------------------------------------------------------------------------- def on_wave_internal_play9_clicked(self, widget, *args): - if self.__sound_mutex.locked(): - return thread.start_new_thread(tux.cmd.sound_play,(9,0,)) #-------------------------------------------------------------------------- # On "play flash sound number 10" button clicked #-------------------------------------------------------------------------- def on_wave_internal_play10_clicked(self, widget, *args): - if self.__sound_mutex.locked(): - return thread.start_new_thread(tux.cmd.sound_play,(10,0,)) #-------------------------------------------------------------------------- Modified: software/gadgets/settings/trunk/settings/Strings/fr_ALL.xml =================================================================== --- software/gadgets/settings/trunk/settings/Strings/fr_ALL.xml 2007-12-12 10:35:05 UTC (rev 780) +++ software/gadgets/settings/trunk/settings/Strings/fr_ALL.xml 2007-12-12 11:46:24 UTC (rev 781) @@ -85,6 +85,11 @@ appuyez sur 'oui'.</Connect> <lblCurrentIDName type='str'>Le nom acteul est : </lblCurrentIDName> <Close type='str'>Fermer</Close> + <StartSpin type='str'>La prochaine test est celui des moteurs +faisant tourner Tux. +Afin de faire ce test dans les meilleures +conditions, merci de faire un peu de place +autour du Tux.</StartSpin> <Out type='str'>Voulez-vous tester la sortie son de Tux? Vous devez connecter des haut-parleurs dans la prise verte.</Out> @@ -110,7 +115,7 @@ <gui_conf_current_bind_lb type='str'>Assignation</gui_conf_current_bind_lb> <speaker_name type='str'>Bruno8k</speaker_name> <btnSoundModify type='str'>Modifier</btnSoundModify> - <Iwlist type='str'>iwlist n'a pas été trouvée. + <Iwlist type='str'>iwlist n'a pas été trouvé. Assurez-vous que le paquet 'wireless tools' est correctement installé sur votre ordinateur. (http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html#latest)</Iwlist> <btnSoundPlayNum type='str'>Lire</btnSoundPlayNum> Modified: software/gadgets/settings/trunk/settings/about.xml =================================================================== (Binary files differ) Modified: software/gadgets/settings/trunk/settings/settings.xml =================================================================== --- software/gadgets/settings/trunk/settings/settings.xml 2007-12-12 10:35:05 UTC (rev 780) +++ software/gadgets/settings/trunk/settings/settings.xml 2007-12-12 11:46:24 UTC (rev 781) @@ -4,24 +4,20 @@ <AvoidChannel type='int'>0</AvoidChannel> <hidden_in_manager type='bool'>True</hidden_in_manager> <SleepDelay type='str'>5</SleepDelay> - <EnableSleep type='bool'>True</EnableSleep> + <EnableSleep type='bool'>False</EnableSleep> </parameters> <general> <have_settings_part type='bool'>True</have_settings_part> <gui_state> <widget> - <y type='int'>25</y> - <visible type='bool'>True</visible> - <x type='int'>0</x> + <visible type='bool'>False</visible> </widget> + <selftest> + <visible type='bool'>False</visible> + </selftest> <conf> <visible type='bool'>False</visible> </conf> - <selftest> - <y type='int'>25</y> - <visible type='bool'>True</visible> - <x type='int'>0</x> - </selftest> </gui_state> <language type='str'>en_US</language> <notified type='bool'>True</notified> @@ -30,7 +26,7 @@ <menu_active type='bool'>True</menu_active> <have_widget_part type='bool'>True</have_widget_part> <speaker type='int'>3</speaker> - <pitch type='int'>100</pitch> + <pitch type='int'>129</pitch> <have_main_part type='bool'>False</have_main_part> <main_priority type='int'>0</main_priority> <notify_priority type='int'>0</notify_priority> Modified: software/gadgets/settings/trunk/settings/strings.xml =================================================================== --- software/gadgets/settings/trunk/settings/strings.xml 2007-12-12 10:35:05 UTC (rev 780) +++ software/gadgets/settings/trunk/settings/strings.xml 2007-12-12 11:46:24 UTC (rev 781) @@ -2,11 +2,11 @@ <strings> <lblLocal type='str'>Available versions</lblLocal> <gui_conf_remote_title type='str'>Remote</gui_conf_remote_title> - <Firmware type='str'>Be sure that the firmware updater gadget is correctly installed.</Firmware> + <Firmware type='str'>Make sure the firmware updater gadget is correctly installed.</Firmware> <Selftest type='str'>This is a self test program for Tux Droid. -Please follow the instructions and execute the -requested tasks. +Please follow the instructions and do the +requested tests. At the end, a log file can be found here : </Selftest> @@ -16,14 +16,14 @@ <itemCPU type='str'>Flash the CPUs</itemCPU> <btnSoundPlayMic type='str'>Play</btnSoundPlayMic> <btnUpdate type='str'>Check for updates</btnUpdate> - <FVersion type='str'>Version can't be read</FVersion> + <btnSoundRecordMic type='str'>Record</btnSoundRecordMic> <gui_conf_about_title type='str'>About</gui_conf_about_title> <chkSoundOriginal type='str'>Include originals</chkSoundOriginal> <btnSoundClear type='str'>Clear list</btnSoundClear> - <Sound1 type='str'>Be sure that the sound volume control is -at the maximum.</Sound1> + <Sound1 type='str'>Make sure that the sound volume control dial on +the back of Tux Droid is at the maximum.</Sound1> <lblIDNum type='str'>Tux's ID : </lblIDNum> - <SVN type='str'>SVN</SVN> + <Sound type='str'>Have you heard the sound ?</Sound> <lblSleepDelay type='str'>Active the sleep mode after a inactivity period of</lblSleepDelay> <itemDescription type='str'>Show the description</itemDescription> <lblConfigTest type='str'>Self tests</lblConfigTest> @@ -39,14 +39,14 @@ <btnID type='str'>Change ID</btnID> <official type='str'>Official version</official> <Disconnect type='str'>Please disconnect the power plug and -press the 'Yes' button.</Disconnect> +click the 'Yes' button.</Disconnect> <btnSoundAdd type='str'>Add</btnSoundAdd> <gui_conf_accept_bt type='str'>Accept</gui_conf_accept_bt> <lblCurrentIDNum type='str'>The current ID is : </lblCurrentIDNum> <Connect type='str'>Please connect the power plug and -press the 'Yes' button</Connect> +click the 'Yes' button</Connect> <lblSoundExternal type='str'>Play external wave file</lblSoundExternal> - <gui_conf_version_lb type='str'>Version</gui_conf_version_lb> + <lblSoundStore type='str'>Store wave files locally</lblSoundStore> <btnSleepSleep type='str'>Sleep</btnSleepSleep> <gui_conf_remote_set_bt type='str'>Set</gui_conf_remote_set_bt> <lblUsedChannel type='str'>Your wifi use the channel :</lblUsedChannel> @@ -60,19 +60,19 @@ <Start type='str'>Start</Start> <treeFile type='str'>Fichier</treeFile> <lblSoundLocal type='str'>Play local wave files</lblSoundLocal> - <lblSoundStore type='str'>Store wave files locally</lblSoundStore> + <gui_conf_version_lb type='str'>Version</gui_conf_version_lb> <gui_conf_update_title type='str'>Update</gui_conf_update_title> <lblTabConfig type='str'>Configuration</lblTabConfig> <gui_conf_cancel_bt type='str'>Cancel</gui_conf_cancel_bt> - <btnSoundRecordMic type='str'>Record</btnSoundRecordMic> + <FVersion type='str'>Version can't be read</FVersion> <btnSleepWakeup type='str'>Wakeup</btnSleepWakeup> <btnCancelT type='str'>No</btnCancelT> <itemChangeLog type='str'>Show ChangeLog</itemChangeLog> <lblSoundLocalSelect type='str'>Select sound</lblSoundLocalSelect> <lblCurrentIDNumError type='str'>Unable to read the current ID.</lblCurrentIDNumError> - <Switch type='str'>After pressing the 'Yes' button, press on -the wings and on the head. -You've 15 seconds to perform this task.</Switch> + <Switch type='str'>After clicking the 'Yes' button, push on +the wings and on the head button. +You have 15 seconds to do this test.</Switch> <gui_conf_author_lb type='str'>Author</gui_conf_author_lb> <lblTabSound type='str'>Audio</lblTabSound> <btnSoundStore type='str'>Store</btnSoundStore> @@ -80,38 +80,44 @@ <lblIDName type='str'>Tux's name : </lblIDName> <lblCurrentIDName type='str'>The current name is : </lblCurrentIDName> <Close type='str'>Close</Close> + <StartSpin type='str'>The next step is to test the spin motors. +To perfom correctly this task, please clear +the surface around Tux. +</StartSpin> <Out type='str'>Would you like to test the sound output interface? -To do this, you need to connect loudspeakers in the -green connector, and press the 'Yes' button.</Out> - <Sound type='str'>Have you heard the sound ?</Sound> +To do this, you need to plug speakers or headphones +into the green connector, and click the 'Yes' button.</Out> + <SVN type='str'>SVN</SVN> <btnOKT type='str'>Yes</btnOKT> - <Mic type='str'>After closing this window, say anything to Tux.</Mic> + <Mic type='str'>After clicking the 'Yes' button, say something +to Tux Droid.</Mic> <btnStopT type='str'>Stop</btnStopT> <soundErase type='str'>Erasing flash ...</soundErase> - <Eyes type='str'>Are the eyes correctly closed ?</Eyes> + <Eyes type='str'>Are the eyes closed correctly?</Eyes> <lblSoundExternalPlay type='str'>Play</lblSoundExternalPlay> <lblNoChannel type='str'>No wifi connection found</lblNoChannel> <gui_conf_delay_lb type='str'>Delay (sec)</gui_conf_delay_lb> <lblConfigSleep type='str'>Sleep configuration</lblConfigSleep> <lblSleepStateSleep type='str'>Tux is currently sleeping</lblSleepStateSleep> - <IR type='str'>After pressing the 'Yes' button, press the -keys '1', '2' and '3' of the remote control. + <IR type='str'>After clicking the 'Yes' button, push the +keys '1', '2' and '3' on the remote control. -You've 15 seconds to perform this task.</IR> +You have 15 seconds to do this test.</IR> <btnSelfTest type='str'>Start self test</btnSelfTest> <lblSleepStateWork type='str'>Tux isn't in sleep mode</lblSleepStateWork> <treeVersionProg type='str'>Component</treeVersionProg> <gui_conf_current_bind_lb type='str'>Current</gui_conf_current_bind_lb> <speaker_name type='str'>Ryan8k</speaker_name> <btnSoundModify type='str'>Modify</btnSoundModify> - <Iwlist type='str'>iwlist package isn't found. -Be sure that wireless tools package is instelled on your computer. + <Iwlist type='str'>iwlist package is not found. +Make sure the wireless tools package is installed on your computer. (http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html#latest)</Iwlist> <unreleased type='str'>Unreleased version</unreleased> <In type='str'>Would you like to test the sound input interface? -To do this, you need to connect an input device -in the blue connector and then click 'Yes'.</In> +To do this, you need to plug an input device +into the blue connector on the back of Tux Droid +and then click 'Yes'.</In> <IDErrorOverflow type='str'>The ID must be included between 1 and 65534.</IDErrorOverflow> </strings> Modified: software/gadgets/settings/trunk/settings.tgf =================================================================== (Binary files differ) |