Commit Graph

106 Commits

Author SHA1 Message Date
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 f6adeed47b Remove some unnecessary #include directives 2019-05-15 14:14:18 -04: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 7766d9a192 AddCheckBox takes a bool for initial state, not string 2019-03-27 12:58:40 -04:00
James Crook 47fe07bb42 Wording
'MP3' -> 'LAME MP3' x2
'Built In' -> 'Built-in'
'AudioUnit' -> 'Audio Unit'
2019-03-27 10:57:11 +00:00
James Crook a2ee30240c Use built-in LAME (Windows only) 2019-03-26 17:47:41 +00:00
Paul Licameli f45300f032 This is only comments, in files where USE_ macros are tested...
... following the comment convention used in the preceding commit.
2019-03-22 12:38:30 -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 dcd82b8ef5 ShuttleGui::AddChoice takes int to specify selection, with a default...
... This makes things brief and where non-default avoids some repetition of
literal strings
2019-03-15 23:35:13 -04:00
Paul Licameli 06b3b42794 Remove unnecessary initializers for empty wxString 2019-03-15 15:18:11 -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
Steve Daulton b0738f6e09 Fix for bug 2050
This fix will become irrelevant when LAME is included, but may as well
fix it in the meantime.
2019-03-10 17:44:44 +00:00
Steve Daulton 8012f6b2dd Fix for bug 2072
id3_length_t is defined as "unsigned long" in id3tag.h, but is undefined
when building without libid3tag.
2019-03-10 17:35:52 +00:00
James Crook c912b13747 Bug 2046 - LAME not found error on 64-bit Mac build shows wrong library (32-bit one)
Audacity now looks for libmp3lame64bit.dylib on mac.
It also reports 64 bit in the build tab in about Audacity if built for 64 bit.
2019-02-10 07:37:37 +00:00
Steve Daulton b3dafcedd1 Fix: bug 2054
Windows: Macros - "ExportMP3 before" and "ExportMP3 after" overwrite
causing non-critical data loss.

Thanks to Mike Barker for locating the problem.

This fix also corrects the bit-rate for the ExportMP3_56k commands.
2019-01-21 10:21:03 +00:00
Paul Licameli ef97ce88ca Correct more double spaces 2018-10-15 12:54:44 -04:00
Paul Licameli a9e7a7e5d5 movable_ptr(_with_deleter) -> std::unique_ptr 2018-05-10 00:56:37 -04:00
Paul Licameli b8a8712ba0 make_movable -> std::make_unique 2018-05-10 00:56:36 -04:00
James Crook b60fae4470 Fix some warnings on mac
These are mostly missing 'overrides'
2018-04-07 20:28:27 +01:00
Paul Licameli 4c9bff73e3 Substitute, don't concatenate! In Export. And one missed translation. 2018-03-25 16:13:03 -04:00
andheh b4f351a257 fixed a "signed vs. unsigned" warning in ExportMP3.cpp 2018-03-06 21:30:40 +00:00
andheh e8605025b5 fixed types in ExportMP3.cpp to avoid "signed vs. unsigned" warnings 2018-03-06 21:30:37 +00:00
James Crook 6509947de8 Fix some MSVC warnings. 2018-03-02 12:04:37 +00:00
Paul Licameli 8be1e8fdad Remove wxArray(Int|Long|Double) except where wxWidgets fns need it 2018-02-21 19:33:31 -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 52a7f2320d Re-fix some warnings about mixing signed and unsigned better...
... Assuming that large unsigned magnitudes with high order bit set are not
the problem, but signed negatives of small magnitude may be:

1) Always cast the unsigned to signed in comparisons, not the other way.

Also:

2) Cast unsigned TERM to signed by itself, before subtracting.  Don't cast
the result.

3) Rewrite some comparisons by moving subtracted term to other side.

