Commit Graph

146 Commits

Author SHA1 Message Date
Paul Licameli c1c0030013 static Tags::Get...
... not member functions of AudacityProject
2019-05-23 14:08:09 -04:00
Paul Licameli 805af452a4 static DirManager::Get()...
... not member functions of AudacityProject

This puts DirManager.cpp and four others back into the big strongly connected
component of link dependencies.  They will break out again when Project.cpp
becomes a low-level file.
2019-05-23 13:10:19 -04:00
Paul Licameli 14ab93a01f static TrackList::Get()...
... not member function of AudacityProject
2019-05-23 12:58:47 -04:00
Paul Licameli f86403378b Move AudacityMessageBox to its own files...
... breaking cycles among low-level files introduced by 273ba9f
2019-05-20 14:48:36 -04:00
Paul Licameli 6c57948d8f Remove unnecessary #include-s from .cpp files...
... Unnecessary because transitively included.

But each .cpp file still includes its own .h file near the top to ensure
that it compiles indenendently, even if it is reincluded transitively later.
2019-05-16 17:21:00 -04:00
Paul Licameli c46fbd919c rename function as AudacityProject::GetProjectName...
... So it does not hide inherited wxWindow::GetName().

And make it const.
2019-04-26 14:10:05 -04:00
James Crook 5c361631c6 Fix Show/Hide Tags Dialog, for export multiple by Labels.
Previously I only fixed the export by tracks case.
Oh beware, duplicated code.
2019-04-13 14:27:25 +01:00
James Crook adf243568b Fix Show/Hide Tags dialog for export multiple too.
Previously it was not remembering a change in show/hide.
2019-04-13 12:25:31 +01:00
Paul Licameli 0b733eed3f Remove (or comment) ProgressDialog.h in headers...
... For ImportPlugin, use unique_ptr not Maybe to hold it, and take constructors
out-of-line.
2019-04-04 09:47:57 -04:00
Paul Licameli 3002aa5362 Remove Tags.h, Grid.h from headers 2019-03-31 16:01:02 -04:00
Paul Licameli 34f318cd41 Remove wx/{imaglist,generic/dragimgg,gauge,dynarray}.h from *.h 2019-03-30 12:51:12 -04:00
Paul Licameli 4e9c3cfb5f Remove wx/{dc,tokenzr,tglbtn,statusbr,simplebook}.h from *.h 2019-03-29 06:29:35 -04:00
Paul Licameli 7766d9a192 AddCheckBox takes a bool for initial state, not string 2019-03-27 12:58:40 -04:00
Paul Licameli 1bcb7c20a5 Remove some nested #include from Project.h 2019-03-16 13:09:54 -04:00
Paul Licameli dd86346156 ShuttlegGUI: const wxArrayStringEx & arguments, not wxArrayString *...
... for choice, combo, and listbox; reference allows passing temporaries,
eliminating need for some variables to hold the string arrays.
2019-03-16 07:17:21 -04:00
Paul Licameli a30000cf74 Use type aliases FilePath, FilePaths...
... for wxString and wxArrayStringEx, holding file paths (absolute or relative,
directory or plain file); to be replaced later with different types

(not yet using std::vector, becase of some uses of wxArrayString::Index with
two arguments)
2019-03-15 15:18:11 -04:00
Paul Licameli 50074f2cfe Replace comparisons against "" with empty() 2019-03-14 13:23:41 -04:00
Paul Licameli c68e336247 More use of std:: style members of wxString...
... replacing:

Length => length
Len => length
2019-03-10 14:44:54 -04:00
Paul Licameli 2db49dc1f0 Use standard library style members of wxArrayString (and wxString) ...
... which will make it easier to change the types of those containers to
std::vectors of other string-like classes

for wxString,

IsEmpty => empty
Clear => clear
Alloc => reserve

for wxArrayString,

