Logo Search packages:      
Sourcecode: alarm-clock version File versions  Download package

SnoozeThread.py

from threading import Thread

import time
import gtk

class SnoozeThread(Thread):
      def __init__(self,c,dl, MainClass):
            Thread.__init__(self)
            self.setDaemon(True)
            self.dl = dl
            self.c = c

            self.MainClass = MainClass

      def run(self):
            self.count = 0

            gtk.gdk.threads_enter()
            self.MainClass().StopTheSound(None)
            gtk.gdk.threads_leave()
            while True:
                  time.sleep(60)
                  self.count = self.count + 1
                  if self.count == self.c[39]:
                        gtk.gdk.threads_enter()
                        self.MainClass().RunAlarm(self.c)
                        gtk.gdk.threads_leave()
                        break

Generated by  Doxygen 1.6.0   Back to index