Changeset 51d5699


Ignore:
Timestamp:
04/08/12 18:54:41 (3 years ago)
Author:
Martin Kolman <martin.kolman@…>
Branches:
master
Children:
4fd575d
Parents:
223a597
git-author:
Martin Kolman <martin.kolman@…> (04/08/12 18:54:41)
git-committer:
Martin Kolman <martin.kolman@…> (04/08/12 18:54:41)
Message:

fix screen not being updated due to broken timer module

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/mod_cron.py

    r223a597 r51d5699  
    2727if gs.GUIString == "GTK": 
    2828  import gobject 
    29   ready = True 
    3029else: 
    3130  from PySide import QtCore 
    32   ready = False 
    3331 
    3432def getModule(m,d,i): 
     
    4139    return(CronQt(m,d,i)) 
    4240  else: # GTK for now 
    43     return(Cron(m,d,i)) 
     41    return(CronGTK(m,d,i)) 
    4442 
    4543class Cron(ranaModule): 
     
    129127  def addIdle(self, callback, args): 
    130128    """add a callback that is called once the main loop becomes idle""" 
    131     if not ready: 
    132       return 
    133129    gobject.idle_add(callback, *args) 
    134130 
     
    136132    """the callback will be called timeout + time needed to execute the callback 
    137133    and other events""" 
    138     if not ready: 
    139       return 
    140134    id = self._getID() 
    141135    realId = gobject.timeout_add(timeout, self._doTimeout, id, callback, args) 
     
    146140  def removeTimeout(self, id): 
    147141    """remove timeout with a given id""" 
    148     if not ready: 
    149       return 
    150142    with self.dataLock: 
    151143      if id in self.cronTab['timeout'].keys(): 
     
    158150  def modifyTimeout(self,id, newTimeout): 
    159151    """modify the duration of a timeout in progress""" 
    160     if not ready: 
    161       return 
    162152    with self.dataLock: 
    163153      if id in self.cronTab['timeout'].keys(): 
Note: See TracChangeset for help on using the changeset viewer.