Commit graph

2305 commits

Author SHA1 Message Date
Bill Kendrick
1bf15f2d27 Rename shape_*_x/y variables
Variables for pointer positions while drawing a shape were
center-centric ("shape_ctr_x/y" and "shape_outer_x/y").
Renamed them to be more general.
2020-08-15 00:58:44 -07:00
Bill Kendrick
2159f8616b WIP: Shape controls -- center vs corner
Adding control buttons to the Shapes tool, allowing for shapes
to be drawn from the center (as before) or from a corner
(more like other paint packages).  The controls do nothing
at this time, but are visible and can be clicked.  This is a
work in progress.

The controls may be removed using a configuration option.
2020-08-15 00:55:31 -07: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
08b33d6d91 Icelandic translation update
h/t Sveinn í Felli
2020-07-31 21:44:48 -07:00
Bill Kendrick
f1f52da42d Galician translation update
h/t Miguel Bouzada
2020-07-30 23:39:29 -07:00
Bill Kendrick
c41395c091 Basque translation update
h/t Alexander Gabilondo
2020-07-30 23:34:28 -07:00
Bill Kendrick
5b55f7f2e3 Santali (Ol Chiki) update
Santali (Ol Chiki) translation update from new contributor
Prasanta Hembram.
2020-07-30 23:27:28 -07:00
Bill Kendrick
04d5ab3aeb Update POT & PO again (export feature done) 2020-07-29 23:01:55 -07:00
Bill Kendrick
c13c543cfe Wrap up GIF export; support speed
Different speed settings in slideshow dialog affect the speed
of the exported GIF.
2020-07-29 22:09:10 -07:00
Bill Kendrick
43edf9fe3e Animated GIF export basics working
Tux Paint can export an animated GIF to the export directory
(e.g., ~/Pictures/TuxPaint) from the Open->Slideshow dialog.

To do -- GIF's animated speed should be based on speed slider
in Slideshow dialog.

To do -- Document this new feature (and single image (PNG) export)
in the README documentation.
2020-07-27 00:29:53 -07: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
ac755bf26c Removing loaddesc() debugging
Things look fine here. Not actually finding languages in i18n,
it seems!
2020-07-26 16:52:05 -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
Bill Kendrick
e50a0ef84c Improved safety when copying things into strings
Created "safe_" variations of 'strncpy()', 'strncat()',
and 'snprintf()', to ensure a truncated source string doesn't
leave the destination buffer without a NUL termination character.

Replaced all calls (in "tuxpaint.c" only, so far) to the standard
functions with calls to the new safer versions.

Replaced most calls to plain 'strcpy()', 'strcat()' and
'sprintf()' (which can cause buffer overruns) with the new functions.
2020-07-26 16:13:53 -07:00
Bill Kendrick
56591258ff Ensure export takes 1 second (filename uniqueness) 2020-07-26 14:25:59 -07:00
Bill Kendrick
b0a2b4dacc Completed single image export function
From "Open" dialog, select an image (single click, or use
arrow keys / etc., to highlight the image), then select the
"Export" button at the lower right.

The image will be saved in the export directory.  By default
this will be based on the config found via the XDG_CONFIG_HOME
environment variable, which is scanned for a "XDG_PICTURES_DIR"
setting.  If none is found, "Pictures" in the directory specified
by the HOME env. var. will be used.  In both cases, a new
"TuxPaint" subdirectory will be created, and exports will be placed
there.

The export location may be overridden using the "--exportdir"
command-line option or "exportdir" config file option
(e.g., "--exportdir /path/to/dir" or "exportdir=/path/to/dir",
respectively).  In this case, the directory is assumed to preexist,
and no "TuxPaint" subdirectory will be made.

There's currently no way to disable the export feature altogether.
If there's demand, we can add it as a simplification option.

Finally, this feature simply copies the PNG file (but no extra
data files) from Tux Paint's "saved" directory to the export dir.

Closes https://sourceforge.net/p/tuxpaint/feature-requests/192/
2020-07-26 14:10:03 -07:00
Bill Kendrick
28b28d583e Wrap up GIF export UI
GIF export button now jumps to a process that iterates through the
chosen saved images, loading each (but not yet saving as a GIF).
It then returns to the Open->Slideshow dialog, and displays a
pop-up dialog that shows a success/fail message.

Also, adding an icon for a regular static image "Export" option,
to be added to the main Open dialog.
2020-07-26 11:46:12 -07:00
Bill Kendrick
7aa91af319 Make sure 'exportdir' from config file is utilized 2020-07-25 22:36:20 -07:00
Bill Kendrick
1617a0ad77 Remove debug+exit from last commit
Oops, Tux Paint just exited immediately, as part of my debug
testing. :)  Removed that.
2020-07-25 16:46:49 -07:00
Bill Kendrick
f8cce36435 Further work on animated GIF export: XDG Pictures
Using XDG's user dir settings to determine where pictures are
stored for a user (e.g., "~/Pictures" -- used as a fallback).
May be overridden using "--exportdir".

