[tuxdroid-svn] r877 - in software/gadgets/battery_monitor/trunk: . Battery_monitor_svn Battery_moni
Status: Beta
Brought to you by:
ks156
From: Paul_R <c2m...@c2...> - 2008-01-24 13:54:47
|
Author: Paul_R Date: 2008-01-24 14:54:44 +0100 (Thu, 24 Jan 2008) New Revision: 877 Modified: software/gadgets/battery_monitor/trunk/Battery_monitor.tgf software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/notify.pyp software/gadgets/battery_monitor/trunk/Battery_monitor_svn/about.xml Log: * Fixed a bug in the notification actuator. This bug cut the TTS and displayed 'NOTIFICATION ERROR' in the debugger * Incremented the version number. (0.0.1 -> 0.0.2) Modified: software/gadgets/battery_monitor/trunk/Battery_monitor.tgf =================================================================== (Binary files differ) Modified: software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/notify.pyp =================================================================== --- software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/notify.pyp 2008-01-24 12:41:06 UTC (rev 876) +++ software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/notify.pyp 2008-01-24 13:54:44 UTC (rev 877) @@ -1,26 +1,27 @@ def notify_checker(): + measure = _me.get_param('measure') + if measure.low_threshold_flag == True or measure.high_threshold_flag == True: return True if measure.end_of_charge_flag == True: return True - + if measure.GUI_on == False: for i in range(len(measure.event_tab)): temp = measure.event_tab[i][7] if temp == True: return True return False - elif measure.GUI_on == True: + else: for i in range(len(measure.test_tab)): temp = measure.test_tab[i][7] if temp == True: return True return False - else: - return False + def notify_actuator(): @@ -49,7 +50,6 @@ event = measure.test_tab else: event = measure.event_tab - for i in range(len(event)): #create text to speach for the default notification if event[i][1] == 0: @@ -67,16 +67,15 @@ elif event[i][2] == 1: text = _me.string('Decrease') elif event[i][2] == 2: - text = _me.string('Both') - - if event[i][7]: + text = _me.string('Both') + if event[i][7]: if event[i][5]: - path = event[i][6] + path = str(event[i][6]) path = path.replace('%20', ' ') if os.path.isfile(path) and os.path.exists(path): path = "'%s'" % path tux.sys.shell(path) - event[i][7] = False + event[i][7] = False else: tux.cmd.mouth_open() tux.tts.speak(text) Modified: software/gadgets/battery_monitor/trunk/Battery_monitor_svn/about.xml =================================================================== --- software/gadgets/battery_monitor/trunk/Battery_monitor_svn/about.xml 2008-01-24 12:41:06 UTC (rev 876) +++ software/gadgets/battery_monitor/trunk/Battery_monitor_svn/about.xml 2008-01-24 13:54:44 UTC (rev 877) @@ -4,5 +4,5 @@ <gadget_description type='str'> </gadget_description> <gadget_name type='str'>battery_monitor</gadget_name> - <gadget_version type='str'>0.0.1</gadget_version> + <gadget_version type='str'>0.0.2</gadget_version> </about> |