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
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 » Mon Nov 24, 2014 6:09 pm

Edgar wrote:
Gale Andrews wrote:I tried the two patches for the internal "Reset" (single and multiple buttons in Prefs).

In the "single button" patch, the "Reset" button should have an ellipsis as it is opening a dialogue requiring user input.

The "Very drastic action" title of the message will need changing to "Reset audacity.cfg" or similar I think. I confirmed reset with a track open and a recording taking place in another project window. Audacity did the right thing, offering to save the contents.

In the "multiple buttons" patch, I think[…]
So, since the multiple buttons patch is off the table (at least for the foreseeable future)
Well, the one you posted so far has issues. I think at least some Preferences panes could benefit from an individual "Defaults" button.
Edgar wrote:the single button patch works as desired - only needing minor wording polish (which you are completely capable of accomplishing)…might I suggest getting it in the nightly so that it may be tested?

Aside - since you now build on all three platforms, did you do so and, if so, can I assume no functional problems occurred?
I only tested on Windows, as I said. I am prepared to build and test it on Mac, but is it what we want? The "single button" patch edits "audacity.cfg" down to "NewPrefsInitialized=1" and does not delete pluginregistry.cfg. So although I think that's OK, Steve presumably doesn't. Let me know if you want to make a new "single button" patch that deletes both .cfg files - or is it already posted here and I missed it?

Vaughan doesn't like "nightly builds" to be other than HEAD, so I won't post one-off builds to the Windows alpha builds page.


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 » Mon Nov 24, 2014 6:26 pm

Gale Andrews wrote:The "single button" patch edits "audacity.cfg" down to "NewPrefsInitialized=1" and does not delete pluginregistry.cfg. So although I think that's OK, Steve presumably doesn't.
I'm not opposed to retaining "NewPrefsInitialized=1" per se. My "complaint" was in making "NewPrefsInitialized=1" a requirement.
My feeling at the moment is that we probably do need to be able to reset/delete pluginregistry.cfg, though that somewhat depends on how robustly pluginregistry.cfg is handled by the time we get to release. At the moment there are still issues with it and I need to regularly delete it in order to keep the Audacity menus working correctly.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

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 » Mon Nov 24, 2014 6:46 pm

Ed, I built your external app on Windows.

I am not sure of the best way to build it on Mac, so I asked Leland. I got quite close if I made it part of the Audacity project, but I won't post the errors here until I know that is the way to build it.

Of course we can still post unofficial external reset apps for Mac and Linux on the Forum if developers don't want to officially distribute an external app. For my primitive effort on Mac, I used bash rm to delete audacity.cfg and sed for the version that only initialised cfg, but perhaps it should be done with Apple Script in case older Macs don't have support for rm and sed?

Testing your external app on Windows, would it be better to use the official Audacity icon with some kind of overlay suggesting reset?

The Help dialogue has a typo "About Reset Audacity's References". I don't know why we need the possessive "Audacity's" anywhere.

Since the buttons actually do delete files, perhaps they should say "Delete" and not "Reset", and only the Help dialogue gives explanation. If we want the external app to to delete audacity.cfg as opposed to reset it, then the "single button" patch to Preferences should also delete audacity.cfg, shouldn't it?

When I only reset pluginregistry.cfg in your external app, the same dialogue is given about resetting Audacity's preferences as with the other buttons, despite I am not resetting Preferences.

If I say "No" in the dialogue to confirm I want to reset Preferences, should the app quit? Perhaps the user wants to explore the other options in the app or look at the help?


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 » Mon Nov 24, 2014 7:20 pm

steve wrote:
Gale Andrews wrote:The "single button" patch edits "audacity.cfg" down to "NewPrefsInitialized=1" and does not delete pluginregistry.cfg. So although I think that's OK, Steve presumably doesn't.
I'm not opposed to retaining "NewPrefsInitialized=1" per se. My "complaint" was in making "NewPrefsInitialized=1" a requirement.
The ongoing requirement I see is that Audacity should be able to handle a .cfg file that for whatever reason only contains "NewPrefsInitialized=1". Handling means deleting that line as now, ignoring it or whatever.
steve wrote:My feeling at the moment is that we probably do need to be able to reset/delete pluginregistry.cfg, though that somewhat depends on how robustly pluginregistry.cfg is handled by the time we get to release. At the moment there are still issues with it and I need to regularly delete it in order to keep the Audacity menus working correctly.
Is this a Linux only bug?

Deleting pluginregistry.cfg seems to be a more complete "reset". However if we only initialize or delete audacity.cfg and leave pluginregistry.cfg alone, then as long as the user chooses to rescan effects I think that will have exactly the same effect as deleting pluginregistry.cfg.

If the user cancels the scan, then they keep all their cached plugins. If the user cancels scan but pluginregistry.cfg has been deleted, they lose their cached plugins.

I think it would make the external app simpler if it only had a button to reset/delete audacity.cfg and we left pluginregistry.cfg alone.


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 » Mon Nov 24, 2014 8:01 pm

Gale Andrews wrote:Is this a Linux only bug?
Apparently not. Waxcylinder has also reported the problem of duplicate entries for Nyquist plugins.
Gale Andrews wrote:as long as the user chooses to rescan effects I think that will have exactly the same effect as deleting pluginregistry.cfg.
No. The duplicate Nyquist plugins issue clears on deleting pluginregistry.cfg but does not clear on rescan. It is not safe to assume that rescanning will fix problems with pluginregistry.cfg.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

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 » Mon Nov 24, 2014 10:07 pm

