Skip to content

#5050 Remember the position and size of the speechViewer#6202

Merged
feerrenrut merged 4 commits into
masterfrom
i5050-RememberPositionOfSpeechViewer
Aug 31, 2016
Merged

#5050 Remember the position and size of the speechViewer#6202
feerrenrut merged 4 commits into
masterfrom
i5050-RememberPositionOfSpeechViewer

Conversation

@feerrenrut

Copy link
Copy Markdown
Contributor

Partially resolves #5050 (remember the position and size of the speech viewer window)

The speechViewer window will open in the same location at the same size as it was when previously closed. If the monitor setup has changed (resolution, or number of monitors) the window is auto positioned/sized.

The speechViewer window will open in the same location at the same size
as it was when previously closed. If the monitor setup has changed
(resolution, or number of monitors) the window is auto positioned/sized.
@feerrenrut

Copy link
Copy Markdown
Contributor Author

@michaelDCurran please take a look when you get a chance.

@feerrenrut

feerrenrut commented Jul 28, 2016

Copy link
Copy Markdown
Contributor Author
  • Test saving and restoring config profiles

Comment thread source/speechViewer.py Outdated
config.conf["speechView"]["width"] = size.width
config.conf["speechView"]["height"] = size.height
config.conf["speechView"]["displays"] = self.getAttachedDisplaySizes()
config.conf["speechView"]["autoPositionWindow"] = False

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed with @michaelDCurran add these to the config schema. Perhaps the displays entry could just hold the hash of the object. Though now I'm thinking about this again, using the hash would have the disadvantage that it becomes much harder to verify the config / behaviour.

Added speechViewer x,y,width,height,displays to the config schema.
Tested with configuration profiles.
@michaelDCurran

Copy link
Copy Markdown
Member

Change range to xrange, but other than that this looks fine.

Remove unnecessary casts to int when reading the config.
Tidy up generator code.
feerrenrut added a commit that referenced this pull request Jul 29, 2016
Speech viewer attempts to re-open with the same size at last location.
Re #5050

Merge branch 'i5050-RememberPositionOfSpeechViewer' into next
…ionOfSpeechViewer

Conflicts:
	source/config/__init__.py
	source/speechViewer.py
@feerrenrut feerrenrut merged commit 134a44a into master Aug 31, 2016
@nvaccessAuto nvaccessAuto added this to the 2016.4 milestone Aug 31, 2016
feerrenrut added a commit that referenced this pull request Aug 31, 2016
When re-opening the speech viewer window, the location and dimensions will now be restored. (#5050)
@jmuheim jmuheim mentioned this pull request Nov 27, 2016
@feerrenrut feerrenrut deleted the i5050-RememberPositionOfSpeechViewer branch January 17, 2020 09:01
@jmuheim

jmuheim commented Jan 17, 2022

Copy link
Copy Markdown

Hello

My speech viewer is still not remembering its position after a relaunch of NVDA. Do I misunderstand something? Do I need to check an option to make this work?

@feerrenrut

Copy link
Copy Markdown
Contributor Author

If the monitor setup has changed (resolution, or number of monitors) the window is auto positioned/sized.

As long as there is no change in displays and the config is saved / not destroyed, it should save and reuse the location.

Do you have "Save configuration when exiting NVDA" enabled?
If not, the config (including position information) may not have been saved, this type of preference could potentially be independent of that setting. It's not really user config, instead it is preserved application state.

@jmuheim

jmuheim commented Jan 24, 2022

Copy link
Copy Markdown

Suddenly, since I wrote the comment above, it seems to work! Very interesting... Didn't work before, and I don't think that I changed anything in the settings.

Whatever! It's working now, that's all that counts. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Option to show Speech Viewer by default (and save dimensions and position of the window)

4 participants