Page 2 of 3

Re: Exported Spectrum overwrites existing file.

Posted: Wed Oct 16, 2013 4:20 pm
by waxcylinder
BUMP: @Steve/ED is this a Feature Request or development Work In Progress?

Peter

Re: Exported Spectrum overwrites existing file.

Posted: Wed Oct 16, 2013 4:25 pm
by Edgar
deferred to Steve…

Re: Exported Spectrum overwrites existing file.

Posted: Wed Oct 16, 2013 5:18 pm
by steve
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).

Re: Exported Spectrum overwrites existing file.

Posted: Wed Oct 16, 2013 6:06 pm
by Robert J. H.
I share Steve's opinion, it's the simplest solution and a expected behaviour.

Re: Exported Spectrum overwrites existing file.

Posted: Thu Oct 17, 2013 8:58 am
by waxcylinder
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.

Re: Exported Spectrum overwrites existing file.

Posted: Tue Nov 12, 2013 7:56 am
by steve
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").

Re: Exported Spectrum overwrites existing file.

Posted: Tue Nov 12, 2013 8:01 am
by steve
preference.png
preference.png (66.48 KiB) Viewed 1999 times
replace.png
replace.png (12.14 KiB) Viewed 1999 times
append.png
append.png (11.96 KiB) Viewed 1999 times

Re: Exported Spectrum overwrites existing file.

Posted: Tue Nov 12, 2013 8:18 am
by Edgar
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

Re: Exported Spectrum overwrites existing file.

Posted: Tue Nov 12, 2013 8:41 am
by steve
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.

Re: Exported Spectrum overwrites existing file.

Posted: Tue Nov 12, 2013 8:56 am
by steve
Here's the patch to go with the screenshots.
OverwriteSpectrumExport-02.patch
(6.43 KiB) Downloaded 163 times