Also, while I was updating some docs, replace references to
"Mac OS X" with "macOS", the new name of that OS these days.
2020-07-25 16:45:17 -07:00
Bill Kendrick
683bbf5f19 Add "GIF Export" to POT and PO files
Please translate!
2020-07-25 00:22:59 -07:00
Bill Kendrick
d6a1d76158 chmod 755 po/update-po.sh 2020-07-25 00:21:46 -07:00
Bill Kendrick
8c3a07294b Beginning GIF export
Beginning addition of an option to export animated GIFs
from the Open -> Slideshow dialog, after choosing the images.

Non-operable at this time, but a button has been added (and will
provide a hint to select 2 or more images, when clicked).
2020-07-25 00:18:46 -07:00
Bill Kendrick
e87f36d9a7 Fix Haiku "unable to open saved files" bug
Appling patch from a92961004d
that fixes https://github.com/haikuports/haikuports/issues/3045
2020-06-22 23:04:13 -07:00
Bill Kendrick
b65d7f9da4 Bumping version to 0.9.25 2020-06-22 22:58: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
90871308ef Bump release date to today (2020-05-29) 2020-05-29 20:15:45 -07:00
Bill Kendrick
10c833e565 Bump version date -> 2020-05-23 2020-05-23 23:32:49 -07:00
Pere Pujal i Carabantes
bcc3bdda96 Closing Tux Paint before the end of font scanning resulted in crashes in the Android port. 2020-05-14 00:48:50 +02:00
Pere Pujal i Carabantes
ba19100fb9 Sometimes the progress bar gets keeps statically showing when returning to foreground. 2020-05-06 19:47:02 +02:00
Pere Pujal i Carabantes
2a430c0dc0 Undeffing FORKED_FONTS seems to improve things on Android. The system onscreen keyboard hid the progress bar, don't show it until fonts are already in place. 2020-05-05 00:24:42 +02:00
dolphin6k
99fb3f7dce Some systems require inluding librsvg-cairo.h explicitly. 2020-05-01 14:51:10 +09:00
Bill Kendrick
d172f38d4d Win32 build (& doc) tweaks
TOYAMA Shin-ichi noticed that when building for Win32 under mingw/msys,
an #include of "librsvg-cairo.h" was also necessary.

He also bumped the version # in win32/resources.rc
(and I put his credit in there).

I updated docs/RELEASE.txt to mention that .rc file also needing
updated when preparing a new release.
2020-04-10 19:05:52 -07:00
Pere Pujal i Carabantes
703696bb9b Android prints were cut at the edges. 2020-04-04 19:25:35 +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
e6f583bd8e Merge branch 'master' into sdl2.0 2020-04-02 16:27:42 +02:00
Bill Kendrick
b9c929a0a1 Rework how progress bar shown with stamps
Was drawing progress bar while DRAWING stamps into the UI
(in https://sourceforge.net/p/tuxpaint/tuxpaint/ci/ad4bfde57c170082d93979a7073f7358872eca21/),
even if they were already loaded and thumbnailed.

Now only doing it when loading a new stamp.  Should hopefully
help with performance.  (h/t Pere for reporting slowness on Android)
2020-04-01 22:29:57 -07:00
Pere Pujal i Carabantes
a95796381c Last minute translations for 0.9.24
Merge branch 'master' into sdl2.0
2020-04-01 11:17:26 +02:00
Karl Ove Hufthammer
3b4e07ef2b Minor improvements in Norwegian Nynorsk translation 2020-03-30 19:14:10 +02:00
Karl Ove Hufthammer
9487ff4230 Fix spelling mistake in Norwegian Nynorsk translation 2020-03-30 19:10:17 +02:00
Pere Pujal i Carabantes
0bbbe8dc99 Merge branch 'master' of ssh://git.code.sf.net/p/tuxpaint/tuxpaint 2020-03-29 23:43:43 +02:00
Pere Pujal i Carabantes
c7794df2af Updating Valencian 2020-03-29 23:42:38 +02:00
Pere Pujal i Carabantes
aefcd2c184 Updating Valencian 2020-03-29 23:41:18 +02:00
Bill Kendrick
d820fade47 Swahili translation update 2020-03-29 12:40:52 -07:00
Pere Pujal i Carabantes
937b40e449 0.9.24 Merge branch 'master' into sdl2.0 2020-03-29 16:35:50 +02:00
Bill Kendrick
5ad2621abc Ensure all docs/etc. show 0.9.24 version # 2020-03-28 22:38:10 -07:00
Bill Kendrick
ad4bfde57c Show progress bar while loading (more) stamps 2020-03-15 13:06:13 -07:00
Pere Pujal i Carabantes
1d67cc867c Tweaking orientation handling in Android. 2019-11-04 01:14:38 +01:00
Pere Pujal i Carabantes
70d9da8369 Halloween, Merge branch 'master' into sdl2.0 2019-11-02 01:01:11 +01:00
Pere Pujal i Carabantes
4e4a6e569d Handling orientation on Android. 2019-11-02 01:00:16 +01:00