Commit graph

4744 commits

Author SHA1 Message Date
Bill Kendrick
fe33acc716 Don't crash on un-wordexp()'able arguments!
We run shell expansion on configuration arguments,
e.g. `printcommand`, but it would crash if the config
file's input was not quoted, e.g.

  printcommand=pstopdf - - > $HOME/print.pdf

Now echo'ing an error to stderr and moving on.
Be sure to quote, e.g.

  printcommand="pstopdf - - > $HOME/print.pdf"
2023-06-03 14:10:13 -07:00
Bill Kendrick
0e359a1fba tuxpaint --listfonts -- sort the results 2023-06-01 23:48:19 -07:00
Bill Kendrick
1cf2fa245d --listfonts option to show all font families Pango finds 2023-06-01 23:31:04 -07:00
Bill Kendrick
e85eb98a57 More changelog updates 2023-06-01 23:13:41 -07:00
Bill Kendrick
ab1d1d3ebd Docs - Image for Open->Template button 2023-06-01 23:12:25 -07:00
Bill Kendrick
34b0760aea WIP Ability to Erase persoanl templates from New
Sync docs
2023-06-01 22:48:56 -07:00
Bill Kendrick
4c757c2a36 WIP Beginning work on "Erase" exported templates via "New" 2023-06-01 22:19:07 -07:00
Bill Kendrick
76f478e504 Rework "noerase" changelog entry 2023-06-01 21:54:24 -07:00
Bill Kendrick
6755d67937 Sync docs to grab "--noerase" option documentation 2023-06-01 21:44:45 -07:00
Bill Kendrick
437802252b "--noerase" option to disable Open->Erase option
Will also be used to remove the New->Erase option we plan
to add, to allow deletion of exported templates.

WIP - Need to update docs.
2023-06-01 21:29:24 -07:00
Bill Kendrick
1b6ee72e87 "uifont" option: tell us what we wanted & what we got
The requested font & actual font loaded will be echo'd to STDOUT
when specifying the `uifont` option.

This uses Pango library directly (I was unable to convice SDL2_Pango.h
to actually notice that pango.h was #include'd before it, and expose
its SDLPango_GetPangoFontDescription() function!).  This is okay,
since we want to also add a "--uifont list" option (or similar),
that will list all of the available fonts, if a user wishes to
query them.  (And similar code will be added to tuxpaint-config to make
the setting available as a pull-down, rather than (or as well as) a
freeform type-in field.)
2023-06-01 00:20:41 -07:00
Bill Kendrick
64eeec1a98 Doc'ing some TODO items re: uifont and make-Template
h/t Pere & Shin-ichi for feedback
2023-05-31 10:45:09 -07:00
Bill Kendrick
71ff56df96 Sync docs after uifont addition, etc. 2023-05-29 13:40:53 -07:00
Bill Kendrick
12ff955f68 Adding more instructions to RELEASE
Even I can't keep up with all the places to document new
options. 8^o
2023-05-29 13:34:42 -07:00
Bill Kendrick
ba9c5b30e8 Doc'ing 0.9.31 changes so far, in appdata XML file 2023-05-29 13:33:10 -07:00
Bill Kendrick
83c4cbc676 WIP New "--uifont" option to specify UI font
If not specified, or "default" is specified (e.g., to override
a higher-up config file setting), it will fallback to what we
have #define'd in fonts.h as PANGO_DEFAULT_FONT, "DejaVu Sans".

It appears to fallback to this (or a reasonable fascimile) if
the font specified by the "uifont" option doesn't exist
(e.g., "tuxpaint --uifont=ABCD1234").

