Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically activate configuration profiles for specific applications #1913

Closed
nvaccessAuto opened this issue Nov 15, 2011 · 27 comments
Closed
Assignees
Milestone

Comments

@nvaccessAuto
Copy link

Reported by aleskis on 2011-11-15 22:40
Based or not on appModule, user should be configure particular settings for a particular application. Vincent solve the duality between braille follow focus or review in writting simple appModule, but if it's a good solution it's not intuitive.
Blocked by #667
Blocking #87

@nvaccessAuto
Copy link
Author

Comment 1 by jteh on 2011-11-15 23:02
Duplicate of #667. Please see ticket:667#comment:1 for why I think this is a bad idea.
Changes:
Added labels: duplicate
State: closed

@nvaccessAuto
Copy link
Author

Comment 2 by jteh on 2013-08-10 11:46
#667 was narrowed to just cover manual switching.
Changes:
Changed title from "Add profile system per application." to "Automatically activate configuration profiles for specific applications"
Removed labels: duplicate
State: reopened

@nvaccessAuto
Copy link
Author

Comment 4 by jteh on 2013-08-12 11:42
I've started work on this in the t1913 branch. It already works, but there's no GUI yet and as usual with this kind of framework, that's the tricky part. It also slightly breaks the manual profile switching GUI, but that shouldn't be too hard to fix.

@nvaccessAuto
Copy link
Author

Comment 6 by James Teh <jamie@... on 2013-08-20 10:27
In [0b5118e]:

Merge branch 't1913' into next

Incubates #1913, #667.

Changes:
Added labels: incubating

@nvaccessAuto
Copy link
Author

Comment 7 by jteh on 2013-08-20 10:28
Changes:
Milestone changed from None to next

@nvaccessAuto
Copy link
Author

Comment 8 by beqa on 2013-08-20 11:18
hi.

if you trigger an app and then delete profile fro which was triggered app nvda shows errors

@nvaccessAuto
Copy link
Author

Comment 9 by leonarddr on 2013-08-20 11:27
I created two profiles, and attached a bunch of applications to one of them. The other one was attached to say all. NVDA started throwing errors at me in the selected applications, even after i deleted all profiles. A strange thing was that the applications list was empty eventhough i added applications earlier, so i couldn't delete them. I switched back to the RC branch due to this problem making NVDA almost unusable for me.

@nvaccessAuto
Copy link
Author

Comment 10 by beqa on 2013-08-20 11:29
hi.

maybe another bug and maybe it is more general but it happens here.

press triggers button and try to turn on some of the review modes and review the window.

it will display the error.

here is a log.

ERROR - external:scriptHandler.executeScript (15:26:19):
error executing script: <bound method GlobalCommands.script_review_nextLine of <globalCommands.GlobalCommands object at 0x04626150>> with gesture u'numpad 9'
Traceback (most recent call last):
File "scriptHandler.pyc", line 165, in executeScript
File "globalCommands.pyc", line 537, in script_review_nextLine
File "api.pyc", line 169, in getReviewPosition
File "review.pyc", line 85, in getPositionForCurrentMode
File "review.pyc", line 62, in getScreenPosition
File "displayModel.pyc", line 199, in init
File "textInfos\offsets.pyc", line 267, in init
File "displayModel.pyc", line 375, in _getOffsetsFromNVDAObject
RuntimeError

@nvaccessAuto
Copy link
Author

Comment 11 by jteh on 2013-08-20 11:37
Oops. Deleting a profile doesn't currently delete its triggers, which is nasty. I'm working on a fix.

To recover from this, you can remove all triggers by doing the following:

  1. Press NVDA+control+z to open the Python console.
  2. Copy and paste this line:
 import config; config.conf["profileTriggers"].clear()
  1. Save your configuration.

@nvaccessAuto
Copy link
Author

Comment 12 by James Teh <jamie@... on 2013-08-20 12:01
In [f78907a]:

Merge branch 't1913' into next

Incubates #1913.

@nvaccessAuto
Copy link
Author

Comment 13 by jteh on 2013-08-20 12:05
I've fixed the trigger deletion issue and also made things break less horribly if a problem does occur when attempting to trigger a profile. I've forced a new next build which should be available in 15 minutes or so.

@nvaccessAuto
Copy link
Author

Comment 14 by PZajda on 2013-08-20 12:17
Hi,

Great, thanks.
I found another problem, when renaming a triggered profile, it is not associated with its triggers anymore, and these triggers still exist but because of the brocken profile, I have to restart NVDA and delete all triggers too.

