1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-05 22:28:57 +02:00

81 Commits

Author SHA1 Message Date
Paul Licameli
0f98522b5c Doxygen comments in generated theme header files 2020-08-22 11:28:05 -04:00
Paul Licameli
0eafcd112b Theme does not depend on GUIPrefs...
...breaks cycle of 6, still Theme in a cycle with ImageManipulation
2020-05-28 05:50:25 -04:00
Paul Licameli
fa4d35296e AllThemeResources.h has a .cpp & doesnt include Theme.h...
... (it used to, via MacroMagic)

This splits a cycle of 8 into 6 + 1 + 1
2020-05-28 05:50:24 -04:00
Paul Licameli
61abb87a77 Reviewed all i18n-hint comments...
... Moved many misplaced ones, which msgfmt would not have extracted into
audacity.pot.

Duplicated some of them, to appear with related but distinct msgids.

Added a few new comments.

Deleted one that was no longer needed in ProjectManager.cpp.
2020-04-05 09:00:00 -04:00
Paul Licameli
dc39f22442 AudacityMessageBox takes TranslatableString message and caption 2019-12-20 21:32:50 -05:00
Paul Licameli
503ccabdd8 TranslatableString caption & message in MessageBoxException 2019-12-16 10:58:05 -05:00
Paul Licameli
87a9e7ccbb Use global ChoiceSettings variables, not coincidental string literals 2019-11-27 13:38:17 -05: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
4bdcf3152f Theme.cpp has fewer dependencies...
It remains in a cycle with ImageManipulation, but the two are free from
other cycles
2019-05-18 20:29:25 -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
08c16b6eb7 Remove wx/{html/htmlwin,fileconf,dragimag,debug,dcclient}.h from *.h 2019-03-30 10:53:22 -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
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
6d5bc21d50 Define and use wxArrayStringEx...
reducing verbosity where there were repeated calls of Add(), and defining
move construction and assignment for efficient returns from functions
2019-03-10 16:23:44 -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
Paul Licameli
303553ae4e Take class AdornedRulerPanel out of src/widgets...
... It's not a utility widget like RulerPanel.  It has a lot of application
specific logic in it.
2018-10-24 15:04:41 -04:00
scootergrisen
b4f7946e9b Remove some double space 2018-10-14 10:42:01 +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
James Crook
c34dd3172b Reduce flicker of Selection Toolbar Text
Previously there could be long delays between erasing text and painting it.
Now we erase in the paint event.
2018-04-14 21:38:53 +01:00
James Crook
291be502a0 Generate JSON box list for ThemeCache
The commented out wxLogDebug statements in Theme.cpp give the
location of all the boxes in the theme.  This is useful
for identifying what is in the theme cache for javascript code.
2018-04-04 21:34:15 +01:00
James Crook
8782a7264a Add code for iota theme-bitmap
This #ifdeffed out TEST_CARD is useful for javascript code that shows how a
theme will look, when applied to Audacity.  With the code enabled, each
pixel of audacity is painted with a colour that encodes the location in
the theme image map that was used.

Net result - in javascript you can change any colour in the theme cache
and instantly see how Audacity will look.
2018-04-04 21:30:10 +01: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
080dd34e61 Get rid of wx object arrays, use std::vector 2018-02-21 19:33:27 -05:00
Paul Licameli
2b3be3208e Fix repaint of Mixer board after change of track name...
... Problem was introduced in 2.2.0 at commit dc05b94

