Commit Graph

140 Commits

Author SHA1 Message Date
Paul Licameli
c5ebc396eb Audacity.h has shrunk to nothing, now remove it! 2021-05-10 00:05:23 -05:00
Paul Licameli
e653b4aaf8 Eliminate Experimental.h, configure compile options instead...
... This makes it impossible to forget to include the EXPERIMENTAL definitions
(such as when cutting and pasting code) and so get unintended quiet changes of
behavior.

The EXPERIMENTAL flags are now specified instead in new file Experimental.cmake
2021-04-27 12:40:07 -04:00
JohnColket
eb39642969
Bug 2663 - Audacity can make unwanted moves of toolbars (#776) 2021-03-28 09:16:09 +01:00
Leland Lucius
91b3389434 Ensure docked state is passed 2021-02-16 01:56:19 -06:00
Leland Lucius
182878caae Bug 2386 - Win/Linux: Toolbar grabber gets stuck pushed 2021-02-15 09:59:42 -06:00
Leland Lucius
3ecc5717ad Bug 2120 - Spectral Selection Toolbar can be truncated when undocked 2021-02-15 09:13:33 -06:00
Leland Lucius
8aaecdc596 Bug 2631 - Silent crash during "discard selected" processing from Recovery dialog. 2021-01-14 21:30:10 -06:00
freddii
534359de6c
Fix minor typos (#720)
Co-authored-by: freddii <https://freddii@github.com>
2021-01-12 11:56:09 +00:00
Paul Licameli
a085057b66 Delay creation of tool docks and bars...
... after construction time for ToolManager, so that ToolManager can be
constructed earlier than ProjectWindow, and therefore the unspecified sequence
of invocation of factories of attached objects in the project won't lead to a
crash on any platform
2020-06-08 15:37:12 -04:00
James Crook
bc621158b8 Update OnResetConfig
Now it resets the toolbars, and fixes three common 'stuck-in-a-mode' issues.

Paul wrote: "I would move that function [OnResetToolBars(context)] into ToolManager.cpp so it can be called from ToolBarMenus.cpp and HelpMenus.cpp, with neither of those two dependent on the other."
2020-05-31 12:22:08 +01:00
Leland Lucius
5cf8434b06 Bug 2410 - Mac: Cosmetic issues with undocked resizable toolbars in Dark and High Contrast themes 2020-05-28 23:10:48 -05:00
Leland Lucius
a5db7bbb2b Bug 2318 - Linux: Time Toolbar is needlessly resized too large when accommodating longer time format 2020-04-12 01:14:08 -05:00
Yuri Chornoivan
d1ada5f08c Fix minor typos 2020-04-11 10:06:24 +01:00
James Crook
60a113da26 Bug 2318 - Time Toolbar is needlessly resized too large when accommodating longer time formats
Tweaks to TimerToolbar.

- When docked, resizer will spring back to right edge when released.
- Now prefers a smaller font, unless bigger is forced.
2020-02-16 11:15:31 +00:00
Paul Licameli
d0a99d5ae5 Each toolbar registers its menu item 2020-02-14 14:51:11 -05:00
James Crook
b837d49b6b Improve positioning of dock-drop indicator
The triangle showing where in the dock a toolbar will drop now takes into account that overly tall toolbars will be resized to 2 tbs once they are docked.
2020-02-14 12:46:43 +00:00
James Crook
9985b8a9b8 Fix Big Time TimerToolBar, Stage III
Fixed issue where format selector could disappear.
Fixed upgrade from 2.3.3.
Remembers time format.
2020-02-14 12:02:21 +00:00
James Crook
a09885e995 Fix Big Time TimerToolBar, Stage II
- Naming (Time Toolbar, not TimerToolBar Toolbar)
- Default time format hhmmss
- Lower dock
- Enabled by default
- Sensible min and max font size
- Sensible min and initial width
- Omit Audio Time from Selection Toolbar
2020-02-06 09:40:30 +00:00
Loss
e787694f07 Implementation of Timer Toolbar
PRL:  Rebased onto recent master, fixed compilation and indentation, added new
files to the XCode project, added an EXPERIMENTAL flag
2019-12-31 17:42:54 -05:00
James Crook
9e69be9f6f Bug 2182 - Updating Audacity can cause messed up toolbar layout 2019-08-30 09:28:26 +01:00
Paul Licameli
e1908ab8e2 ToolManager does not depend on ProjectWindow 2019-06-16 01:24:29 -04:00
Paul Licameli
0b897c81b0 ToolManager.cpp does not depend on Meter 2019-06-16 01:24:29 -04:00
Paul Licameli
705b4b28e7 Register a predicate with each CommandFlag bit 2019-06-14 00:31:15 -04:00
Paul Licameli
c6f24d864b Construct all toolbars with back-reference to the project...
... and eliminate many uses of GetActiveProject
2019-06-12 20:52:36 -04:00
Paul Licameli
e6d7a72a73 Registration of toolbar factory functions...
... reduces direct dependencies of ToolManager.cpp.

This frees four files from cycles:
DeviceToolBar
EditToolBar
MeterToolBar
MixerToolBar

Leaving 66 files still in the big s.c.c.
2019-06-12 16:01:53 -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
ac65d817ac Remove an #include 2019-05-25 05:59:50 -04:00
Paul Licameli
15dd230ee1 static ToolManager::Get()...
... not member functions of AudacityProject
2019-05-23 15:24:28 -04:00
Paul Licameli
62899a32f4 All things with an UpdatePrefs() message listen for an event...
... Still to do, improve the handling of updates of only subsets of the prefs
2019-05-20 21:38:13 -04:00
Paul Licameli
4c3729040f comments 2019-05-20 19:46:14 -04:00
Paul Licameli
236c8ed51e Move version keys from AudacityApp to AudacityPrefs 2019-05-17 16:29:04 -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
08c16b6eb7 Remove wx/{html/htmlwin,fileconf,dragimag,debug,dcclient}.h from *.h 2019-03-30 10:53:22 -04:00
Paul Licameli
bcc2e0d13b Remove wx/frame.h, wx/sizer.h, wx/access.h from headers 2019-03-28 11:21:15 -04:00
Paul Licameli
5e7d41ec07 Each .cpp/.mm file includes corresponding header before any other...
... except Audacity.h

This forces us to make each header contain all forward declarations or nested
headers that it requires, rather than depend on context.
2019-03-17 22:54:52 -04:00
Paul Licameli
906e55f047 Experimental.h in all .h or .cpp files that directly use EXPERIMENTALs...
... except Audacity.h; and in no others.

Do so even if Experimental.h gets multiply included, as in both the .h and
.cpp files.

This makes it easier to do a text scan to be sure there are no unintended quiet
changes of meaning because of omission of Experimental.h when the flag is
an enabled one.

Also move inclusions of Experimental.h earlier.

Also don't require Experimental.h to be preceded by Audacity.h to define
EXPERIMENTAL_MIDI_OUT correctly.
2019-03-17 22:54:00 -04:00
James Crook
f07e40a4c0 Bug 1983 - Preference updates do not preserve toolbar widths 2018-09-20 13:16:09 +01:00
Paul Licameli
a90c6c45f3 Remove redundant calls to update toolbars 2018-09-15 18:24:16 -04:00
Paul Licameli
01634938cc Fix: Undock Tools toolbar; then reset toolbars Mac...
... Used to need two resets to get the correct result, now only one.
2018-09-15 18:23:51 -04:00
James Crook
bf6b47dbb4 Bug 1918 - Left to right (LTR) language selection reverses elements that should not be reversed
This does not entirely fix LTR language support, but dramatically ameliorates the problems originally reported in bug 1918.
2018-08-08 16:33:00 +01:00
Paul Licameli
0dddcf44cb Some uses of wxWindowRef, a weak pointer that won't become dangling 2018-08-01 22:49:37 -04: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
2f3604bdea Rewrite many calls to Connect() with Bind()...
... it's the more modern way, and does better type checking, without the
dubious casts of pointers-to-member-functions.
2018-02-21 19:28:11 -05:00
Paul Licameli
bf5228267a Calls to Disconnect or Unbind in destructors are not needed, if...
... it's either the source of the connection that is being destroyed, or other
object (such as an ancestor window) transitively owning it and so causing it to
be destroyed too;

or, the sink is being destroyed, and that sink is a wxEvtHandler (which is
always so for Disconnect, though not for Unbind in case Bind was passed a
member function of a non-wxEvtHandler).

wxWidgets takes care of erasing the connection in such cases.

This removes most calls to Disconnect and Unbind.  Many destructors shrank to
nothing.

Notably, in case of popup menu handling, the call to Disconnect is not removable
because the object being destroyed is neither the source nor the sink.
2018-02-21 19:28:06 -05:00
Paul Licameli
57ce726a25 Rename Meter as MeterPanel, and some DOxygen 2018-02-21 17:50:28 -05:00
Paul Licameli
89d3d6e6e6 Comments and name changes to clarify code for toolbar configurations 2018-01-22 12:13:40 -05:00
Paul Licameli
58b44baf05 Some NULL checks... somehow I crashed on Mac but can't repeat now 2018-01-22 12:11:43 -05:00
Paul Licameli
2ee3ba5761 Bug1828: ESC from dragging of a docked toolbar...
... Now restores state again properly and does not cause undocking of other
bars when you restart.

Redoes commit 2d56c8ec32 better
2018-01-21 05:42:49 -05:00
David Bailes
cfdb7950f1 Update fix for #1554
This is an update to commit 516af71. The Dock key is now retained in the config file, so that if a user goes back to a version before the fix, the toolbar layout remains unchanged.

Note that when ToolManager::ReadConfig() is called, InitPreferences has already been called which has set the version keys to the current version of Audacity. Therefore the initial values of these keys are stored in AudacityApp.
2018-01-10 11:33:05 +00:00