Count => size
GetCount => size
IsEmpty => empty
Add => push_back
Clear => clear
Empty => clear
Sort => std::sort (only with default comparator)
SetCount => resize
Last => back
Item => operator []
Alloc => reserve
2019-03-10 14:43:57 -04:00
James Crook 5fd95dd131 Fix C4456 Warnings.
"C4456 declaration hides previous local declaration."
These arise from repeated declarations of the same name.
2018-10-10 17:28:50 +01:00
Paul Licameli 3eee8b8cf0 Rewrite many iterations over tracks and channels in src/import, src/export 2018-10-01 11:24:50 -04:00
James Crook ee2d8c11cb Bug 1928 - Export Multiple with a label track present defaults to export by tracks not labels 2018-08-10 19:25:21 +01:00
Steve Daulton 217c1267bd Add Help button to Export Multiple dialog 2018-08-09 20:49:44 +01:00
James Crook 8c15422211 Allow 'Export Multiple' of a single track. 2018-04-01 17:52:34 +01:00
Paul Licameli 080dd34e61 Get rid of wx object arrays, use std::vector 2018-02-21 19:33:27 -05:00
Paul Licameli d4b21bb33e Bug 1600: Should keep progress dialog visible throughout Exp. Multi 2018-01-25 15:58:37 -05:00
Paul Licameli 2677ec5fe1 Bug1831: Export Multi fails? Erase incomplete, restore original file! 2018-01-24 14:38:44 -05:00
Paul Licameli 8e0cffb7f2 Simplify GuardedCall and default its return type to void 2018-01-13 01:32:41 -05:00
Paul Licameli 80a958f8a4 Rewrite empty prompts to ShuttleGUI functions as {} ...
... so we might more easily redefine the type of the function argument,
some other day (not this release)
2018-01-01 22:51:25 -05:00
Paul Licameli e0970ad1e8 Remove unnecesary Format, Printf, casts to wxString 2018-01-01 21:53:51 -05:00
Paul Licameli 7fd78183d2 Remove needless uses of wxString::c_str() in wxString::Format...
... and similar wx "variadics," which all treat wxString smartly enough that
you don't need this.

Don't need c_str either to convert wxString to const wxChar * because
wxString has a conversion operator that does the same.
2018-01-01 20:34:33 -05:00
Paul Licameli cf4b9eb5c8 Define wxDirDialogWrapper, with localized default prompt and name 2018-01-01 17:50:04 -05:00
Paul Licameli af290d73c0 Define AudacityTextEntryDialog wrapper around wxTextEntryDialog...
... Prohibiting use of the default caption which is unlocalized.  (But we
didn't use it in fact anywhere.)
2018-01-01 17:50:03 -05:00
Paul Licameli ccb4bbac33 Translate "Message" as default title of message box...
... This required a sweeping change of all calls to wxMessageBox!  But it seems
safe to me, despite the great number of touched files.
2018-01-01 17:50:02 -05:00
Paul Licameli a5dfff4bd2 Fix message box for completed Export Multiple which got lost in 2.2.0 2017-11-04 21:00:01 -04:00
Paul Licameli a9d4c2c05b Defaulting of file paths to Documents is defined in just one place 2017-08-03 08:02:19 -04:00
Paul Licameli 6b5c5a0335 More simplifications by use of SelectionStateChanger 2017-06-11 11:21:36 -04:00
Paul Licameli 967e1fcf02 More exception safety for selection states of tracks 2017-04-24 13:08:31 -04:00
Paul Licameli 6c4cf46c06 Move mute and solo state into PlayableTrack 2017-03-29 13:45:08 -04:00
Paul Licameli 48459404a5 Exception safety in: general exporting routines 2017-03-21 14:11:22 -04:00
Paul Licameli d9be2be137 Restore selected status of tracks correctly in export multiple 2017-03-17 17:52:36 -04:00
Paul Licameli aa0d55ac83 Use enum class ProgressResult, don't interconvert with int or bool 2017-03-17 17:52:24 -04:00
Paul Licameli b019e28a53 remove unused variable 2017-03-17 17:52:23 -04:00
James Crook ec12bc37b5 Bug 1580 - Enh: New default directory for Save and Export .../Documents/Audacity
Fix affects windows only.
In the case of Save and SaveAs creates the directory too, so that the dialog can be positioned there.
For Export Multiple, will prompt if the directory does not exist.
2017-02-06 15:38:20 +00:00
James Crook 97bf72ddb4 Bug 1304 - Starting Save or Export directory is not set, so is unwritable or requires authentication for most users
Covers the case of Export Multiple too.
2017-01-18 14:19:06 +00:00
James Crook 389b0f197e Improve source for xgettext
1: Mark % as not being treated as print formatting.
2: i18n hint fix.
2016-11-21 10:31:52 +00:00
James Crook 796b98de8b Bug 1510 - Moonphase: Crash cancelling Save As... character replacement dialogue when exporting multiple by tracks
Bug no longer moonphase when exporting stereo.  Iterator is iterating through channels, not tracks, so we need to allow for that when we skip whole tracks.
2016-09-10 20:00:32 +01:00
Paul Licameli 2263a0f477 Don't use wxArrayPtrVoid with casts, use std::vector 2016-09-08 11:08:49 -04:00
James Crook b56ea0599b Bug 1440 - (Residual) Error message looks funny on Mac as only ":" is disallowed.
Previously the dialog listed multiple characters that are disallowed.  On Mac, only ":" is disallowed, so the text in that case can't say "any of" without looking funny.
2016-09-07 15:53:44 +01:00
Paul Licameli 67cec5ad83 Make many counts of tracks and channels unsigned...
... And in some places where a library uses signed types, assert that
the reported number is not negative.

What led me to this, is that there are many places where a size_t value for
an allocation is the product of a number of channels and some other number.
2016-09-07 10:11:41 -04:00
James Crook 7c7fc55bc2 Bug 1440 - Cancelling Export Multiple by labels containing illegal characters exports the cancelled file with empty name.
Also made ExportMultipleByTrack more like ExportMultipleByLabel in that it continues on exporting tracks even if one track has a bad name.
2016-07-15 16:20:25 +01:00
Paul Licameli 84c0337aba Fix TAB key navigation on Mac for all dialogs (not only for panels) 2016-07-10 17:12:27 -04:00
Paul Licameli 02ce3c312b Bug119: Export Multiple /, *, ? handled incorrectly 2016-06-20 22:32:23 -04:00
Paul Licameli c3cca71461 Sweep for filename copying: import and export 2016-04-10 22:24:12 -04:00
Paul Licameli 456c8fb01e ExportPlugins managed with smart pointers 2016-04-06 14:08:42 -04:00
Paul Licameli 43790cfa56 std::vector for wave track pointers; remove deprecated TrackList function; ...
... and some more uses of const
2016-03-01 20:54:48 -05:00
Paul Licameli a5b6c9fd8f Add some const qualifiers; define TrackListConstIterator 2016-02-24 19:10:39 -05:00
Paul Licameli 83e8a80f61 Sweep unnecessary wxString copies: export 2016-02-22 22:22:25 -05:00
Paul Licameli 3f237daddc Use macro safenew for many allocations of wxWindow subclasses 2016-02-14 20:20:19 -05:00
Steve Daulton d6b8080a5d Fix for bug 1313 2016-01-29 22:12:41 +00:00
Leland Lucius 9dd79c9f80 Remove flushing of preferences in ShuttlePrefs and only
flush when all settings have been written.
2015-12-21 20:07:24 -06:00
Leland Lucius e5ce636234 Fix for bug #1124 2015-08-26 12:40:55 -05:00
Leland Lucius 2e2dcd1bcf Fix for bug #1150 2015-08-24 00:34:59 -05:00
Leland Lucius 617e0713df This should fix bug #1111
In addition it adds an option to open the full FFmpeg options
dialog.
2015-08-05 02:28:42 -05:00
Steve Daulton 246a8c17ef Save overwrite choice in Export Multiple 2015-08-03 16:02:41 +01:00
Paul Licameli d39eaa4e65 Remove WaveTrack.h from other headers 2015-07-28 10:02:05 -04:00
Paul Licameli b89c2a130c Remove Track.h from other headers 2015-07-28 10:02:03 -04:00
Paul Licameli e70f91c64e Removed ShuttleGui.h from other headers 2015-07-19 12:31:03 -04:00
David Bailes f458df1c7b Changes to a number of dialogs so that the NVDA screen reader can read the titles. Missed these in my last patch. The accessibility name of the dialog is set to the title. 2015-05-18 13:57:05 +01:00
james.k.crook@gmail.com 8a9987a0d9 From: martin@steghoefer.eu [PATCHES 02-15 of 15] Fix runtime problem with wxWidgets 3.0:
Correct string formatting for:
2/15  %d + enum => %d + int
3/15  %lld + int64_t => %lld + long long
4/15  %d + int64_t => %lld + long long
5/15  %d + double => %f + double
6/15  %d + int32_t => %d + int
7/15  %d + intptr_t => %p + void*
8/15  gint, guint
9/15  %d + long => %ld + long
10/15 %n + int => %d + int
11/15 %x + int => %x + unsigned int
12/15 %f + int => %d + int
13/15 %S + wxChar* => %s + wxChar*
14/15 %d + size_t => %d + int
15/15 %d + size_t => %lld + long long

"The functions wxString::Format, wxString::Printf (and others indirectly) have become stricter about parameter types that don't match (format specifier vs. function parameters). So the bugs (that were already present in audacity before) become visible in wx3.0 as error message dialogs. I've checked all occurrences of Printf, wxPrintf, PrintfV, Format, FormatV, wxLogDebug and wxLogError systematically and made the type match."

Note (9/15): In TrackPanel.cpp, ExportMP2.cpp and CompareAudioCommand.cpp this patch supersedes related change done in r13466 because the new solution requires fewer casts and therefore simplifies the code.

Note: Many .po files are affected, and we need to be very careful about this.  Incorrect "%d" and similar in translation files may lead to crashes in those languages (only).  This is something we should actually have been more careful about in the past.  We need to write a script to check that the "%d" and similar format specifiers match between English and translation.
2014-11-08 16:42:34 +00:00
lllucius@gmail.com 1b993ccd08 Patch provided by Rob (RPM) to resolve many of the wx3 format string assertions
He wanted to help so I asked if he wanted to track them down.  He agreed and
found more than I probably would have.  And he said there were more, but the
rest were questionable and since he works on Windows, wasn't able to actually
test.

I give a few of the ones he did find a go and they do indeed get rid of the
assertions.

(Basically, a 64-bit/32-bit issue, easily resolved with a typecast.)
2014-10-19 03:08:10 +00:00
james.k.crook@gmail.com f5e593cc4c Paul L's new SelectedRegion class replacing use of t0 and t1. Also LabelTrack.h no longer in TrackPanel.h includes.
This change is believed to be a direct refactoring that does not change functionality.  It paves the way for more complex kinds of selection, such as selections involving frequency as well as time.  It also reduces risk of left and right edges being swapped in future code using SelectedRegion, as the default is to swap on assignment if needed.
2014-10-05 17:10:09 +00:00
RichardAsh1981@gmail.com fc3a7558ae re-organise the Help System functions into a class as static methods for future utility 2014-06-09 18:42:19 +00:00
RichardAsh1981@gmail.com 59b8cdeaa8 separate out Help system functions into their own source file (pending some extra ones) and change the required includes to accomodate this. As a result, some error class definitions have to move from .cpp file to .h file. 2014-06-06 21:34:36 +00:00
benjamin.drung@gmail.com 277932dccb Remove trailing spaces. 2014-06-03 20:30:19 +00:00
james.k.crook@gmail.com dba81b3f1c Cleanup: Fixed lots of trivial MSVC warnings. 2013-08-25 21:51:26 +00:00
v.audacity c2e0257da5 Metadata Editor:
* "Open Me&tadata Editor..." -> "Edit Me&tadata..." because it's more concise, matches other occurrences, and eliminates any confusion about file opening. 

* In AudacityProject::OnEditMetadata(), "Edit the metadata tags" -> "Edit Metadata Tags": more concise, and brings in line with capitalization standard for dialog titles. 

* Likewise for capitalization in other invocations of ShowEditDialog in ExportMultiple.

* In TagsEditor::PopulateOrExchange(), "RETURN key" -> "ENTER key" because I don't recall ever seeing a Return key on a comnputer (!).
2013-07-10 01:22:55 +00:00
mchinen 7863f52986 ExportMultipl.cpp:fix wx controls labels heirarchy. Patch by Steve Daulton. 2013-05-19 08:51:34 +00:00
v.audacity 706fa2d785 Further simplify an alert, per discussion on bug 428. 2013-01-12 00:56:31 +00:00
v.audacity c7407ca9e0 slight further tweaks 2013-01-08 01:15:08 +00:00
v.audacity a35b11b340 Re-order the conditionals from Steve's patch for bugs 428 and 430, so that it doesn't check twice for all audio being muted, and does that check before checking for label issues. 2013-01-08 00:44:57 +00:00
v.audacity f73f03aff4 Simplify messages. 2013-01-07 05:35:34 +00:00
v.audacity 72825001f5 modified version of Steve's patch for bugs 428 and 430 2013-01-05 00:05:59 +00:00
windinthew 208398fdf4 Fix "Can't export multiple files" warning as per -quality list 26 Sep 10 (export multiple works if the first label track is above the audio track).
Rename "Numbering after Label/Track Name" to "Numbering after File name prefix" which is what it actually does (else Manual doesn't make sense).
2011-01-01 11:51:24 +00:00
windinthew a267f86b2e Clarify in "Can't export multiple files" warning that the Label Track containing labels must be directly underneath the audio track. 2010-09-25 07:45:56 +00:00
windinthew b5e09a975e Clarify in "not a legal file name" dialogue that track names can also be illegal 2010-04-25 06:04:15 +00:00
james.k.crook f4e81220b3 New ShowInfoDialog() function for text message plus OK button. Resizability more obvious now, and cursor at position 0. 2010-02-13 18:24:57 +00:00
james.k.crook a2ad4dae36 Use RICH2 edit ctrl in place of plain old text ctrl where possible. We can tab into it, and it is expected to be better for screen readers. 2010-02-13 11:11:05 +00:00
james.k.crook c6ca8c2018 Bugzilla:72 Blank labels continue to give 'untitled' in files after the first. 2010-02-12 17:28:24 +00:00
james.k.crook afe3290cb3 Missing EndVerticalLay(), spotted by Ed Musgrove. Worked OK here, but would cause issues if adding more sizers. 2010-02-12 12:30:53 +00:00
james.k.crook e3134f1a12 Shorter solution for patch #13 (scroll bars), also removes superfluous ifs left after removing number-of-digits = 1 or 2 choice code. 2010-02-11 14:42:44 +00:00
windinthew bfb812a9e4 Modifications to Benjamin Drung's patch (003) as agreed with James:
* "Using Label/Track Name" is default again
* Clearer wording for the two different "numbering" options, both of which now use two-digit numbering    
* Last used "Name files" radio button is remembered and written to .cfg (patch by Ed)
2010-02-10 14:03:47 +00:00
james.k.crook 365c0c8ac3 Tweak radio-button spacing (slightly tighter) 2010-02-07 22:25:16 +00:00
james.k.crook 66206238b5 New option also needs to do enabling/disabling. 2010-02-07 20:38:56 +00:00
james.k.crook d84bc6b212 Enh: Allow number+name in export-multiple; patch thanks to Benjamin Drung. 2010-02-07 20:17:36 +00:00
ra e74978ba77 Locate and position the current Audacity source code, and clear a variety of old junk out of the way into junk-branches 2010-01-23 19:44:49 +00:00