@nvaccessAuto
Copy link
Author

Comment 15 by jteh (in reply to comment 10) on 2013-08-20 12:17
Replying to beqa:

press triggers button and try to turn on some of the review modes and review the window.

it will display the error.

This is a separate issue. I filed #3454 for this.

@nvaccessAuto
Copy link
Author

Comment 16 by PZajda on 2013-08-20 12:30
The error still happens with the new build, but I have not to restart NVDA for things to work properly again because it just causes the profile not to be activated.
Here is the error:
ERROR - external:config.AppProfileTrigger.exit (14:27:28):
Error exiting trigger app:excel, profile Excel
Traceback (most recent call last):
File "config__init__.pyc", line 913, in exit
File "config__init__.pyc", line 661, in triggerProfileExit
File "config__init
_.pyc", line 492, in _getProfile
File "configobj.pyc", line 1242, in init
File "configobj.pyc", line 1254, in _load
IOError: Config file not found: "C:\Documents and Settings\PZAJDA\Application Data\nvda\profiles\Excel.ini".

Edit: oops, I received the commit message just after sending this comment.

@nvaccessAuto
Copy link
Author

Comment 17 by jteh (in reply to comment 16) on 2013-08-20 12:34
Replying to PZajda:

The error still happens with the new build, but I have not to restart NVDA for things to work properly again because it just causes the profile not to be activated.

You should clear your triggers as explained in comment:11. I've fixed the rename bug now, but that can wait for tomorrow's build. :)

@nvaccessAuto
Copy link
Author

Comment 18 by leonarddr (in reply to comment 14) on 2013-08-20 12:36
Replying to PZajda:

I found another problem, when renaming a triggered profile, it is not associated with its triggers anymore, and these triggers still exist but because of the brocken profile, I have to restart NVDA and delete all triggers too.

I think this clarifies the issues i had. I will try the new next build as well.

@nvaccessAuto
Copy link
Author

Comment 19 by leonarddr on 2013-08-20 12:58
I've noticed the following additional bugs or things that i'd like to bring under your attention:

  • Active profile isn't being saved even when you choose save configuration from the menu, always the default "None" profile is used on a new start of NVDA.
  • NVDA shuts down very slowly when a custom profile is active
  • It is possible to add configuration profiles in secure and login windows, set triggers for them etc. this might not be very functional and could be confusing.
  • Profile renaming is somewhat case insensitive. When i press rename on a profile, keep its name and press ok everything is allright, but when i rename a profile from "profile" to "PROFILE" (Notice the capitals), i get "That profile already exists".
  • When a custom profile is selected manually, application triggers for other profiles don't work entirely. Speech synthesizer is kept to the manually selected profile, however keyboard echo is retrieved from the triggered profile. The say all trigger does work and changes the synthesizer here.
  • Changing the NVDA language when a custom profile is loaded changes the overall language setting, so not the profile specific setting. I assume this is normal behavior, however i suggest hiding the NVDA language setting from the general settings window when a custom profile is selected, or even hiding the general settings menu item completely.

Also i'd like to suggest a trigger for messages coming through the NVDA controler API, although that idea probably conflicts with #3453.

@nvaccessAuto
Copy link
Author

Comment 20 by jteh (in reply to comment 19) on 2013-08-20 22:36
Replying to leonarddr:

  • Active profile isn't being saved even when you choose save configuration from the menu, always the default "None" profile is used on a new start of NVDA.

Does saving the manually activated profile really make sense? The fact that it's a profile suggests abnormal usage (as opposed to your normal configuration).

  • NVDA shuts down very slowly when a custom profile is active

This is probably #3442, which is unrelated.

  • It is possible to add configuration profiles in secure and login windows, set triggers for them etc. this might not be very functional and could be confusing.

Oops. You're not supposed to be able to save anything in secure mode. I'll fix that. I'm not sure I think the dialog should be disabled altogether, though. If the user configured profiles before copying the config, perhaps they wanted them preserved for a reason.

  • Profile renaming is somewhat case insensitive. When i press rename on a profile, keep its name and press ok everything is allright, but when i rename a profile from "profile" to "PROFILE" (Notice the capitals), i get "That profile already exists".

Profile names are case insensitive, as they are mapped to file names and Windows file names are case insensitive.

  • When a custom profile is selected manually, application triggers for other profiles don't work entirely.

This is intentional. The manual profile always takes precedence over all other profiles. Otherwise, editing a profile would be confusing.

  • Changing the NVDA language when a custom profile is loaded changes the overall language setting, so not the profile specific setting. I assume this is normal behavior, however i suggest hiding the NVDA language setting from the general settings window when a custom profile is selected, or even hiding the general settings menu item completely.

I'd argue this is more a point of documentation. If I've selected a custom profile, I might still wish to configure global settings without having to switch profiles. However, settings that don't apply to profiles should definitely be documented.

Also i'd like to suggest a trigger for messages coming through the NVDA controler API

Does this really make sense? Messages coming from the controller API could be from all different types of applications and we can't differentiate. Lumping them all into one category seems completely arbitrary. Anyway, if you want this, please file a separate enhancement ticket and provide justification.

Thanks!

@nvaccessAuto
Copy link
Author

Comment 21 by James Teh <jamie@... on 2013-08-21 08:03
In [d4efaf6]:

Merge branch 't1913' into next

Incubates #1913.

@nvaccessAuto
Copy link
Author

Comment 22 by jteh on 2013-08-21 11:11
I'm merging this work into the t667 branch, as it's getting too difficult to maintain them separately.
Changes:
Removed labels: incubating

@nvaccessAuto
Copy link
Author

Comment 23 by leonarddr (in reply to comment 20) on 2013-08-21 20:03
Replying to jteh:

  • NVDA shuts down very slowly when a custom profile is active

This is probably #3442, which is unrelated.

It seems to be fixed anyway

  • Profile renaming is somewhat case insensitive. When i press rename on a profile, keep its name and press ok everything is allright, but when i rename a profile from "profile" to "PROFILE" (Notice the capitals), i get "That profile already exists".

Profile names are case insensitive, as they are mapped to file names and Windows file names are case insensitive.

I understand. The current state of the code doesn't allow me to change capital typos though. Changing "PRofile" to "Profile" doesn't work, i have to change it to something else before i change it to "Profile" and remove the capital R typo.

  • When a custom profile is selected manually, application triggers for other profiles don't work entirely.

This is intentional. The manual profile always takes precedence over all other profiles. Otherwise, editing a profile would be confusing.

This implies that it shouldn't be possible that keyboard echo is copied from the triggered profile when a manual profile is active? This is the case now. When i selected a manual profile and open the profile manager from a program which triggers another, the triggered profile is also selected rather than the manual profile.

@nvaccessAuto
Copy link
Author

Comment 24 by jteh (in reply to comment 23) on 2013-08-21 21:45
Replying to leonarddr:

Profile names are case insensitive, as they are mapped to file names and Windows file names are case insensitive.

I understand. The current state of the code doesn't allow me to change capital typos though. Changing "PRofile" to "Profile" doesn't work, i have to change it to something else before i change it to "Profile" and remove the capital R typo.

Hmm. I'll look into it.

This is intentional. The manual profile always takes precedence over all other profiles. Otherwise, editing a profile would be confusing.

This implies that it shouldn't be possible that keyboard echo is copied from the triggered profile when a manual profile is active? This is the case now.

Nothing is copied anywhere. However, profiles only contain the settings you change in them. If you haven't set keyboard echo in your manual profile, then the setting for keyboard echo will be taken from triggered profiles. Failing that, the base configuration will be used, and failing that, the factory default setting will be used.

@nvaccessAuto
Copy link
Author

Comment 25 by leonarddr on 2013-08-23 11:32
When removed the latest custom profile, the triggers..., rename and delete buttons are still visible and accessible, allowing one to set triggers for the none profile.

@nvaccessAuto
Copy link
Author

Comment 26 by James Teh <jamie@... on 2013-08-23 13:43
In [c9e3e28]:

ProfilesDialog: When a profile is deleted and (none) is selected, disable the Triggers, Rename and Delete buttons as is normally done for (none).

Re #1913.

@nvaccessAuto
Copy link
Author

Comment 27 by James Teh <jamie@... on 2013-08-23 13:49
In [bfea638]:

Merge branch 't667' into next

Incubates #667. Re #1913.

@nvaccessAuto
Copy link
Author

Comment 28 by James Teh <jamie@... on 2013-10-16 06:29
In [d92358e]:

You can now have different settings for different situations using configuration profiles. Profiles can be activated manually or automatically (e.g. for a particular application).

Fixes #87, #667, #1913.

Changes:
State: closed

@nvaccessAuto
Copy link
Author

Comment 29 by jteh on 2013-10-16 06:31
Changes:
Milestone changed from next to 2013.3

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

No branches or pull requests

2 participants