Commit Graph

130 Commits

Author SHA1 Message Date
Paul Licameli
05efeeb5bd New files for ProjectSettings 2019-06-03 01:13:13 -04:00
Paul Licameli
dd10e00a2d New attached structure ProjectSettings stores rate, snap-to, et al. 2019-06-02 14:42:00 -04:00
Paul Licameli
b25d3ad344 Limit access to global array of open projects & simplify iterations 2019-05-30 01:55:25 -04:00
Paul Licameli
82663892dc Accessors to get the project window...
... as a preparation for splitting up class AudacityProject.

Use ProjectWindow as an alias for AudacityProject, and fetch it from the
project with a static member function, where certain of its services are used;
pretending they are not the same class.

Use global accessor functions to get wxFrame from the project where only
wxFrame's member functions are needed, so there will be less dependency on
ProjectWindow when it becomes a distinct class.
2019-05-28 23:18:13 -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
0ab29d21e9 Some naming consistency...
Prefer "MissingAliasFiles" not other permutations of the words
2019-05-17 06:47:53 -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
c8d95e1117 Bug2105: Enable TAB to sliders on Mac...
... I think this is a defect in wxWidgets, but one we can work around with a
simple wrapper class around wxSlider overriding one method.

To make the fix complete, change all occurrences of "safenew wxSlider"
but the one in ShuttleGui.cpp covers most cases
2019-04-30 21:50:22 +01: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
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
08c16b6eb7 Remove wx/{html/htmlwin,fileconf,dragimag,debug,dcclient}.h from *.h 2019-03-30 10:53:22 -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
2176de79fb Rewrite #include directives in lib-src/FileDialog ...
... Removing one from the public header file
2019-03-23 11:31:17 -04: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
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
485b6bb425 Use type aliases FileExtension, FileExtensions...
... for wxString and wxArrayStringEx, holding file extensions (without dot);
to be replaced later with different types

(not yet using std::vector, becase of some uses of wxArrayString::Index with
two arguments)

And simplify some constructions of arrays
2019-03-15 15:18:11 -04:00
Paul Licameli
06b3b42794 Remove unnecessary initializers for empty wxString 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
da33daf197 Some replacements of wxArrayString with auto 2019-03-10 14:47:12 -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
David Bailes
5eb670fd63 Fix windows build: problem with path of an include.
Problem: the line

Should be "..Menu.h", and this is already included.
2018-10-24 19:20:18 +01:00
Paul Licameli
fb8b5029e5 Select and Clip Menus 2018-10-24 12:16:33 -04:00
Paul Licameli
2792faa114 Edit and Label Menus 2018-10-24 12:14:05 -04:00
Paul Licameli
ce9f2e2538 Include Menus.h directly, only where needed, not via Project.h 2018-10-16 16:45:26 -04:00
scootergrisen
b4f7946e9b Remove some double space 2018-10-14 10:42:01 +01: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
Paul Licameli
9481587fa8 Move menu handling functions out of class AudacityProject 2018-09-29 12:10:27 -04:00
James Crook
154f6d25d9 Bug 1923 - Enh: Help buttons for Export Audio 2018-08-10 09:40:00 +01:00
Steve Daulton
5dab364f15 Add Help button for Advanced Mixing Options 2018-08-09 21:25:29 +01:00
James Crook
cf442759b4 Add AUDACITY_FILE_SUFFIX_EVENT to ExportPCM
This signals a change in the file suffix, and it is received by the Exporter.
However, there is currently no way to change the displayed filename in
the file selection dialog.

This was a step towards a fix for Bug 1355 - "Other uncompressed files" does not (visually) update target file extension according to the chosen "Header" type
2018-08-06 15:56:56 +01:00
James Crook
4318cb6780 Bug 1886 - Sluggish behaviour caused by the large time taken to draw the Track Control Panel
All backing bitmaps (not just the one in track panel) now are set to 24 bits.
Big thanks to David Bailes for tracking down the root cause of slow BitBlts, and the comments at https://trac.wxwidgets.org/ticket/14403 which led to the fix.

In testing the bitmaps, I also fixed the sizer errors reported for Export.cpp that wxWidgets now reports as ASSERTS when running in debug builds.
2018-08-03 18:29:49 +01:00
Paul Licameli
e432883dec Fix deprecation warnings with wxFont, wxPen, wxBrush ctors...
... Replace some enum constants with the equivalent values from the more
special-purpose enums, as the wx header files recommend, so overloading
selects the ctors with non-int arguments.

In a full rebuild of the debug project on Mac, this reduces the count of
warnings from 264 to 274.
2018-07-23 13:21:15 -04:00
Steve Daulton
24ac6a2d2b Fix crash if invalid [Export] format 2018-05-15 10:29:41 +01:00
Paul Licameli
a9e7a7e5d5 movable_ptr(_with_deleter) -> std::unique_ptr 2018-05-10 00:56:37 -04:00
Steve Daulton
705fc96208
Update export warnings
Attempt to reduce confusion (as reported on the forum) re these messages.
2018-05-04 10:22:04 +01:00
Paul Licameli
080dd34e61 Get rid of wx object arrays, use std::vector 2018-02-21 19:33:27 -05:00
Paul Licameli
151cbb1305 Follow wxWidgets argument conventions for other ctors 2018-02-21 19:21:03 -05:00
Paul Licameli
d4b21bb33e Bug 1600: Should keep progress dialog visible throughout Exp. Multi 2018-01-25 15:58:37 -05:00
James Crook
b384f99e62 Bug 1825 - Import Uncompressed File Dialog Incorrect Reference to Menu Item 2018-01-17 13:27:00 +00:00
Paul Licameli
def1d52505 Substitute, don't concatenate, when composing localized strings...
... Avoid English syntax bias.
2018-01-04 04:30:46 -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
384300016d Define FileDialogWrapper, with localized default prompt and name 2018-01-01 17:50:04 -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
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
49174461d1 Overwriting export via save-compressed or chain commands: safety...
... of original file contents in case of failure.
2017-10-17 06:46:29 -04:00
Paul Licameli
cbf4c11e26 When export fails, don't leave a partially written file. 2017-10-17 06:29:04 -04:00