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

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

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

NVDA Subversion
Author: jteh
Date: Mon Apr 14 05:04:45 2008
New Revision: 1901

Log:
  new virtual buffers: Make the reportCurrentLine, reportCurrentSelection and sayAll scripts act on the focus object instead of the virtual buffer when virtual buffer pass-through is enabled. Fixes #52.
  old virtual buffers: Fix the exception when say all is used while pass-through is enabled.


Modified:
   trunk/   (props changed)
   trunk/source/appModules/_default.py

Modified: trunk/source/appModules/_default.py
==============================================================================
--- trunk/source/appModules/_default.py (original)
+++ trunk/source/appModules/_default.py Mon Apr 14 05:04:45 2008
@@ -58,7 +58,7 @@
  def script_reportCurrentLine(self,keyPress,nextScript):
  obj=api.getFocusObject()
  virtualBuffer=obj.virtualBuffer
- if hasattr(virtualBuffer,'TextInfo'):
+ if hasattr(virtualBuffer,'TextInfo') and not virtualBuffer.passThrough:
  obj=virtualBuffer
  info=obj.makeTextInfo(textHandler.POSITION_CARET)
  info.expand(textHandler.UNIT_LINE)
@@ -73,7 +73,7 @@
  def script_reportCurrentSelection(self,keyPress,nextScript):
  obj=api.getFocusObject()
  virtualBuffer=obj.virtualBuffer
- if hasattr(virtualBuffer,'TextInfo'):
+ if hasattr(virtualBuffer,'TextInfo') and not virtualBuffer.passThrough:
  obj=virtualBuffer
  info=obj.makeTextInfo(textHandler.POSITION_SELECTION)
  if info.isCollapsed:
@@ -568,7 +568,7 @@
  if v and not hasattr(v,'TextInfo') and not v.passThrough:
  sayAllHandler.sayAll(v.text_reviewPosition,v.text_characterCount,v.text_getNextLineOffsets,v.text_getText,v.text_reportNewPresentation,v._set_text_reviewPosition)
  else:
- if v:
+ if hasattr(v,'TextInfo') and not v.passThrough:
  o=v
  info=o.makeTextInfo(textHandler.POSITION_CARET)
  sayAllHandler.readText(info,sayAllHandler.CURSOR_CARET)