reset Preferences CFG file

This read-only archive contains discussions from the Adding Feature forum.
New feature request may be posted to the Adding Feature forum.
Technical support is available via the Help forum.
Locked
waxcylinder
Forum Staff
Posts: 14684
Joined: Tue Jul 31, 2007 11:03 am
Operating System: Windows 10

Re: reset Preferences CFG file

Post by waxcylinder » Sat Nov 15, 2014 10:00 am

Gale Andrews wrote:
waxcylinder wrote:
Gale Andrews wrote: So I don't understand why you say that resetting Preferences would not reset the toolbars.
Because if you read the Proposal one if the original (and still existing ideas) is to implement Preferences reset through Edit>Preferences with each pane having a Reset button (which could wither reset the Prefs on that pane or all Prefs - the proposal was/is ambiguous).
Do you support that idea, if it's ambiguous? I'm -1. I think that idea is complex and could limit the chance of acceptance. I can only see it working if each pane had two buttons, one to reset that Pane's prefs, and a button to reset all Prefs (however defined).
Yes, I'd be quite happy with a two-button (this pane/all) solution if it were implemented that way. But I'd also be happy with a new Reset pane.

Best chance of acceptance BTW is to get a patch that can be submitted and tested ... :geek:


Gale Andrews wrote:
waxcylinder wrote:There is nothing in Edit>Preferences to reset Toolbars - hence my extension of James' idea of having a new "Reset" pane in Preferences enabling the user to choose any or all and to include a Toolbars reset.
So is your proposal to move View > Toolbars into Preferences? Or to add a "Reset Toolbars" button into every Preferences pane? That would mean three buttons if we had a choice to reset just an individual preferences pane. I don't see the point of a "Reset Toolbars" button because I think Prefs should have a "sledgehammer" button.
No it is not my proposal (or intention) to move View>Toolbars into Preferences (though I can see that could be an option). But now you're making me think about this some more, maybe what we need is a "Reset" entry in the Toolbars dropdown menu to reset all the Toolbars to "factory settings". I could get to like that idea and I'm sure it would be more acceptable than moving Toolbars into Prefs (and avoid a regression).

Update: Oh golly gosh - silly me. - I've just looked at the View>Toolbar menu and seen that we already have such a command :oops: :roll: :oops:
I may need to do some pruning adjustments to that proposal ...


Gale Andrews wrote:There has to be the sledgehammer (outside the Audacity GUI) for the case when Audacity won't launch. And I think for ease of access there should be a sledgehammer button in Audacity.
Good.

Peter.
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * *

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: reset Preferences CFG file

Post by Gale Andrews » Sat Nov 15, 2014 12:45 pm

steve wrote:
Gale Andrews wrote:As I said, please enlighten me as to the harm that "NewPrefsInitialized=1" does to 2.0.7.
An example already given. A user may want to reset preferences for Audacity 2.0.7 but not wipe out their old 1.2.x preferences from 2.0.6.
Then that does not harm 2.0.7 which is the question I asked.
steve wrote:
Gale Andrews wrote:What is that burden, given 2.0.7 does not recognise 1.2 settings?
The burden is that we have to continue supporting a feature that is no longer in Audacity.

Currently, the first time this version of Audacity is run Audacity tries to migrate old preferences (if they exist) but if the entry "NewPrefsInitialized" is found, Audacity deletes it.
Which is "this" version? The first phrase of your sentence refers to 2.0.6. The second phrase refers to 2.0.7 (2.0.6 retains "NewPrefsInitialized=1").
steve wrote:So by creating a new cfg file and writing "NewPrefsInitialized=1" to it, we are writing a line that will be immediately deleted on launch. My point is, why are we yet again placing so much importance on maintaining the status quo?
Please try re-reading what I have already written for the reasons. For those users who go back (even temporarily) to old versions to fix a problem, actually letting them reset preferences in that version (which is what they were intending to do) may help them solve whatever the problem was.

If they can't solve the problem in the older version they may never use any version of Audacity again.

If you say you like forwards and backwards compatibility where possible then "loss aversion" when possible should also be good. Why does this suggested piece of loss aversion "cripple Audacity development"?


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: reset Preferences CFG file

Post by Gale Andrews » Sat Nov 15, 2014 1:00 pm

