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
Edgar
Forum Crew
Posts: 2042
Joined: Thu Sep 03, 2009 9:13 pm
Operating System: Windows 10

Re: reset Preferences CFG file

Post by Edgar » Thu Nov 20, 2014 12:12 am

Internal sledgehammer:
both.png
both.png (43.37 KiB) Viewed 1187 times
patch attached
As before, only the Device pane has the per-pane reset; the other panes can be added once the design is approved.
Attachments
resetBoth.patch
(11.91 KiB) Downloaded 35 times
-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

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

Re: reset Preferences CFG file

Post by steve » Thu Nov 20, 2014 9:29 am

Edgar wrote:Internal sledgehammer:
Edgar wrote:External sledgehammer:
I like the basic design of both.

Although the external application is currently Windows only, I presume that, as it is wxWidgets, it could be cross-platform?

Does the External Sledgehammer need to be "installed" on Mac? In spite of the clear installation instructions repeated in several places, it seems that some Mac users will still try to run Audacity directly from the DMG rather than installing it. What will happen if the external reset is run from the DMG?

I'd suggest some minor wording changes:

Internal Sledgehammer:
"Manage Audacity's configuration (.cfg) files" ->
"Reset Audacity" or "Reset Audacity's configuration (.cfg) files"


External Sledgehammer:
Window title: "Reset Audacities Preferences" ->
"Reset Audacity" or "Reset Audacity's configuration (.cfg) files"

What about the "lock" file (if it exists)? Is that deleted? I think it should be because that can prevent Audacity from launching.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

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

Re: reset Preferences CFG file

Post by waxcylinder » Thu Nov 20, 2014 9:35 am

steve wrote:What about the "lock" file (if it exists)? Is that deleted? I think it should be because that can prevent Audacity from launching.
+1

I do seem to recall this still coming up occasionally on the Forum as a problem for users

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

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

Re: reset Preferences CFG file

Post by Edgar » Thu Nov 20, 2014 5:49 pm

steve wrote: Although the external application is currently Windows only, I presume that, as it is wxWidgets, it could be cross-platform?

Does the External Sledgehammer need to be "installed" on Mac? In spite of the clear installation instructions repeated in several places, it seems that some Mac users will still try to run Audacity directly from the DMG rather than installing it. What will happen if the external reset is run from the DMG?
There should be no problem compiling this for Mac or Linux. I apologize for not being up-to-date on make & makefiles but this application only has one source file and links with two wxWidgets libraries so should be trivial to compile. I know nothing of DMG, sorry.
steve wrote: I'd suggest some minor wording changes:
Internal Sledgehammer:
"Manage Audacity's configuration (.cfg) files" ->
"Reset Audacity" or "Reset Audacity's configuration (.cfg) files"
The difference between your wording and my wording is that mine seems more grammatically pleasing for a section title because it is not as active-sounding a verb phrase. But now that I see both I realize that it should probably be made into a noun phrase more like:
"Audacity's configuration (.cfg) files"
steve wrote: I'd suggest some minor wording changes:
External Sledgehammer:
Window title: "Reset Audacities Preferences" ->
"Reset Audacity" or "Reset Audacity's configuration (.cfg) files"
The misspelling is a combination of poor proofreading & the pitfall of dictating homonyms; I prefer your second version.
steve wrote: What about the "lock" file (if it exists)? Is that deleted? I think it should be because that can prevent Audacity from launching.
I know how to do that but forgot to place the check in the current code. New patch coming later today…
-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: 2042
Joined: Thu Sep 03, 2009 9:13 pm
Operating System: Windows 10

Re: reset Preferences CFG file

Post by Edgar » Thu Nov 20, 2014 7:42 pm

waxcylinder wrote:
steve wrote:What about the "lock" file (if it exists)? Is that deleted? I think it should be because that can prevent Audacity from launching.
+1

I do seem to recall this still coming up occasionally on the Forum as a problem for users

Peter
I think I misunderstood. I know of no ""lock" file". I thought you meant checking to make sure that Audacity was not running.

Audacity places a lock on its temp folder but, as far as I know there is no method for a program to remove a lock placed by another program. I think a reboot would be required here but this would only happen if Audacity was terminated without going through its normal shutdown procedure.

Clearly, for QA purposes, if Audacity is unable to launch, the first step would be to tell the user to reboot and if that were unsuccessful some diagnostics would be in order. If it shows up on the taskbar but is invisible and not just minimized then I would suggest that we have an extra button in our Reset external sledgehammer which allows the user to only set the Project window's size and location to default as I expect that it is one of the most common problem areas (Audacity might have been last closed on a second monitor is turned off or unconnected etc.). Likewise, I would have an additional button (or pair of buttons) so that the base configuration file and the plug-in registry configuration file were separately removable.

I have attached a replacement for reset.cpp which checks to ensure that Audacity is not currently running.

Has anyone actually compiled and tested this application?
Attachments
resetCPP.zip
(2.61 KiB) Downloaded 36 times
-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

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

Re: reset Preferences CFG file

Post by steve » Thu Nov 20, 2014 8:36 pm

(Linux) While Audacity is open, there is a file in the Audacity temp folder called "audacity-lock-username".
The size of the file is 5 bytes.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

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

Re: reset Preferences CFG file

Post by Edgar » Thu Nov 20, 2014 9:23 pm

steve wrote:(Linux) While Audacity is open, there is a file in the Audacity temp folder called "audacity-lock-username".
The size of the file is 5 bytes.
Not on Windows 7. I do see some (very vague) discussion of this in the wxWidgets documentation:
http://docs.wxwidgets.org/trunk/classwx ... ecker.html
and some platform-specific code in srcAudacityApp.cpp at or near line number 1497 in the function:
bool AudacityApp::InitTempDir()

To delete this file (if it exists, and only on Mac & Linux) would require opening the Audacity configuration file and getting the current value of:
[Directories]TempDir
as a path, appending that filename (with extension) and then attempting to remove the file with suitable error checking: if it exists but cannot be removed tell the user to reboot and try again. As I have no way of really testing this (I could create such file mechanically on Windows but could not "prove" the lock condition) I'm not going to bother writing the code until somebody commits to testing it.
-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: 2042
Joined: Thu Sep 03, 2009 9:13 pm
Operating System: Windows 10

Re: reset Preferences CFG file

Post by Edgar » Thu Nov 20, 2014 9:59 pm

steve wrote:(Linux) While Audacity is open, there is a file in the Audacity temp folder called "audacity-lock-username".
The size of the file is 5 bytes.
What is the filename extension?
-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: 2042
Joined: Thu Sep 03, 2009 9:13 pm
Operating System: Windows 10

Re: reset Preferences CFG file

Post by Edgar » Thu Nov 20, 2014 10:35 pm

Edgar wrote:I'm not going to bother writing the code until somebody commits to testing it.
I lied. Here's some code for testing purposes; it does not remove the Lock file but displays a message box which should show the entire filename, with full path but without extension.
Attachments
resetCPP2.zip
(2.8 KiB) Downloaded 39 times
-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

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

Re: reset Preferences CFG file

Post by steve » Fri Nov 21, 2014 12:47 am

Edgar wrote:What is the filename extension?
There isn't one. That is the full file name.
By default:
/var/tmp/audacity-username/audacity-lock-username
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked