Package appModules :: Module thunderbird
[hide private]
[frames] | no frames]

Source Code for Module appModules.thunderbird

 1  #appModules/thunderbird.py 
 2  #A part of NonVisual Desktop Access (NVDA) 
 3  #Copyright (C) 2006-2008 NVDA Contributors <http://www.nvda-project.org/> 
 4  #This file is covered by the GNU General Public License. 
 5  #See the file COPYING for more details. 
 6   
 7  import appModuleHandler 
 8  import controlTypes 
 9  import api 
10  import speech 
11  import winUser 
12   
13 -class AppModule(appModuleHandler.AppModule):
14
15 - def event_gainFocus(self, obj, nextHandler):
16 if obj.role == controlTypes.ROLE_DOCUMENT and controlTypes.STATE_BUSY in obj.states and winUser.isWindowVisible(obj.windowHandle): 17 statusBar = api.getStatusBar() 18 if statusBar: 19 try: 20 # The document loading status is contained in the second field of the status bar. 21 statusText = statusBar.firstChild.next.name 22 except: 23 # Fall back to reading the entire status bar. 24 statusText = api.getStatusBarText(statusBar) 25 speech.speakMessage(controlTypes.speechStateLabels[controlTypes.STATE_BUSY]) 26 speech.speakMessage(statusText) 27 return 28 nextHandler()
29