1
0
Fork 0

Added forgotten timer: check if not PPP/PHP Day

This commit is contained in:
Daniele Tricoli 2007-04-28 07:36:57 +00:00
parent 218a6c3141
commit 4051487361
1 changed files with 5 additions and 2 deletions

View File

@ -42,6 +42,7 @@ START_CHECK_HOUR = time(9, 0)
FINISH_CHECK_HOUR = time(21, 0)
TOTAL_HOURS = FINISH_CHECK_HOUR.hour - START_CHECK_HOUR.hour
AUTO_HIDE_AFTER = 10 # seconds
CHECK_TIMER = 10 #seconds
DIPLAYING_TEXT = 'Today is a PPP/PHP Day!'
def u(t):
@ -152,11 +153,13 @@ class PReminder:
self.setText(DIPLAYING_TEXT)
self.setPiece(now.hour - START_CHECK_HOUR.hour)
self.timerID = gobject.timeout_add(timer, self.check)
self.show()
self.timerShow = gobject.timeout_add(AUTO_HIDE_AFTER * 1000,
self.hide)
else:
timer = CHECK_TIMER * 1000
self.timerID = gobject.timeout_add(timer, self.check)
def main(self):
gtk.main()