Merge branch 'master' of ssh://git.code.sf.net/p/tuxpaint/tuxpaint

This commit is contained in:
Pere Pujal i Carabantes 2020-12-11 23:53:37 +01:00
commit 934f3aed26
31 changed files with 7035 additions and 5388 deletions

View file

@ -155,6 +155,7 @@ const char *lang_prefixes[NUM_LANGS] = {
"sat@olchiki",
"sat",
"sa",
"sc",
"sd",
"sd@devanagari",
"shs",
@ -362,7 +363,7 @@ static const language_to_locale_struct language_to_locale_array[] = {
{"luganda", "lg_UG.UTF-8"},
{"luxembourgish", "lb_LU.UTF-8"},
{"letzebuergesch", "lb_LU.UTF-8"},
{"konkani-devaganari", "kok_IN.UTF-8"},
{"konkani-devanagari", "kok_IN.UTF-8"},
{"konkani-roman", "kok@roman"},
{"maithili", "mai_IN.UTF-8"},
{"macedonian", "mk_MK.UTF-8"},
@ -398,8 +399,10 @@ static const language_to_locale_struct language_to_locale_array[] = {
{"russian", "ru_RU.UTF-8"},
{"russkiy", "ru_RU.UTF-8"},
{"sanskrit", "sa_IN.UTF-8"},
{"santali-devaganari", "sat_IN.UTF-8"},
{"santali-devanagari", "sat_IN.UTF-8"},
{"santali-ol-chiki", "sat@olchiki"},
{"sardinian", "sc_IT"},
{"sardu", "sc_IT"},
{"serbian", "sr_RS.UTF-8"}, /* Was sr_YU, but that's not in /usr/share/i18n/SUPPORTED, and sr_RS is -bjk 2014.08.04 */
{"serbian-latin", "sr_RS@latin"},
{"shuswap", "shs_CA.UTF-8"},
@ -513,7 +516,7 @@ static void show_lang_usage(int exitcode)
/* cgg */ " kiga chiga\n"
/* rw */ " kinyarwanda\n"
/* tlh */ " klingon tlhIngan\n"
/* kok */ " konkani-devaganari\n"
/* kok */ " konkani-devanagari\n"
/* kok@roman */ " konkani-roman\n"
/* ko */ " korean\n"
/* ku */ " kurdish\n"
@ -544,8 +547,9 @@ static void show_lang_usage(int exitcode)
/* ro */ " romanian\n"
/* ru */ " russian russkiy\n"
/* sa */ " sanskrit\n"
/* sat */ " santali-devaganari\n"
/* sat */ " santali-devanagari\n"
/* sat@olchiki */ " santali-ol-chiki\n"
/* sc */ " sardinian sardu\n"
/* gd */ " scottish scottish-gaelic ghaidhlig\n"
/* sr */ " serbian\n"
/* sr@latin */ " serbian-latin\n"
@ -670,7 +674,7 @@ static void show_locale_usage(FILE * f, const char *const prg)
" lb_LU (Luxembourgish Letzebuergesch)\n"
" lv_LV (Latvian)\n"
" lt_LT (Lithuanian Lietuviu)\n"
" kok_IN (Konkani (Devaganari))\n"
" kok_IN (Konkani (Devanagari))\n"
" kok@roman (Konkani (Roman))\n"
" mai_IN (Maithili)\n"
" mk_MK (Macedonian)\n"
@ -694,6 +698,7 @@ static void show_locale_usage(FILE * f, const char *const prg)
" sa_IN (Sanskrit)\n"
" sat_IN (Santali)\n"
" sat@olchiki (Santali (Ol-Chiki))\n"
" sc_IT (Sardinian)\n"
" sd_IN@devanagari (Sindhi (Devanagari))\n"
" sd_IN (Sindhii (Perso-Arabic))\n"
" shs_CA (Shuswap Secwepemctin)\n"

View file

@ -101,7 +101,7 @@ enum
LANG_KN, /* Kannada */
LANG_KM, /* Khmer */
LANG_KOK_ROMAN, /* Konkani (Roman) */
LANG_KOK, /* Konkani (Devaganari) */
LANG_KOK, /* Konkani (Devanagari) */
LANG_KO, /* Korean */
LANG_KS_DEVANAGARI, /* Kashmiri (Devanagari script) */
LANG_KS, /* Kashmiri (Perso-Arabic script) */
@ -137,6 +137,7 @@ enum
LANG_SAT_OL_CHIKI,
LANG_SAT, /* Santali */
LANG_SA, /* Sanskrit */
LANG_SC, /* Sardinian */
LANG_SD, /* Sindhi (Perso-Arabic) */
LANG_SD_DEVANAGARI, /* Sindhi (Devanagari) */
LANG_SHS, /* Shuswap */

20
src/install-dlls.sh Normal file
View file

@ -0,0 +1,20 @@
#!/bin/sh
find_depends(){
for dllpath in `ntldd $@ | grep mingw | awk '{print $3}' | sort | uniq`
do
dllname=`basename $dllpath`
if ! grep -q $dllname dlllist; then
echo $dllpath >> dlllist
echo -n .
cp $dllpath $DESTDIR/
find_depends $dllpath
fi
done
}
DESTDIR=$3
echo > dlllist
find_depends $1 $2
echo

View file

@ -740,7 +740,7 @@ khmer
klingon | tlhIngan
.TP 2
-
konkani-devaganari
konkani-devanagari
.TP 2
-
konkani-roman
@ -833,12 +833,15 @@ russian | russkiy
sanskrit
.TP 2
-
santali-devaganari
santali-devanagari
.TP 2
-
santali-ol-chiki
.TP 2
-
sardinian
.TP 2
-
scottish | scottish-gaelic | ghaidhlig
.TP 2
-
@ -1227,6 +1230,7 @@ Damian Yerrick,
Muhammad Najmi Ahmad Zabidi,
Eugene Zelenko,
Martin Zhekov,
Flavia Floris,
and
Huang Zuzhen.

View file

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: fr\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-15 16:42-0700\n"
"PO-Revision-Date: 2017-12-03 07:56+0100\n"
"PO-Revision-Date: 2020-12-08 10:39+0100\n"
"Last-Translator: Chion Jacques <jacques.chion@orange.fr>\n"
"Language-Team: <fr@li.org>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.4\n"
"X-Generator: Poedit 2.4.1\n"
#. Response to Black (0, 0, 0) color selected
#: ../colors.h:86
@ -323,23 +323,23 @@ msgstr "Un octogone a huit côtés égaux."
#: ../shapes.h:320 ../shapes.h:321
msgid "A star with 3 points."
msgstr "Étoile à 3 branches"
msgstr "Étoile à 3 branches."
#: ../shapes.h:322 ../shapes.h:323
msgid "A star with 4 points."
msgstr "Étoile à 4 branches"
msgstr "Étoile à 4 branches."
#: ../shapes.h:324 ../shapes.h:325
msgid "A star with 5 points."
msgstr "Étoile à 5 branches"
msgstr "Étoile à 5 branches."
#: ../shapes.h:372
msgid "Draw shapes from the center."
msgstr ""
msgstr "Dessine des objets depuis le centre."
#: ../shapes.h:373
msgid "Draw shapes from a corner."
msgstr ""
msgstr "Dessine des objets depuis un coin."
#. Title of tool selector (buttons down the left)
#: ../titles.h:56
@ -472,16 +472,13 @@ msgstr ""
"Clique pour commencer à dessiner une ligne. Puis continue pour la compléter."
#: ../tools.h:125
#, fuzzy
#| msgid ""
#| "Pick a shape. Click to pick the center, drag, then let go when it is the "
#| "size you want. Move around to rotate it, and click to draw it."
msgid ""
"Pick a shape. Click to start drawing, drag, and let go when it is the size "
"you want. Move around to rotate it, and click to draw it."
msgstr ""
"Choisis une forme. Clique en son centre, choisis sa place et sa taille tout "
"en appuyant, fais-la tourner, et clique enfin pour la dessiner."
"Choisis une forme. Clique pour démarrer le dessin, fais glisser, et continue "
"jusqu'à la taille désirée. Déplace-toi pour la faire tourner, et clique pour "
"dessiner."
#: ../tools.h:129
msgid ""
@ -537,7 +534,7 @@ msgstr ""
#. Response to 'open' action (while file dialog is being constructed)
#: ../tools.h:154
msgid "Open…"
msgstr "Ouvrir.."
msgstr "Ouvrir ..."
#. Response to 'save' action
#: ../tools.h:157
@ -547,7 +544,7 @@ msgstr "Ton image a été sauvegardée !"
#. Response to 'print' action (while printing, or print dialog is being used)
#: ../tools.h:160
msgid "Printing…"
msgstr "Impression.."
msgstr "Impression ..."
#. Response to 'quit' (exit) action
#: ../tools.h:163
@ -667,34 +664,26 @@ msgstr "N'oublie pas d'utiliser le bouton gauche de la souris !"
#. Confirmation of successful (we hope) image export
#: ../tuxpaint.c:2190
#, fuzzy
#| msgid "Your picture has been printed!"
msgid "Your picture has been exported!"
msgstr "Ton image a été imprimée !"
msgstr "Ton image a été exportée !"
#: ../tuxpaint.c:2191
#, fuzzy
#| msgid "Your picture has been printed!"
msgid "Your slideshow GIF has been exported!"
msgstr "Ton image a été imprimée !"
msgstr "Ton image GIF a été exportée !"
#. We got an error exporting
#: ../tuxpaint.c:2195
#, fuzzy
#| msgid "Sorry! Your picture could not be printed!"
msgid "Sorry! Your picture could not be exported!"
msgstr "Désolé, ton image n'a pas pu être imprimée !"
msgstr "Désolé, ton image n'a pas pu être exportée !"
#: ../tuxpaint.c:2196
#, fuzzy
#| msgid "Sorry! Your picture could not be printed!"
msgid "Sorry! Your slideshow GIF could not be exported!"
msgstr "Désolé, ton image n'a pas pu être imprimée !"
msgstr "Désolé, ton image GIF n'a pas pu être exportée !"
#. Slideshow instructions
#: ../tuxpaint.c:2200
msgid "Choose the pictures you want, then click “Play”."
msgstr "Choisis les images que tu veux, puis clique sur “Départ”"
msgstr "Choisis les images que tu veux, puis clique sur “Départ”."
#. Sound has been muted (silenced) via keyboard shortcut
#: ../tuxpaint.c:2407
@ -709,7 +698,7 @@ msgstr "Son activé."
#. Wait while Text tool finishes loading fonts
#: ../tuxpaint.c:3167
msgid "Please wait…"
msgstr "Attends s'il te plaît .."
msgstr "Attends s'il te plaît ..."
#. Open dialog: 'Erase' button, to erase/deleted the selected picture
#: ../tuxpaint.c:7923
@ -724,7 +713,7 @@ msgstr "Diapos"
#. Open dialog: 'Export' button, to copy an image to an easily-accessible location
#: ../tuxpaint.c:7929
msgid "Export"
msgstr ""
msgstr "Exporter"
#. Open dialog: 'Back' button, to dismiss Open dialog without opening a picture
#: ../tuxpaint.c:7932
@ -739,7 +728,7 @@ msgstr "Départ"
#. Slideshow: 'GIF Export' button, to create an animated GIF
#: ../tuxpaint.c:7938
msgid "GIF Export"
msgstr ""
msgstr "Exporter en GIF"
#. Slideshow: 'Next' button, to load next slide (image)
#: ../tuxpaint.c:7941
@ -782,14 +771,14 @@ msgstr "Non, c'est une nouvelle image !"
#. Instructions for 'Open' file dialog
#: ../tuxpaint.c:14454
msgid "Choose the picture you want, then click “Open”."
msgstr "Choisis une image, et clique ensuite sur “Ouvrir”"
msgstr "Choisis une image, et clique ensuite sur “Ouvrir”."
#. None selected? Too dangerous to automatically select all (like we do for slideshow playback).
#. Only 1 selected? No point in saving as GIF.
#.
#: ../tuxpaint.c:15880
msgid "Select 2 or more drawings to turn into an animated GIF."
msgstr ""
msgstr "Sélectionner 2 ou plusieurs dessins pour créer une image animée GIF."
#: ../tuxpaint.c:23539
msgid "Select a color from your drawing."
@ -1259,7 +1248,7 @@ msgstr ""
#: ../../magic/src/puzzle.c:103
msgid "Puzzle"
msgstr "Puzzle "
msgstr "Puzzle"
#: ../../magic/src/puzzle.c:110
msgid "Click the part of your picture where would you like a puzzle."
@ -1573,7 +1562,7 @@ msgstr "Clique et promène la souris pour dessiner un effet Xor"
#
#: ../../magic/src/xor.c:101
msgid "Click to draw a XOR effect on the whole picture"
msgstr "Clique pour avoir un effet Xor sur l'ensemble de l'image."
msgstr "Clique pour avoir un effet Xor sur l'ensemble de l'image"
#~ msgid "Black & White"
#~ msgstr "Gris"

View file

@ -1,16 +1,18 @@
# Galician translation Tux Paint.
# Copyright (C) 2015 Tux Paint.
# This file is distributed under the same license as the Tux Paint package.
#
# Translators:
# Leandro Regueiro <leandro.regueiro@gmail.com>, 2005-2006
# Miguel Anxo Bouzada <mbouzada@gmail.com>, 2015
# Miguel A. Bouzada <mbouzada@gmail.com>, 2017.
# Miguel Anxo Bouzada <mbouzada@gmail.com>, 2017
# Miguel Anxo Bouzada <mbouzada@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Tux Paint\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-15 16:42-0700\n"
"PO-Revision-Date: 2020-08-16 09:19+0200\n"
"PO-Revision-Date: 2020-09-03 18:31+0200\n"
"Last-Translator: Miguel Anxo Bouzada <mbouzada@gmail.com>\n"
"Language-Team: Proxecto Trasno <proxecto@trasno.net>\n"
"Language: gl\n"
@ -18,7 +20,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.3\n"
"X-Generator: Poedit 2.4.1\n"
#. Response to Black (0, 0, 0) color selected
#: ../colors.h:86
@ -533,7 +535,7 @@ msgstr "Escolle unha cor ou unha imaxe coa que iniciar un novo debuxo."
#. Response to 'open' action (while file dialog is being constructed)
#: ../tools.h:154
msgid "Open…"
msgstr "Abrir..."
msgstr "Abrir"
#. Response to 'save' action
#: ../tools.h:157
@ -543,7 +545,7 @@ msgstr "Gardouse a túa imaxe!"
#. Response to 'print' action (while printing, or print dialog is being used)
#: ../tools.h:160
msgid "Printing…"
msgstr "Imprimindo..."
msgstr "Imprimindo"
#. Response to 'quit' (exit) action
#: ../tools.h:163
@ -697,7 +699,7 @@ msgstr "Son sen silenciar."
#. Wait while Text tool finishes loading fonts
#: ../tuxpaint.c:3167
msgid "Please wait…"
msgstr "Agarda un chisco..."
msgstr "Agarda un chisco"
#. Open dialog: 'Erase' button, to erase/deleted the selected picture
#: ../tuxpaint.c:7923
@ -822,7 +824,7 @@ msgid ""
"perpendicularly to open or close the blinds."
msgstr ""
"Preme preto do bordo do debuxo para poñer unha persiana sobre el. Move o "
"rato perpendicularmente para abrir ou pechas as persianas. "
"rato perpendicularmente para abrir ou pechas as persianas."
#: ../../magic/src/blocks_chalk_drip.c:129
msgid "Blocks"
@ -900,7 +902,7 @@ msgstr "Confeti"
#: ../../magic/src/confetti.c:88
msgid "Click to throw confetti!"
msgstr "Preme para lanzar confeti"
msgstr "Preme para lanzar confeti."
#: ../../magic/src/distortion.c:134
msgid "Distortion"
@ -932,7 +934,7 @@ msgstr "Preme e arrastra o rato para clarexar algunhas partes do debuxo."
#: ../../magic/src/fade_darken.c:129
msgid "Click to lighten your entire picture."
msgstr "Preme para clarexar todo o debuxo"
msgstr "Preme para clarexar todo o debuxo."
#: ../../magic/src/fade_darken.c:134
msgid "Click and drag the mouse to darken parts of your picture."
@ -1042,7 +1044,7 @@ msgid ""
"Click and drag the mouse to draw with two brushes that are symmetric across "
"the left and right of your picture."
msgstr ""
"Preme e arrastra o rato para debuxar con dous pinceis simétricos da dereita "
"Preme e arrastra o rato para debuxar con dous pinceis simétricos á dereita e "
"á esquerda do debuxo."
#: ../../magic/src/kalidescope.c:152
@ -1050,7 +1052,7 @@ msgid ""
"Click and drag the mouse to draw with two brushes that are symmetric across "
"the top and bottom of your picture."
msgstr ""
"Preme e arrastra o rato para debuxar con dous pinceis simétricos de arriba a "
"Preme e arrastra o rato para debuxar con dous pinceis simétricos arriba e "
"abaixo do debuxo."
#: ../../magic/src/kalidescope.c:156
@ -1089,7 +1091,7 @@ msgstr "Preme e arrastra o rato para pintar cunha cor metalizada."
#: ../../magic/src/mirror_flip.c:110
msgid "Mirror"
msgstr "Reflectir"
msgstr "Espello"
#: ../../magic/src/mirror_flip.c:112
msgid "Flip"
@ -1179,7 +1181,7 @@ msgstr "Preme para converter a negativo o debuxo."
#: ../../magic/src/noise.c:66
msgid "Noise"
msgstr "Noise"
msgstr "Ruído"
#: ../../magic/src/noise.c:70
msgid "Click and drag the mouse to add noise to parts of your picture."
@ -1188,7 +1190,7 @@ msgstr ""
#: ../../magic/src/noise.c:71
msgid "Click to add noise to your entire picture."
msgstr "Preme para engadirlle ruído a todo o debuxo"
msgstr "Preme para engadirlle ruído a todo o debuxo."
#: ../../magic/src/perspective.c:147
msgid "Perspective"
@ -1266,11 +1268,11 @@ msgstr ""
#: ../../magic/src/ripples.c:102
msgid "Ripples"
msgstr "Ondulacións"
msgstr "Rizos"
#: ../../magic/src/ripples.c:108
msgid "Click to make ripples appear over your picture."
msgstr "Preme para facer que aparezan unhas ondas no debuxo."
msgstr "Preme para facer que aparezan unhas ondas rizadas no debuxo."
#: ../../magic/src/rosette.c:115
msgid "Rosette"
@ -1354,7 +1356,7 @@ msgstr ""
#: ../../magic/src/snow.c:71
msgid "Snow Ball"
msgstr "Cerellos"
msgstr "Bolas de neve"
#: ../../magic/src/snow.c:72
msgid "Snow Flake"
@ -1362,11 +1364,11 @@ msgstr "Folerpas"
#: ../../magic/src/snow.c:76
msgid "Click to add snow balls to your picture."
msgstr "Preme para engadirlle cerellos ao debuxo"
msgstr "Preme para engadirlle cerellos ao debuxo."
#: ../../magic/src/snow.c:77
msgid "Click to add snow flakes to your picture."
msgstr "Preme para engadirlle folerpas ao debuxo"
msgstr "Preme para engadirlle folerpas ao debuxo."
#: ../../magic/src/string.c:129
msgid "String edges"
@ -1395,7 +1397,7 @@ msgstr "Preme e arrastra o rato para debuxar frechas feitas con cadenetas."
#: ../../magic/src/string.c:153
msgid "Draw string art arrows with free angles."
msgstr "Debuxa cadenetas con forma de frecha de varios ángulos. "
msgstr "Debuxa cadenetas con forma de frecha de varios ángulos."
#: ../../magic/src/tint.c:74
msgid "Tint"
@ -1496,7 +1498,7 @@ msgstr "Preme e arrastra o rato para obter un efecto excluínte (XOR)"
#: ../../magic/src/xor.c:101
msgid "Click to draw a XOR effect on the whole picture"
msgstr "Preme para obter un efecto excluínte (XOR) en todo o debuxo."
msgstr "Preme para obter un efecto excluínte (XOR) en todo o debuxo"
#~ msgid "`\\%_@$~#{<(^&*"
#~ msgstr "`\\%_@$~#{<(^&*"

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

1480
src/po/sc.po Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,7 @@
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#
#, fuzzy
msgid ""
msgstr ""
@ -107,19 +107,19 @@ msgstr ""
#. they have both uppercase and lowercase letters. Note that we do not
#. test for "Aa", because it is OK if uppercase and lowercase are the
#. same (but not nice -- such fonts get a low score later).
#.
#.
#. Most locales leave the blacklist strings alone: "QX" and "qx"
#. (it is less destructive to use the scoring strings instead)
#.
#.
#. Locales that absolutely require all fonts to have some
#. extra characters should use "QX..." and "qx...", where "..."
#. are some characters you absolutely require in all fonts.
#.
#.
#. Locales with absolutely NO use for ASCII may use "..." and "...",
#. where "..." are some characters you absolutely require in
#. all fonts. This would be the case for a locale in which it is
#. impossible for a user to type ASCII letters.
#.
#.
#. Most translators should use scoring instead.
#: ../dirwalk.c:177
msgid "qx"
@ -762,7 +762,7 @@ msgstr ""
#. None selected? Too dangerous to automatically select all (like we do for slideshow playback).
#. Only 1 selected? No point in saving as GIF.
#.
#.
#: ../tuxpaint.c:15880
msgid "Select 2 or more drawings to turn into an animated GIF."
msgstr ""

View file

@ -22,7 +22,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt)
June 14, 2002 - August 30, 2020
June 14, 2002 - November 21, 2020
*/
@ -455,7 +455,9 @@ static void mtw(wchar_t * wtok, char *tok)
#else
#include <librsvg/rsvg.h>
/* #include <librsvg/rsvg-cairo.h> -- Deprecated */
#if defined (__MINGW32__) && (__GNUC__ <= 4 )
#include <librsvg/rsvg-cairo.h>
#endif
#if !defined(RSVG_H) || !defined(RSVG_CAIRO_H)
#error "---------------------------------------------------"
@ -1533,7 +1535,7 @@ static SDL_Surface *render_text(TuxPaint_Font * restrict font, const char *restr
/**
* Convert a wide-character string to string of Uint16's.
*
*
* This conversion is required on platforms where Uint16 doesn't match wchar_t.
* On Windows, wchar_t is 16-bit, elsewhere it is 32-bit.
* Mismatch caused by the use of Uint16 for unicode characters by SDL, SDL_ttf.
@ -2220,7 +2222,7 @@ int brushflag, xnew, ynew, eraflag, lineflag, magicflag, keybd_flag, keybd_posit
int cur_thing;
/**
* --- MAIN LOOP! ---
* --- MAIN LOOP! ---
*/
static void mainloop(void)
{
@ -9317,7 +9319,7 @@ static void draw_shapes(void)
/* Show shape-from-center button: */
if (shape_mode == SHAPEMODE_CENTER)
if (shape_mode == SHAPEMODE_CENTER)
button_color = img_btn_down;
else
button_color = img_btn_up;
@ -9335,7 +9337,7 @@ static void draw_shapes(void)
/* Show shape-from-corner button: */
if (shape_mode == SHAPEMODE_CORNER)
if (shape_mode == SHAPEMODE_CORNER)
button_color = img_btn_down;
else
button_color = img_btn_up;
@ -11490,7 +11492,7 @@ static int SDLCALL NondefectiveBlit(SDL_Surface * src, SDL_Rect * srcrect, SDL_S
/**
* Copy an image, scaling and smearing, as needed, into a new surface.
* Free the original surface.
*
*
* @param SDL_Surface * src -- source surface (will be freed by this function!)
* @param SDL_Surface * dst -- destination surface
* @param int SDCALL(*blit) -- function for blitting; "NondefectiveBlit" or "SDL_BlitSurface"
@ -11678,6 +11680,7 @@ static SDL_Surface *load_starter_helper(char *path_and_basename, const char *ext
ext = strdup(extension);
safe_snprintf(fname, sizeof(fname), "%s.%s", path_and_basename, ext);
surf = (*load_func) (fname);
if (surf == NULL)
@ -12085,7 +12088,7 @@ static void save_current(void)
char *fname;
FILE *fi;
if (!make_directory(DIR_SAVE, "", "Can't create user data directory"))
if (!make_directory(DIR_SAVE, "", "Can't create user data directory (E001)"))
{
draw_tux_text(TUX_OOPS, strerror(errno), 0);
return;
@ -13228,22 +13231,22 @@ static void do_shape(int sx, int sy, int nx, int ny, int rotn, int use_brush)
if (rotn != 0)
{
rotn_rad = rotn * M_PI / 180;
xp = (x1 + offx) * cos(rotn_rad) - (y1 + offy) * sin(rotn_rad);
yp = (x1 + offx) * sin(rotn_rad) + (y1 + offy) * cos(rotn_rad);
x1 = xp - offx;
y1 = yp - offy;
xp = (x2 + offx) * cos(rotn_rad) - (y2 + offy) * sin(rotn_rad);
yp = (x2 + offx) * sin(rotn_rad) + (y2 + offy) * cos(rotn_rad);
x2 = xp - offx;
y2 = yp - offy;
xp = (xv + offx) * cos(rotn_rad) - (yv + offy) * sin(rotn_rad);
yp = (xv + offx) * sin(rotn_rad) + (yv + offy) * cos(rotn_rad);
xv = xp - offx;
yv = yp - offy;
}
@ -13318,6 +13321,10 @@ static int shape_rotation(int ctr_x, int ctr_y, int ox, int oy)
else if (shape_radius < 100)
deg = ((deg - 7) / 15) * 15;
/* Disabled b/c it adversely affected shape_locked shapes (square & octagon)
with corner-dragged shapes; disabling doesn't seem to cause problems
with any shape, in either drag mode... -bjk 2020-11-10 */
/*
if (shape_locked[cur_shape])
{
int angle_skip;
@ -13325,6 +13332,7 @@ static int shape_rotation(int ctr_x, int ctr_y, int ox, int oy)
angle_skip = 360 / shape_sides[cur_shape];
deg = deg % angle_skip;
}
*/
return (deg);
}
@ -13426,7 +13434,7 @@ static int do_save(int tool, int dont_show_success_results)
show_progress_bar(screen);
do_setcursor(cursor_watch);
if (!make_directory(DIR_SAVE, "", "Can't create user data directory"))
if (!make_directory(DIR_SAVE, "", "Can't create user data directory (E002)"))
{
fprintf(stderr, "Cannot save the any pictures! SORRY!\n\n");
draw_tux_text(TUX_OOPS, strerror(errno), 0);
@ -13438,7 +13446,7 @@ static int do_save(int tool, int dont_show_success_results)
/* Make sure we have a ~/.tuxpaint/saved directory: */
if (!make_directory(DIR_SAVE, "saved", "Can't create user data directory"))
if (!make_directory(DIR_SAVE, "saved", "Can't create user data directory (for saved drawings) (E003)"))
{
fprintf(stderr, "Cannot save any pictures! SORRY!\n\n");
draw_tux_text(TUX_OOPS, strerror(errno), 0);
@ -13450,7 +13458,7 @@ static int do_save(int tool, int dont_show_success_results)
/* Make sure we have a ~/.tuxpaint/saved/.thumbs/ directory: */
if (!make_directory(DIR_SAVE, "saved/.thumbs", "Can't create user data thumbnail directory"))
if (!make_directory(DIR_SAVE, "saved/.thumbs", "Can't create user data thumbnail directory (for saved drawings' thumbnails) (E004)"))
{
fprintf(stderr, "Cannot save any pictures! SORRY!\n\n");
draw_tux_text(TUX_OOPS, strerror(errno), 0);
@ -13461,7 +13469,7 @@ static int do_save(int tool, int dont_show_success_results)
/* Make sure we have a ~/.tuxpaint/saved/.label/ directory: */
if (!make_directory(DIR_SAVE, "saved/.label", "Can't create label information directory"))
if (!make_directory(DIR_SAVE, "saved/.label", "Can't create label information directory (E005)"))
{
fprintf(stderr, "Cannot save label information! SORRY!\n\n");
draw_tux_text(TUX_OOPS, strerror(errno), 0);
@ -14506,10 +14514,10 @@ static int do_open(void)
/* No thumbnail - load original: */
/* Make sure we have a ~/.tuxpaint/saved directory: */
if (make_directory(DIR_SAVE, "saved", "Can't create user data directory"))
if (make_directory(DIR_SAVE, "saved", "Can't create user data directory (for saved drawings) (E006)"))
{
/* (Make sure we have a .../saved/.thumbs/ directory:) */
make_directory(DIR_SAVE, "saved/.thumbs", "Can't create user data thumbnail directory");
make_directory(DIR_SAVE, "saved/.thumbs", "Can't create user data thumbnail directory (for saved drawings' thumbnails) (E007)");
}
@ -15576,10 +15584,10 @@ static int do_slideshow(void)
/* No thumbnail - load original: */
/* Make sure we have a ~/.tuxpaint/saved directory: */
if (make_directory(DIR_SAVE, "saved", "Can't create user data directory"))
if (make_directory(DIR_SAVE, "saved", "Can't create user data directory (for saved drawings) (E008)"))
{
/* (Make sure we have a .../saved/.thumbs/ directory:) */
make_directory(DIR_SAVE, "saved/.thumbs", "Can't create user data thumbnail directory");
make_directory(DIR_SAVE, "saved/.thumbs", "Can't create user data thumbnail directory (for saved drawings' thumbnails) (E009)");
}
safe_snprintf(fname, sizeof(fname), "%s/%s", dirname, f->d_name);
@ -16057,19 +16065,19 @@ static int do_slideshow(void)
draw_toolbar();
draw_colors(COLORSEL_CLOBBER_WIPE);
draw_none();
/* Show a message depending on success */
if (export_successful)
do_prompt_snd(PROMPT_GIF_EXPORT_TXT, PROMPT_EXPORT_YES, "", SND_TUXOK, screen->w / 2, screen->h / 2);
else
do_prompt_snd(PROMPT_GIF_EXPORT_FAILED_TXT, PROMPT_EXPORT_YES, "", SND_YOUCANNOT, screen->w / 2, screen->h / 2);
freeme = textdir(TUX_TIP_SLIDESHOW);
draw_tux_text(TUX_BORED, freeme, 1);
free(freeme);
SDL_Flip(screen);
update_list = 1;
}
}
@ -16243,6 +16251,7 @@ static void play_slideshow(int *selected, int num_selected, char *dirname, char
SDL_Surface *img;
char *tmp_starter_id, *tmp_template_id, *tmp_file_id;
int tmp_starter_mirrored, tmp_starter_flipped, tmp_starter_personal;
/* FIXME: Do we want to keep `template_personal` safe, too? */
char fname[1024];
SDL_Event event;
SDLKey key;
@ -16260,6 +16269,7 @@ static void play_slideshow(int *selected, int num_selected, char *dirname, char
tmp_starter_mirrored = starter_mirrored;
tmp_starter_flipped = starter_flipped;
tmp_starter_personal = starter_personal;
/* FIXME: Do we want to keep `template_personal` safe, too? */
do_setcursor(cursor_tiny);
@ -16963,8 +16973,11 @@ static void do_render_cur_text(int do_blit)
{
#if defined(_FRIBIDI_H) || defined(FRIBIDI_H)
//FriBidiCharType baseDir = FRIBIDI_TYPE_LTR;
//FriBidiCharType baseDir = FRIBIDI_TYPE_WL; /* Per: Shai Ayal <shaiay@gmail.com>, 2009-01-14 */
#if defined (__MINGW32__) && (__GNUC__ <= 4 )
FriBidiCharType baseDir = FRIBIDI_TYPE_WL; /* Per: Shai Ayal <shaiay@gmail.com>, 2009-01-14 */
#else
FriBidiParType baseDir = FRIBIDI_TYPE_WL; //EP to avoid warning on types in now commented line above
#endif
FriBidiChar *unicodeIn, *unicodeOut;
unsigned int i;
@ -19114,7 +19127,8 @@ static int do_new_dialog(void)
DIR *d;
struct dirent *f;
struct dirent2 *fs;
int place, oldplace;
struct stat sbuf;
int place;
char *dirname[NUM_PLACES_TO_LOOK];
char **d_names = NULL, **d_exts = NULL;
int *d_places;
@ -19200,18 +19214,22 @@ static int do_new_dialog(void)
{
f = readdir(d);
if (f != NULL)
if (f !=NULL)
{
memcpy(&(fs[num_files_in_dirs].f), f, sizeof(struct dirent));
fs[num_files_in_dirs].place = places_to_look;
num_files_in_dirs++;
if (num_files_in_dirs >= things_alloced)
safe_snprintf(fname, sizeof(fname), "%s/%s", dirname[places_to_look], f->d_name);
if (!stat(fname, &sbuf) && S_ISREG(sbuf.st_mode))
{
things_alloced = things_alloced + 32;
memcpy(&(fs[num_files_in_dirs].f), f, sizeof(struct dirent));
fs[num_files_in_dirs].place = places_to_look;
fs = (struct dirent2 *)realloc(fs, sizeof(struct dirent2) * things_alloced);
num_files_in_dirs++;
if (num_files_in_dirs >= things_alloced)
{
things_alloced = things_alloced + 32;
fs = (struct dirent2 *)realloc(fs, sizeof(struct dirent2) * things_alloced);
}
}
}
}
@ -19255,19 +19273,14 @@ static int do_new_dialog(void)
/* Read directory of images and build thumbnails: */
oldplace = -1;
for (j = 0; j < num_files_in_dirs; j++)
{
f = &(fs[j].f);
place = fs[j].place;
if ((place == PLACE_PERSONAL_TEMPLATES_DIR || place == PLACE_TEMPLATES_DIR) && oldplace != place)
if ((place == PLACE_PERSONAL_TEMPLATES_DIR || place == PLACE_TEMPLATES_DIR) && first_template == -1)
first_template = num_files;
oldplace = place;
show_progress_bar(screen);
if (f != NULL)
@ -19404,12 +19417,16 @@ static int do_new_dialog(void)
{
/* No thumbnail - load original: */
/* Make sure we have a ~/.tuxpaint/[starters|templates] directory: */
if (make_directory(DIR_SAVE, dirname[d_places[num_files]], "Can't create user data directory"))
if (d_places[num_files] == PLACE_PERSONAL_TEMPLATES_DIR ||
d_places[num_files] == PLACE_PERSONAL_STARTERS_DIR)
{
/* (Make sure we have a .../[starters|templates]/.thumbs/ directory:) */
safe_snprintf(fname, sizeof(fname), "%s/.thumbs", dirname[d_places[num_files]]);
make_directory(DIR_SAVE, fname, "Can't create user data thumbnail directory");
/* Make sure we have a ~/.tuxpaint/[starters|templates] directory: */
if (make_directory(DIR_SAVE, dirname[d_places[num_files]], "Can't create user data directory (for starters/templates) (E010)"))
{
/* (Make sure we have a .../[starters|templates]/.thumbs/ directory:) */
safe_snprintf(fname, sizeof(fname), "%s/.thumbs", dirname[d_places[num_files]]);
make_directory(DIR_SAVE, fname, "Can't create user data thumbnail directory (for starters/templates) (E011)");
}
}
img = NULL;
@ -19510,10 +19527,10 @@ static int do_new_dialog(void)
safe_snprintf(fname, sizeof(fname), "%s/.thumbs/%s-t.png",
dirname[d_places[num_files]], d_names[num_files]);
if (!make_directory(DIR_SAVE, "starters", "Can't create user data directory") ||
!make_directory(DIR_SAVE, "templates", "Can't create user data directory") ||
!make_directory(DIR_SAVE, "starters/.thumbs", "Can't create user data directory") ||
!make_directory(DIR_SAVE, "templates/.thumbs", "Can't create user data directory"))
if (!make_directory(DIR_SAVE, "starters", "Can't create user data directory (for starters) (E012)") ||
!make_directory(DIR_SAVE, "templates", "Can't create user data directory (for templates) (E013)") ||
!make_directory(DIR_SAVE, "starters/.thumbs", "Can't create user data directory (for starters) (E014)") ||
!make_directory(DIR_SAVE, "templates/.thumbs", "Can't create user data directory (for templates) (E015)"))
fprintf(stderr, "Cannot save any pictures! SORRY!\n\n");
else
{
@ -23024,7 +23041,7 @@ static void setup_config(char *argv[])
free(picturesdir);
exportdir = strdup(str);
}
/* Load options from user's own configuration (".rc" / ".cfg") file: */
#if defined(_WIN32)
@ -25643,12 +25660,12 @@ char * get_xdg_user_dir(const char * dir_type, const char * fallback) {
} else {
safe_strncpy(return_path, found, MAX_PATH);
}
/* Trim trailing " */
if (return_path[strlen(return_path) - 1] == '\"') {
return_path[strlen(return_path) - 1] = '\0';
}
found_it = TRUE;
}
}
@ -25740,34 +25757,34 @@ static int export_gif(int *selected, int num_selected, char *dirname, char **d_n
if (bitmap != NULL)
{
done = 0;
for (i = 0; i < num_selected && !done; i++)
{
which = selected[i];
show_progress_bar(screen);
/* Figure out filename: */
safe_snprintf(fname, sizeof(fname), "%s/%s%s", dirname, d_names[which], d_exts[which]);
/* Load and scale the image */
img = myIMG_Load(fname);
if (img != NULL)
{
autoscale_copy_smear_free(img, screen, SDL_BlitSurface);
safe_strncpy(file_id, d_names[which], sizeof(file_id));
/* See if this saved image was based on a 'starter' */
load_starter_id(d_names[which], NULL);
if (starter_id[0] != '\0')
{
load_starter(starter_id);
if (starter_mirrored)
mirror_starter();
if (starter_flipped)
flip_starter();
}
@ -25783,7 +25800,7 @@ static int export_gif(int *selected, int num_selected, char *dirname, char **d_n
for (y = 0; y < overall_h; y++) {
for (x = 0; x < overall_w; x++) {
SDL_GetRGBA(getpixels[screen->format->BytesPerPixel](screen, x, y), screen->format, &r, &g, &b, &a);
bitmap[((i * overall_area) + (y * overall_w) + x) * 4 + 0] = r;
bitmap[((i * overall_area) + (y * overall_w) + x) * 4 + 1] = g;
bitmap[((i * overall_area) + (y * overall_w) + x) * 4 + 2] = b;
@ -25792,7 +25809,7 @@ static int export_gif(int *selected, int num_selected, char *dirname, char **d_n
}
SDL_Flip(screen);
done = export_gif_monitor_events();
done = export_gif_monitor_events();
}
@ -25800,7 +25817,7 @@ static int export_gif(int *selected, int num_selected, char *dirname, char **d_n
{
/* Quantize to max 256 (8bpp) colors and generate a suitable palette */
liq_handle = liq_attr_create();
input_image = liq_image_create_rgba(liq_handle, bitmap, overall_w, num_selected * overall_h, 0);
input_image = liq_image_create_rgba(liq_handle, bitmap, overall_w, num_selected * overall_h, 0);
liq_set_max_colors(liq_handle, 256);
show_progress_bar(screen);
@ -25818,7 +25835,7 @@ static int export_gif(int *selected, int num_selected, char *dirname, char **d_n
pixels_size = num_selected * overall_area;
raw_8bit_pixels = malloc(pixels_size);
liq_set_dithering_level(quantization_result, 1.0);
liq_write_remapped_image(quantization_result, input_image, raw_8bit_pixels, pixels_size);
palette = liq_get_palette(quantization_result);
free(bitmap);
@ -25837,24 +25854,24 @@ static int export_gif(int *selected, int num_selected, char *dirname, char **d_n
8, /* 256 colors */
0 /* infinite loop */
);
/* Export each frame */
for (i = 0; i < num_selected && !done; i++)
{
memcpy(gif->frame, raw_8bit_pixels + i * overall_area, overall_area);
ge_add_frame(gif, gif_speed);
show_progress_bar(screen);
done = export_gif_monitor_events();
done = export_gif_monitor_events();
}
/* Close the GIF */
ge_close_gif(gif);
} else {
fprintf(stderr, "Quantization failed\n");
done = 1;
}
if (done)
{
/* Aborted; discard the partially-saved GIF */
@ -25884,7 +25901,7 @@ static int export_gif(int *selected, int num_selected, char *dirname, char **d_n
starter_flipped = tmp_starter_flipped;
starter_personal = tmp_starter_personal;
free(gif_fname);
/* Success if we didn't have an error, and user didn't abort */
@ -26018,7 +26035,7 @@ static char * get_export_filepath(const char * ext) {
/* Make sure the export dir exists */
if (!make_directory(DIR_EXPORT, "", "Can't create export directory"))
if (!make_directory(DIR_EXPORT, "", "Can't create export directory (E016)"))
{
return NULL;
}