steve wrote:
Gale Andrews wrote:Is this a Linux only bug?
Apparently not. Waxcylinder has also reported the problem of duplicate entries for Nyquist plugins.
I've not seen the bug yet. Perhaps I am deleting pluginregistry.cfg too often, but I have only been doing that in the last couple of days.
steve wrote:
Gale Andrews wrote:as long as the user chooses to rescan effects I think that will have exactly the same effect as deleting pluginregistry.cfg.
No. The duplicate Nyquist plugins issue clears on deleting pluginregistry.cfg but does not clear on rescan. It is not safe to assume that rescanning will fix problems with pluginregistry.cfg.
On my testing it's safe to assume if the bug wasn't there.

It would be better to fix the bug than program for existence of a bug.


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 » Mon Nov 24, 2014 10:59 pm

Gale Andrews wrote:It would be better to fix the bug than program for existence of a bug.
Absolutely, but this is all very new and there are a lot of "unknowns". For example, if a user tries to load/install a plugin that crashes Audacity, can it be guaranteed that Audacity will launch if the effect has been marked as "enabled" in the pluginregistry.cfg file?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

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 » Mon Nov 24, 2014 11:32 pm

Gale Andrews wrote: I am not sure of the best way to build it on Mac, so I asked Leland.

Of course we can still post unofficial external reset apps for Mac and Linux on the Forum if developers don't want to officially distribute an external app. For my primitive effort on Mac, I used bash rm to delete audacity.cfg and sed for the version that only initialised cfg, but perhaps it should be done with Apple Script in case older Macs don't have support for rm and sed?
IMHO, I would feel uncomfortable if the Audacity Team Developers did not want it distributed. I do not believe that it needs to be shipped with Audacity as part of the "normal" distribution. In your bash script were you able to use code to determine the location of the configuration file? There's a small chance that sed might not exist but rm will certainly.
Gale Andrews wrote: Testing your external app on Windows, would it be better to use the official Audacity icon with some kind of overlay suggesting reset?

The Help dialogue has a typo "About Reset Audacity's References". I don't know why we need the possessive "Audacity's" anywhere.

Since the buttons actually do delete files, perhaps they should say "Delete" and not "Reset", and only the Help dialogue gives explanation. If we want the external app to to delete audacity.cfg as opposed to reset it, then the "single button" patch to Preferences should also delete audacity.cfg, shouldn't it?

When I only reset pluginregistry.cfg in your external app, the same dialogue is given about resetting Audacity's preferences as with the other buttons, despite I am not resetting Preferences.

If I say "No" in the dialogue to confirm I want to reset Preferences, should the app quit? Perhaps the user wants to explore the other options in the app or look at the help?
In re. the icon: that is a QA/design decision for someone with more artistic skills than I. As long as it has some icon at this stage (alpha) that's all that is important as changing the artwork is simple.

In re. the typo: references versus preferences - sorry, my dictation software has a hard time with those.

In re. grammar: correct grammar usage suggests either "Audacity's preference file" or "the Audacity preference file"; I know that Connie has been convinced that the inconsequential "the" is not desirable but I have a very hard time being convinced <grin>.

In re. Delete versus Reset: the original design was to "reset" Audacity's configuration file to be completely empty with the exception of the "initialized" line. The design is in flux! If the application eventually has a single button which does nothing but emptying the configuration file (leaving a blank file or one with the initialize line) then Reset is correct. As I pointed out when I first presented the application it needs serious QA/wording review <grin>.

In re. different warning dialogs: until the design is finalized fine tuning the wording is not productive.

In re. clicking "No" - should close the app: IMHO no; after reading the warning, there is a good chance that the user will want to make a copy of the configuration file before deleting it. Keeping the App open might be convenient.

Maybe the app should have a button which opens the location of the configuration files in Windows Explorer/the equivalent Mac/Linux folder/directory Explorer. Maybe this application should be a Locator not a Deleter nor a Reseter.
-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

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 » Wed Nov 26, 2014 5:05 pm

steve wrote:
Gale Andrews wrote:It would be better to fix the bug than program for existence of a bug.
Absolutely, but this is all very new and there are a lot of "unknowns". For example, if a user tries to load/install a plugin that crashes Audacity, can it be guaranteed that Audacity will launch if the effect has been marked as "enabled" in the pluginregistry.cfg file?
No, that seems to be another bug.

In 2.0.6 if you rescan and do not select a plugin in the Install VST Effects dialogue, that plugin is removed from plugins.cfg and so removed from the plugins cache.

Rescan without selecting a plugin does not remove that plugin from pluginregistry.cfg. Can you see any reason it should not do so? The whole point of the Register Effects dialogue is to choose which effects to install and uninstall, surely? And if so, that's a P1 and we should not program for that bug's existence.


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 » Wed Nov 26, 2014 5:36 pm

Gale Andrews wrote:Rescan without selecting a plugin does not remove that plugin from pluginregistry.cfg. Can you see any reason it should not do so?
Is it supposed to be removed from the plugin registry, or just marked as "don't use"? I'm not sure what the intention is.

I can see a good reason for keeping a record of plugins that crash on load - then we don't need to keep trying to load them on every launch.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked