[tuxdroid-svn] r785 - in software/gadgets/sound_monitor/trunk: . audio_monitor audio_monitor/Script
Status: Beta
Brought to you by:
ks156
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) |