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

Allow cloning of profiles #4253

Open
nvaccessAuto opened this issue Jul 6, 2014 · 17 comments
Open

Allow cloning of profiles #4253

nvaccessAuto opened this issue Jul 6, 2014 · 17 comments

Comments

@nvaccessAuto
Copy link

Reported by zahari_bgr on 2014-07-06 02:55
There sometimes is a situation in which one could want to create a configuration profile which differs less from an existing profile compared to the normal configuration.
Therefore, it will be useful if the user has the option of cloning an existing profile under a new name, so they have to change less options for achieveing the desired configuration.

@nvaccessAuto
Copy link
Author

Attachment cloneProfile.diff added by zahari_bgr on 2014-07-06 03:14
Description:

@nvaccessAuto
Copy link
Author

Comment 1 by zahari_bgr on 2014-07-06 03:15
To solve this, I've added a combo box with label "Copy settings from" in the New profile dialog, which allows copying the settings from existing profile after creation (or None=Don't copy anything).
I've added an additional parameter to the create() function in config named parentProfile, and I pass the filename of the parent profile to that function.
At the end of create() I check if parentProfile is not none and copy the contents of its configuration file to that of the newly created profile.
I've added one line to the user guide describing this new option.

I've attached a patch (cloneProfile.diff) and also created a branch named "t4253" in the following repository:
https://bitbucket.org/zahyur/nvda.git

@nvaccessAuto
Copy link
Author

Comment 2 by jteh on 2014-07-06 09:07
Thanks. Can you please provide use cases (example scenarios) for why a user would need this?

@nvaccessAuto
Copy link
Author

Comment 3 by zahari_bgr on 2014-07-07 19:22
Hi,
imagine you've configured your normal configuration for reading stuff and a profile for editing text.
In normal configuration you would have punctuation set to none or some, much of the reporting options off, etc, and in the profile for editing - completely the opposite.
If you want to make another reading profile with some reporting options on, or with a different punctuation level - that will be easy, but if you would like to make another profile for editing with different reporting of indentation or voice for example - you would have to go through most of the options and you can miss one or two and then wondering why something isn't reported.

My original idea was to add a Clone button to the configuration manager which asks for the name and clones the profile, but I found this more simple and elegant, and if you don't need it you won't encounter it at all since it is the last option in the New profile dialog.
Note that I don't touch any dictionaries here - if one wants to clone the dictionary as well, they could just import it (see ticket #4252).

@nvaccessAuto
Copy link
Author

Comment 4 by jteh (in reply to comment 3) on 2014-07-08 07:18
Replying to zahari_bgr:

Note that I don't touch any dictionaries here - if one wants to clone the dictionary as well, they could just import it (see ticket #4252).

That would require them to be able to find the dictionary file for the cloned profile, though. That said, we can address that elsewhere.

@nvaccessAuto
Copy link
Author

Attachment freezWhenPressingEnter.log added by zahari_bgr on 2014-07-10 16:07
Description:

@nvaccessAuto
Copy link
Author

Comment 5 by zahari_bgr on 2014-07-10 16:08
Hi,
I have a problem here. When I press Enter when I'm focused on the Profile Name field (and not on any other field), the action onOk is executed as expected, the messageBox asking if you wish to manualy activate this profile popups, and here NVDA freezes. When I answer to the prompt it recovers and continues as expected. If I bypass the prompt in the code with either True or False there is no problem at all. I removed the listener on the trigger change just to see what will happen and that did not solved the problem. Wrapping the radio buttons with their own sizer did not solved it to. I've experimented with w.TextCtrl's different styles and even tryed to handle wx.TE_PROCESS_ENTER myself, but it still freezes on the same place.
The same happens when you try to choose a trigger that is allready associated with a profile - the messageBox popups, NVDA freezes, when you answer to the prompt - NVDA recovers (only the line in the code is different, but it is again a messageBox).
I'll post the extracted part of the log as attachment, cause it is 44 lines long.
Part of the stack is also in script_enter gesture.send().
I'm not sure what "typed word: ddddddddd" is doing here (it is not part of the stack), but speaking of typed words is disabled, and even I enable it (or enable/disable speaking of typed characters) does not solv the problem.
Do you have any idea what is causing this?

@nvaccessAuto
Copy link
Author

Comment 6 by jteh on 2014-07-11 02:22
Where is this script_enter coming from? There shouldn't be such a script bound in that dialog, at least not by default.

@nvaccessAuto
Copy link
Author

Comment 7 by zahari_bgr on 2014-07-11 04:30
Hi,
I've tested this on 2 machines with Windows 7 32bit SP1 with the latest official snapshot builds both next and master and the behaviour and the stack trace are the same.
Thats weird. I have similar software installed on both machines, but...
Disabling of anti-virus software doesn't help.
This doesn't happen with 2014.1 nor 2014.2
Do you want me to create a new ticket about this and to provide a full log?

@nvaccessAuto
Copy link
Author

Comment 8 by vgjh2005 on 2014-08-03 16:16
Hi:
I also consider this function is useful.
Thanks!

@nvaccessAuto
Copy link
Author

Comment 10 by blindbhavya on 2014-10-03 12:02
I too find this feature very interesting and potentially very useful.
Hope work may be done on this ticket.
Good luck.

@nvaccessAuto
Copy link
Author

Comment 12 by nvdakor on 2015-06-26 04:47
Hi,
A few things after a brief code review:

  • Try the patch with latest master snapshot to make sure the freeze doesn't occur when WXPython 3.0.2 is used.
  • Personally, instead of presenting the list of base profiles up front when creating a new profile, I think it might be better to present it only when a variation of this dialog is opened.
    In regards to the second comment, here's what I'd like to propose:
  • Keep the current new profile dialog as is.
  • In new profile dialog constructor, have a keyword argument to specify whether it is a new or copy profile dialog (default should be False, which implies brand new profile).
  • Depending on copy argument, title should be different, and if copy is true, show the base profiles along with the default name be entered into the profile name field.
  • Back at the config profiles dialog, create a copy button.
  • New and copy buttons should be bound to an event that creates the new profile dialog with appropriate value for the copy argument specified.
    For an add-on example, see:
    http://bitbucket.org/nvdaaddonteam/stationplaylist
    Branch: 6.0/broadcastProfiles
    So far, great work (at least in my opinion). Thanks.

@zahyur
Copy link
Contributor

zahyur commented Aug 19, 2016

Hi,
The original plan was a "Clone" button. My fear was that there would be to many buttons in that dialog, so I've decided that the new profile dialog is more appropriate place, especially if only the settings would be copied.
I have no plans of working on this any more, so if someone wants to take over - I'll be happy.

@bhavyashah
Copy link

@jcsteh @josephsl Just a friendly reminder to review this 2-year-old code submission.

@derekriemer
Copy link
Collaborator

@LeonarddeR interested in putting this into a PR?

@jcsteh jcsteh removed their assignment Sep 5, 2017
@Adriani90
Copy link
Collaborator

@derekriemer, @zahyur, @LeonarddeR I have mixed feelings about this feature. @zahyur this is great work indeed. But we have a quite inconsistent Profile Settings behavior in NVDA (i.e. double entries in Profile.ini and so on. I think such a Feature could lead to much more broken profiles (i.e. in Terms of volume, speech paterns etc.). In my opinion we should Limit this to dictionaries, once speech dictionaries can be set on a Profile specific Basis. This is at least my opinion. Additionally, at least from my experience, I have about 8 profiles as of now but sincerely I forgot Details of some profiles. I must look into the whole Settings to see what I have changed compared to Default. And in run it Comes out that I am faster if I create a completely new Profile and adjust Settings accordingly on an application Basis. The Problem is that cloning a Profile could cause undesired behavior and the user must search through the whole Settings bunch to find a way to solve it.

@josephsl
Copy link
Collaborator

josephsl commented Jan 2, 2019

Hi,

I advise against reviewing the old pull request, as configuration profiles dialog has gone through numerous changes since the issue's inception.

I'd be happy to "transfer" a feature from one of my add-ons to NvDA Core (profile copying functionality from StationPlaylist add-on), provided that people believe this feature can benefit many people, including unexpected cases. We may also need to redesign how profiles are shown on screen, as it might be helpful to let users add notes about profiles and such.

Thanks.

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

7 participants