Commit graph

2868 commits

Author SHA1 Message Date
Bill Kendrick
cdba8ffbbd Adding an auto option for button sizes
Merge 333f4b05a4 sdl2.0->master

(See https://sourceforge.net/p/tuxpaint/feature-requests/218/)
2022-06-14 00:14:02 -07:00
Pere Pujal i Carabantes
333f4b05a4 Adding an auto option for button sizes, see https://sourceforge.net/p/tuxpaint/feature-requests/218/ 2022-06-13 08:13:21 +02:00
Will Thompson
21bdf7de11 Add additional .desktop file categories
These are taken from Fedora, which replaces Art with Graphics and adds
KidsGame.

In my opinion, Art is appropriate, but so are 2DGraphics (hence
Graphics) and KidsGame (hence Game).
2022-06-10 21:46:03 +01:00
Will Thompson
74506214e7 Add appstream metainfo file
This is used by software centres such as GNOME Software to display
information about the app, both before and after it is installed.

The <id> used here follows the recommendations in the Appstream
specification, with the exception of violating the spec's strong
encouragement to use only lowercase characters. This is because the
version that is already published by Flathub uses an uppercase T in the
final component of the ID.[0] The file shipped by Fedora followed an older
convention of using the desktop file name as the ID. This is
acknowledged by the <provides> section near the bottom of the file,
which will allow software centres to associate the reverse-domain-name
ID with the older ID.[1]

Many fields in this file are translatable.  This was the motivation for
the preceeding two changes:

- By using xgettext rather than intltool, the untranslated template may
  be written using the normal appstream XML tags, rather than needing to
  use (for example) <_name>Tux Paint</_name> to mark that field for
  translation, which renders the template not valid for tools like
  'appstreamcli validate'.
- Merging translations at build time, rather than committing the
  translated XML to the repo as well, avoids another potentially
  error-prone manual step when updating the source file or translations.

The release notes are taken from the press releases on the Tuxpaint
website. They will be extracted for translation. Another option is to
replace the <description> with <url type="details">...</url>, but AFAIK
no software centres currently show these URLs.[2]

[0]: https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-id-generic
[1]: https://www.freedesktop.org/software/appstream/docs/sect-Metadata-Application.html#tag-id-desktopapp
[2]: https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-releases

TODO:

- align comment

Fixes: https://sourceforge.net/p/tuxpaint/feature-requests/172/
2022-06-10 21:45:44 +01:00
dolphin6k
f838704282 Fixed jugged upscaling in full screen mode 2022-06-10 20:46:48 +09:00
Will Thompson
b4aa697474 Merge desktop file at build time
Previously, both the .desktop.in template and the final .desktop file
were checked into source control.

While in some ways convenient, the manual step of updating it may be
forgotten after updating a translation or adjusting the template. It
also potentially introduces confusion as to which file to modify.

Instead, generate the .desktop file at build time. Since this is now
done using msgfmt rather than intltool, there is no additional
dependency beyond gettext, which is already used at build time to
compile .po files to .mo files.
2022-06-10 10:36:56 +01:00
Will Thompson
3141249969 Remove intltool dependency
Since gettext 0.19, gettext itself has been able to extract strings from
and merge translations to .desktop files. As a result, there is no need
to use intltool.  More details are available on
https://wiki.gnome.org/MigratingFromIntltoolToGettext, though that page
assumes a project using Autotools, which this project does not.

One advantage of using xgettext rather than intltool is that there is no
need to prefix translatable keys in the .desktop.in file with _. This
patch adjusts tuxpaint.desktop.in accordingly, which makes the input
file itself a valid desktop file.

The LINGUAS file contains the list of supported languages. This could
in principle be generated automatically from one of the other places in
the source tree that has a manually-maintained list of languages; but in
my experience it is generally maintained by hand and checked into the
source tree.

POTFILES.in.in must be updated to remove the intltool-specific file
encoding annotation; instead this is passed to xgettext.

Finally, update-po.sh is rewritten to invoke xgettext and msgfmt rather
than intltool commands.

The mangling of POTFILES.in.in to prefix all filenames with '../' is
only necessary to minimize the churn when updating the .pot and .po
files, to simplify review of this change. The alternative is to pass
--directory=.. to xgettext. This would cause all .po files to be updated
as follows when regenerated:

     #. Response to Black (0, 0, 0) color selected
    -#: ../colors.h:86
    +#: colors.h:86
     msgid "Black!"
     msgstr "Noir !"
2022-06-10 10:36:56 +01:00
Will Thompson
e7ec1efdc8 Remove unused, no-op create_pot_file.sh
614f6573e7 made this "a no-op script, for
now", in September 2006. It seems safe to assume, 16 years later, that
if it is needed it can be recovered from the Git history.
2022-06-10 10:36:56 +01:00
Bill Kendrick
4e298483c5 Merge branch 'master' into sdl2.0 2022-06-06 21:43:20 -07:00
Mark Kim
f041db9c4d Localization of SDL2.0 menu on macOS.
SDL2 initializes the macOS menu later than SDL1 (appears to be done
around the video initialization time), so we also need to call later our
routine to override the SDL menu with our localizable version.
2022-06-04 22:34:16 -04:00
Pere Pujal i Carabantes
937e99f6c2 Updating Catalan. 2022-06-04 10:06:48 +02:00
Pere Pujal i Carabantes
1d0ea00d95 Updating Catalan. 2022-06-04 10:03:42 +02:00
Bill Kendrick
45a26483fa Merge branch 'master' into sdl2.0 2022-06-04 00:11:14 -07:00
Bill Kendrick
a3f915be1c Happy 20th Anniversary! 2022-06-04 00:06:00 -07:00
dolphin6k
f21018282c Updated Japanese translation (tile zoom) 2022-06-03 14:09:23 +09:00
Bill Kendrick
ff470263a0 Different description for Tile Zoom than plain Zoom
Oops, had committed to sdl2.0 only :eyeroll:
2022-06-02 21:17:23 -07:00
Bill Kendrick
040884f3f3 Different description for Tile Zoom than plain Zoom
h/t Pere for the suggestion
2022-06-02 21:09:23 -07:00
Bill Kendrick
5369bca3b9 Merge branch 'master' into sdl2.0 2022-06-02 21:06:27 -07:00
Pere Pujal i Carabantes
f4977c31dc Updating Catalan translation. 2022-05-31 00:06:01 +02:00
Pere Pujal i Carabantes
78586144ab Updating Catalan translation. 2022-05-31 00:04:28 +02:00
dolphin6k
8babe0e4ee Updated Japanese translation 2022-05-28 18:06:07 +09:00
Bill Kendrick
8eeb860183 Show SDL version in --verbose-version output 2022-05-22 23:53:23 -07:00
Bill Kendrick
23cc59539c Show SDL version in --verbose-version output 2022-05-22 23:52:32 -07:00
Bill Kendrick
be1031efb2 Mend mis-find-replace of an OSK debug #define 2022-05-20 00:27:51 -07:00
Bill Kendrick
2b5b6132ab Backport OSK keyboard debug change to master
Allow for an "OSK_DEBUG" to be set, to show only debug
from `onscreen_keyboard.c`, and nowhere else.
2022-05-20 00:25:32 -07:00
Bill Kendrick
db7a5e171b Attempt to mend glitchiness of OSK on SDL2.0 branch
Composing is still messed up, however...
2022-05-20 00:23:01 -07:00
Bill Kendrick
e1fc4d60e7 Wrapping a printf in im.c in a debug #ifdef 2022-05-19 23:29:19 -07:00
Bill Kendrick
dcc699eea1 Merge SDL-agnostic way to declare callback func. for SDL_SetEventFilter() 2022-05-19 01:36:47 -07:00
Bill Kendrick
ff05e91f39 SDL-agnostic way to declare callback func. for SDL_SetEventFilter()
SDL 1.2 wants a "const SDL_Event *",
SDL 2.0 wants a "union SDL_Event *".
2022-05-19 01:34:19 -07:00
Bill Kendrick
166b6aa233 Mend bug in SDL agnostic SDL_TimerID check
Had 0 vs NULL swapped between SDL 1 & 2
2022-05-19 01:21:32 -07:00
Bill Kendrick
91a37acf1a Backport (and fix) SDL-agnostic SDL_TimerID check to SDL2.0 branch 2022-05-19 01:18:54 -07:00
Bill Kendrick
4a1d0cc846 SDL-agnostic way of handling SDL_TimerID diff
SDL 1.2 it's a pointer (so "NULL" is invalid),
SDL 2 it's an int (so "0" is invalid).
2022-05-19 01:13:24 -07:00
Bill Kendrick
c8db730c4f Backport a few warning squelches from sdl-2.0 branch
https://sourceforge.net/p/tuxpaint/tuxpaint/ci/dfba73d327df49cbea16207ab25c11991be2c0c7/
2022-05-19 01:05:19 -07:00
Bill Kendrick
dfba73d327 Address some compile-time warnings in SDL 2.0
Also disable VERBOSE DEBUG output.

Note - Still a pair of nasty warnings about the following

 * ‘rsvg_handle_close’ is deprecated: Use
   'rsvg_handle_read_stream_sync' instead

 * passing argument 3 of ‘autoscale_copy_smear_free’ from incompatible
   pointer type (SDL_BlitSurface)

They should be addressed.
2022-05-19 00:49:48 -07:00
Bill Kendrick
a6f5449ce4 Backport sdl-2.0 prompt shadow fix to master 2022-05-18 23:42:13 -07:00
Bill Kendrick
ed7184bd64 Avoid leftover shadow on Open->Erase prompt
Fixes https://sourceforge.net/p/tuxpaint/bugs/248/

(Seemed to do with alpha of the new `backup` surface?
I admit I don't 100% understand what was going on.)
2022-05-18 23:37:23 -07:00
Bill Kendrick
d3d2ecde1a Portuguese translation update
h/t Hugo
2022-05-18 00:00:56 -07:00
Pere Pujal i Carabantes
99eb47a72e Merge branch 'master' into sdl2.0 2022-05-17 00:30:17 +02:00
Bill Kendrick
932c86b8dc "reversort"; make sure Slideshow starts at the _top_
...since that will be where the newest images are.
2022-05-16 00:05:57 -07:00
Bill Kendrick
b2225a62f5 WIP Reverse sorting in Open & Slideshows dialog
...via --reversesort option.  WIP; need docs updated.
(Also need Tux Paint Config. changes, but that's another repo)
2022-05-15 23:56:53 -07:00
Bill Kendrick
27ec817973 The "Slideshow" begins by showing most recent images
...rather than the oldest.  (i.e., defaults to being scrolled
to the very bottom now, rather than the very top)
2022-05-15 23:39:28 -07:00
Pere Pujal i Carabantes
956292e122 Merge branch 'master' into sdl2.0 2022-05-14 19:41:24 +02:00
Bill Kendrick
ea7f88ab92 POT/PO update 2022-05-07 18:15:12 -07:00
Bill Kendrick
e9001c9fac Move where paperinit() is called
h/t to upstream developer of libpaper!
(https://sourceforge.net/p/tuxpaint/bugs/250/)
2022-04-29 18:16:27 -07:00
Pere Pujal i Carabantes
bf73b3679b Merge work in autoscroll from 'master' into sdl2.0 2022-04-26 00:25:29 +02:00
Bill Kendrick
cc6cf1ebcc Remedy bug in Apply Label feature w/ Enter key
Should correct bug https://sourceforge.net/p/tuxpaint/bugs/249/
h/t Shin-ichi
2022-04-22 18:16:55 -07:00
dolphin6k
b6aab66898 Updated Japanese translations. 2022-04-22 15:57:57 +09:00
Bill Kendrick
8fac8476f4 Open dialog scroll buttons auto-repeat now
Had an unwanted SDL_RemoveTimer call in a dumb place. :/
2022-04-18 23:31:08 -07:00
Bill Kendrick
0aab76291b Remove some debugging printfs
...HOWEVER, the auto-repeat of scroll buttons in the Open dialog
do not seem to work, despite the code being identical to what
I just added to New and Slideshow...!?
2022-04-18 22:09:28 -07:00
Bill Kendrick
da201ecfe8 Formatting clean-up 2022-04-18 22:07:34 -07:00