Commit graph

3778 commits

Author SHA1 Message Date
Bill Kendrick
a095d89ff2 Updating README to capture Label doc updates 2022-02-21 23:38:56 -08:00
Bill Kendrick
3e385f6a68 More work on Label apply feature
h/t Pere for adding the missing pieces.

WIP b/c there's one minor side effect that needs addressing
(final label, highlighted red, does not lose its highlight)
2022-02-21 23:23:32 -08:00
Pere Pujal i Carabantes
b62a5f1094 Less flickering when selecting a label.
If you selected a label and the cursor was in another place, the label was displayed flashy in that another place.
2022-02-21 00:50:16 +01:00
Bill Kendrick
5c2bcd44a2 OSK: Reposition if cursor overlap zone via [Enter]
Onscreen keyboard repositions itself to the top if you use [Enter]
to move the cursor down, and it begins overlapping the keyboard.

Also, play "carriage return" sound effect, even when entering
a blank 'line' of text.
2022-02-17 22:19:57 -08:00
Bill Kendrick
278513979a Compress doc JPEG images 2022-02-16 14:02:03 -08:00
Bill Kendrick
a304460d6d Compressed PNGs in docs folder
Used `pngout`
2022-02-16 01:48:30 -08:00
Bill Kendrick
9702fcae1b Icelandic update
h/t Sveinn í Felli
2022-02-14 23:43:30 -08:00
Mark Kim
c126eb92b5 macOS fix for backspace in text/label tools in some languages
Fixed the issue with the backspace not working in text and label tools
when in certain language modes in macOS.  Mac keyboards have the DELETE
key where PC keyboards have the BACKSPACE key, and the two keys have
different keycodes, so the backspace requires special handling on the
macOS in programs writtens for the PC.
2022-02-13 17:16:12 -05:00
dolphin6k
3d4dd494b5 WIN32: Use WideCharToMultiByte() insted of iconv() for label embeddiing. 2022-02-13 18:51:08 +09:00
Bill Kendrick
afc76bc20a Refreshed zh_TW subset font based on current PO files
It had been ~14 years!
2022-02-13 01:34:47 -08:00
Bill Kendrick
e31f4991d9 Update helper script for zh_TW font regen. 2022-02-13 01:30:36 -08:00
Bill Kendrick
0c6c5fd4b9 Doc'ing Santali translation update 2022-02-12 22:30:01 -08:00
b'William Kendrick
04aae49077 Merge /u/prasantahembram/tuxpaint12/ branch master into master
https://sourceforge.net/p/tuxpaint/tuxpaint/merge-requests/11/
2022-02-13 06:27:22 +00:00
Mark Kim
d47ed30f5c Document the macOS fonts search path addition 2022-02-12 22:16:17 -05:00
Mark Kim
671fba1b44 Merge branch 'master' of ssh://git.code.sf.net/p/tuxpaint/tuxpaint 2022-02-12 22:14:38 -05:00
Mark Kim
2cc4217a0c macOS check for locale fonts in Tux Paint system preferences location 2022-02-12 22:13:26 -05:00
Mark Kim
cf06258947 Fix recent macOS changes to be macOS 10.10 compatible
* macOS language detection has been updated to be backward compatible to macOS
  10.10 Yosemite.

It appears older version(s?) of macOS can just return "en" instead of "en-US"
when queried for the preferred locale.  Updated code to account for this.
2022-02-12 22:03:12 -05:00
dolphin6k
f4cc875861 Finally fixed space bug with labels on windows correctly 2022-02-12 10:20:18 +09:00
dolphin6k
599e616d13 Fixed space bug with labels also on windows. 2022-02-11 23:26:58 +09:00
prasantahembram
4810d41be7 Added Santali translation. 2022-02-11 18:46:46 +05:30
Bill Kendrick
851f5ffbb7 Win32, loading Label text from drawings: Avoid leak
Avoid leaking memory when loading Label text strings from a saved drawing.

