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

Source Code for Module appModules.nvda

 1  #appModules/nvda.py 
 2  #A part of NonVisual Desktop Access (NVDA) 
 3  #Copyright (C) 2008-2011 NV Access Inc 
 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 api 
 9  import controlTypes 
10  import versionInfo 
11   
12 -class AppModule(appModuleHandler.AppModule):
13
14 - def event_NVDAObject_init(self, obj):
15 # It seems that context menus always get the name "context" and this cannot be overridden. 16 # Fudge the name of the NVDA system tray menu to make it more friendly. 17 if obj.role == controlTypes.ROLE_POPUPMENU: 18 parent = obj.parent 19 if parent and parent.parent==api.getDesktopObject(): 20 obj.name=versionInfo.name
21
22 - def event_gainFocus(self, obj, nextHandler):
23 if obj.role == controlTypes.ROLE_UNKNOWN and controlTypes.STATE_INVISIBLE in obj.states: 24 return 25 nextHandler()
26 27 # Silence invisible unknowns for stateChange as well. 28 event_stateChange = event_gainFocus
29