Also, in MixerBoard, change name whenever changing the label, which might
matter to screen readers.
2018-02-07 05:16:29 -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
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
James Crook
a49f14ad02 doxygen. Class list completed for letter 'A'. 2017-11-09 18:32:29 +00:00
Paul Licameli
70b5076b0b Fix some untranslated prompts and messages...
... Even if some commented out.  Such don't enlarge the .pot file, but make
them right in case they are ever un-commented.
2017-09-10 19:24:41 -04:00
James Crook
dd02a02c25 Mask for XPM RegisterImage()
Per conversation on http://forum.audacityteam.org/viewtopic.php?f=50&t=96765
I'm not convinced, but the function is unused, so it is a net plus to add this code with a comment.
2017-08-16 20:49:32 +01:00
James Crook
cd0ac7d7ef Bug 1715 - Theme change in the case of multiple open windows is only complete in the foreground window. 2017-08-14 15:36:16 +01:00
James Crook
dc05b94fd1 Bug 1701 - Mac: Text descriptors in Selection Toolbar become invisible after Open command
Problem was that on mac enable/disable clears the colour back to black.
The easiest workaround was to create a new class auStaticText that does all that we
need for wxStaticText.
2017-08-13 23:04:13 +01:00
James Crook
00f6ee2fc3 Const 'fix' no longer needed, thanks to Paul's fix.
Paul's change to DYLD_LIBRARY_PATH initialisation fixes the const issue.
2017-07-28 14:49:56 +01:00
James Crook
00f865860e LightTheme fix, but without the const.
To narrow down the Mac 'wrong library invoked' bug.
2017-07-26 15:37:31 +01:00
James Crook
188886f4da Revert 'Possible fix for Mac library issue.'.
The ',' on the end of the data was not creating a rogue zero entry.
So adding ImageSize-- was incorrect.
2017-07-25 21:17:46 +01:00
James Crook
6513fcf2ca Possible fix for Mac library issue.
Fix off by one error in size.

Git-bisect indicated a problem (on Mac only) caused by a change in an image file.
It's possible that this is an error in code that we have 'got away with' until now.
We always have an extra zero on the end of the image data and included it in the count of the
size of stream to unpack.  For a particular image this may have triggered a memory corruption
problem.
2017-07-25 20:53:42 +01:00
Paul Licameli
f0de38dec1 Scanned for bad naked new; found none; changed comments, used safenew 2017-07-23 09:35:01 -04:00
James Crook
60405eb7fe Theme Tweaks
- Highlighting of Buttons in TCP and Sliders
- No crinkly Help Icon anymore
- Invisible numbers in NoteTrack fixed
- Better visibility of label track dragger elements
- Theme rearranged more logically, and dead images culled
2017-07-19 15:27:00 +01:00
Henric Jungheim
48edd2298a Put the theme data in .rdata/.rodata 2017-07-12 20:47:12 +01:00
James Crook
11f9a8bb00 "Hi Contrast" -> "High Contrast" 2017-07-02 09:39:44 +01:00
James Crook
64a28861a0 Make light theme default.
Or as our RM said, 'Let it be Light'.
2017-06-09 19:40:29 +01:00
Paul Licameli
0d899b0163 compiler warning fixed 2017-06-09 13:14:41 -04:00
James Crook
62f75eb159 (Hi-DPI) No longer upscale ImageCache
I found a couple of problems working with upscaled image caches.

Firstly in GIMP a 'size 4 square pencil' is not 4x4, which makes editing an upscaled image very fiddly.
Secondly the wxIMAGE_QUALITY_NEAREST algorithm is not as dumb as I need it to be, and it is doing some blending when rescaling.  This leads to loss of image quality in some cases.

So when we do switch to Hi-DPI support, we need to be 'all in' and only be downscaling in Audacity, not upscaling too.
2017-05-22 13:46:05 +01:00
James Crook
978f09ba13 Lose unused images from theme. 2017-05-13 18:38:16 +01:00
James Crook
c0f835b67b Add border around theme Images. Do fixups.
Adding an orange border around the images in a theme makes it much easier to cut and paste in the correct position.  I've also expanded the internal images and fixed up a few image details - the pins/bobbins on darker themes, and the light blue rather than dark blue for negative times.
2017-05-04 21:41:18 +01:00
James Crook
e7f95e2be0 A small step towards HiDPI
The image cache that users work with should now have 'pixels' that are 4x4.   This will in time allow us to have large or small versions of all buttons, and also means we have hi resolution images for HiDPI screens.  The actual cost of the extra size should be small, as compression will see lots of repetition.

The main point of doing this now is so that new contributed themes can be HiDPI from the start.
2017-05-04 16:56:32 +01:00
James Crook
9d501f69d6 Add preference for Record being to new track. 2017-05-01 12:04:27 +01:00