For https://sourceforge.net/p/tuxpaint/feature-requests/146/
2023-05-29 13:13:58 -07:00
Bill Kendrick
b4a550a6e1 Add --[no]templateexport to --help output 2023-05-29 12:43:11 -07:00
Bill Kendrick
b452d84d25 Improved how trans dir created
Having it as a Makefile target caused po->mo conversion to happen
every time, even if the MO files existed. >:-(
2023-05-29 12:36:56 -07:00
Bill Kendrick
813978d9ef Template export is wrapped up
Tux Paint Config. has an option to disable/enable.
Closing https://sourceforge.net/p/tuxpaint/feature-requests/236/
2023-05-29 12:31:43 -07:00
Bill Kendrick
08832773ec Sync docs (readme<->extending re: open/template) 2023-05-29 11:13:49 -07:00
Bill Kendrick
8ba1313c21 POT/PO after adding new Template creation feature 2023-05-29 10:52:10 -07:00
Bill Kendrick
65378f6fdd Ability to disable Template creation from Open dialog 2023-05-29 10:50:55 -07:00
Bill Kendrick
36d7e0daf3 Sync docs after a bunch of changes, including make-Template 2023-05-29 10:23:27 -07:00
Bill Kendrick
9ab7fdba13 Ensure trans dir exists when making .mo files
Helps get `make clean && make -j` (parallel build) to work.
h/t bkw @ slackbuilds
2023-05-28 11:15:54 -07:00
Bill Kendrick
33394f397b Template export: test image dimensions & file CRC
Final couple of tests to let us avoid creating a template that's
identical to one that already exists.  All told, we test the
following (and the first thing that matches causes us to stop
testing that template, and move on to the next, as it appears
to not be identical to the saved image, in its current state)

 + filename prefix (based on saved image's filename)
 + file size
 + image dimensions
 + image contents (via CRC)
2023-05-27 15:40:30 -07:00
Bill Kendrick
e578de2c6b Template export: Test file sizes, too
Avoid exporting a saved picture to a new template if one already
exists with both the same filename prefix, and now also identical
file sizes (in bytes).

Bugfix - The export function was always dumping chunks that
were the size of the input buffer, which means the final chunk
(which will frequently be smaller) will contain garbage data
beyond the end.
2023-05-27 14:17:48 -07:00
Bill Kendrick
785401d68e WIP Disallow creation of duplicate templates...
...based on saved files.  So far, only looking for identical
template prefix (which is based on the save file's filename).

Next will be to check other fingerprints, in case the saved file
changed after an earlier template was created.
2023-05-27 13:09:05 -07:00
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
c359216180 Doc'ing the templates|starters datadir .thumbs bugfix 2023-05-27 11:59:58 -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
e9b04a8759 Squiggles Magic tool icon 2023-05-23 00:41:57 -07:00
Bill Kendrick
f49f9f31ba Loops Magic tool icon 2023-05-23 00:40:17 -07:00
Bill Kendrick
a35956fe29 Merge branch 'master' of ssh://git.code.sf.net/p/tuxpaint/tuxpaint 2023-05-23 00:37:50 -07:00
Bill Kendrick
ab53612d50 Ribbon Magic tool sound effect
CC-BY 3.0 by https://freesound.org/people/CosmicEmbers/
2023-05-23 00:37:12 -07:00
Bill Kendrick
0783b36fce Ribbon Magic tool sound effect
CC-BY 3.0 by https://freesound.org/people/CosmicEmbers/
2023-05-23 00:29:37 -07:00
Bill Kendrick
375207f3d3 Smooth magic tool sound effect
CC-BY 4.0 by https://freesound.org/people/PercyFrench/
2023-05-22 23:56:41 -07:00
Bill Kendrick
5e24fb3742 Squiggles magic tool sound
CC0 by https://freesound.org/people/Tomoyo%20Ichijouji/
2023-05-22 23:46:53 -07:00
Bill Kendrick
da02bf19bf Loops magic tool sound
https://freesound.org/people/Jagadamba/sounds/254397/
CC-BY 4.0 https://freesound.org/people/Jagadamba/
2023-05-22 23:43:28 -07:00
Bill Kendrick
7d4118b4d5 Screenshot examples of 0.9.30 new Magic tools so far 2023-05-22 23:33:04 -07:00
Bill Kendrick
91139c9026 Sync docs for Fuzzy Eraser & 0.9.31 new Magic tools so far 2023-05-22 23:25:20 -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
644176874c Bring ribbon.c & smooth.c out of WIP; add new tools...
...squiggly lines and loop-the-loops.
2023-05-22 00:10:58 -07:00
Bill Kendrick
4b77cc7526 Regen ALL docs after bumping version to 0.9.31 2023-05-20 11:35:22 -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