Commit graph

2829 commits

Author SHA1 Message Date
Bill Kendrick
9537efd987 export_pict(), use some enums for args & return values 2023-05-27 12:46:01 -07:00
Bill Kendrick
269355a99c Ensure {datadir}/templates exists when making template
Example

  mkdir /tmp/tp
  tuxpaint --datadir /tmp/tp

without this fix, choosing "Template" (make a new templat)
from "Open" dialog would result in an error, since
`/tmp/tp/templates` did not exist.

We now `mkdir()` it.  This requires, of course, that the
directory specified by `--datadir` _itself_ exists.  (We will
not attempt to create anything higher up.)
2023-05-27 12:07:47 -07:00
Bill Kendrick
10092ece0e Starter/Template thumbnails: use DIR_DATA, not DIR_SAVE
Places where we attempt to save thumbnails of starters & templates
was trying to `mkdir()` a `.thumbs/` subdirectory in non-existent
`starters/` and `templates/` subdirectories of the "savedir"
location; should be the "datadir" one.

To replicate

  mkdir -p /tmp/tp/starters
  cp SOMEFILE.png /tmp/tp/starters
  tuxpaint --datadir /tmp/tp

then click "New"; observer the warning

  Error: Couldn't save thumbnail of saved image!
  /tmp/tp/starters/.thumbs/SOMEFILE.png
  The error that occurred was:
  No such file or directory
2023-05-27 11:55:55 -07:00
Bill Kendrick
7b6f04ac1d Problem loading templates from overridden 'datadir'
When specifying "datadir", Tux Paint's "New" dialog
was able to present templates found in that directory,
but would attempt to load from whatever the user's
"savedir" was, instead.

h/t Giancarlo Orru for reporting the bug.
2023-05-27 11:51:03 -07:00
Bill Kendrick
955c39c053 WIP Ability to copy saved drawing into a new template
https://sourceforge.net/p/tuxpaint/feature-requests/236/
2023-05-25 23:20:32 -07:00
Bill Kendrick
313555f6a1 Wrapped up initial stab at fuzzy erasers 2023-05-22 23:02:31 -07:00
Bill Kendrick
065060de03 More work on fuzzy eraser; better behavior w/ Ctrl-Z & -R 2023-05-22 22:24:47 -07:00
Bill Kendrick
d31bc814e6 WIP - Fuzzy erasers
Also, mend scroll button / interaction bug in Eraser selector.
2023-05-22 00:33:52 -07:00
Bill Kendrick
d8f3adc2e7 Bump version to 0.9.31; credit new Russian translator
h/t Olesya
2023-05-20 11:22:45 -07:00
Olesya Gerasimenko
4ccfea64f2 Update Russian translation 2023-05-19 16:18:25 +03:00
Bill Kendrick
eb8f4be7fd Makefile: Set version to 0.9.30-rc1
And appdate.xml -- bump date.
2023-05-14 13:14:24 -07:00
Bill Kendrick
2d99a823f2 fix location for tuxpaint.cfg on Haiku
Unclear why when I `git pull` in master, I'm not seeing
https://sourceforge.net/p/tuxpaint/tuxpaint/ci/b48cb438239e47ebce3c6b84f5aff2d7d906d3ba/
so just replicating it (plus adding entry to docs/CHANGES.txt).
2023-05-12 00:19:22 -07:00
Bill Kendrick
8e9a51d478 Define & use NUM_ERASER_SIZES
...everywhere "NUM_ERASERS / 2" was being used
2023-05-10 23:20:05 -07:00
Bill Kendrick
a58f1f64b5 pick_best_scape() is now always included (even when building with NOSVG)
Was failing to compile on Haiku for Luc (apparently building with
no SVG support), since I started using that function outside of
SVG-related places.

Also, to continue being able to compile on Linux with no SVG support --
 * Always use SDL_TRUE & SDL_FALSE, not TRUE & FALSE
 * Always link tuxpaint with "-lm"

