[tuxdroid-svn] r581 - in software/gadgets/light_monitor/trunk: . Light_monitor Light_monitor/Script
Status: Beta
Brought to you by:
ks156
From: Paul_R <c2m...@c2...> - 2007-10-04 16:23:43
|
Author: Paul_R Date: 2007-10-04 18:23:15 +0200 (Thu, 04 Oct 2007) New Revision: 581 Modified: software/gadgets/light_monitor/trunk/Light_monitor.tgf software/gadgets/light_monitor/trunk/Light_monitor/Scripts/Python/GUI/widget/other.glade software/gadgets/light_monitor/trunk/Light_monitor/Scripts/Python/GUI/widget/other.pyp software/gadgets/light_monitor/trunk/Light_monitor/about.xml software/gadgets/light_monitor/trunk/Light_monitor/strings.xml Log: * Added a new function in the test window to add the selected config in the settings window I can't yet refresh the config window when the button is pressed, because the manager freeze. I have to find a solution to this problem... Modified: software/gadgets/light_monitor/trunk/Light_monitor/Scripts/Python/GUI/widget/other.glade =================================================================== --- software/gadgets/light_monitor/trunk/Light_monitor/Scripts/Python/GUI/widget/other.glade 2007-10-04 15:08:19 UTC (rev 580) +++ software/gadgets/light_monitor/trunk/Light_monitor/Scripts/Python/GUI/widget/other.glade 2007-10-04 16:23:15 UTC (rev 581) @@ -1190,7 +1190,7 @@ <property name="use_underline">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> - <signal name="pressed" handler="on_btnSet_pressed" last_modification_time="Thu, 04 Oct 2007 14:52:44 GMT"/> + <signal name="clicked" handler="on_btnSet_clicked" last_modification_time="Thu, 04 Oct 2007 15:53:35 GMT"/> </widget> <packing> <property name="x">320</property> Modified: software/gadgets/light_monitor/trunk/Light_monitor/Scripts/Python/GUI/widget/other.pyp =================================================================== --- software/gadgets/light_monitor/trunk/Light_monitor/Scripts/Python/GUI/widget/other.pyp 2007-10-04 15:08:19 UTC (rev 580) +++ software/gadgets/light_monitor/trunk/Light_monitor/Scripts/Python/GUI/widget/other.pyp 2007-10-04 16:23:15 UTC (rev 581) @@ -159,9 +159,67 @@ def on_btnSet_clicked(self, widget, *args): - pass + if self.get_widget('cbbConfig').get_active() == 0: + val = [len(self.light_measure.event_tab)+1, 0, 0, + self.light_measure.val_drop, + self.light_measure.val_drop_time, + self.light_measure.change_notified, + self.light_measure.change_behavior, + False, + 0] + elif self.get_widget('cbbConfig').get_active() == 1: + val = [len(self.light_measure.event_tab)+1, 0, 1, + self.light_measure.val_raise, + self.light_measure.val_raise_time, + self.light_measure.change_notified, + self.light_measure.change_behavior, + False, + 0] + elif self.get_widget('cbbConfig').get_active() == 2: + val = [len(self.light_measure.event_tab)+1, 0, 2, + self.light_measure.val_changeD, + self.light_measure.val_changeD_time, + self.light_measure.change_notified, + self.light_measure.change_behavior, + False, + 0] + elif self.get_widget('cbbConfig').get_active() == 3: + val = [len(self.light_measure.event_tab)+1, 0, 3, + self.light_measure.val_changeU, + self.light_measure.val_changeU_time, + self.light_measure.change_notified, + self.light_measure.change_behavior, + False, + 0] + elif self.get_widget('cbbConfig').get_active() == 4: + val = [len(self.light_measure.event_tab)+1, 1, 0, + self.light_measure.val_increase, + 0, + self.light_measure.threshold_notified, + self.light_measure.threshold_behavior, + False, + 0] + elif self.get_widget('cbbConfig').get_active() == 5: + val = [len(self.light_measure.event_tab)+1, 1, 1, + self.light_measure.val_decrease, + 0, + self.light_measure.threshold_notified, + self.light_measure.threshold_behavior, + False, + 0] + elif self.get_widget('cbbConfig').get_active() == 6: + val = [len(self.light_measure.event_tab)+1, 1, 2, + self.light_measure.val_both, + 0, + self.light_measure.threshold_notified, + self.light_measure.threshold_behavior, + False, + 0] + self.light_measure.event_tab.append(val) + print self.light_measure.event_tab + #_me.gui('conf').hide() + #_me.gui('conf').show() - def on_btnApply_clicked(self, widget, *args): #Store the new radio buttons status Modified: software/gadgets/light_monitor/trunk/Light_monitor/about.xml =================================================================== --- software/gadgets/light_monitor/trunk/Light_monitor/about.xml 2007-10-04 15:08:19 UTC (rev 580) +++ software/gadgets/light_monitor/trunk/Light_monitor/about.xml 2007-10-04 16:23:15 UTC (rev 581) @@ -1,7 +1,7 @@ <?xml version='1.0' encoding='UTF-8'?> <about> - <gadget_name type='str'>light_monitor</gadget_name> <gadget_author type='str'>Paul Rathgeb</gadget_author> + <gadget_version type='str'>0.0.1</gadget_version> <gadget_description type='str'>Light monitor for tux droid</gadget_description> - <gadget_version type='str'>0.0.1</gadget_version> + <gadget_name type='str'>light_monitor</gadget_name> </about> Modified: software/gadgets/light_monitor/trunk/Light_monitor/strings.xml =================================================================== --- software/gadgets/light_monitor/trunk/Light_monitor/strings.xml 2007-10-04 15:08:19 UTC (rev 580) +++ software/gadgets/light_monitor/trunk/Light_monitor/strings.xml 2007-10-04 16:23:15 UTC (rev 581) @@ -10,7 +10,6 @@ <gui_conf_accept_bt type='str'>Accept</gui_conf_accept_bt> <help_text type='str'> </help_text> - <conf_lblBehavior type='str'>Behavior script</conf_lblBehavior> <conf_lblChange type='str'>Change</conf_lblChange> <conf_lblBoth type='str'>Both</conf_lblBoth> <widget_lblBtnApply type='str'>Apply changes</widget_lblBtnApply> @@ -20,11 +19,13 @@ <gui_conf_update_title type='str'>Update</gui_conf_update_title> <widget_lblValue type='str'>Value (%)</widget_lblValue> <gui_conf_cancel_bt type='str'>Cancel</gui_conf_cancel_bt> - <widget_lblBoth type='str'>Both direction</widget_lblBoth> + <gui_conf_rate_lb type='str'>Refresh rate :</gui_conf_rate_lb> + <conf_btnRemove type='str'>Remove</conf_btnRemove> <gui_conf_delay_lb type='str'>Delay (sec)</gui_conf_delay_lb> <conf_btnBehavior type='str'>Clear path</conf_btnBehavior> <gui_conf_about_title type='str'>About</gui_conf_about_title> <conf_lblChangeD type='str'>Drop and raise</conf_lblChangeD> + <conf_lblChangeU type='str'>Raise and drop</conf_lblChangeU> <speaker_name type='str'>Ryan8k</speaker_name> <conf_lblSample type='str'>Samples</conf_lblSample> <conf_lblType type='str'>Type</conf_lblType> @@ -41,10 +42,9 @@ <conf_lblNotifiedBehavior type='str'>Notified</conf_lblNotifiedBehavior> <gui_conf_author_lb type='str'>Author</gui_conf_author_lb> <widget_lblDrop type='str'>Drop</widget_lblDrop> - <conf_lblNotified type='str'>Notified ?</conf_lblNotified> - <gui_conf_rate_lb type='str'>Refresh rate :</gui_conf_rate_lb> + <widget_lblBoth type='str'>Both direction</widget_lblBoth> <conf_lblDefaultBehavior type='str'>Default behavior</conf_lblDefaultBehavior> - <conf_lblChangeU type='str'>Raise and drop</conf_lblChangeU> + <conf_lblBehavior type='str'>Behavior script</conf_lblBehavior> <gui_conf_remote_set_bt type='str'>Set</gui_conf_remote_set_bt> <widget_lblChange type='str'>Change</widget_lblChange> <widget_lblLight type='str'>Search light</widget_lblLight> @@ -60,6 +60,6 @@ <widget_lblChangeD type='str'>Drop and raise</widget_lblChangeD> <conf_lblTime type='str'>Time (sec.)</conf_lblTime> <conf_lblControl type='str'>Control</conf_lblControl> - <conf_btnRemove type='str'>Remove</conf_btnRemove> + <conf_lblNotified type='str'>Notified ?</conf_lblNotified> <widget_lblThreshold type='str'>Threshold</widget_lblThreshold> </strings> Modified: software/gadgets/light_monitor/trunk/Light_monitor.tgf =================================================================== (Binary files differ) |