Also, a heck of a lot of comments to explain (as best I understand)
what load_info_about_label_surface() is doing.
2022-02-11 01:18:51 -08:00
dolphin6k
907c739679 Removed mtw() for windows.
Instead, defined windows native functions for mbstowcs()/wcstombs().
2022-02-11 09:40:59 +09:00
dolphin6k
7305768d38 Revert "Removed "#ifdef WIN32" block around label embedding."
This reverts commit c0da1f0e94.
2022-02-11 08:52:37 +09:00
dolphin6k
c0da1f0e94 Removed "#ifdef WIN32" block around label embedding.
It has likely become unneccessary by recent fix for the common part.

Also backported a fix for uppercase issue from sdl2.0 branch (Define Windows native
function for mbstowcs/wcstombs).
2022-02-11 08:33:29 +09:00
dolphin6k
6a414961b8 Do not copy dll(s) if already exist. 2022-02-10 20:02:08 +09:00
Bill Kendrick
4ec43dcff2 Address fscanf eating space at beginning of Labels
When reading label text (on non-Windows, at least), fscanf("%lc")
was being used.  It seemed to be skipping the initial space,
causing strings to be shifted left one, and end up with garbage
bytes at the far right.

Fixes https://sourceforge.net/p/tuxpaint/bugs/247/ I hope!
2022-02-10 02:28:50 -08:00
Bill Kendrick
ce4b8b9040 POT/PO refresh after more work on Label tool 2022-02-10 01:02:39 -08:00
Bill Kendrick
5d064297d4 WIP: More work on Apply Label functionality
"Apply Label" mode of Label tool can be activated/deactivated,
though it doesn't currently do the work yet.

Also

* Modularized routine to select a Label (via click or [Enter] key):
   `select_label_node()`

 * Starting routine for applying a Label to the canvas
   (via click or [Enter] key): `apply_label_node()`

 * Modularized routine for repositioning the on-screen keyboard based on
   where we're typing: `reposition_onscreen_keyboard()`

Seems likely that I broke some things.
2022-02-10 01:01:40 -08:00
Bill Kendrick
e0922a14e1 WIP Apply label: Show apply label button 2022-02-09 23:25:46 -08:00
Bill Kendrick
d682044ce0 Commentary for text input handling routines
Also, sound effect when deleting a Label (select existing label (node),
[Backspace] to delete every character, then [Enter] or [Tab] to commit).
2022-02-09 22:58:54 -08:00
Bill Kendrick
f787cb0f75 WIP Label "apply" option
Starting work towards
https://sourceforge.net/p/tuxpaint/feature-requests/213/

The ability to 'apply' a label to the canvas, making it permanent
(as if added using the "Text" tool instead).

Removed unused "label rotate" option's code (and hence addressed
a bug we didn't relalize when choosing the "Label" tool while in
in "--nostampcontrols" mode; the unused "rotate" button would appear).
2022-02-09 22:41:13 -08:00
Bill Kendrick
b60a4ec4d1 Mend compile-time warnings in locale_to_closest_locale
Also, not currently used except for macOS, so wrapping in #ifdef
to avoid "defined but not used" warning.
2022-02-09 22:06:14 -08:00
dolphin6k
110cdeaa6a Documented stdout/stderr redirection for windows. 2022-02-10 12:29:37 +09:00
dolphin6k
d0699bdbc9 Redirect stdout and stderror to User's save directory. 2022-02-10 12:24:46 +09:00
dolphin6k
b71955c150 Use "<dynamic full path of current dir>\\locale" to bindtextdomain() only for the target "bdist-win32" 2022-02-09 23:12:12 +09:00
Bill Kendrick
e9fdbe9373 POT/PO update for brush tips
(Also catching a Label tool tip edit.)
2022-02-09 02:15:30 -08:00
Bill Kendrick
9f9a25f98a Brush tips - show when anim/rotate/dir, and spacing
Show tips when choosing brushes, to remind the user when they
are animated, and or rotational/directional.

