[Nvda-dev] commit r1895 - in trunk: . source/appModules

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Nvda-dev] commit r1895 - in trunk: . source/appModules

NVDA Subversion
Author: jteh
Date: Wed Apr  9 11:52:41 2008
New Revision: 1895

Log:
Add a Firefox appModule. This simply reads the status bar whenever a document becomes busy or a busy document receives focus.

Added:
   trunk/source/appModules/firefox.py   (contents, props changed)
Modified:
   trunk/   (props changed)

Added: trunk/source/appModules/firefox.py
==============================================================================
--- (empty file)
+++ trunk/source/appModules/firefox.py Wed Apr  9 11:52:41 2008
@@ -0,0 +1,24 @@
+#appModules/firefox.py
+#A part of NonVisual Desktop Access (NVDA)
+#Copyright (C) 2006-2008 NVDA Contributors <http://www.nvda-project.org/>
+#This file is covered by the GNU General Public License.
+#See the file COPYING for more details.
+
+import appModuleHandler
+import controlTypes
+import api
+import speech
+import winUser
+
+class appModule(appModuleHandler.appModule):
+
+ def event_stateChange(self, obj, nextHandler):
+ if obj.role == controlTypes.ROLE_DOCUMENT and controlTypes.STATE_BUSY in obj.states and winUser.isWindowVisible(obj.windowHandle):
+ statusBar = api.getStatusBar()
+ if statusBar:
+ statusText = api.getStatusBarText(statusBar)
+ speech.cancelSpeech()
+ speech.speakMessage(statusText)
+ nextHandler()
+
+ event_gainFocus = event_stateChange