Exported Spectrum overwrites existing 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.
waxcylinder
Forum Staff
Posts: 14684
Joined: Tue Jul 31, 2007 11:03 am
Operating System: Windows 10

Re: Exported Spectrum overwrites existing file.

Post by waxcylinder » Wed Oct 16, 2013 4:20 pm

BUMP: @Steve/ED is this a Feature Request or development Work In Progress?

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: Exported Spectrum overwrites existing file.

Post by Edgar » Wed Oct 16, 2013 4:25 pm

deferred to Steve…

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

Re: Exported Spectrum overwrites existing file.

Post by steve » Wed Oct 16, 2013 5:18 pm

If agreement can be reached by QA about "how" to implement it, then it will be a work in progress, but until such time it is a feature request.
My vote is for: "Export Spectrum overwrites existing file" and prompts the user if the file already exists (like when exporting audio).
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Robert J. H.
Posts: 3633
Joined: Thu May 31, 2012 8:33 am
Operating System: Windows 10

Re: Exported Spectrum overwrites existing file.

Post by Robert J. H. » Wed Oct 16, 2013 6:06 pm

I share Steve's opinion, it's the simplest solution and a expected behaviour.

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

Re: Exported Spectrum overwrites existing file.

Post by waxcylinder » Thu Oct 17, 2013 8:58 am

steve wrote:If agreement can be reached by QA about "how" to implement it, then it will be a work in progress, but until such time it is a feature request.
Accordingly it makes no sense to transfer this to Wiki>PFR, nor to move it to the FR archive-discussion section of the forum (as this is still potentially a live discussion).

So I will just let it bump along on here until if and when we get agreement/resolution.

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: Exported Spectrum overwrites existing file.

Post by steve » Tue Nov 12, 2013 7:56 am

I was thinking that it would be nice if selecting an existing file to export the spectrum to could pop up a simple message box (wxMessageBox) that would say something like:

A file named "/path/spectrum.txt" already exists.
[Overwrite] [Append] [Cancel]

Unfortunately (unless Edgar knows better) there seems to be no way with wxWidgets to "simply" change the default button text :evil:
The available buttons are YES, NO, OK, CANCEL.

Considering that this is most probably a feature that few people use at all, and those people that have commented in this topic only want the ability to overwrite and perhaps be reminded if they are overwriting a file, it seems to me to be OTT to design and build a full-blown custom dialogue for something so trivial.

It would be very ugly to design the message box:

"Click "YES" to Overwrite,
click "NO" to Append,
or "Cancel" to select a new file name"

So we could have a simple:

A file named "/path/spectrum.txt" already exists.
Overwrite? [YES] [NO]

and lose the "Append" option (but then we have the "R" word),

or

A file named "/path/spectrum.txt" already exists.
Append? [YES] [NO]

but then we loose the very feature that this feature request is about,

or

we have a preference setting (and triggering the "preference creep phobia").
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

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

Re: Exported Spectrum overwrites existing file.

Post by steve » Tue Nov 12, 2013 8:01 am

preference.png
preference.png (66.48 KiB) Viewed 2000 times
replace.png
replace.png (12.14 KiB) Viewed 2000 times
append.png
append.png (11.96 KiB) Viewed 2000 times
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: Exported Spectrum overwrites existing file.

Post by Edgar » Tue Nov 12, 2013 8:18 am

steve wrote: Unfortunately (unless Edgar knows better) there seems to be no way with wxWidgets to "simply" change the default button text
I do not think that there is any way to change these labels; one would need to create a custom dialog. We already have the ErrorDialog (see src/widgets/Error Dialog.cpp) which could probably be extended to do this job.

If we MUST use a Yes/No dialog which will pop up every time <shudder> then I suppose we need some wording vaguely like:
"Normally Audacity will overwrite the existing data. To keep the existing data you may append the new data to the old data. Do you wish to append?"
Yes _|_ No _|_ Cancel

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

Re: Exported Spectrum overwrites existing file.

Post by steve » Tue Nov 12, 2013 8:41 am

Edgar wrote:If we MUST use a Yes/No dialog which will pop up every time <shudder>
<shudder>
I agree, not nice.

If we have a "don't show this again", I don't think that we can avoid having a preference setting.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

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

Re: Exported Spectrum overwrites existing file.

Post by steve » Tue Nov 12, 2013 8:56 am

Here's the patch to go with the screenshots.
OverwriteSpectrumExport-02.patch
(6.43 KiB) Downloaded 164 times
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked