Commit Graph

82 Commits

Author SHA1 Message Date
Paul Licameli ae42397d64 FileNames::SelectFile takes TranslatableString for message 2019-12-20 13:40:20 -05:00
Paul Licameli 53ee9c9800 TranslatableString for titles, names, labels of wxDialogWrappers...
... Found one missed translation in CommandTargets.cpp
2019-12-16 10:58:05 -05:00
Paul Licameli 0cf90d65e6 S.GetParent() for all windows passed to ShuttleGui::AddWindow()...
... Verified that this makes no real change.
2019-12-10 09:58:38 -05:00
Paul Licameli e3efd52026 Move many declarations into LabelTrackView & define its Copy() 2019-06-20 10:47:25 -04:00
Paul Licameli aa5f9550bd LabelTrackView, not LabelTrack, handles focus changes when adding 2019-06-20 10:47:25 -04:00
Paul Licameli 4f940c855d New files for ProjectWindow 2019-06-03 01:43:26 -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 b5a57682b6 static ViewInfo::Get() and ZoomInfo::Get()...
... not member functions of AudacityProject
2019-05-23 12:58:47 -04:00
David Bailes 14601660d9 Bug 2113: When the label editor closes, no control is the focus.
This was caused by commit: 7c0d05f
Problems:
1. LabelDialog::Show() is called both when dialog opens and closes, so SetFocus() was being called when the dialog closed.
2. The call for SetFocus() was only needed for mac and linux, and it would have been better to #ifdef it to prevent unforeseen bugs on other platforms.

This commits fixes the two issues.
2019-05-22 11:43:20 +01: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 3002aa5362 Remove Tags.h, Grid.h from headers 2019-03-31 16:01:02 -04:00
Paul Licameli de60edc62f Remove wx/{app,statbmp,spinctrl,scrolbar,dynlib,dcmemory}.h from *.h 2019-03-30 07:57:37 -04:00
Paul Licameli 41175e94cd Simplify by removing many std::move of shared_ptr to tracks...
... Don't need them, as we did with std::unique_ptr
2019-03-16 13:11:33 -04:00
Paul Licameli dfeb7e18aa Type aliases for some uses of ComponentInterfaceSymbol...
... to be replaced later with distinct types

Also changing FamilyId => Family in function names

Also NumericFormatId => NumericFormatSymbol
2019-03-14 17:26:20 -04:00
Paul Licameli 50074f2cfe Replace comparisons against "" with empty() 2019-03-14 13:23:41 -04:00
Paul Licameli dd8eb9e3d9 Less use of wxArrayString::Index() ...
... instead use the utility make_iterator_range and its index() or contains()
method.  This generic utility works with any container defining begin() and
end().

