Minor speech viewer tweaks #6340

Merged
merged 4 commits into from Sep 23, 2016

Conversation

Projects
None yet
3 participants
@feerrenrut
Contributor

feerrenrut commented Sep 6, 2016

Fixes an issue where the NVDA menu speechviewer checkbox status does not reflect the actual visibility of the window:
Steps to reproduce:

  • Open speechviewer via menu
  • close via taskbar (or alt+F4)
  • look at nvda menu again, notice that speechviewer is still checked

Modified the change log for the "speech viewer on startup" feature to include information on how to use this feature.

User guide changes, include information about:

  • the speech viewer checkbox
  • the speech viewer position and size

feerrenrut added some commits Sep 6, 2016

Speechviewer check mark reflects state
When the speechviewer window is closed without using the NVDA menu, the
checkmark in the menu is now updated.
@feerrenrut

This comment has been minimized.

Show comment
Hide comment
@feerrenrut

feerrenrut Sep 6, 2016

Contributor

@jcsteh Would you mind taking a look at this?

Contributor

feerrenrut commented Sep 6, 2016

@jcsteh Would you mind taking a look at this?

source/speechViewer.py
if not isActive:
return
isActive=False
+ _onActiveChanged(isActive)

This comment has been minimized.

@jcsteh

jcsteh Sep 8, 2016

Contributor

I understand the desire to use dependency injection here, rather than calling a global. However, I'm concerned that some external code might call activate and not pass a callable, thus breaking the invariant that the check box should be checked while the Speech Viewer is open and unchecked when it's closed. There are ways we can redesign this to be a bit cleaner, but for now, I think calling gui.mainFrame.onSpeechViewerEnabled is clearer.

@jcsteh

jcsteh Sep 8, 2016

Contributor

I understand the desire to use dependency injection here, rather than calling a global. However, I'm concerned that some external code might call activate and not pass a callable, thus breaking the invariant that the check box should be checked while the Speech Viewer is open and unchecked when it's closed. There are ways we can redesign this to be a bit cleaner, but for now, I think calling gui.mainFrame.onSpeechViewerEnabled is clearer.

user_docs/en/userGuide.t2t
@@ -1437,7 +1437,7 @@ These actions are available under the viewer's Log menu.
For sighted software developers or people demoing NVDA to sighted audiences, a floating window is available that allows you to view all the text that NVDA is currently speaking.
To enable the speech viewer, check the "Speech Viewer" menu item under Tools in the NVDA menu.
-Uncheck the menu item to disable it.
+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, will result in the speech viewer opening 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.

This comment has been minimized.

@jcsteh

jcsteh Sep 8, 2016

Contributor
  1. Split the stuff about the startup check box into a new paragraph.

  2. Each sentence should be on its own line to make life easier for translators. (T2t will still treat them as a continuous paragraph.)

  3. The "Show Speech Viewer on Startup" check box should only have its first letter capitalised (rather than using title case) for consistency with the rest of the options in the GUI.

  4. Change this sentence:

    If this is checked, will result in the speech viewer opening when NVDA is started.

    to:

    If this is checked, the speech viewer will open when NVDA is started.

@jcsteh

jcsteh Sep 8, 2016

Contributor
  1. Split the stuff about the startup check box into a new paragraph.

  2. Each sentence should be on its own line to make life easier for translators. (T2t will still treat them as a continuous paragraph.)

  3. The "Show Speech Viewer on Startup" check box should only have its first letter capitalised (rather than using title case) for consistency with the rest of the options in the GUI.

  4. Change this sentence:

    If this is checked, will result in the speech viewer opening when NVDA is started.

    to:

    If this is checked, the speech viewer will open when NVDA is started.

@feerrenrut

This comment has been minimized.

Show comment
Hide comment
@feerrenrut

feerrenrut Sep 8, 2016

Contributor

@jcsteh Mind taking another look at this one?

Contributor

feerrenrut commented Sep 8, 2016

@jcsteh Mind taking another look at this one?

source/speechViewer.py
isActive=False
-def activate(onActiveChanged = lambda isNowActive: None):
+def activate():
"""
Function to call to trigger the speech viewer window to open.
onActiveChanged - function object that takes a boolean which is true if the speechviewer is active or false if it is no longer active.

This comment has been minimized.

@jcsteh

jcsteh Sep 8, 2016

Contributor

nit: This parameter has been removed, but still in docstring.

@jcsteh

jcsteh Sep 8, 2016

Contributor

nit: This parameter has been removed, but still in docstring.

@jcsteh

This comment has been minimized.

Show comment
Hide comment
@jcsteh

jcsteh Sep 8, 2016

Contributor

Ship it! :)

Contributor

jcsteh commented Sep 8, 2016

Ship it! :)

feerrenrut added a commit that referenced this pull request Sep 9, 2016

incubates #6340
Merge branch 'minorSpeechViewerTweaks' into next

@nvaccessAuto nvaccessAuto assigned feerrenrut and unassigned jcsteh Sep 9, 2016

feerrenrut added a commit that referenced this pull request Sep 9, 2016

incubates #6340
re issue #6101
Merge branch 'i6101_SymbolsListCtrl' into next

@feerrenrut feerrenrut merged commit b996b42 into master Sep 23, 2016

@nvaccessAuto nvaccessAuto added this to the 2016.4 milestone Sep 23, 2016

feerrenrut added a commit that referenced this pull request Sep 23, 2016

Update changes file for PR #6340
After being closed via the task bar or the alt+F4 shortcut, the speech viewer checkbox status in the NVDA menu will now reflect the actual visibility of the window. (#6340)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment