Commit graph

2552 commits

Author SHA1 Message Date
Pere Pujal i Carabantes
310ed51ede Changing old android/support/v4 to androidX. 2021-11-15 01:08:02 +01:00
Bill Kendrick
b029ceeae7 Portuguese update
from Hugo Carvalho
2021-11-13 13:20:33 -08:00
Pere Pujal i Carabantes
75ca9dd66e Merge branch 'master' into sdl2.0 2021-11-09 23:23:28 +01:00
dolphin6k
c31e0cd504 Updated Japanese translations. 2021-11-09 23:01:19 +09:00
Pere Pujal i Carabantes
32f05c3891 Need to declare tmp_char also for Android. 2021-11-09 00:09:45 +01:00
Pere Pujal i Carabantes
88d8252952 Merge branch 'master' into sdl2.0 2021-11-08 23:33:49 +01:00
Pere Pujal i Carabantes
f32d8b4ab8 Updating Catalan angle translations to a neutral singular/plural. 2021-11-08 23:23:52 +01:00
Bill Kendrick
f65fe54a2c Going back to squelching notices re: unusable fonts
Only doing so if DEBUG set.
2021-11-08 13:21:01 -08:00
Bill Kendrick
70795bffcd Translate new angle-showing tips (Lines, Shapes)
h/t Pere for noticing they weren't appearing
2021-11-08 13:18:38 -08:00
Pere Pujal i Carabantes
b187ca9bb1 Updating Catalan. 2021-11-08 21:12:25 +01:00
Bill Kendrick
58274ed01f Refresh PO/POT after Lightning desc. typo fix 2021-11-07 20:33:03 -08:00
Pere Pujal i Carabantes
1afe9e155c Merge branch 'master' into sdl2.0
Tons of bugfixes and improvements for Windows by Toyama Shin-Ichi
Angle rotation and some magic tools by Bill.
2021-11-06 08:59:22 +01:00
dolphin6k
46dd77fdb5 Reverted to mtw(). (MultiByteToWideChar() was not safe for the labels on other versions of Windows.) 2021-11-06 01:00:18 +09:00
dolphin6k
1efedfa191 Windows Recycle Bin support seems to be stable. / Replaced mtw() with MultiByteToWideChar(). 2021-11-06 00:29:10 +09:00
dolphin6k
5c669730a9 Re-defined iswprint() using GetStringTypeW on windows. 2021-11-05 16:55:23 +09:00
Bill Kendrick
0a529cea96 Avoid crashing on config file lines lacking =
Instead, emit a warning to stdout (though really we may want to
exit cleanly, like parse.gperf does when coming across an
unrecognized option).
2021-11-04 21:30:07 -07:00
dolphin6k
7c8f6bca80 Addressed warnings when compiling on MinGW/MSYS
Following warnings still remain so far.

src/tuxpaint.c:199:2: warning: #warning "Attempting to define strcasestr(); if errors, build with -DHAVE_STRCASESTR" [-Wcpp]
  199 | #warning "Attempting to define strcasestr(); if errors, build with -DHAVE_STRCASESTR"
      |  ^~~~~~~

src/parse.gperf: In function 'parse_one_option':
src/parse.gperf:306:45: warning: argument to 'sizeof' in 'memcpy' call is the same pointer type 'char *' as the destination; expected 'char' or an explicit length [-Wsizeof-pointer-memaccess]
  306 |   memcpy(offset+(char*)tmpcfg, &opt, sizeof(char*)); /* FIXME: This causes a warning; should it be 'sizeof(char)', or do we need to have the warning suppressed? -bjk 2021.10.14 */
      |                                             ^~~~

src/dirwalk.c: In function 'tp_ftw':
src/dirwalk.c:348:2: warning: #warning Failed to see DT_UNKNOWN [-Wcpp]
  348 | #warning Failed to see DT_UNKNOWN
      |  ^~~~~~~

src/get_fname.c: In function 'get_fname':
src/get_fname.c💯3: warning: 'dir' may be used uninitialized in this function [-Wmaybe-uninitialized]
  100 |   snprintf(f, sizeof(f),
      |   ^~~~~~~~~~~~~~~~~~~~~~
  101 |            "%s%c%s",
      |            ~~~~~~~~~
  102 |     dir, (*name) ? '/' : '\0', /* Some mkdir()'s don't like trailing slashes */
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  103 |     name);
      |     ~~~~~

magic/src/cartoon.c:178:99: warning: unused parameter 'last' [-Wunused-parameter]
  178 | static void do_cartoon(void *ptr, int which ATTRIBUTE_UNUSED, SDL_Surface * canvas, SDL_Surface * last, int x, int y)
      |                                                                                     ~~~~~~~~~~~~~~^~~~
2021-11-05 12:23:09 +09:00
Bill Kendrick
19db5e1b4a Avoid compile-time warnings re: wchar_t comparison
When assembling UTF-8 in render_text_w() (to send to SDL_Pango),
we assumed `wchar_t` could encompass the entirety of Unicode
(up to U+10FFFF); however, on Windows `wchar_t` is only 16-bits,
meaning the test for characters <= U+FFFF was always true.

This reworks the if/elseif/else block, via some "#ifndef WIN32"
tests, to avoid this warning.

In the end, we need to replace our internal use of `wchar_t`
with something 32-bit, to allow for higher Unicode code points
(e.g., to support Emoji via the Text and Label tools).

Additonally, some work will need to be done to ensure that
text stored as Labels within saved Tux Paint images (PNGs) continued
to work correctly, and could be traded between platforms.
(Untested, but right now I assume a picture drawn on Linux where
`wchar_t` is 32-bit would break if you attempt to load it on Windows,
and possibly vice-versa?)

See https://sourceforge.net/p/tuxpaint/feature-requests/210/
2021-11-03 22:16:24 -07:00
Bill Kendrick
f46df76736 Clean up comment formatting re: UTF-8 stuff 2021-11-03 21:28:03 -07:00
dolphin6k
6145fb8bc2 Addressed some compile time warnings. 2021-11-03 22:04:24 +09:00
dolphin6k
0cb079acb0 win32_trash.c: converted newline from <CR><LF> to <LF> 2021-11-03 20:51:25 +09:00
dolphin6k
2a6b55e3c2 "Move to recycle bin" for Windows is now ready for the tests. 2021-10-31 17:18:16 +09:00
dolphin6k
f9efb48450 win32_trash() to work correctly on various version of windows.
Careful tests are still required.
2021-10-31 15:49:55 +09:00
dolphin6k
b667aa7d79 win32_trash() is still quite unstable. 2021-10-31 02:34:24 +09:00
dolphin6k
e9f31ac4ce Updated Japanese translations. 2021-10-30 18:51:54 +09:00
Bill Kendrick
022e7cd4eb Remove FIXME re: Windows trash support
...since Shin-ichi is adding it :)
2021-10-29 16:25:09 -07:00
dolphin6k
8d23668589 UNLINK_ONLY macro to work correctly for windows. 2021-10-30 07:34:30 +09:00
dolphin6k
87ed5bc991 tweak for win32_trash() 2021-10-29 23:37:19 +09:00
Bill Kendrick
adc181e3ec More debugging in dirwalk & fonts 2021-10-28 22:52:06 -07:00
Bill Kendrick
0701eeae74 Portuguese translation update
From Hugo Carvalho
2021-10-28 10:01:02 -07:00
Bill Kendrick
32d3ac4ce2 Icelandic translation update
From Sveinn í Felli
2021-10-28 09:38:37 -07:00
dolphin6k
61ce0798d9 Initial implimentation of win32_trash() 2021-10-28 22:47:32 +09:00
Bill Kendrick
75d209e3f1 PO/POT update, adding Cartoon full-image mode desc 2021-10-27 22:57:30 -07:00
Bill Kendrick
2e231b5adc switchout/switchin when changing Magic groups
Also, doc'ing Cartoon full-image mode
2021-10-27 22:56:29 -07:00
Bill Kendrick
27b89d0dba Blocks/Chalk: Full-image descriptive text 2021-10-27 22:24:13 -07:00
Bill Kendrick
05f7f4bec4 Icelandic translation updates
From Sveinn í Felli
2021-10-26 23:41:18 -07:00
Bill Kendrick
d9596af63f Pausing SDL_ttf -> SDL_pango project for now 2021-10-26 23:25:21 -07:00
Bill Kendrick
59920d3ce9 More debug output when TuxPaint_Font_OpenFont ends
Also, avoid unused var. declaration when FORKED_FONTS is disabled.
2021-10-26 23:08:47 -07:00
Bill Kendrick
10fbd32977 dirwalk: Enable stderr output re: unloadbale fonts 2021-10-26 23:07:48 -07:00
Bill Kendrick
173b813a04 Hacking on TuxPaint_Font_OpenFont
More DEBUG output.  Looking into having SDL_ttf open a font,
get its name, and then see whether SDL_Pango can load it.
(If not, fall back to SDL_ttf.)

That code is not working, and "#if 0"'d out, for the moment.
2021-10-26 22:49:46 -07:00
Bill Kendrick
8d9ddebcd1 Always echo to stderr if cannot TTF_OpenFont a TTF 2021-10-26 22:17:28 -07:00
Bill Kendrick
b0e5051d14 Portuguese translation update
From Hugo Carvalho
2021-10-26 10:33:13 -07:00
dolphin6k
4e7346c8d9 Fixed crash bug regarding locale detection on 64bit windows build. 2021-10-26 23:16:04 +09:00
Bill Kendrick
af1bd0850e Lines/Shapes: Display angles in Tux tip text
When drawing lines or rotating a shape, the angle of rotation
is shown (in the instructions at the bottom).
2021-10-25 23:23:28 -07:00
Bill Kendrick
1bee12246e Protect mysetenv() fron any NULL string pointers
...such as those we seem to be receiving from _nl_locale_name()
on 64-bit Windows under newer MinGW/MSYS (see big thread on
tuxpaint-devel with reports from Shin-ichi).
2021-10-25 22:11:32 -07:00
Pere Pujal i Carabantes
9c010ffd40 Updating Catalan translation. 2021-10-24 12:37:34 +02:00
Pere Pujal i Carabantes
5500b45ec8 Exposing Stretch strings to translations. 2021-10-24 12:32:37 +02:00
Pere Pujal i Carabantes
e6cd8d7b30 Input Method working again in the sdl2.0 branch. 2021-10-24 12:12:53 +02:00
Pere Pujal i Carabantes
9cf77f684c Merge branch 'master' into sdl2.0
There are problems with im that should be investigated...
2021-10-24 11:47:54 +02:00
Bill Kendrick
b8317f74e0 extern char*[] from sounds.h to new sounds.c
Move the list of Tux Paint's internal sound effect filenames
from "sounds.h" to a new "sounds.c" (that compiles to "sounds.o").
2021-10-24 01:20:07 -07:00