Changeset 713:64f54381f834 for src
- Timestamp:
- 10/25/15 18:49:24 (9 years ago)
- Branch:
- cef
- Phase:
- public
- Location:
- src/mlx/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/cef.py
r703 r713 28 28 # Indicate if we should quit 29 29 _toQuit = False 30 31 # Indicate the users of the fast timeout handler. If it reaches zero, the 32 # timeout will be stopped 33 _fastTimeoutUsers = 0 30 34 31 35 # The Selenium thread … … 402 406 #------------------------------------------------------------------------------ 403 407 408 def startFastTimeout(): 409 """Start the fast timeout handler.""" 410 global _fastTimeoutUsers 411 412 if _fastTimeoutUsers==0: 413 _fastTimeoutUsers = 1 414 gobject.timeout_add(1, _handleFastTimeout) 415 else: 416 _fastTimeoutUsers += 1 417 418 #------------------------------------------------------------------------------ 419 420 def stopFastTimeout(): 421 """Stop the fast timeout handler.""" 422 global _fastTimeoutUsers 423 424 assert _fastTimeoutUsers>0 425 _fastTimeoutUsers -= 1 426 427 #------------------------------------------------------------------------------ 428 429 def _handleFastTimeout(): 430 """Handle a (fast) timeout by running the CEF message loop.""" 431 if _toQuit or _fastTimeoutUsers==0: 432 return False 433 else: 434 cefpython.MessageLoopWork() 435 return True 436 437 #------------------------------------------------------------------------------ 438 404 439 def _handleSizeAllocate(widget, sizeAlloc): 405 440 """Handle the size-allocate event.""" -
src/mlx/gui/flight.py
r712 r713 1974 1974 self._wizard.gui.beginBusy("Calling SimBrief...") 1975 1975 1976 cef.startFastTimeout() 1976 1977 cef.callSimBrief(plan, 1977 1978 self._getCredentialsCallback, … … 2046 2047 self._wizard.gui.updateBusyState(xstr(message)) 2047 2048 else: 2049 cef.stopFastTimeout() 2048 2050 self._wizard.gui.endBusy() 2049 2051
Note:
See TracChangeset
for help on using the changeset viewer.