Show tips when brush spacing is changed, specifying the approximate
spacing.  Output is fuzzy, to avoid being overly technical (e.g., it
will never say "2 345/1000 times as big as" or "1/103 the size of")
2022-02-09 02:12:40 -08:00
Bill Kendrick
5330fea44c Doc'ing Label tool improvement in CHANGES.txt 2022-02-07 23:59:37 -08:00
Bill Kendrick
7313f269ac Show tips & play sound effects w/ Label selector
Closes https://sourceforge.net/p/tuxpaint/bugs/245/
2022-02-07 23:57:36 -08:00
dolphin6k
f1519a2a39 Better way to install dll files and .mo files for tpconf only for the target "bdist-win32" 2022-02-07 22:26:54 +09:00
Mark Kim
9994847ea3 small macOS cleanup
- Need to use __MACOS__ instead of __APPLE__ when #including "macos.h".
- Need to include "platform.h" for this to work.
2022-02-06 21:26:21 -05:00
Mark Kim
e1ecf80e26 Fix random crashes in Korean, Japanese, and some other languages
Occasionally running Tux Paint in Korean, Japanese, and possibly other
languages would cause Tux Paint to crash.  This commit fixes it.

This bug was previously mentioned as the possible cause of these
previously reported crashes, though they were determined to be
unrelated:

  https://sourceforge.net/p/tuxpaint/mailman/message/37364981/
  https://sourceforge.net/p/tuxpaint/mailman/message/37376574/

The cause of the crash turned out to be in the function that loads the
input method map (*.im).  Some languages that use more than one
keystroke to produce one unicode character use this mapfile to track, in
a state machine, what keys have been pressed and what unicode character
should be output.  This state machine's memory is increased dynamically
as needed when the input method map file is loaded.  There was a line of
code that references the old memory that could have moved by the memory
increase.  This line of code has been moved to prior to the memory
increase to avoid accessing memory that may have moved.
2022-02-06 21:02:06 -05:00
Mark Kim
c9e195549f macOS system language detection.
It appears the system language detection doesn't work on [some versions
of?] macOS.  Fixed.

Strangely, querying the Cocoa API for the system locale on a system in
US with the preferred language set to Korean produces the invalid locale
"ko-US" instead of the expected "ko-KR".  This behavior of returning the
language with a invalid region qualifier for the language appears to
happen only with languages where macOS does not have regional variants
(this issue does not seem to occur with Canadian English, en-CA, for
example.)  A fuzzy matching locale function has been added to handle
this issue.
2022-02-06 20:26:50 -05:00
Mark Kim
c2ab6d461c merge macos.c and macos.m, update ios.*
* Merged macos.c into macos.m.
* Updated ios.h and ios.c to be compatible with the macos.* changes.
* Renamed ios.c to ios.m.
2022-02-06 11:29:19 -05:00
Mark Kim
d697d3faca better korean translations 2022-02-06 11:21:01 -05:00
Mark Kim
ab2d76d0b9 Update some Korean translations 2022-02-06 08:23:20 -05:00
Bill Kendrick
e7d81ef63f Clean up some compile-time warnings/errors
Under Xcode with clang, Mark Kim was getting an error:

  src/tuxpaint.c:23125:44: error: use of undeclared identifier 'i'
                   SDL_MapRGB(img_color_btns[i]->format,
                                             ^

Oddly, I was not getting errors no matter what nonsense I put
in there (e.g., changing "->format" to "->formatXYZ"), under
"gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)"
2022-02-05 16:59:59 -08:00
Bill Kendrick
36968b0abf Doc'ing unset HOME bugfix for macOS
h/t Mark Kim

(Also, reorganized build stuff)
2022-02-05 16:47:29 -08:00
Bill Kendrick
4dbaa0b320 Doc'ing and POT-izing macOS menu translation
h/t Mark Kim (for https://sourceforge.net/p/tuxpaint/bugs/183/)
2022-02-05 16:42:02 -08:00
Mark Kim
7aa000b68a Tux Paint for macOS can localize menus (feature request #183)
Tux Paint for macOS can now localize the macOS menubar.  Translation
files (*.po) will be required for the actual translations to show.
2022-02-05 18:40:36 -05:00