Commit graph

173 commits

Author SHA1 Message Date
Bill Kendrick
3c5303563a WIP Dropping in code for Haiku trash can support
h/t Jérôme Duval <https://github.com/korli> for pointing us to this
(see https://github.com/haikuports/haikuports/issues/10568)
Code used is copyright (c) 2004, Francois Revol <revol@free.fr>,
provided under the MIT licence.

(Also, ran `indent.sh`)
2024-06-06 23:06:07 -07:00
Bill Kendrick
5c7c1b6083 Remove lang_use_right_to_left_word stuff; it's unused
For https://sourceforge.net/p/tuxpaint/tasks/33/`
Next step: remove `textdir()` completely.
2024-06-02 22:29:55 -07:00
Bill Kendrick
93a8fd8815 Drop button_label_y_nudge; no longer needed (part 2)
Apparently `git push`-ed before I was done.  The rest of
https://sourceforge.net/p/tuxpaint/tuxpaint/ci/8db84be008a797f04b2d8557cb0c196c74da5059/
2024-06-02 11:09:05 -07:00
Bill Kendrick
cef773a694 Now REQUIRING SDL2_Pango; no NO_SDLPANGO option
Motivation - Without SDL2_Pango, languages like Japanese,
Arabic, and Thai do not render properly.  Currently, Debian
(and hence Ubuntu) do not have SDL2_Pango, so Tux Paint 0.9.28
is adversely affected.  Fedora DOES have SDL2_Pango, so works well.
This also allows us to delete a lot of ancient cruft code.

Closes https://sourceforge.net/p/tuxpaint/bugs/268/
h/t Pere

(INSTALL docs to be updated momentarily)
2023-04-30 16:10:29 -07:00
Bill Kendrick
18f9cad6fe Adding "indent.sh" to re-indent code; ran it!!! 2023-04-23 23:26:00 -07:00
Bill Kendrick
0517b4392c Update URL to https://tuxpaint.org/ everywhere
Also, add other social media accounts to list of places to
announce Tux Paint in RELEASE docs.

Also, list a ton more options missing from default example config file
"src/tuxpaint.conf"
2022-12-11 01:29:25 -08:00
Mark Kim
3849480fd4 Pango loads Tux Paint-supplied fonts on macOS.
Previously Pango loaded system-supplied fonts instead, which could lead
to fonts not rendering in a human-readable text.  This change fixes
https://sourceforge.net/p/tuxpaint/bugs/265/
2022-12-02 22:57:38 -05:00
dolphin6k
7a630264cb Addressed a compile-time warning on windows. 2022-11-18 16:08:07 +09:00
Bill Kendrick
cc05925d9e Re-ran indent on all .c & .h source code files
Like so --
  find . -name "*.c" -or -name "*.h" -exec  indent -nbfda -npcs -npsl -bli0 --no-tabs {} \;

The `indent` invocation differs from the last one noted in
CHANGES.txt (from 2006!?), in that I've added "--no-tabs",
to ensure indents are all space-based.
2022-09-15 00:14:20 -07:00
Pere Pujal i Carabantes
b7414433cb Merge branch 'master' into sdl2.0
Catching up with latest devel
Still things to solve/do:
Apply label seems to not work, neither in master
Onscreen keyboard size doesn't perform as in master
Test on other OSs, Windows, Android, ...
2022-02-18 00:29:40 +01:00
Pere Pujal i Carabantes
eb7f55e289 Merge branch 'master' into sdl2.0
Some things are still WIP, they need to be tested and addressed later.
2022-02-17 23:57:28 +01: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
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
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
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
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
dolphin6k
c965c2fad2 Pass the full path of locale directory to bindtextdomain().
Workaround to the issue that gettext() can not find translation files
after the update of MinGW/MSYS2 in January 2022.
2022-02-02 22:34:30 +09: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
4e7346c8d9 Fixed crash bug regarding locale detection on 64bit windows build. 2021-10-26 23:16:04 +09: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
aae22f0593 Correcting Devaganari to Devanagari 2020-11-06 21:47:42 +01:00
Pere Pujal i Carabantes
f9db53fe19 Correcting Devaganari to Devanagari 2020-11-05 03:38:42 +01:00
Pere Pujal i Carabantes
f8179faa0f Adding Sardinian translation. 2020-10-29 20:43:30 +01:00
Pere Pujal i Carabantes
ba26daa6c6 Adding Sardinian translation. 2020-10-29 20:35:44 +01:00
Pere Pujal i Carabantes
436a535003 Merge branch 'master' with export features made by Bill and some updated translations into sdl2.0 2020-08-06 00:48:08 +02:00
Bill Kendrick
4ba4c11911 Properly handling getenv() returning "" not NULL
i18n code was checking for local-related environment variables
(e.g., "getenv("LANGUAGE")") coming back as a NULL if unset.

However, on my laptop, under Kubuntu 20.04 with GLIBC 2.31, a
"LANGUAGE" env. var. is set, but it's blank.

Tux Paint failed to attempt any fallback (e.g., checking "LANG")
in that situation, which was causing the description text corruption
that was corrected in a previous commit.

That commit also mistakenly suggested that the issue might've been a
difference with GCC versions, but the problem was deeper in Tux Paint's
code (in i18n.c), and was triggered by an unexpected environment.
2020-07-26 17:17:14 -07:00
Bill Kendrick
42512a67b0 Don't use extern for num_wished_langs
WORK IN PROGRESS -- Attempting to mend an issue where stamp descriptions
are not loading.

Also, making things safer when a problem occurs.

Using gcc 9.3.0 compiler, this was happening in 0.9.25 during
development, but also affected 0.9.24 and 0.9.23, which worked
fine under earlier versions of gcc.
2020-07-26 16:42:12 -07:00
Pere Pujal i Carabantes
7769410b2e Merge 0.9.24 master branch into sdl2.0 2020-05-31 00:47:19 +02:00
Bill Kendrick
91505fae8e Debug output clean-up
Wrapped some debug output in "#ifdef DEBUG" tests,
and made sure some warnings and errors were going to
STDERR, rather than STDOUT.

Motivation: Less noise while launching/using Tux Paint,
unless it matters.
2020-04-02 22:15:13 -07:00
Pere Pujal i Carabantes
a1c778135d Merge branch 'master' into sdl2.0
Merging master 2019-september-24 into sdl2.0 branch
2019-09-24 14:52:40 +02:00
begasus
e5c3cdfcf5 Haiku fixes 2019-09-06 13:45:56 +02:00
Bill Kendrick
7938480174 Clean up GCC warnings (2019-08-29 edition)
Updated most parts of the code that were throwing warnings in GCC.
2019-08-30 00:01:00 -07:00
Pere Pujal i Carabantes
4d3ef642da Updating to master 2019/6/6 2019-06-06 20:22:55 +02:00
Bill Kendrick
4e3a9fbc8c Re-ran indent on .c files
Also, added a few places where indent is disabled
(via `/* *INDENT-OFF* */`).

See https://sourceforge.net/p/tuxpaint/mailman/message/36077409/
from Oct. 2017.
2019-04-13 12:00:44 -07:00
Pere Pujal i Carabantes
1a5308226c Merge branch 'master' into sdl2.0 2018-08-30 01:37:00 +02:00
Bill Kendrick
9144ebd705 More function documentation 2018-05-17 00:30:48 -07:00
Pere Pujal i Carabantes
b2c176730a Merging from the master branch. 2017-12-19 02:47:08 +01:00
Pere Pujal i Carabantes
1e0ea6d4b3 Indentation. 2017-12-19 02:17:27 +01:00
Pere Pujal i Carabantes
ede838caf9 Syncing with the android version... 2017-12-06 06:39:41 +01:00
Mark K. Kim
472bf79bb9 Trying again... 2017-11-27 01:02:41 -05:00
Bill Kendrick
5b4e0dd53f indent i18n.c i18n.h 2017-10-15 10:56:18 -07:00
William Kendrick
548805f676 Had forgotten to add Kabyle to "--lang help" output.
(N.B. This stuff begs for modularization)
2016-12-12 07:37:23 +00:00
William Kendrick
f762aafa10 Adding Kabyle (aka Kabylian) translation 2016-12-12 07:20:34 +00:00
Pere Pujal i Carabantes
9c43a9b69e kashmiri, sindhi and urdu in perso-arabic are rtl 2015-03-11 21:48:34 +00:00
Pere Pujal i Carabantes
ce84b47f0d Adding2 Sindhi and 2 Kashmiri translations provided by chandrakant dhutadmal 2015-03-10 23:38:59 +00:00
Pere Pujal i Carabantes
df45c3993c Adding Bengali, Bodo, Dogri and Urdu provided by chandrakant dhutadmal in the mailing list, still todo add 2 Sindhi and 2 Kashmiri translations 2015-03-09 22:52:05 +00:00
Pere Pujal i Carabantes
79e6da0fb6 Commenting out printf()s 2014-08-14 06:08:48 +00:00
Pere Pujal i Carabantes
dac517aef5 Stamps also should display localized even if the language has not a correponding locale. 2014-08-06 22:28:41 +00:00
William Kendrick
1a31c28d40 Tweaked "--lang serbian" locale (was sr_YU, now sr_RS, based on Ubuntu locales) 2014-08-05 06:55:05 +00:00
Pere Pujal i Carabantes
7f01f9017b Enabling Sinhala 2014-08-04 23:08:07 +00:00