waxcylinder wrote:
Gale Andrews wrote:
waxcylinder wrote:
Gale Andrews wrote: So I don't understand why you say that resetting Preferences would not reset the toolbars.
Because if you read the Proposal one if the original (and still existing ideas) is to implement Preferences reset through Edit>Preferences with each pane having a Reset button (which could wither reset the Prefs on that pane or all Prefs - the proposal was/is ambiguous).
Do you support that idea, if it's ambiguous? I'm -1. I think that idea is complex and could limit the chance of acceptance. I can only see it working if each pane had two buttons, one to reset that Pane's prefs, and a button to reset all Prefs (however defined).
Yes, I'd be quite happy with a two-button (this pane/all) solution if it were implemented that way. But I'd also be happy with a new Reset pane.
Do people often want to default more than one pane of preferences? If not, a reset pane could be more effort to use, especially if you have to look at the actual pane first to see what you're resetting.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: reset Preferences CFG file

Post by steve » Sat Nov 15, 2014 1:50 pm

Gale Andrews wrote:Which is "this" version?
2.0.7
Gale Andrews wrote:For those users who go back (even temporarily) to old versions to fix a problem, actually letting them reset preferences in that version (which is what they were intending to do) may help them solve whatever the problem was.
I thought we were talking about users resetting preferences in 2.0.7.
If resetting preferences in 2.0.7 fixes the problem, then surely they will continue to use 2.0.7?
If resetting preferences in 2.0.7 does not fix the problem in 2.0.7, then the problem is probably nothing to do with preferences.
If we want an external application for resetting preferences for Audacity 2.x, then it could have an option to select which version of Audacity to reset preferences for. That provides some forward compatibility because if future versions require a different method for resetting, then that new method can be added to the "Reset" application.
Gale Andrews wrote:Why does this suggested piece of loss aversion "cripple Audacity development"?
Of course one small thing like including "NewPrefsInitialized=1" does not "cripple Audacity development" (I am quoting Gale - I did not say "cripple Audacity development"), but as a general practice, spending valuable development and QA time on creating "forward compatibility" retrospectively, detracts from the more important task of making Audacity better. If we want to put great emphasis on forward compatibility, then better to put that effort into making 2.0.7 forwardly compatible.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

waxcylinder
Forum Staff
Posts: 14684
Joined: Tue Jul 31, 2007 11:03 am
Operating System: Windows 10

Re: reset Preferences CFG file

Post by waxcylinder » Sat Nov 15, 2014 2:00 pm

Gale Andrews wrote:Do people often want to default more than one pane of preferences? If not, a reset pane could be more effort to use, especially if you have to look at the actual pane first to see what you're resetting.
I'm guessing yes - otherwise why would we be thinking about the "sledgehammer"

I certainly wouldn't want to go to each and every pane just to reset all my Prefs.

Peter
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * *

Edgar
Forum Crew
Posts: 2043
Joined: Thu Sep 03, 2009 9:13 pm
Operating System: Windows 10

Re: reset Preferences CFG file

Post by Edgar » Sat Nov 15, 2014 6:12 pm

This thread has gotten way off topic. The question under discussion is how to give all 3 platforms the ability to "reset" the CFG file. There are 2 NOT-mutually exclusive camps/sledgehammers: 1) a control within Audacity (while running) which will cause the CFG file (and possibly its RAM (while running) representation) to be virtually (considerations might be taken for retaining/discarding registry entries) empty; 2) an external program (cross-platform) which will either delete or cause to be virtually empty the CFG file.

I think we have some Developer support (Vaughan) for the general concept of giving the user (cross-platform) this power. I think a strong case can be made that both of these sledgehammers should be implemented. They do not have to be developed concurrently, it is easy to add the ability-while-running option, developing an external program and adding it to the Audacity build is not so easy (but not that hard - it would require significant Developer support/intercession).

I think that if we wish to explore the concept of partial Preferences reset we should start a new thread with that in mind (remembering that there are now many items in the configuration file which are not in Preferences).
-Edgar
running Audacity personally customized 2.0.6 daily in a professional audio studio
occasionally using current Audacity alpha for testing and support situations
64-bit Windows Pro 10

Edgar
Forum Crew
Posts: 2043
Joined: Thu Sep 03, 2009 9:13 pm
Operating System: Windows 10

Re: reset Preferences CFG file

Post by Edgar » Sat Nov 15, 2014 7:04 pm

