Changeset 125

Show
Ignore:
Timestamp:
01/18/08 10:48:13
Author:
slee
Message:

removed need for patched pyatspi with Registry.PumpQueuedEvents?

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • inapp/trunk/src/jambu/InAppSelection.py

    r118 r125  
    8282     
    8383    def _onIdle(): 
    84       pyatspi.Registry.onPumpQueuedEvents() 
     84      # temp till pyatspi gets patched 
     85      def PumpQueuedEvents(self): 
     86        ''' 
     87        Provides asynch processing of events in the queue by executeing them with  
     88        _dispatchEvent(), as is done immediately when synch processing.  
     89        This method would normally be called from a main or idle loop. 
     90        ''' 
     91        import Queue 
     92        while 1: 
     93          try: 
     94            # get next waiting event 
     95            event = self.queue.get_nowait() 
     96          except Queue.Empty: 
     97            break 
     98          try: 
     99            # dispatch it 
     100            self._dispatchEvent(event) 
     101          except: 
     102            pass  # not expected 
     103      PumpQueuedEvents(pyatspi.Registry()) 
    85104      return True   # keep this function in idle processing 
    86105    gobject.idle_add(_onIdle)