Skip to content

Commit

Permalink
Minor speech viewer tweaks (#6340)
Browse files Browse the repository at this point in the history
Updates changes log and user guide for speech viewer
Speechviewer check mark now reflects state

When the speechviewer window is closed without using the NVDA menu, the
checkmark in the menu is now updated.

No github issue for this, see PR #6340
  • Loading branch information
feerrenrut committed Sep 23, 2016
1 parent 57715b4 commit b996b42
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 10 deletions.
7 changes: 5 additions & 2 deletions source/gui/__init__.py
Expand Up @@ -253,13 +253,16 @@ def onCheckForUpdateCommand(self, evt):
def onViewLogCommand(self, evt):
logViewer.activate()

def onSpeechViewerEnabled(self, isEnabled):
# its possible for this to be called after the sysTrayIcon is destroyed if we are exiting NVDA
if self.sysTrayIcon and self.sysTrayIcon.menu_tools_toggleSpeechViewer:
self.sysTrayIcon.menu_tools_toggleSpeechViewer.Check(isEnabled)

def onToggleSpeechViewerCommand(self, evt):
if not speechViewer.isActive:
speechViewer.activate()
self.sysTrayIcon.menu_tools_toggleSpeechViewer.Check(True)
else:
speechViewer.deactivate()
self.sysTrayIcon.menu_tools_toggleSpeechViewer.Check(False)

def onPythonConsoleCommand(self, evt):
import pythonConsole
Expand Down
17 changes: 12 additions & 5 deletions source/speechViewer.py
Expand Up @@ -77,9 +77,17 @@ def savePositionInformation(self):
isActive=False

def activate():
"""
Function to call to trigger the speech viewer window to open.
"""
_setActive(True, SpeechViewerFrame(_cleanup) )

def _setActive(isNowActive, speechViewerFrame=None):
global _guiFrame, isActive
_guiFrame = SpeechViewerFrame(_cleanup)
isActive=True
isActive = isNowActive
_guiFrame = speechViewerFrame
if gui and gui.mainFrame:
gui.mainFrame.onSpeechViewerEnabled(isNowActive)

def appendText(text):
if not isActive:
Expand All @@ -93,11 +101,10 @@ def appendText(text):
_guiFrame.textCtrl.AppendText(text + "\n")

def _cleanup():
global _guiFrame, isActive
global isActive
if not isActive:
return
isActive=False
_guiFrame = None
_setActive(False)

def deactivate():
global _guiFrame, isActive
Expand Down
2 changes: 1 addition & 1 deletion user_docs/en/changes.t2t
Expand Up @@ -8,7 +8,7 @@
== New Features ==
- NVDA can now indicate line indentation using tones. This can be configured using the "Report line indentation with" combo box in NVDA's Document Formatting preferences dialog. (#5906)
- Support for the Orbit Reader 20 braille display. (#6007)
- An option to open the speech viewer window on startup has been added. (#5050)
- An option to open the speech viewer window on startup has been added. This can be enabled via a check box in the speech viewer window. (#5050)
- When re-opening the speech viewer window, the location and dimensions will now be restored. (#5050)
- Cross Reference fields in Microsoft Word are now treated like hyperlinks. They are reported as links, and can be activated. (#6102)
- Initial support for the upcoming version of the Kindle app. (#6247)
Expand Down
8 changes: 6 additions & 2 deletions user_docs/en/userGuide.t2t
Expand Up @@ -1439,6 +1439,10 @@ For sighted software developers or people demoing NVDA to sighted audiences, a f
To enable the speech viewer, check the "Speech Viewer" menu item under Tools in the NVDA menu.
Uncheck the menu item to disable it.

The speech viewer window contains a check box labeled "Show speech viewer on startup".
If this is checked, the speech viewer will open when NVDA is started.
The speech viewer window will always attempt to re-open with the same dimensions and location as when it was closed.

While the speech viewer is enabled, it constantly updates to show you the most current text being spoken.
However, if you click or focus inside the viewer, NVDA will temporarily stop updating the text, so that you are able to easily select or copy the existing content.

Expand Down Expand Up @@ -2120,8 +2124,8 @@ The following models are supported:
- EcoBraille 80
- EcoBraille Plus
-

In NVDA, you can set the serial port to which the display is connected in the Braille Settings dialog.
In NVDA, you can set the serial port to which the display is connected in the Braille Settings dialog.

Following are the key assignments for EcoBraille displays.
Please see the [EcoBraille documentation ftp://ftp.once.es/pub/utt/bibliotecnia/Lineas_Braille/ECO/] for descriptions of where these keys can be found.
Expand Down

0 comments on commit b996b42

Please sign in to comment.