Imagine you have 2 (or more) users registered on your computer (I'm not sure of the details on Mac or Linux) - let's say Joe & Joan; ignoring the concept of administer rights (at least for now) let's say that Audacity has never been installed on this computer. Joe logs onto his account and installs Audacity (Is it possible to install Audacity for all users or just a single user? - No, single user only.), runs it successfully, exits Audacity and logs off his account; there is now a CFG file in C:UsersJoeAppDataRoamingAudacity. Joan logs on, and wants to run Audacity; is there an icon on her desktop (if Joe accepted the default of placing an icon on the desktop) or entry in her start menu; will she inherit Joe's configuration file? Should our sledgehammer obliterate both Joe & Joan's CFG files?
-Edgar
running Audacity personally customized 2.0.6 daily in a professional audio studio
occasionally using current Audacity alpha for testing and support situations
64-bit Windows Pro 10

Edgar
Forum Crew
Posts: 2043
Joined: Thu Sep 03, 2009 9:13 pm
Operating System: Windows 10

Re: reset Preferences CFG file

Post by Edgar » Sat Nov 15, 2014 11:41 pm

waxcylinder wrote: Best chance of acceptance BTW is to get a patch
Your wish is my command, find patch attached…
This is a bare-bones patch; its only feature is to add a button at the bottom of every Preference dialog panel: "Reset". Clicking this button immediately results in a dialog which warns you of the dangers and tells you that pressing OK will result in the immediate closure of Audacity and restoring all configuration values to factory default state. I suspect that the wording of the various warnings needs a thorough review by QA.

In srcAudacityApp.cpp at or near line number 328 function QuitAudacity(bool bForce) currently has the line:

Code: Select all

gPrefs->Write(wxT("/NewPrefsInitialized"), true);
which is still under discussion but easier to remove by commenting it out than adding it in if later desired.
Attachments
ResetCFG.patch
(5.3 KiB) Downloaded 48 times
Last edited by Edgar on Fri Apr 24, 2015 3:54 pm, edited 2 times in total.
Reason: Typo it's > its
-Edgar
running Audacity personally customized 2.0.6 daily in a professional audio studio
occasionally using current Audacity alpha for testing and support situations
64-bit Windows Pro 10

waxcylinder
Forum Staff
Posts: 14684
Joined: Tue Jul 31, 2007 11:03 am
Operating System: Windows 10

Re: reset Preferences CFG file

Post by waxcylinder » Sun Nov 16, 2014 11:06 am

Edgar wrote:
waxcylinder wrote: Best chance of acceptance BTW is to get a patch
Your wish is my command, find patch attached…
This is a bare-bones patch; it's only feature is to add a button at the bottom of every Preference dialog panel: "Reset". Clicking this button immediately results in a dialog which warns you of the dangers and tells you that pressing OK will result in the immediate closure of Audacity and restoring all configuration values to factory default state. I suspect that the wording of the various warnings needs a thorough review by QA.
I'm really thinking (now that I've though about this a lot more, that we really shouldn't be implementing a "sledgehammer" reset in the Preferences. I now think that resets in Preferences should be confined to resetting items that live in Preferences.

There is, as I latterly remembered, already a reset in the Toolbars dropdown from View>Toolbars - so we don't really need to reset Toolbars from Preferences - my *bad* for even raising this red-herring in the Proposal in the first place.

Plus we really do need the "sledgehammer" to be external.

If you agree, what remains to be discussed is whether we go for:
1) one button on each Prefs pane that resets just that pane
2) two buttons on each pane - one to reset the pane, the other to reset all Prefs
3) a new "Reset Pane" in Prefs.

I favor 2 or 3 - and if 2 is easier and quicker to implement then let's go for it.
Is 2 something that you can do Ed?

Peter.
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * *

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: reset Preferences CFG file

Post by steve » Sun Nov 16, 2014 12:05 pm

Edgar wrote: I think a strong case can be made that both of these sledgehammers should be implemented.
+1
Though there is a difference in application.

In the case where Audacity cannot be launched, only the external application can be used - this may need to be a bigger sledgehammer, or could offer a number of choices:
"Reset Everything" (biggest sledgehammer), "Reset Preferences only" (normal sledgehammer), "Reset ...." (a subset of what gets reset).

A reset option in Preferences should (arguably) reset preferences only, though there could be a reset button in the Effects menu to reset/delete pluginregistry (does "rescan" reset pluginregistry?)

"Chains" can already be "reset" by deleting them from within the Edit Chains dialog. (If anyone wants a "reset/delete all chains" option, I think that belongs in a separate discussion).
Edgar wrote:I think that if we wish to explore the concept of partial Preferences reset we should start a new thread with that in mind
+1 to restricting the scope of this discussion to "sledgehammer".
Edgar wrote:Imagine you have 2 (or more) users registered on your computer (I'm not sure of the details on Mac or Linux)
On Linux, each user has their own "home" folder for user data.
Audacity preferences are stored in a subdirectory of the "home" folder. Thus resetting preferences while logged in as a normal user will reset preferences for that user only.

Resetting preferences for all users would be possible, but probably not normally desirable, and would require "root" or "super user" (administrator) permissions, and then iterate through each user account to reset preferences for each.

For now I think we should (on Linux) be considering (only) resetting for the logged in user.

An external program/script for resetting preferences on Linux is trivial and probably not necessary. Manual resetting is extremely easy via the file browser.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked