Esempio n. 1
0
 def _schedule_refresh(self):
     if self.schedule_on_gobject:
         self.timer = gobject.timeout_add(int(self.get_next_tick() * 1000), self._refresh)
     else:
         self.timer = g15scheduler.schedule("%s-Redraw" % self.page_id,
                                            self.get_next_tick(),
                                            self._refresh)
Esempio n. 2
0
 def _schedule_refresh(self):
     if self.schedule_on_gobject:
         self.timer = gobject.timeout_add(int(self.get_next_tick() * 1000), self._refresh)
     else:
         self.timer = g15scheduler.schedule("%s-Redraw" % self.page_id,
                                            self.get_next_tick(),
                                            self._refresh)
Esempio n. 3
0
 def __save_macro(self, macro):
     """
     Schedule saving of the macro in 2 seconds. This may be called again 
     before the 2 seconds are up, in which case the timer will reset.
     
     Keyword arguments:
     macro        -- macro to save
     """
     if not self.adjusting:
         if self.__macro_save_timer is not None:
             self.__macro_save_timer.cancel()
         self.__macro_save_timer = g15scheduler.schedule("SaveMacro", 2, self.__do_save_macro, macro)
Esempio n. 4
0
 def __save_macro(self, macro):
     """
     Schedule saving of the macro in 2 seconds. This may be called again 
     before the 2 seconds are up, in which case the timer will reset.
     
     Keyword arguments:
     macro        -- macro to save
     """
     if not self.adjusting:
         if self.__macro_save_timer is not None:
             self.__macro_save_timer.cancel()
         self.__macro_save_timer = g15scheduler.schedule(
             "SaveMacro", 2, self.__do_save_macro, macro)
Esempio n. 5
0
 def save_accounts(self):
     if not self._adjusting:
         if self._save_timer is not None:
             self._save_timer.cancel()
         self._save_timer = g15scheduler.schedule("SaveAccounts", 2,
                                                  self._do_save_accounts)
Esempio n. 6
0
 def save_accounts(self):
     if not self._adjusting:
         if self._save_timer is not None:
             self._save_timer.cancel()
         self._save_timer = g15scheduler.schedule("SaveAccounts", 2, self._do_save_accounts)