Beispiel #1
0
 def getUniq(self,req,dt):
     data=json.loads(dt.decode("utf-8")) if not isinstance(dt,dict) else dt
     if data["uniq"]=="not_yet_set":
         return
     if data["uniq"]:
         self.uniq=data["uniq"]
         Clock.unschedule(self.checkUniq)
         Clock.schedule_interval(self.listenMesage, 4)
Beispiel #2
0
 def startClock(self):
     Clock.schedule_interval(self.checkUniq,1)
Beispiel #3
0
 def stopListenMsg(self):
     self.uniq=None
     Clock.unschedule(self.listenMesage)
Beispiel #4
0
 def delete_clock(self, touch):
     try:
         Clock.unschedule(touch.ud['event'])
     except KeyError:
         pass
     self.long_press_clock = None
Beispiel #5
0
 def create_clock(self, touch):
     function = partial(self.menu, touch)
     self.long_press_clock = Clock.schedule_once(function, 2)
     touch.ud['event'] = function  # So we can unschedule it if the button is pressed early
Beispiel #6
0
 def delete_clock(self, touch):
     try:
         Clock.unschedule(touch.ud['event'])
     except KeyError:
         pass
     self.long_press_clock = None
Beispiel #7
0
 def create_clock(self, touch):
     function = partial(self.menu, touch)
     self.long_press_clock = Clock.schedule_once(function, 2)
     touch.ud[
         'event'] = function  # So we can unschedule it if the button is pressed early