This further lessens dependency on wxWidgets container idioms.
2019-03-10 14:45:06 -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 d26b17eea5 bug 2011 - dlg.Raise() only required for GTK 2018-11-26 21:06:45 +00:00
Steve Daulton 7c0d05fc18 Fix for bug 2011 - Label Editor
Linux: Audacity may stop responding to GUI after opening Label Editor
2018-11-20 19:52:31 +00:00
Paul Licameli 968d63d5fd Rewrite many iterations over tracks and channels in various places 2018-10-01 13:35:51 -04:00
James Crook 09063d6b41 Bug 1465 - Labels Editor: Does not remember modified size and position after OK 2018-04-11 23:11:01 +01:00
Paul Licameli 0fb02a8024 IdentInterfaceSymbol in NumericTextCtrl; don't persist translated 2018-03-28 14:00:17 -04:00
James Crook 159a3ab6af Rejig EditLabels Dialog.
- Made it more like the Edit Chains Dialog. (Buttons on right).
- Now using ShuttleGui somewhat.
- Gave it a Help button.
2018-03-04 18:41:15 +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 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
James Crook 63de7f0884 Bug 305 - Analysis effects produce false indication that a label is open for editing
This was true of any Nyquist or VAMP effect that created labels.
2017-12-17 21:18:07 +00:00
James Crook 68897d8932 Some cppcheck fixes by David Binderman 2017-11-04 17:47:39 +00:00
Paul Licameli 5d48e96942 Where FileSelector was used, default to Documents not cwd; save prefs 2017-08-03 08:02:33 -04:00
windinthew e2a7282690 Fix wording issues reported on Wiki
No ellipses in title bar of file open/import dialogs
Auto Recovery Discard dialogs say only recoverable projects are discarded
Capitalised button in Dependency dialogue per MS guidelines.
2017-03-27 05:36:10 +01:00
Paul Licameli 39d514b183 Some more const, some stl idioms, remove unused declaration 2016-09-13 22:03:58 -04:00
James Crook 65c7e8051a ThomasFeher - Unused parameters clean up. 2016-09-11 20:31:49 +01:00
David Bailes 0569572d1b Fix for bug 1464: In label editor, displayed track names wrong after remove
In LabelDialog::OnRemove, displayed name of track was incorrectly being removed
when a label (and not any track) was being removed.
2016-08-01 12:11:40 +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 e1e1b9b138 Bug1437 again -- don't mess up the counting 2016-07-07 12:07:38 -04:00
Paul Licameli e13ae7d410 Bug1437: Label Edit wont delete other labels, duplicate other tracks
This refers to the new Edit... command in the popup menu for individual labels.

The label editor can also be reached from toolbar menus, which shows data
for all labels.
2016-07-07 10:57:32 -04:00
Paul Licameli f8fe26ca36 Add columns to Label editor for low and high spectral selection 2016-06-27 18:41:43 -04:00
Paul Licameli 9c687f055c Generalize TimeRenderer and TimeEditor to handle frequencies in grid 2016-06-27 18:41:42 -04:00
Paul Licameli c3b4ea165f Bug1428: Don't make negative label start time from label edit dialog 2016-06-27 17:40:49 -04:00
Paul Licameli 53e30e5533 Label context menu can bring up the edit dialog 2016-06-26 13:34:52 -04:00
Paul Licameli 42fcfdab98 Fewer naked news and deletes in Tags.cpp and LabelDialog.cpp 2016-04-08 21:16:18 -04:00
Paul Licameli c87eb0804b Unreported bugs: memory leaks, assertions dismissing Tags and Label editors...
Symptoms were:

Edit metadata; ESC; exit audacity -- memory leaks.

Edit metadata; single-click "Genre" field twice; ESC -- assertion violaion in
Windows debug build.

Make a label; Track > Edit Labels; single-click time field twice; esc -- also
caused assertions, then memory leak at exit.

However, there are still two small memory leaks at exit after using Label
editor, yet unexplained.
2016-04-08 20:48:58 -04:00
Paul Licameli a6ca36cdab TrackList holds smart pointers to tracks, Add() only takes rvalue refs to such 2016-03-26 15:41:31 -04:00
Paul Licameli 5ef4dd46a5 TrackFactory functions return std::unique_ptr, although some callers...
... release() them for now.
2016-03-26 11:50:12 -04:00
Paul Licameli 5162ab5c5b Use TrackFactory in more places...
... There should now be no direct allocation of Track subclasses with new,
except in those classes' own methods
2016-03-26 11:50:09 -04:00
Paul Licameli 9bf098c7d9 Sweep unnecessary wxString copies: rest 2016-02-23 02:15:56 -05:00
Paul Licameli 1c07741d57 Sizers are owned by wxWindow objects when added, so use safenew, or...
... use unique_ptr in the interim between building them and adding.

This checks eliminates some naked news, which were not paired with deletes.
2016-02-18 18:58:38 -05:00
Paul Licameli 4d78e353c3 Revert "sizers"
This reverts commit 84c0a0b666.
2016-02-18 14:50:52 -05:00