Finally, verbose version info ("tuxpaint --verbose-version") now states which
SVG build (new RSVG or old Cairo)
2023-05-09 23:44:39 -07:00
Bill Kendrick
3ae4517a08 Mend compiler warning (don't cast ceil() to (int)) 2023-05-04 23:36:04 -07:00
Bill Kendrick
3f5bc2b554 thumbnail2() - ceil() the new_x & new_y calculations
I noticed that buttonsize=90 or =91 would end up with UI buttons
images ere one pixel smaller (89x89 or 90x90, respectively) than
expected, hence they layout would end up with one row and one
column of unused pixels between them.  Any button content (e.g.
stamp thumbnails) that might render into the full size would end
up leaving garbage pixels behind.

Applying ceil() to the new_x and new_y (but then making sure they do
not exceed the requested max_x and max_y) calculated sizes inside the
thumbnail2() function.  (We do not simply use max_x and max_y directly,
because we are usually trying to maintain the original image's aspect
ratio.)
2023-05-04 23:29:39 -07:00
Bill Kendrick
aa2235c8ba Reduce max button size; account for new stamp control row
...for rotation button added in 0.9.29
2023-05-04 22:43:59 -07:00
dolphin6k
11b6dc1b27 Updated Japanese
Many magic label to be word-wrapped
2023-05-04 09:05:21 +09:00
Pere Pujal i Carabantes
3743a15673 printf -> DEBUG_PRINTF Shapes tool output filled my terminal. 2023-05-03 20:41:34 +02:00
Bill Kendrick
de7b8dd51b After Ctrl+click pipette, color selector showed old color
Was redrawing color toolbar _before_ changing the chosen color
to be the pipette tool.

Reproducing the bug - Select a built-in color, Ctrl+click in the canvas,
observe built-in color still appears chosen [the bug], paint with e.g.,
paint brush, observe it's using the correct, pipette-selected color,
not the one that appears chosen [this is correct].
2023-05-03 10:11:56 -07:00
dolphin6k
d318a44a45 Updated Japanese 2023-05-03 11:47:24 +09:00
Bill Kendrick
d6940cc8b8 New Magic tool: Rainbow Cycle
Changes colors each time you use it (similar to Rainbow and
Smooth Rainbow, but only changes between strokes).
2023-05-02 00:01:05 -07:00
Bill Kendrick
ef5d6ae751 Remove dangling func prototype
... anti_carriage_return() no longer exists, now that we don't
need it since we always require SDL2_Pango
2023-05-01 14:00: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
dolphin6k
84ba2e9665 Updated Japanese 2023-04-30 09:01:06 +09:00
Bill Kendrick
378b2acca6 Accept SDL_VIDEO_WINDOW_POS in --fullscreen too
This seems to allow me to specify which display (monitor) to make
Tux Paint appear on my two-monitor set-up (laptop + external monitor)!

Closes https://sourceforge.net/p/tuxpaint/bugs/277/
2023-04-28 00:13:32 -07:00
Bill Kendrick
98b22a7296 Call Magic tool's set_size() on mode switch
Some tools would get stuck unable to draw in MODE_PAINT mode,
when switching from MODE_FULLSCREEN.
2023-04-27 23:44:44 -07:00
Bill Kendrick
f25fc539bf Regen POT/POs after re-indenting tons of .c & .h files 2023-04-23 23:27:37 -07:00
Bill Kendrick
18f9cad6fe Adding "indent.sh" to re-indent code; ran it!!! 2023-04-23 23:26:00 -07:00
Bill Kendrick
b85e47cf60 New "TV (Bright)" variation of "TV" Magic tool 2023-04-22 12:13:12 -07:00
Bill Kendrick
4004ff13da Appdate - Mention new things in 0.9.30 so far
PS - Previous commits mentioned 0.9.29, which was force-of-habit! 8^o
2023-04-22 10:05:48 -07:00
Bill Kendrick
06a36c571e Clone: Support sizes; performance boost 2023-04-20 22:15:01 -07:00
Bill Kendrick
b739f7dccb Songhay translation updates
h/t Mohomodou and Abdoul
2023-04-20 20:44:46 -07:00
Bill Kendrick
9b80c0d688 Don't load blank-named template during slideshow 2023-04-19 21:56:46 -07:00
Bill Kendrick
a0b720b3ad POT/PO refresh 2023-04-19 11:40:40 -07:00
Bill Kendrick
8620477ca3 Icelandic localization updates
h/t Sveinn
2023-04-19 11:39:35 -07:00
Jacques Chion
6c44ff6d3d some adjustments 2023-04-14 10:10:49 +02:00
Bill Kendrick
76dd03df2b Forgot to commit MAGIC_FEATURE_CONTROL into tp_magic_api.h.in
.in is important!
2023-04-13 21:18:59 -07:00
Bill Kendrick
b2535d59ba Magic size capabilites on a per-mode basis
e.g., useful to set size for paint-mode blur, but meaningless
for fullscreen-mode blur.
2023-04-12 23:39:55 -07:00
Bill Kendrick
5bbfd91c2c Magic size controls work!
However, need to make their availability set-able on a per-mode
basis.
2023-04-12 23:09:37 -07:00
Bill Kendrick
3996edaeec Magic: Show a size selector
...still doesn't interact yet, but it renders!
2023-04-12 22:49:09 -07:00
Bill Kendrick
263b382338 Preparing a space for Magic size control
Magic Controls (paint vs fullscreen) and Sizes (coming soon)
can be enabled/disabled independently, and the list of Magic tools
sizes itself accordingly.
2023-04-12 22:31:05 -07:00
Bill Kendrick
eda0a646be Parse support for [no]magicsizes; new MAGIC_FEATURE_CONTROL bitmask 2023-04-12 00:11:11 -07:00
Bill Kendrick
c2585d7a26 Doc'ing forthcoming [no]magicsizes options 2023-04-12 00:03:23 -07:00
Bill Kendrick
bb12be2518 More work on Magic size support
Set default, pass current size to plugin when tool changes.
2023-04-11 23:57:51 -07:00
Bill Kendrick
7bdb19ff0f More work on Magic size support; "kalidescope" <sic> is underway 2023-04-11 22:16:45 -07:00
Bill Kendrick
84bfec3365 Sync docs & more info re: forthcoming Magic size feature 2023-04-11 21:55:39 -07:00
Jacques Chion
8cd00d279e fixing 2023-04-11 16:33:54 +02:00
Bill Kendrick
1b420da45c Slightly more verbose output from "--verbose-version"
Shows when certain features are enabled; not just disabled.
2023-04-11 00:55:42 -07:00
Bill Kendrick
f7dfb95570 Scale button icons when label text is word-wrapped
For https://sourceforge.net/p/tuxpaint/bugs/131/
2023-04-11 00:26:20 -07:00