Page 1 of 2

Multiple export overwrite option

Posted: Wed Jul 29, 2015 8:49 am
by mickthefish
when using (export multiple) in audacity,is there any way to permenantly untick the (overwrite existing file) box as i keep forgetting to unclick it.it would also save time as i use quite a lot--mickthefish.

Re: Multiple export overwrite option

Posted: Wed Jul 29, 2015 1:29 pm
by steve
No there isn't.

I'll move this to the "adding features" part of the forum.
I agree that it would be better if the user setting was retained, (and for safety, the default set to unchecked, don't overwrite).

Re: Multiple export overwrite option

Posted: Wed Jul 29, 2015 5:57 pm
by waxcylinder
steve wrote:I agree that it would be better if the user setting was retained, (and for safety, the default set to unchecked, don't overwrite).
+1 from me to that

@Steve: do you have the skills to "make it so" :?:

Peter

Re: Multiple export overwrite option

Posted: Wed Jul 29, 2015 8:29 pm
by Gale Andrews
waxcylinder wrote:
steve wrote:I agree that it would be better if the user setting was retained, (and for safety, the default set to unchecked, don't overwrite).
+1 from me to that

@Steve: do you have the skills to "make it so" :?:

Peter
+1 but I don't want to default to off unless the user's setting is retained. I think most users want to overwrite.


Gale

Re: Multiple export overwrite option

Posted: Thu Jul 30, 2015 8:07 pm
by Edgar
waxcylinder wrote:@Steve: do you have the skills to "make it so"
It's a very simple change; currently (before the change to wxWidgets 3) the code looks like (in \src\export\ExportMultiple.cpp at or near line number 352):

Code: Select all

   S.StartHorizontalLay(wxEXPAND, false);
   {
      mOverwrite = S.Id(OverwriteID).AddCheckBox(_("Overwrite existing files"), wxT("true"));
   }
   S.EndHorizontalLay();
needs two additional statements:

Code: Select all

   S.StartHorizontalLay(wxEXPAND, false);
   {
      wxString overwriteExisting(wxT("true"));
      gPrefs->Read(wxT("/Export/OverwriteExisting"), &overwriteExisting, wxT("true"));
      mOverwrite = S.Id(OverwriteID).TieCheckBox(_("Overwrite existing files"), overwriteExisting, wxT("true"));
   }
   S.EndHorizontalLay();
and the changeover from a generic wxWidgets checkbox to a Preferences-aware TieCheckBox.

Re: Multiple export overwrite option

Posted: Fri Jul 31, 2015 12:38 pm
by mickthefish
Hi Gale-I suppose it depends on what project your working on wether you prefer the checkbox (ticked or un-ticked)if as you say most people prefer it set to overwrite.not an easy FIX for me though!-mickthefish.

Re: Multiple export overwrite option

Posted: Mon Aug 03, 2015 12:41 pm
by steve
Edgar wrote:
waxcylinder wrote:@Steve: do you have the skills to "make it so"
It's a very simple change; currently (before the change to wxWidgets 3) the code looks like (in \src\export\ExportMultiple.cpp at or near line number 352):

Code: Select all

   S.StartHorizontalLay(wxEXPAND, false);
   {
      mOverwrite = S.Id(OverwriteID).AddCheckBox(_("Overwrite existing files"), wxT("true"));
   }
   S.EndHorizontalLay();
needs two additional statements:

Code: Select all

   S.StartHorizontalLay(wxEXPAND, false);
   {
      wxString overwriteExisting(wxT("true"));
      gPrefs->Read(wxT("/Export/OverwriteExisting"), &overwriteExisting, wxT("true"));
      mOverwrite = S.Id(OverwriteID).TieCheckBox(_("Overwrite existing files"), overwriteExisting, wxT("true"));
   }
   S.EndHorizontalLay();
and the changeover from a generic wxWidgets checkbox to a Preferences-aware TieCheckBox.
How about just:

Code: Select all

   {
      mOverwrite = S.Id(OverwriteID).TieCheckBox(_("Overwrite existing files"),
                                                 wxT("/Export/OverwriteExisting"),
                                                 true);
   }

Re: Multiple export overwrite option

Posted: Mon Aug 03, 2015 3:05 pm
by steve
Done in commit 246a8c

Re: Multiple export overwrite option

Posted: Mon Aug 03, 2015 3:46 pm
by waxcylinder
Just saw that on the commit list :)

Re: Multiple export overwrite option

Posted: Tue Aug 04, 2015 11:09 pm
by Edgar
steve wrote: How about just:

Code: Select all

   {
      mOverwrite = S.Id(OverwriteID).TieCheckBox(_("Overwrite existing files"),
                                                 wxT("/Export/OverwriteExisting"),
                                                 true);
   }
I tried that first and got a compiler warning (maybe because "true" can be defined as a BOOL or as an INT depending on the OS and/or compiler). If you search the code for other instances where we use a TieCheckBox you will see that, historically, it is done the way I did it. FYI your way does not work on my system (Windows 7, MSVS 2010 & 2013, WxWidgets 2.8 - next week I should be on Windows 10, MSVS 2015 & wxWidgets 3.0).