See commits
d2fe7b1757
f463eda36c
2018-01-23 18:51:53 -05:00
Paul Licameli 07bf088565 Bug1829, more: correct error checks for writing MP3 & add more of them 2018-01-22 16:48:17 -05:00
Paul Licameli e1cf056710 Bug1829: Inform user, erase incomplete files whenever export fails...
... Also checked more error returns from library functions.  Detect it when
write fails (maybe because of exhaustion of space) -- don't continue,
pretending all is still well.

Using one non-specific error message in many places, because we're in string
freeze now.
2018-01-20 19:56:32 -05:00
Richard Ash 499c6b4f36 Fix building without libid3tag (#230)
* Fix building without libid3tag

* Fix building without libid3tag

Extend the pull Audacity#214 from torto9 to fix building
with twolame but without libid3tag
2018-01-07 12:06:33 -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 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 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
James Crook d9bab5347a String changes: Exporting 'the audio' rather than 'the entire project'. 2017-12-17 17:34:28 +00:00
James Crook f463eda36c Clean up some dead code and MSVC warnings.
- Dead code from experiments in SelectionBar removed.
- Many warnings about unused parameters fixed with WXUNUSED()
- Many warnings about signed / unsigned comparisons cleaned up.
- Several 'local variable declared but not used' warnings fixed.
2017-12-08 15:20:39 +00:00
Paul Licameli 31231a54d2 use override 2017-11-05 21:01:52 -05:00
Paul Licameli 1a22a59ee9 Fix links to local help for buttons in Library preferences...
... There are four different code paths to test, for four different "Download"
buttons:

The two "Download" buttons in the Libraries preference dialog; and,
The Download button in each of the two dialog boxes that follow the two
"Locate..." buttons.

There are just two new help pages in a proper build of local help, each the
target of two buttons.

One of these pages is called "FAQ:Installing the FFmpeg-Import-Export Library"
rather than "FAQ:Installing the FFmpeg-Import/Export Library"

because there are some difficulties preventing links to pages with "/" in the
title, which I didn't try to fix.
2017-10-18 21:47:59 -04:00
Paul Licameli e329990ec0 fix build 2017-10-18 04:14:45 -04:00
Paul Licameli 32e40b3f7f Fix a remote help link in Lib prefs> Locate... > Download ...
FindDialog::OnDownload in ExportMP3.cpp should be analogous with
FindFFmpegDialog::OnDownload in FFmpeg.cpp
2017-10-17 20:31:58 -04:00
James Crook ce9938787c Use alpha or released or local manual for "help on selection".
Previously this was hard coded to use the online alphamanual.
Some other help-on-errors paths were hardcoded to use the online manual, and did not use local help even if available, so these were changed too.

Also two naming changes in the code:
ShowHelpDialog() became ShowHelp() because it typically shows the help in your browser, only showing the help in a dialog under certain circumstances.
The helpURL parameter became helpPage since it is usually a page name that is then elaborated into a url.
The Link() function became InnerLink().

Some careful http -> https changes made too.
2017-08-25 13:59:16 +01:00
James Crook aee0c4cbc6 Fix for broken build (::None)
None clashed with something else under linux, probably a macro expansion.
2017-08-03 17:25:12 +01:00
Paul Licameli 5d48e96942 Where FileSelector was used, default to Documents not cwd; save prefs 2017-08-03 08:02:33 -04:00
Paul Licameli def0d2bada Fix Linux build 2017-03-22 16:25:49 -04:00
Paul Licameli 0c8bedc59a Exception safety in: subclasses of ExportPlugin; and more error checking 2017-03-21 14:11:22 -04:00
Paul Licameli 1614db9994 Remove naked malloc (or similar) and free in: export 2017-03-17 17:52:52 -04:00
Paul Licameli 9bdc7b2cbf Remove naked new[] in: export 2017-03-17 17:52:45 -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 5036583549 Fewer inclusions of AudacityApp.h 2017-03-17 17:52:24 -04:00
Leland Lucius 0efe931df2 Bug 290 - (Mac) LAME: Audacity looks for LAME in a restricted folder that Mac no longer supports 2017-03-03 19:27:17 +00:00
windinthew d5a6b83fe0 Fix issues reported on Wording page 2016-10-14 16:36:41 +01:00