Merge branch 'master' into sdl2.0

This commit is contained in:
Pere Pujal i Carabantes 2018-08-30 01:37:00 +02:00
commit 1a5308226c
37 changed files with 1696 additions and 771 deletions

5
.gitignore vendored
View file

@ -7,3 +7,8 @@ src/tp_magic_api.h
tp-magic-config
trans/
*~
TuxPaint.app
TuxPaint.dmg
*.dylib
*.dylib.dSYM
.DS_Store

139
Makefile
View file

@ -1,46 +1,50 @@
# Tux Paint - A simple drawing program for children.
# Copyright (c) 2002-2017 by Bill Kendrick and others
# bill@newbreedsoftware.com
# Copyright (c) 2002-2018
# Various contributors (see AUTHORS.txt)
# http://www.tuxpaint.org/
# June 14, 2002 - December 30, 2017
# June 14, 2002 - August 19, 2018
# The version number, for release:
VER_VERSION:=0.9.23
VER_DATE:=$(shell date +"%Y-%m-%d")
ifdef SOURCE_DATE_EPOCH
VER_DATE=$(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+%Y-%m-%d" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "+%Y-%m-%d" 2>/dev/null || date -u "+%Y-%m-%d")
else
VER_DATE=$(shell date "+%Y-%m-%d")
endif
MAGIC_API_VERSION:=0x00000003
# Need to know the OS
SYSNAME:=$(shell uname -s)
ifeq ($(findstring MINGW32, $(SYSNAME)),MINGW32)
OS:=windows
GPERF:=/usr/bin/gperf
OS:=windows
GPERF:=/usr/bin/gperf
else
ifeq ($(SYSNAME),Darwin)
OS:=osx
GPERF:=/usr/bin/gperf
else
ifeq ($(SYSNAME),BeOS)
OS:=beos
GPERF:=$(shell finddir B_USER_BIN_DIRECTORY)/gperf
else
ifeq ($(SYSNAME),Haiku)
OS:=beos
GPERF:=$(shell finddir B_SYSTEM_BIN_DIRECTORY)/gperf
STDC_LIB:=-lstdc++
ifeq ($(shell gcc --version | cut -c 1-6),2.95.3)
STDC_LIB:=-lstdc++.r4
endif
else
OS:=linux
GPERF:=/usr/bin/gperf
endif
endif
endif
ifeq ($(SYSNAME),Darwin)
OS:=osx
GPERF:=/usr/bin/gperf
else
ifeq ($(SYSNAME),BeOS)
OS:=beos
GPERF:=$(shell finddir B_USER_BIN_DIRECTORY)/gperf
else
ifeq ($(SYSNAME),Haiku)
OS:=beos
GPERF:=$(shell finddir B_SYSTEM_BIN_DIRECTORY)/gperf
STDC_LIB:=-lstdc++
ifeq ($(shell gcc --version | cut -c 1-6),2.95.3)
STDC_LIB:=-lstdc++.r4
endif
else
OS:=linux
GPERF:=/usr/bin/gperf
endif
endif
endif
endif
# change to sdl-console to build a console version on Windows
@ -92,7 +96,7 @@ linux_ARCH_LIBS:=obj/postscript_print.o
ARCH_LIBS:=$($(OS)_ARCH_LIBS)
windows_ARCH_CFLAGS:=
osx_ARCH_CFLAGS:=-isystem /opt/local/include -DHAVE_STRCASESTR -w -headerpad_max_install_names
osx_ARCH_CFLAGS:=-mmacosx-version-min=10.7 -isystem /opt/local/include -DHAVE_STRCASESTR -w -headerpad_max_install_names
beos_ARCH_CFLAGS:=
linux_ARCH_CFLAGS:=
ARCH_CFLAGS:=$($(OS)_ARCH_CFLAGS)
@ -136,11 +140,11 @@ PREFIX:=$($(OS)_PREFIX)
# macOS is set up as a bundle, with all files under 'Contents'.
# "TuxPaint-1" is the OLPC XO name. Installing to ./ is bad!
ifeq ($(OS),osx)
DESTDIR:=$(BUNDLE)/Contents/
DESTDIR:=$(BUNDLE)/Contents/
else ifeq ($(PREFIX),./)
DESTDIR:=TuxPaint-1
DESTDIR:=TuxPaint-1
else
DESTDIR:=$(PKG_ROOT)
DESTDIR:=$(PKG_ROOT)
endif
# Program:
@ -160,12 +164,11 @@ LIBDIR=$(PREFIX)
# Magic Tool plug-ins
INCLUDE_PREFIX:=$(DESTDIR)$(PREFIX)/include
MAGIC_PREFIX:=$(DESTDIR)$(LIBDIR)/lib/tuxpaint/plugins
MAGIC_PREFIX:=$(DESTDIR)$(LIBDIR)/lib$(LIBDIRSUFFIX)/tuxpaint/plugins
# Docs and man page:
DOC_PREFIX:=$(DESTDIR)$(PREFIX)/share/doc/tuxpaint
DEVDOC_PREFIX:=$(DESTDIR)$(PREFIX)/share/doc/tuxpaint-dev
DOC_PREFIX:=$(DESTDIR)$(PREFIX)/share/doc/tuxpaint-$(VER_VERSION)
DEVDOC_PREFIX:=$(DESTDIR)$(PREFIX)/share/doc/tuxpaint-$(VER_VERSION)/tuxpaint-dev
MAN_PREFIX:=$(DESTDIR)$(PREFIX)/share/man
DEVMAN_PREFIX:=$(DESTDIR)$(PREFIX)/share/man
@ -185,10 +188,10 @@ endif
# Icons and launchers:
ICON_PREFIX:=$(DESTDIR)$(PREFIX)/share/pixmaps
X11_ICON_PREFIX:=$(DESTDIR)$(PREFIX)/X11R6/include/X11/pixmaps
GNOME_PREFIX:=$(shell gnome-config --prefix 2> /dev/null)
KDE_PREFIX:=$(shell kde-config --install apps --expandvars 2> /dev/null)
KDE_ICON_PREFIX:=$(shell kde-config --install icon --expandvars 2> /dev/null)
X11_ICON_PREFIX:=$(DESTDIR)$(PREFIX)/share/pixmaps
KDE_PREFIX:=$(shell kde-config --install xdgdata-apps --expandvars 2> /dev/null)
KDE_ICON_PREFIX:=$(shell kde4-config --install icon --expandvars 2> /dev/null)
# Maemo flag
MAEMOFLAG:=
@ -458,9 +461,9 @@ trans:
######
windows_ARCH_INSTALL:=
osx_ARCH_INSTALL:=install-bundlefiles
osx_ARCH_INSTALL:=install-macbundle TuxPaint.dmg
beos_ARCH_INSTALL:=install-haiku
linux_ARCH_INSTALL:=install-gnome install-kde install-kde-icons
linux_ARCH_INSTALL:=install-kde install-kde-icons
ARCH_INSTALL:=$($(OS)_ARCH_INSTALL)
# "make install" installs all of the various parts
@ -482,7 +485,8 @@ install: install-bin install-data install-man install-doc \
@echo
@if [ "x$(OS)" == "xosx" ]; then \
echo "All done! Now you can double click $(BUNDLE) to run the"; \
echo "program!!!"; \
echo "program!!! TuxPaint.dmg has also been created for"; \
echo "distribution."; \
echo; \
echo "For more information, see $(DOC_PREFIX)/README.txt"; \
else \
@ -591,7 +595,7 @@ clean:
@-rm -f templates/.thumbs/*.png
@if [ -d templates/.thumbs ]; then rmdir templates/.thumbs; fi
@-if [ "x$(BUNDLE)" != "x" ]; then rm -rf $(BUNDLE); fi
@-rm -f TuxPaint.dmg
@-rm -f TuxPaint.dmg temp.dmg; rm -rf magic/*.dSYM
@echo
# "make uninstall" should remove the various parts from their
@ -599,15 +603,10 @@ clean:
# are the same as they were when you installed, of course!!!
.PHONY: uninstall
uninstall: uninstall-i18n
-if [ "x$(GNOME_PREFIX)" != "x" ]; then \
rm $(GNOME_PREFIX)/share/applications/tuxpaint.desktop; \
rm $(GNOME_PREFIX)/share/pixmaps/tuxpaint.png; \
else \
rm /usr/share/applications/tuxpaint.desktop; \
rm /usr/share/pixmaps/tuxpaint.png; \
fi
-rm /usr/share/applications/tuxpaint.desktop; \
-rm /usr/share/pixmaps/tuxpaint.png; \
-if [ "x$(KDE_PREFIX)" != "x" ]; then \
rm $(KDE_PREFIX)/Graphics/tuxpaint.desktop; \
rm $(KDE_PREFIX)/tuxpaint.desktop; \
fi
-rm $(ICON_PREFIX)/tuxpaint.png
-rm $(X11_ICON_PREFIX)/tuxpaint.xpm
@ -752,21 +751,6 @@ echo-install-example-templates:
install-example-templates: echo-install-example-templates install-example-template-dirs $(INSTALLED_TEMPLATES)
# Install a launcher icon in the Gnome menu
.PHONY: install-gnome
install-gnome:
@echo
@echo "...Installing launcher icon into GNOME..."
@if [ "x$(GNOME_PREFIX)" != "x" ]; then \
install -d $(DESTDIR)$(GNOME_PREFIX)/share/pixmaps; \
cp data/images/icon.png $(DESTDIR)/$(GNOME_PREFIX)/share/pixmaps/tuxpaint.png; \
chmod 644 $(DESTDIR)$(GNOME_PREFIX)/share/pixmaps/tuxpaint.png; \
install -d $(DESTDIR)$(GNOME_PREFIX)/share/applications; \
cp src/tuxpaint.desktop $(DESTDIR)$(GNOME_PREFIX)/share/applications/; \
chmod 644 $(DESTDIR)$(GNOME_PREFIX)/share/applications/tuxpaint.desktop; \
fi
# Install a launcher icon for the Nokia 770.
.PHONY: install-nokia770
install-nokia770:
@ -798,10 +782,11 @@ install-kde:
@echo
@echo "...Installing launcher icon into KDE..."
@if [ "x$(KDE_PREFIX)" != "x" ]; then \
install -d $(DESTDIR)$(KDE_PREFIX)/Graphics; \
cp src/tuxpaint.desktop $(DESTDIR)$(KDE_PREFIX)/Graphics/; \
chmod 644 $(DESTDIR)$(KDE_PREFIX)/Graphics/tuxpaint.desktop; \
install -d $(DESTDIR)$(KDE_PREFIX); \
cp src/tuxpaint.desktop $(DESTDIR)$(KDE_PREFIX)/; \
chmod 644 $(DESTDIR)$(KDE_PREFIX)/tuxpaint.desktop; \
fi
kbuildsycoca4
.PHONY: install-kde-icons
install-kde-icons:
@ -846,10 +831,8 @@ install-kde-icons:
fi
# Install the PNG icon (for GNOME, KDE, etc.)
# Install the PNG icon (for KDE desktop, etc.)
# and the 24-color 32x32 XPM (for other Window managers):
# FIXME: Should this also use $(DESTDIR)?
.PHONY: install-icon
install-icon:
@echo
@ -1014,8 +997,8 @@ install-man:
# Install the support files for macOS application bundle
.PHONY: install-bundlefiles
install-bundlefiles:
.PHONY: install-macbundle
install-macbundle:
@echo
@echo "...Installing App Bundle Support Files..."
@install -d -m 755 $(BUNDLE)/Contents/MacOS
@ -1026,7 +1009,13 @@ install-bundlefiles:
@install -m 644 macos/Info.plist $(BUNDLE)/Contents
@install -m 644 macos/tuxpaint.icns $(BUNDLE)/Contents/Resources
@custom/macos.sh
@hdiutil create -volname "Tux Paint $(VER_VERSION)" -srcfolder $(BUNDLE) -ov -format UDBZ -o TuxPaint.dmg
# Create DMG for macOS
TuxPaint.dmg:
@echo
@echo "...Creating DMG Distribution File..."
@custom/macos-mkdmg.sh
# Build the program!

24
Resources/README.txt Normal file
View file

@ -0,0 +1,24 @@
This folder exists to ease testing under macOS. Please ignore but do not
delete. More details are below.
macOS requires all files in an application have a specific folder structure.
We create this structure under the folder "TuxPaint.app" when `make install` is
run. But `make install` takes a long time to run under macOS due to the large
number of files that need to be copied, as well as all the processing we do to
those files (see custom/macos.sh for what we need to do.) This makes testing
even a small code change time consuming.
That's the problem this folder solves: Instead of creating the folder
structure under TuxPaint.app every time to test a code change to be able to run
the application, we pre-build the folder structure around the tuxpaint binary
so the binary can be executed directly without re-creating the folder structure
every time. Luckily for us, this only require that we only have a single
folder "Resources" in the root folder of the tuxpaint source code (with some
subfolders and symlinks underneath the Resources folder.)
I hope my fellow Tux Paint contributors will forgive me for taking up yet
another whole folder for use by a single platform, let alone almost empty, in
the root folder of the source code distribution meant for multiple platforms.
Mark Kim
2018.06.27

1
Resources/share/tuxpaint Symbolic link
View file

@ -0,0 +1 @@
../../data

53
custom/macos-mkdmg.sh Executable file
View file

@ -0,0 +1,53 @@
#!/bin/sh
##############################################################################
# Script to generate TuxPaint.dmg from TuxPaint.app.
#
# Generating a pretty DMG file programmatically is a bit of an art. Many
# thanks to the appdmg project for showing how:
# (https://github.com/LinusU/node-appdmg)
#
BUNDLE=TuxPaint.app
TEMP_DMG=temp.dmg
TEMP_DMG_SIZE=`expr \`du -sm "$BUNDLE" | cut -f1\` \* 15 / 10`m
FINAL_DMG=TuxPaint.dmg
VOLNAME="Tux Paint"
ICON="macos/tuxpaint.icns"
BACKGROUND="macos/background.png"
echo " * Creating the temporary image..."
hdiutil create "$TEMP_DMG" -ov -fs HFS+ -size "$TEMP_DMG_SIZE" -volname "$VOLNAME" \
&& VOLUME=`hdiutil attach "$TEMP_DMG" -nobrowse -noverify -noautoopen | grep Apple_HFS | sed 's/^.*Apple_HFS[[:blank:]]*//'` \
|| exit 1
echo " * Adding the image background..."
mkdir "$VOLUME/.background" \
&& tiffutil -cathidpicheck "$BACKGROUND" -out "$VOLUME/.background/background.tiff" \
|| exit 1
echo " * Setting the folder icon..."
cp "$ICON" "$VOLUME/.VolumeIcon.icns" \
&& xattr -wx com.apple.FinderInfo '00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' "$VOLUME" \
|| exit 1
echo " * Copying the contents..."
ln -s "/Applications" "$VOLUME" \
&& cp -a "$BUNDLE" "$VOLUME" \
&& cp -a "macos/DS_Store" "$VOLUME/.DS_Store" \
|| exit 1
echo " * Configuring the folder to open upon mount..."
bless --folder "$VOLUME" --openfolder "$VOLUME" \
|| exit 1
echo " * Unmounting the temporary image..."
hdiutil detach "$VOLUME"
echo " * Creating the final image..."
hdiutil convert "$TEMP_DMG" -ov -format "UDBZ" -imagekey "zlib-level=9" -o "$FINAL_DMG"
echo " * Deleting the temporary image..."
rm -f "$TEMP_DMG"

View file

@ -2,12 +2,12 @@ AUTHORS.txt for Tux Paint
Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2018 by Bill Kendrick and others
bill@newbreedsoftware.com
Copyright (c) 2002-2018
Various contributors (see below, and CHANGES.txt)
http://www.tuxpaint.org/
June 17, 2002 - February 24, 2018
June 17, 2002 - August 18, 2018
$Id$
@ -151,7 +151,7 @@ $Id$
DEALINGS IN THE SOFTWARE.
Pere Pujal i Carabantes <perepujal@gmail.com> for gluing all toghether
Joystick control
Ankit Choudary <ankit.goaldecided@gmail.com>, as part of GSOC 2010,
@ -350,10 +350,10 @@ $Id$
* Voice of Tux the Penguin
Daniel 'TuxthePenguin' Alston <supertuxfansite@gmail.com>
* Cartoon
* "cartoon6.wav" from http://www.grsites.com/
* Many others taken from various sources on the web.
* Edited using SOX
@ -422,7 +422,7 @@ $Id$
http://soundbible.com/417-Right-Channel-Scramble.html
Right channel scramble by Mike Koenig
Creative Commons attribution licence 3.0
* Calligraphy sound (calligraphy.ogg)
http://soundbible.com/214-Tearing-Paper.html
Tearing Paper by Mike Koenig
@ -541,7 +541,7 @@ $Id$
* Bosnian
Samir Ribić
* Breton
Korvigelloù An Drouizi (Philippe) <drouizig@drouizig.org>
@ -584,7 +584,7 @@ $Id$
* Croatian
Nedjeljko Jedvaj <jedvaj.nedeljko@lexunit.com>
Paulo Pavačić
* Czech
Peter Sterba <sterba@sterba.com>
Martin <barin@email.cz>
@ -647,14 +647,14 @@ $Id$
* Gaelic (Scottish)
Fòram na Gàidhlig
* Galician
Leandro Regueiro <leandro.regueiro@gmail.com>
Miguel Bouzada
* Georgian and Georgian TrueType Font (GPL)
Gia Shervashidze <giasher@gmail.com>
* German
Fabian Franz <FabianFranz@gmx.de>
Roland Illig <roland.illig@gmx.de>
@ -662,7 +662,7 @@ $Id$
Burkhard Lück <lueck@hube-lueck.de>
Holger Wansing
Pfannenstein Erik (website)
* Gronings
J.F.M. Lange <jfm.lange@hky.de>
@ -714,7 +714,7 @@ $Id$
Simona Riva <simona.riva@tiscali.it>
Marco Milanesi <kpanic@pavia.linux.it>
Flavio Pastor <flavio.pastore@zonaitalia.it>
* Japanese
TOYAMA Shin-ichi <shin1@wmail.plala.or.jp>
@ -757,10 +757,10 @@ $Id$
* Korean
Mark K. Kim <mkkim214@gmail.com>
* Korean Input Method
Mark K. Kim <mkkim214@gmail.com>
* Kurdish
Amed Çeko Jiyan <amedcj@gmail.com>
@ -885,12 +885,12 @@ $Id$
Silvio Faria <sirofa2003@yahoo.com.br>
Adorilson Bezerra de Araujo <adorilson@gmail.com>
Frederico Goncalves Guimaraes <frederico@teia.bio.br>
* Portuguese (Portugal)
Sergio Marques <smarquespt@gmail.com>
Ricardo Cruz <rpmcruz@clix.pt>
Helder Correia <helder.pereira.correia@gmail.com>
* Romanian
Sorin Paliga <sorin.paliga@gmail.com>
Laurentiu Buzdugan
@ -924,7 +924,7 @@ $Id$
* Serbian latin
Ivana <reci.ne.silvesteru@gmail.com>
* Shuswap (Secwepemctín)
Neskie Manuel <neskiem@gmail.com>
@ -1044,24 +1044,25 @@ $Id$
* Zapoteco
Rodrigo Perez Ramirez and Indigenas Sin Fronteras <isf_mx@yahoo.com>
* Zulu
sipho <sipho@translate.org.za>
* Ports and Packaging
* Windows 32-bit coding and builds
TOYAMA Shin-ichi <shin1@wmail.plala.or.jp>
John Popplewell <john@johnnypops.demon.co.uk>
* Tweaks to help Windows cross-compiling under Linux
Volker Grabsch <vog@notjusthosting.com>
* Mac OS X coding and builds
Mark K. Kim <mkkim214@gmail.com>
Martin Fuhrer <mfuhrer@users.sourceforge.net>
Darrell Walisser <walisser@mac.com> [retired]
Eric Poncet <http://www.linguasoft.com/>
Harvey Ginter <harveyginter@gmail.com>
Mark K. Kim <mkkim214@gmail.com>
Robert Buj Gelonch <rbuj@users.sf.net>
* Maemo (Nokia 770 and N880) coding and builds
@ -1080,6 +1081,7 @@ $Id$
Richard June <rjune@bravegnuworld.com> [backup]
* Slackware Linux packages
Tim Dickson <dickson.tim@googlemail.com>
Torsten Giebl <wizard@turricane.org>
* NetBSD packages

View file

@ -2,13 +2,13 @@ CHANGES.txt for Tux Paint
Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2017 by Bill Kendrick and others
bill@newbreedsoftware.com
Copyright (c) 2002-2018
Various contributors (see below, and AUTHORS.txt)
http://www.tuxpaint.org/
$Id$
2018.xxx.x (0.9.23)
2018.August.18 (0.9.23)
* New tools
---------
* Color selector
@ -172,17 +172,38 @@ $Id$
the wrong(lossy) way, the program will crash
(SF.net Bug #210)
* Fix text not displaying on systems without Fontconfig installed.
Mark K. Kim <mkkim214@gmail.com>
* "Hat" started could not be drawn on. Mended.
https://sourceforge.net/p/tuxpaint/bugs/202/
* Ports
-----
* Ports & Building
----------------
* Rewrote the macOS build system to be more Linux-like, with no XCode IDE.
Build for older releases of macOS / Mac OS X (10.6 and later).
Mark K. Kim <mkkim214@gmail.com>
* Mac install creates a DMG
Robert Buj Gelonch <rbuj@users.sf.net>
Mark K. Kim <mkkim214@gmail.com>
* Allow override override build date (in order to make builds reproducible)
("SOURCE_DATE_EPOCH")
by Chris Lamb, pushed by Bernhard M. Wiedemann
* Allow specifying a suffix to the "lib" directory where
magic tools are installed.
("LIBDIRSUFFIX")
Tim Dickson <dickson.tim@googlemail.com>
* Install Tux Paint docs into a version-numbered directory
(e.g., "/usr/local/share/doc/tuxpaint-0.9.23/")
Tim Dickson <dickson.tim@googlemail.com>
* Launcher icon installation location adjustments:
* .../X11R6/include/X11/pixmaps/ -> .../share/pixmaps/
* Using kde4config (vs kdeconfig); not putting things in "Graphics" subdir.
* Removed gnome-config stuff
Tim Dickson <dickson.tim@googlemail.com>
Bill Kendrick <bill@newbreedsoftware.com>
* Other Improvements:
-------------------

View file

@ -2,13 +2,10 @@
version 0.9.23
Extending Tux Paint
Copyright 2002-2016 by Bill Kendrick and others
New Breed Software
bill@newbreedsoftware.com
Copyright (c) 2002-2018 by various contributors; see AUTHORS.txt
http://www.tuxpaint.org/
June 14, 2002 - December 11, 2016
June 14, 2002 - August 28, 2018
----------------------------------------------------------------------
@ -379,8 +376,8 @@ Stamps
Tinting Options:
Depending on the contents of your stamp, you might want to have
Tux Paint use one of a numer of methods when tinting it. Add one
of the following lines to the stamp's data file:
Tux Paint use one of a number of methods when tinting it. Add
one of the following lines to the stamp's data file:
"tinter=normal" (default)
This is the normal tinting mode. (Hue range is

View file

@ -2,13 +2,10 @@
version 0.9.23
Frequently Asked Questions
Copyright 2002-2017 by Bill Kendrick and others
New Breed Software
bill@newbreedsoftware.com
Copyright (c) 2002-2018 by various contributors; see AUTHORS.txt
http://www.tuxpaint.org/
September 14, 2002 - December, 2017
September 14, 2002 - August 28, 2018
Drawing-related

View file

@ -2,11 +2,11 @@ INSTALL.txt for Tux Paint
Tux Paint - A simple drawing program for children.
Copyright 2002-2007 by Bill Kendrick and others
bill@newbreedsoftware.com
Copyright (c) 2002-2018
Various contributors (see below, and AUTHORS.txt)
http://www.tuxpaint.org/
June 27, 2002 - July 12, 2007
June 27, 2002 - August 19, 2018
$Id$
@ -17,7 +17,7 @@ Requirements:
The Windows version of Tux Paint comes pre-packaged with the
necessary pre-compiled libraries (in ".DLL" form), so no extra
downloading is needed.
libSDL
------
Tux Paint requires the Simple DirectMedia Layer Library (libSDL),
@ -55,7 +55,7 @@ Requirements:
free, LGPL'd libraries. Under Linux, just like SDL, they should
either already be installed, or are readily available for installation
as part of your Linux distribution.
libPNG
------
Tux Paint uses PNG (Portable Network Graphics) format for its
@ -127,7 +127,7 @@ Requirements:
tools.)
http://netpbm.sourceforge.net/
Compiling and Installation:
---------------------------
@ -141,25 +141,25 @@ Compiling and Installation:
----------
Tux Paint comes pre-compiled for Windows, so no compilation is
necessary.
As of February 2005 (starting with Tux Paint 0.9.15), the Makefile
includes support for building on a Windows system using MinGW/MSYS.
( http://www.mingw.org/ )
After configuring the environment and building and installing all the
dependencies, use these commands, in MSYS, to build, install and run:
Prior to version 0.9.20:
$ make win32
$ make install-win32
$ tuxpaint
$ make win32
$ make install-win32
$ tuxpaint
Version 0.9.20 and beyond:
$ make
$ make install
$ tuxpaint
$ make
$ make install
$ tuxpaint
Use the following command to build a version suitable for
redistribution with the installer or in a zip-file:
@ -176,7 +176,7 @@ Compiling and Installation:
here:
http://johnnypops.demon.co.uk/mingw/index.html
Read the relevant notes if building for Win9X/ME.
Installer:
@ -202,7 +202,7 @@ Compiling and Installation:
-----------------------------------------
To change program settings, right-click on the TuxPaint shortcut
and select 'Properties' (at the bottom).
Make sure the 'Shortcut' tab is selected in the window that
appears, and examine the 'Target:' field. You should see
something like this :
@ -211,7 +211,7 @@ Compiling and Installation:
You can now add command-line options which will be enabled when
you double-click the icon.
For example, to make the game run in fullscreen mode,
with simple shapes (no rotation option) and in French,
add the options (after 'TuxPaint.exe'), like so:
@ -219,11 +219,11 @@ Compiling and Installation:
"C:\Program Files\TuxPaint\TuxPaint.exe" -f -s --lang french
(See "README.txt" for a full list of available command-line options.)
If you make a mistake or it all disappears use Ctrl-Z to undo or
just hit the [ESC] key and the box will close with no changes made
(unless you pushed the "Apply" button!).
When you have finished, click "OK."
If Something Goes Wrong
@ -232,12 +232,12 @@ Compiling and Installation:
nothing happens, it is probably because some of these command-line
options are wrong. Open an Explorer like before, and look for a file
called 'stderr.txt' in the TuxPaint folder.
It will contain a description of what was wrong. Usually it will
just be due to incorrect character-case (capital 'Z' instead
of lowercase 'z') or a missing (or extra) '-' (dash).
Linux/Unix Users:
-----------------
Compiling:
@ -277,6 +277,11 @@ Compiling and Installation:
$ make SDL_MIXER_LIB=
Other options:
--------------
Various other options (e.g., installation paths) may be overridden;
see them in "Makefile" for further details.
If you get errors:
------------------
If you receive any errors during compile-time, make sure you have
@ -328,40 +333,40 @@ Compiling and Installation:
Other variables are:
BIN_PREFIX
Where the "tuxpaint" binary will be installed.
(Set to "$(PREFIX)/bin" by default - e.g., "/usr/local/bin")
DATA_PREFIX
Where the data files (sound, graphics, brushes, stamps, fonts)
will go, and where Tux Paint will look for them when it's run.
(Set to "$(PREFIX)/share/tuxpaint")
DOC_PREFIX
Where the documentation text files (the "docs" directory) will go.
(Set to "$(PREFIX)/share/doc/tuxpaint")
MAN_PREFIX
Where the manual page for Tux Paint will go.
(Set to "$(PREFIX)/share/man")
ICON_PREFIX $(PREFIX)/share/pixmaps
X11_ICON_PREFIX $(PREFIX)/X11R6/include/X11/pixmaps
GNOME_PREFIX $(PREFIX)/share/gnome/apps/Graphics
KDE_PREFIX $(PREFIX)/share/applnk/Graphics
Where the icons and launchers (for GNOME and KDE) will go.
LOCALE_PREFIX
Where the translation files for Tux Paint will go, and where
Tux Paint will look for them.
(Set to "$(PREFIX)/share/locale/")
(Final location of a translation file will be
under the locale's directory (e.g., "es" for Spanish),
within the "LC_MESSAGES" subdirectory.)
Where the "tuxpaint" binary will be installed.
(Set to "$(PREFIX)/bin" by default - e.g., "/usr/local/bin")
DATA_PREFIX
Where the data files (sound, graphics, brushes, stamps, fonts)
will go, and where Tux Paint will look for them when it's run.
(Set to "$(PREFIX)/share/tuxpaint")
DOC_PREFIX
Where the documentation text files (the "docs" directory) will go.
(Set to "$(PREFIX)/share/doc/tuxpaint")
MAN_PREFIX
Where the manual page for Tux Paint will go.
(Set to "$(PREFIX)/share/man")
ICON_PREFIX $(PREFIX)/share/pixmaps
X11_ICON_PREFIX $(PREFIX)/X11R6/include/X11/pixmaps
GNOME_PREFIX $(PREFIX)/share/gnome/apps/Graphics
KDE_PREFIX $(PREFIX)/share/applnk/Graphics
Where the icons and launchers (for GNOME and KDE) will go.
LOCALE_PREFIX
Where the translation files for Tux Paint will go, and where
Tux Paint will look for them.
(Set to "$(PREFIX)/share/locale/")
(Final location of a translation file will be
under the locale's directory (e.g., "es" for Spanish),
within the "LC_MESSAGES" subdirectory.)
FIXME: This list is out of date. See Makefile and Makefile-i18n for
a complete list.
Uninstalling Tux Paint:
-----------------------
Windows
@ -404,4 +409,3 @@ Uninstalling Tux Paint:
superuser mode:
# exit

View file

@ -3,13 +3,10 @@
Options Documentation
Copyright 2002-2016 by Bill Kendrick and others
New Breed Software
bill@newbreedsoftware.com
Copyright (c) 2002-2018 by various contributors; see AUTHORS.txt
http://www.tuxpaint.org/
December 11, 2016
August 28, 2018
----------------------------------------------------------------------

View file

@ -3,13 +3,10 @@
A simple drawing program for children
Copyright 2002-2017 by Bill Kendrick and others
New Breed Software & Tux4Kids
bill@newbreedsoftware.com
Copyright 2002-2018 by various contributors; see AUTHORS.txt
http://www.tuxpaint.org/
June 14, 2002 - December 3, 2017
June 14, 2002 - August 28, 2018
----------------------------------------------------------------------

View file

@ -17,13 +17,10 @@ version
<br>
Extending Tux Paint</h1>
<p>Copyright 2002-2016 by Bill Kendrick and others<br>
New Breed Software</p>
<p><a href="mailto:bill@newbreedsoftware.com">bill@newbreedsoftware.com</a><br>
<p>Copyright (c) 2002-2018 by various contributors; see AUTHORS.txt<br/>
<a href="http://www.tuxpaint.org/">http://www.tuxpaint.org/</a></p>
<p>June 14, 2002 - December 11, 2016</p>
<p>June 14, 2002 - August 28, 2018</p>
</center>
<hr size=2 noshade>
@ -495,7 +492,7 @@ effect.</p>
<h6>Tinting Options:</h6>
<blockquote>
<p>Depending on the contents of your stamp, you might want to
have Tux&nbsp;Paint use one of a numer of methods when tinting it.
have Tux&nbsp;Paint use one of a number of methods when tinting it.
Add one of the following lines to the stamp's data file:</p>
<dl>

View file

@ -16,13 +16,10 @@ version
<br>
Frequently Asked Questions</h1>
<p>Copyright 2002-2017 by Bill Kendrick and others<br>
New Breed Software</p>
<p><a href="mailto:bill@newbreedsoftware.com">bill@newbreedsoftware.com</a><br>
<p>Copyright (c) 2002-2018 by various contributors; see AUTHORS.txt<br/>
<a href="http://www.tuxpaint.org/">http://www.tuxpaint.org/</a></p>
<p>September 14, 2002 - December, 2017</p>
<p>September 14, 2002 - August 28, 2018</p>
</center>
<h2>Drawing-related</h2>

View file

@ -16,13 +16,10 @@ version
</h1>
<h2>Options Documentation</h2>
<p>Copyright 2002-2016 by Bill Kendrick and others<br>
New Breed Software</p>
<p><a href="mailto:bill@newbreedsoftware.com">bill@newbreedsoftware.com</a><br>
<p>Copyright (c) 2002-2018 by various contributors; see AUTHORS.txt<br/>
<a href="http://www.tuxpaint.org/">http://www.tuxpaint.org/</a></p>
<p>December 11, 2016</p>
<p>August 28, 2018</p>
</center>

View file

@ -17,16 +17,12 @@ version
</h1>
<h3>A simple drawing program for children</h3>
<p>Copyright 2002-2017 by Bill Kendrick and others<br>
<a href="http://www.newbreedsoftware.com/">New Breed Software &amp;
<a href="http://tux4kids.alioth.debian.org/">Tux4Kids</a></p>
<p><a href="mailto:bill@newbreedsoftware.com">bill@newbreedsoftware.com</a><br>
<p>Copyright 2002-2018 by various contributors; see AUTHORS.txt<br>
<a href="http://www.tuxpaint.org/">http://www.tuxpaint.org/</a></p>
<p>June 14, 2002 -
December 3, 2017</p>
August 28, 2018</p>
</center>

BIN
macos/DS_Store Normal file

Binary file not shown.

View file

@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>tuxpaint</string>
<key>CFBundleGetInfoString</key>
<string>0.9.23, Copyright 2009-2017, Tux Paint Development Team</string>
<string>0.9.23, Copyright 2009-2018, Tux Paint Development Team</string>
<key>CFBundleIconFile</key>
<string>tuxpaint.icns</string>
<key>CFBundleIdentifier</key>
@ -23,6 +23,6 @@
<key>CFBundleSignature</key>
<string>TXPT</string>
<key>CFBundleVersion</key>
<string>2017-11-27</string>
<string>2018-06-27</string>
</dict>
</plist>

View file

@ -7,11 +7,14 @@ Starting with 0.9.23, however, Tux Paint for macOS is built as though it were a
Linux application.
REQUIREMENTS
------------
Although Tux Paint is run without the XCode IDE, XCode itself is still required
to build Tux Paint. Download it from the App Store, and launch it once to
accept its license agreements.
PREREQUISITES
-------------
Although Tux Paint is built without the XCode IDE, XCode itself is still required
to build Tux Paint. Download it from the App Store, and launch it once to
accept its license agreements. Also install XCode command line tools using the
command:
xcode-select --install
Building Tux Paint also requires various libraries from MacPorts. Install them
to the default /opt/local path according to the instructions found on their
@ -23,7 +26,7 @@ As of this writing, the required libraries are:
cairo
fribidi
pkgconfig
lbzip2
libpaper
libpng
librsvg
@ -54,5 +57,70 @@ Simply, run:
% make install
... to create the TuxPaint.app application bundle that can be run in-place or
copied to /Applications. Zip it up for distribution.
copied to /Applications. It also creates TuxPaint.dmg for distribution.
KNOWN BUGS
----------
On macOS 10.13 High Sierra:
- The mouse cursor appears with an invert-transparent background due to an
issue with SDL1 on macOS 10.13. A patch to SDL has been issued on May 16,
2018 to fix this issue. Until this patch is officially relased and becomes a
part of the MacPorts package, SDL will need to be built from the source code
that includes the patch to display the mouse cursor correctly under macOS 10.13.
Here are more details:
Patch - https://github.com/kanjitalk755/SDL/commit/0296d5e601a5deb5ce2f540a8eafd64dd22dbe69
Source + patch - https://github.com/kanjitalk755/SDL/tree/forHighSierra
Full discussion - https://bugzilla.libsdl.org/show_bug.cgi?id=4076
BACKWARD COMPATIBILITY
----------------------
Broadly speaking, a Mac binary built on macOS 10.12 Sierra (for example) runs
only on macOS 10.12 and later. To compile a binary that can also execute on an
earlier version of macOS (say, 10.7 Lion and later), one of the following must
be done:
(A) Pass the flag -mmacosx-version-min=10.7 to the compiler.
(B) Or set the environment variable MACOSX_DEPLOYMENT_TARGET to 10.7
Tux Paint binary itself is built by doing (A) in the Makefile (by passing the
parameter to osx_ARCH_CFLAGS). However, the MacPorts libraries used by Tux
Paint are not, so Tux Paint package itself will not run on any version of macOS
earlier than the macOS on which it is built.
To build the Tux Paint package that can run on earlier versions of macOS, the
MacPorts libraries also need to be built with either #1 or #2. This is done by
configuring MacPorts to install all packages from their sources and build them
to run on macOS 10.7 and later:
1. Install the MacPorts base normally.
2. Before installing any MacPorts package, add the following settings to
/opt/local/etc/macports/macports.conf:
buildfromsource always
macosx_deployment_target 10.7
3. Install all packages normally.
... then build Tux Paint normally.
Please note building MacPorts packages from the source takes significantly
longer than installing the prebuilt packages.
If you have already installed MacPorts' prebuilt packages, it is possible to
uninstall them, add the above configuration from step #2, then install them
again from the source. The MacPorts webpage on migration explains how uninstall
packages and reinstall them after making system changes:
https://trac.macports.org/wiki/Migration
Even when Tux Paint and MacPorts are built to run on a specific version of
macOS, it is possible Tux Paint will not compile for or run on that version of
macOS. As of this writing, 10.7 is the oldest version of macOS that can be
targetted without errors when compiling the sources of MacPorts libraries
required by Tux Paint.
21st May 2018
Mark K. Kim <mkkim214@gmail.com>

BIN
macos/background.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

@ -49,6 +49,11 @@ int no_fancy_cursors = 1;
int no_fancy_cursors;
#endif
/**
* Set the current cursor shape.
*
* @param c The cursor shape to use.
*/
void do_setcursor(SDL_Cursor * c)
{
/* Shut GCC up over the fact that the XBMs are #included within cursor.h
@ -81,6 +86,11 @@ void do_setcursor(SDL_Cursor * c)
SDL_SetCursor(c);
}
/**
* Free (deallocate) a cursor.
*
* @param cursor Pointer to a cursor to free; will be set to point to NULL afterwards.
*/
void free_cursor(SDL_Cursor ** cursor)
{
if (*cursor)

View file

@ -44,9 +44,9 @@
#endif
/*
The following section renames global variables defined in SDL_Pango.h to avoid errors during linking.
It is okay to rename these variables because they are constants.
SDL_Pang.h is included by fonts.h.
The following section renames global variables defined in SDL_Pango.h to avoid errors during linking.
It is okay to rename these variables because they are constants.
SDL_Pang.h is included by fonts.h.
*/
#define _MATRIX_WHITE_BACK _MATRIX_WHITE_BACK1
#define MATRIX_WHITE_BACK MATRIX_WHITE_BACK1
@ -68,8 +68,14 @@
///////////////// directory walking callers and callbacks //////////////////
/* Directory walking callers and callbacks */
/**
* Callback to invoke when loading fonts
*
* @param screen Screen surface, for animating progress bar.
* FIXME
*/
void loadfont_callback(SDL_Surface * screen, SDL_Texture * texture, SDL_Renderer * renderer,
const char *restrict const dir, unsigned dirlen, tp_ftw_str * files, unsigned i,
const char *restrict const locale)
@ -257,15 +263,35 @@ void loadfont_callback(SDL_Surface * screen, SDL_Texture * texture, SDL_Renderer
}
// For qsort()
/**
* Callback for comparing filenames
*
* @param v1 Filename #1
* @param v2 Filename #2
* @return An integer less than, equal to, or greater than zero if the
* filename of dir entry 'v1' is found, respectively, to be less than,
* to match, or be greater than that of 'v2'.
*/
int compare_ftw_str(const void *v1, const void *v2)
{
const char *restrict const s1 = ((tp_ftw_str *) v1)->str;
const char *restrict const s2 = ((tp_ftw_str *) v2)->str;
return -strcmp(s1, s2); /* FIXME: Should we try strcasecmp, to group things together despite uppercase/lowercase in filenames (e.g., Jigsaw* vs jigsaw* Starters)??? -bjk 2009.10.11 */
return -strcmp(s1, s2);
/* FIXME: Should we try strcasecmp, to group things together despite uppercase/lowercase in filenames (e.g., Jigsaw* vs jigsaw* Starters)??? -bjk 2009.10.11 */
}
/**
* Process a directory full of files, using a callback function to
* deal with the files. (For loading fonts, brushes, and stamps)
*
* @param screen Screen surface, for updating progress bar.
* @param dir Directory to Process
* @param dirlen Size of directory to process
* @param rsrc Dealing with resources? (FIXME: better explanation)
* @param fn Callback function to invoke
* @param locale Locale, to pass to callback function when applicable (i.e., for fonts), else NULL
*/
void tp_ftw(SDL_Surface * screen, SDL_Texture * texture, SDL_Renderer * renderer, char *restrict const dir,
unsigned dirlen, int rsrc, void (*fn) (SDL_Surface * screen, SDL_Texture * texture, SDL_Renderer * renderer,
const char *restrict const dir, unsigned dirlen, tp_ftw_str * files,

View file

@ -161,29 +161,6 @@ static void reliable_read(int fd, void *buf, size_t count);
#endif
/* This doesn't actually ever get used; see load_locale_font()
-bjk 2017.10.15 */
/*
#ifndef NO_SDLPANGO
static TuxPaint_Font *try_alternate_font(int size)
{
char str[128];
char prefix[64];
char *p;
strcpy(prefix, lang_prefix);
if ((p = strrchr(prefix, '_')) != NULL)
{
*p = 0;
snprintf(str, sizeof(str), "%sfonts/locale/%s.ttf", DATA_PREFIX, prefix);
return TuxPaint_Font_OpenFont("", str, size);
}
return NULL;
}
#endif
*/
#ifdef NO_SDLPANGO
TuxPaint_Font *load_locale_font(TuxPaint_Font * fallback, int size)
{
@ -923,7 +900,7 @@ static void groupfonts(void)
qsort(user_font_families, num_font_families, sizeof user_font_families[0], compar_fontscore);
//printf("groupfonts() qsort(user_font_families 2...)\n");
//fflush(stdout);
if (user_font_families[0]->score < 0)
if (num_font_families > 0 && user_font_families[0]->score < 0)
printf("sorted the wrong way, or all fonts were unusable\n");
#if 0
// THREADED_FONTS
@ -1035,8 +1012,18 @@ static void loadfonts(SDL_Surface * screen, SDL_Texture * texture, SDL_Renderer
free(homedirdir);
#endif
#ifdef DEBUG
printf("Grouping fonts...\n");
fflush(stdout);
#endif
groupfonts();
#ifdef DEBUG
printf("Finished loading the fonts\n");
fflush(stdout);
#endif
font_thread_done = 1;
waiting_for_fonts = 0;
// FIXME: need a memory barrier here

View file

@ -30,22 +30,22 @@
#include "debug.h"
#include "compiler.h"
/* DIR_SAVE: Where is the user's saved directory?
This is where their saved files are stored
and where the "current_id.txt" file is saved.
/* DIR_SAVE: Where is the user's saved directory?
This is where their saved files are stored
and where the "current_id.txt" file is saved.
Windows predefines "savedir" as:
"C:\Documents and Settings\%USERNAME%\Application Data\TuxPaint"
though it may get overridden with "--savedir" option
Windows predefines "savedir" as:
"C:\Documents and Settings\%USERNAME%\Application Data\TuxPaint"
though it may get overridden with "--savedir" option
BeOS similarly predefines "savedir" as "./userdata"...
BeOS similarly predefines "savedir" as "./userdata"...
Macintosh: It's under ~/Library/Application Support/TuxPaint
Macintosh: It's under ~/Library/Application Support/TuxPaint
Linux & Unix: It's under ~/.tuxpaint
Linux & Unix: It's under ~/.tuxpaint
DIR_DATA: Where is the user's data directory?
This is where local fonts, brushes and stamps can be found. */
DIR_DATA: Where is the user's data directory?
This is where local fonts, brushes and stamps can be found. */
const char *savedir;
@ -57,6 +57,14 @@ const char *datadir;
// for caller-provided space, and maybe callee strdup.
// That's at most 4 functions per Tux Paint thread.
/**
* Construct a filepath, given a filename, and what kind of file
* (data file, or saved images?)
*
* @param name Filaneme
* @param kind What kind of file? (DIR_SAVE or DIR_DATA?)
* @return Full fillpath
*/
char *get_fname(const char *const name, int kind)
{
char f[512];

View file

@ -76,6 +76,10 @@ static char *android_locale()
static int langint = LANG_EN;
/* Strings representing each language's ISO 639 (-1 or -2) codes.
* Should map to the 'enum' of possible languages ("LANG_xxx")
* found in "i18n.h" (where "NUM_LANGS" is found, as the final
* entry in the 'enum' list). */
const char *lang_prefixes[NUM_LANGS] = {
"ach",
"af",
@ -209,7 +213,7 @@ const char *lang_prefixes[NUM_LANGS] = {
};
// languages which don't use the default font
/* Languages which don't use the default font */
static int lang_use_own_font[] = {
LANG_AR,
LANG_BO,
@ -227,6 +231,7 @@ static int lang_use_own_font[] = {
-1
};
/* Languages which are written right-to-left */
static int lang_use_right_to_left[] = {
LANG_AR,
LANG_FA,
@ -237,6 +242,7 @@ static int lang_use_right_to_left[] = {
-1
};
/* FIXME: */
static int lang_use_right_to_left_word[] = {
#ifdef NO_SDLPANGO
LANG_HE,
@ -244,6 +250,8 @@ static int lang_use_right_to_left_word[] = {
-1
};
/* Languages which require a vertical 'nudge' in
* text rendering, and by how much? */
static int lang_y_nudge[][2] = {
{LANG_KM, 4},
{-1, -1}
@ -258,6 +266,13 @@ const char *lang_prefix, *short_lang_prefix;
int num_wished_langs = 0;
w_langs wished_langs[255];
/* Mappings from human-readable language names (found in
* config files, or command-line arguments) to the precise
* local code to use. Some locales appear multiple times,
* (e.g. "de_DE.UTF-8" is represented by both "german"
* (the English name of the language) and "deutsch"
* (the German name of the language)).
*/
static const language_to_locale_struct language_to_locale_array[] = {
{"english", "C"},
{"american-english", "C"},
@ -446,13 +461,20 @@ static const language_to_locale_struct language_to_locale_array[] = {
{"zulu", "zu_ZA.UTF-8"}
};
/* FIXME: All this should REALLY be array-based!!! */
/* Show available languages: */
/**
* Show available languages
*
* @param exitcode Exit code; also determines whether STDERR or STDOUT used.
* (e.g., is this output of "--lang help" (STDOUT & exit 0),
* or complaint of an inappropriate "--lang" argument (STDERR & exit 1)?)
*/
static void show_lang_usage(int exitcode)
{
FILE *f = exitcode ? stderr : stdout;
const char *const prg = "tuxpaint";
/* FIXME: All this should REALLY be array-based!!! */
fprintf(f, "\n" "Usage: %s [--lang LANGUAGE]\n" "\n" "LANGUAGE may be one of:\n"
/* C */ " english american-english\n"
/* ach */ " acholi acoli\n"
@ -588,10 +610,15 @@ static void show_lang_usage(int exitcode)
}
/* FIXME: Add accented characters to the descriptions */
/* Show available locales: */
/**
* Show available locales as a "usage" output
*
* @param f File descriptor to write to (e.g., STDOUT or STDERR)
* @param prg Program name (e.g., "tuxpaint" or "tuxpaint.exe")
*/
static void show_locale_usage(FILE * f, const char *const prg)
{
/* FIXME: Add accented characters to the descriptions */
fprintf(f,
"\n"
"Usage: %s [--locale LOCALE]\n"
@ -725,13 +752,23 @@ static void show_locale_usage(FILE * f, const char *const prg)
" xh_ZA (Xhosa)\n" " zam (Zapoteco-Miahuatlan)\n" " zu_ZA (Zulu)\n" "\n", prg);
}
/**
* Return the current language
*
* @return The current language (one of the LANG_xxx enums)
*/
int get_current_language(void)
{
return langint;
}
/**
* Search an array of ints for a given int
*
* @param l The int to search for
* @param array The array of ints to search, terminated by -1
* @return 1 if "l" is found in "array", 0 otherwise
*/
static int search_int_array(int l, int *array)
{
int i;
@ -745,12 +782,16 @@ static int search_int_array(int l, int *array)
return 0;
}
// This is to ensure that iswprint() works beyond ASCII,
// even if the locale wouldn't normally support that.
/**
* Ensures that iswprint() works beyond ASCII,
* even if the locale wouldn't normally support that.
* Tries fallback locales until one works.
* Emits an error message to STDERR if none work.
*/
static void ctype_utf8(void)
{
#ifndef _WIN32
/* FIXME: should this iterate over more locales?
/* FIXME: should this iterate over more locales?
A zapotec speaker may have es_MX.UTF-8 available but not have en_US.UTF-8 for example */
const char *names[] = { "en_US.UTF8", "en_US.UTF-8", "UTF8", "UTF-8", "C.UTF-8" };
int i = sizeof(names) / sizeof(names[0]);
@ -768,7 +809,12 @@ static void ctype_utf8(void)
#endif
}
/**
* For a given language, return its local, or exit with a usage error.
*
* @param langstr Name of language (e.g., "german")
* @return Locale (e.g., "de_DE.UTF-8")
*/
static const char *language_to_locale(const char *langstr)
{
int i = sizeof language_to_locale_array / sizeof language_to_locale_array[0];
@ -785,6 +831,12 @@ static const char *language_to_locale(const char *langstr)
return NULL;
}
/**
* Set language ("langint" global) based on a given locale;
* will try a few ways of checking, is case-insensitive, etc.
*
* @param loc Locale (e.g., "pt_BR.UTF-8", "pt_BR", "pt_br", etc.)
*/
static void set_langint_from_locale_string(const char *restrict loc)
{
char *baseloc = strdup(loc);
@ -893,10 +945,10 @@ static void set_langint_from_locale_string(const char *restrict loc)
}
}
/* Last resource, we should never arrive here, this check depends
on the right order in lang_prefixes[]
Languages sharing the same starting letters must be ordered
from longest to shortest, like currently are pt_BR and pt */
/* Last resort, we should never arrive here, this check depends
on the right order in lang_prefixes[]
Languages sharing the same starting letters must be ordered
from longest to shortest, like currently are pt_BR and pt */
// if (found == 0)
// printf("Language still not found: loc= %s Trying reverse check as last resource...\n", loc);
@ -923,6 +975,14 @@ static void set_langint_from_locale_string(const char *restrict loc)
#undef HAVE_SETENV
#endif
/**
* Set an environment variable.
* (Wrapper for setenv() or putenv(), depending on OS)
*
* @param name Variable to set
* @param value Value to set the variable to
*/
static void mysetenv(const char *name, const char *value)
{
#ifdef HAVE_SETENV
@ -937,8 +997,15 @@ static void mysetenv(const char *name, const char *value)
}
/**
* Attempt to set Tux Paint's UI language.
*
* @param loc Locale
* @return The Y-nudge value for font rendering in the language.
*/
static int set_current_language(const char *restrict locale_choice) MUST_CHECK;
static int set_current_language(const char *restrict loc)
static int set_current_language(const char *restrict loc)
{
int i;
int y_nudge = 0;
@ -1112,6 +1179,17 @@ static int set_current_language(const char *restrict locale_choice) MUST_CHECK;
return wished_langs[0].lang_y_nudge;
}
/**
* Given a locale (e.g., "de_DE.UTF-8" or a language name (e.g., "german"),
* attempt to set Tux Paint's UI language. Show help, and exit,
* if asked (either 'locale' or 'lang' are "help"), or if the
* given input is not recognized.
*
* @param lang Language name (or NULL)
* @param locale Locale (or NULL)
* @return Y-nudge
*/
int setup_i18n(const char *restrict lang, const char *restrict locale)
{
#ifdef DEBUG
@ -1142,6 +1220,9 @@ int setup_i18n(const char *restrict lang, const char *restrict locale)
}
#ifdef NO_SDLPANGO
/**
* FIXME
*/
int smash_i18n(void)
{
return set_current_language("C");

View file

@ -1,3 +1,6 @@
/*
* FIXME
*/
#include <stdlib.h>
#include "macos.h"
@ -6,43 +9,50 @@
#define MACOS_GLOBAL_PREFERENCES_PATH "/Library/Application Support/TuxPaint"
/**
* FIXME
*/
const char* macos_fontsPath()
{
static char* p = NULL;
static char* p = NULL;
if(!p) {
const char* home = getenv("HOME");
if(!p) {
const char* home = getenv("HOME");
p = malloc(strlen(home) + strlen(MACOS_FONTS_PATH) + 1);
p = malloc(strlen(home) + strlen(MACOS_FONTS_PATH) + 1);
if(p) sprintf(p, MACOS_FONTS_PATH, getenv("HOME"));
else perror("macos_fontsPath");
}
if(p) sprintf(p, MACOS_FONTS_PATH, getenv("HOME"));
else perror("macos_fontsPath");
}
return p;
return p;
}
/**
* FIXME
*/
const char* macos_preferencesPath()
{
static char* p = NULL;
static char* p = NULL;
if(!p) {
const char* home = getenv("HOME");
if(!p) {
const char* home = getenv("HOME");
p = malloc(strlen(home) + strlen(MACOS_PREFERENCES_PATH) + 1);
p = malloc(strlen(home) + strlen(MACOS_PREFERENCES_PATH) + 1);
if(p) sprintf(p, MACOS_PREFERENCES_PATH, getenv("HOME"));
else perror("macos_preferencesPath");
}
if(p) sprintf(p, MACOS_PREFERENCES_PATH, getenv("HOME"));
else perror("macos_preferencesPath");
}
return p;
return p;
}
/**
* FIXME
*/
const char* macos_globalPreferencesPath()
{
return MACOS_GLOBAL_PREFERENCES_PATH;
return MACOS_GLOBAL_PREFERENCES_PATH;
}

View file

@ -1,5 +1,5 @@
.\" tuxpaint.1 - 2016.12.11
.TH TUXPAINT 1 "11 December 2016" "0.9.23" "Tux Paint"
.\" tuxpaint.1 - 2018.08.19
.TH TUXPAINT 1 "19 August 2018" "0.9.23" "Tux Paint"
.SH NAME
tuxpaint -- "Tux Paint", a drawing program for young children.

View file

@ -33,6 +33,20 @@ int mute;
int use_sound = 1;
static int old_sound[4] = { -1, -1, -1, -1 };
/**
* Play a sound.
*
* @param screen Screen surface (for dealing with panning & volume)
* @param chan Channel to play on (-1 for first free unused channel)
* @param s Which sound to play (integer index of `sounds[]` array)
* @param override 1 to override an already-playing sound, 0 otherwise
* @param x X coordinate within the screen surface, for left/right panning
* effect; or SNDPOS_LEFT, SNDPOS_CENTER, or SNDPOS_RIGHT for
* far left, center, or far right panning, respectively.
* @param y Y coordinate within the screen surface, for volume control
* (low values, near the top of the window, are quieter), or
* SNDDIST_NEAR for full volume
*/
void playsound(SDL_Surface * screen, int chan, int s, int override, int x, int y)
{
#ifndef NOSOUND
@ -40,6 +54,10 @@ void playsound(SDL_Surface * screen, int chan, int s, int override, int x, int y
if (!mute && use_sound && s != SND_NONE)
{
#ifdef DEBUG
printf("playsound #%d in channel %d, pos (%d,%d), %soverride, ptr=%p\n", s, chan, x, y, override ? "" : "no ", sounds[s]);
fflush(stdout);
#endif
if (override || !Mix_Playing(chan))
{
Mix_PlayChannel(chan, sounds[s], 0);
@ -77,8 +95,10 @@ void playsound(SDL_Surface * screen, int chan, int s, int override, int x, int y
left = ((255 - dist) * ((screen->w - 1) - x)) / (screen->w - 1);
}
#ifdef DEBUG
printf("Panning of sound #%d in channel %d, left=%d, right=%d\n", s, chan, left, (255-dist)-left);
fflush(stdout);
#endif
Mix_SetPanning(chan, left, (255 - dist) - left);
}
}

View file

@ -11,7 +11,7 @@ msgstr ""
"Project-Id-Version: eu\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-29 15:48+0200\n"
"PO-Revision-Date: 2018-01-20 18:19+0100\n"
"PO-Revision-Date: 2018-08-09 11:17+0200\n"
"Last-Translator: Alexander Gabilondo <alexgabi@irakasle.net>\n"
"Language-Team: librezale@librezale.org\n"
"Language: eu\n"
@ -19,7 +19,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.0.4\n"
"X-Generator: Poedit 2.0.6\n"
#. Response to Black (0, 0, 0) color selected
#: ../colors.h:86
@ -150,10 +150,8 @@ msgstr ",.?!"
#. uncommon punctuation (e.g., '@', '#', '*', etc.)
#: ../dirwalk.c:201
#, fuzzy
#| msgid "`\\%_@$~#{<(^&*"
msgid "`%_@$~#{<(^&*"
msgstr "`\\%_@$~#{}<>^&*"
msgstr "`%_@$~#{}<>^&*"
#. digits (e.g., '0', '1' and '7')
#: ../dirwalk.c:204
@ -302,7 +300,7 @@ msgstr "Zirkuluaren puntu guztiek distatzia berdina daukate erdiraino."
#. Description of an ellipse
#: ../shapes.h:304 ../shapes.h:305
msgid "An ellipse is a stretched circle."
msgstr "Elipsea zirkulu zapaldua da"
msgstr "Elipsea zirkulu zapaldua da."
#. Description of a triangle
#: ../shapes.h:308 ../shapes.h:309
@ -318,7 +316,7 @@ msgstr "Pentagonoak bost alde ditu."
msgid "A rhombus has four equal sides, and opposite sides are parallel."
msgstr ""
"Erronboaren lau aldeak berdinak dira, eta aurrez aurre daudenak paraleloak "
"dira"
"dira."
#: ../shapes.h:323 ../shapes.h:325
msgid "An octagon has eight equal sides."
@ -640,7 +638,7 @@ msgstr "Bai, ezabatu!"
#: ../tuxpaint.c:2103
msgid "No, dont erase it!"
msgstr "Ez, ez ezabatu"
msgstr "Ez, ez ezabatu!"
#. Reminder that Mouse Button 1 is the button to use in Tux Paint
#: ../tuxpaint.c:2106
@ -650,12 +648,12 @@ msgstr "Gogora ezazu saguaren ezkerreko botoia erabiltzea!"
#. Sound has been muted (silenced) via keyboard shortcut
#: ../tuxpaint.c:2314
msgid "Sound muted."
msgstr "Soinurik gabe"
msgstr "Soinurik gabe."
#. Sound has been unmuted (unsilenced) via keyboard shortcut
#: ../tuxpaint.c:2319
msgid "Sound unmuted."
msgstr "Soinua gaituta"
msgstr "Soinua gaituta."
#. Wait while Text tool finishes loading fonts
#: ../tuxpaint.c:3072
@ -717,26 +715,27 @@ msgstr "Bai, zaharra ordeztu!"
#. (like a 'File:Save As...' action in other applications)
#: ../tuxpaint.c:12803
msgid "No, save a new file!"
msgstr "Ez, artxibo berria gorde"
msgstr "Ez, artxibo berria gorde!"
#: ../tuxpaint.c:14048
msgid "Choose the picture you want, then click “Open”."
msgstr ""
"Aukera ezazu ireki nahi duzun irudia. Ondoren klik egin Ireki botoian"
"Aukera ezazu ireki nahi duzun irudia. Ondoren klik egin “Ireki“ botoian."
#. Let user choose images:
#. Instructions for Slideshow file dialog (FIXME: Make a #define)
#: ../tuxpaint.c:15079 ../tuxpaint.c:15407
msgid "Choose the pictures you want, then click “Play”."
msgstr "Aukera ezazu ireki nahi duzun irudia. Ondoren klik egin Hasi botoian"
msgid "Choose the pictures you want, then click “Play“."
msgstr ""
"Aukera ezazu ireki nahi duzun irudia. Ondoren klik egin “Hasi“ botoian."
#: ../tuxpaint.c:22873
msgid "Select a color from your drawing."
msgstr "Hautatu zure marrazkiaren kolore bat"
msgstr "Hautatu zure marrazkiaren kolore bat."
#: ../tuxpaint.c:22885
msgid "Pick a color."
msgstr "Hautatu kolore bat"
msgstr "Hautatu kolore bat."
#: ../tuxpaint.desktop.in.h:1
msgid "Tux Paint"
@ -748,7 +747,7 @@ msgstr "Marrazketa programa"
#: ../tuxpaint.desktop.in.h:3
msgid "A drawing program for children."
msgstr "Umeentzako marrazketa programa"
msgstr "Umeentzako marrazketa programa."
#: ../../magic/src/alien.c:64
msgid "Color Shift"
@ -761,7 +760,7 @@ msgstr ""
#: ../../magic/src/alien.c:68
msgid "Click to change the colors in your entire picture."
msgstr "Klik egin irudi osoaren koloreak aldatzeko"
msgstr "Klik egin irudi osoaren koloreak aldatzeko."
#: ../../magic/src/blind.c:117
msgid "Blind"
@ -788,15 +787,10 @@ msgid "Drip"
msgstr "Busti"
#: ../../magic/src/blocks_chalk_drip.c:150
#, fuzzy
#| msgid "Click and move the mouse around to make the picture blocky."
msgid "Click and drag the mouse around to make the picture blocky."
msgstr "Klik egin eta mugi ezazu sagua irudia laukitxotan marrazteko."
msgstr "Klik egin eta mugi ezazu sagua irudia pixalizatzeko."
#: ../../magic/src/blocks_chalk_drip.c:153
#, fuzzy
#| msgid ""
#| "Click and move the mouse around to turn the picture into a chalk drawing."
msgid ""
"Click and drag the mouse around to turn the picture into a chalk drawing."
msgstr ""
@ -812,14 +806,12 @@ msgid "Blur"
msgstr "Desenfokatu"
#: ../../magic/src/blur.c:83
#, fuzzy
#| msgid "Click and move the mouse around to blur the image."
msgid "Click and drag the mouse around to blur the image."
msgstr "Klik egin eta mugi ezazu sagua irudia desenfokatzeko."
msgstr "Klik egin eta mugi ezazu sagua irudia desfokuratzeko."
#: ../../magic/src/blur.c:84
msgid "Click to blur the entire image."
msgstr "Klik egin irudi osoa desenfokatzeko"
msgstr "Klik egin irudi osoa desfokuratzeko."
#. Both are named "Bricks", at the moment:
#: ../../magic/src/bricks.c:124
@ -827,14 +819,10 @@ msgid "Bricks"
msgstr "Adreiluak"
#: ../../magic/src/bricks.c:131
#, fuzzy
#| msgid "Click and move to draw large bricks."
msgid "Click and drag to draw large bricks."
msgstr "Egin klik eta mugitu adreilu handiak marrazteko."
#: ../../magic/src/bricks.c:133
#, fuzzy
#| msgid "Click and move to draw small bricks."
msgid "Click and drag to draw small bricks."
msgstr "Egin klik eta mugitu adreilu txikiak marrazteko."
@ -843,8 +831,6 @@ msgid "Calligraphy"
msgstr "Kaligrafia"
#: ../../magic/src/calligraphy.c:134
#, fuzzy
#| msgid "Click and move the mouse around to draw in calligraphy."
msgid "Click and drag the mouse around to draw in calligraphy."
msgstr "Klik egin eta mugitu sagua kaligrafia eran marrazteko."
@ -853,10 +839,8 @@ msgid "Cartoon"
msgstr "Bineta"
#: ../../magic/src/cartoon.c:113
#, fuzzy
#| msgid "Click and move the mouse around to turn the picture into a cartoon."
msgid "Click and drag the mouse around to turn the picture into a cartoon."
msgstr "Klik egin eta mugi ezazu sagua irudia bineta bihurtzeko."
msgstr "Klik egin eta mugi ezazu sagua irudia komikia bihurtzeko."
#: ../../magic/src/confetti.c:85
msgid "Confetti"
@ -880,7 +864,7 @@ msgstr "Bozelketa"
#: ../../magic/src/emboss.c:109
msgid "Click and drag the mouse to emboss the picture."
msgstr "Klik egin eta mugitu sagua irudia bozeltzeko"
msgstr "Klik egin eta mugitu sagua irudia bozeltzeko."
#: ../../magic/src/fade_darken.c:121
msgid "Lighten"
@ -896,7 +880,7 @@ msgstr "Klik egin eta mugi ezazu sagua irudiaren parte batzuk argitzeko."
#: ../../magic/src/fade_darken.c:136
msgid "Click to lighten your entire picture."
msgstr "Klik egin irudi osoa argitzeko"
msgstr "Klik egin irudi osoa argitzeko."
#: ../../magic/src/fade_darken.c:141
msgid "Click and drag the mouse to darken parts of your picture."
@ -930,8 +914,8 @@ msgstr "Lorea"
#: ../../magic/src/flower.c:156
msgid "Click and drag to draw a flower stalk. Let go to finish the flower."
msgstr ""
"Klik egin eta arrastatu lore zuirton bat marrazteko. Jarraitu lorea amaitu "
"arte"
"Klik egin eta arrastatu lore zurtoin bat marrazteko. Jarraitu lorea amaitu "
"arte."
#: ../../magic/src/foam.c:121
msgid "Foam"
@ -950,7 +934,7 @@ msgstr "Tolestu"
msgid ""
"Choose a background color and click to turn the corner of the page over."
msgstr ""
"Hautatu atzeko-planoaren kolorea eta klik egin orrialdearen txokoa tolesteko"
"Hautatu atzeko-planoaren kolorea eta klik egin orrialdearen txokoa tolesteko."
#: ../../magic/src/fretwork.c:176
msgid "Fretwork"
@ -958,7 +942,7 @@ msgstr "Sareta"
#: ../../magic/src/fretwork.c:180
msgid "Click and drag to draw repetitive patterns. "
msgstr "Klik egin eta arrastatu sare artistiko korapilatsua marrazteko."
msgstr "Klik egin eta arrastatu ereduak errepikatzeko."
#: ../../magic/src/fretwork.c:182
msgid "Click to surround your picture with repetitive patterns."
@ -983,10 +967,8 @@ msgid "Grass"
msgstr "Belarra"
#: ../../magic/src/grass.c:118
#, fuzzy
#| msgid "Click and move to draw grass. Dont forget the dirt!"
msgid "Click and drag to draw grass. Dont forget the dirt!"
msgstr "Egin klik eta mugi ezazu belarra marrazteko. Ez ahaztu lokatza!"
msgstr "Egin klik eta mugi ezazu belarra marrazteko. Ez ahaztu lokatza!"
#: ../../magic/src/halftone.c:34
msgid "Halftone"
@ -1038,16 +1020,12 @@ msgid "Click and drag the mouse to draw a pattern across the picture."
msgstr "Klik egin eta mugitu sagua diseinua marrazteko irudian zehar."
#: ../../magic/src/kalidescope.c:142
#, fuzzy
#| msgid ""
#| "Click and drag the mouse to draw a pattern plus its symmetric across the "
#| "picture."
msgid ""
"Click and drag the mouse to draw a pattern that is symmetric across the "
"picture."
msgstr ""
"Klikatu eta arrastatu sagua beste diseinu bat marrazteko. Simetrikoa izango "
"da irudian zehar."
"Klikatu eta arrastatu sagua beste eredu bat marrazteko. Simetrikoa izango da "
"irudian zehar."
#. KAL_BOTH
#: ../../magic/src/kalidescope.c:144
@ -1082,20 +1060,17 @@ msgstr "Irauli"
#: ../../magic/src/mirror_flip.c:130
msgid "Click to make a mirror image."
msgstr "Egin klik irudiaren isla sortzeko!"
msgstr "Egin klik irudiaren isla sortzeko."
#: ../../magic/src/mirror_flip.c:133
msgid "Click to flip the picture upside-down."
msgstr "Klik egin eta irudia goitik-behera irauliko da!"
msgstr "Klik egin eta irudia goitik-behera irauliko da."
#: ../../magic/src/mosaic.c:100
msgid "Mosaic"
msgstr "Mosaikoa"
#: ../../magic/src/mosaic.c:103
#, fuzzy
#| msgid ""
#| "Click and move the mouse to add a mosaic effect to parts of your picture."
msgid ""
"Click and drag the mouse to add a mosaic effect to parts of your picture."
msgstr ""
@ -1119,9 +1094,6 @@ msgid "Irregular Mosaic"
msgstr "Mosaiko irregularra"
#: ../../magic/src/mosaic_shaped.c:148
#, fuzzy
#| msgid ""
#| "Click and move the mouse to add a square mosaic to parts of your picture."
msgid ""
"Click and drag the mouse to add a square mosaic to parts of your picture."
msgstr ""
@ -1133,10 +1105,6 @@ msgid "Click to add a square mosaic to your entire picture."
msgstr "Egin klik irudi osoari mosaiko efektua emateko."
#: ../../magic/src/mosaic_shaped.c:153
#, fuzzy
#| msgid ""
#| "Click and move the mouse to add a hexagonal mosaic to parts of your "
#| "picture."
msgid ""
"Click and drag the mouse to add a hexagonal mosaic to parts of your picture."
msgstr ""
@ -1148,10 +1116,6 @@ msgid "Click to add a hexagonal mosaic to your entire picture."
msgstr "Egin klik irudi osoari mosaiko hexagonal efektua emateko."
#: ../../magic/src/mosaic_shaped.c:158
#, fuzzy
#| msgid ""
#| "Click and move the mouse to add an irregular mosaic to parts of your "
#| "picture."
msgid ""
"Click and drag the mouse to add an irregular mosaic to parts of your picture."
msgstr ""
@ -1167,8 +1131,6 @@ msgid "Negative"
msgstr "Negatiboa"
#: ../../magic/src/negative.c:106
#, fuzzy
#| msgid "Click and move the mouse around to make your painting negative."
msgid "Click and drag the mouse around to make your painting negative."
msgstr "Klik egin eta mugi ezazu sagua irudiaren negatiboa marrazteko."
@ -1181,8 +1143,6 @@ msgid "Noise"
msgstr "Zarata"
#: ../../magic/src/noise.c:66
#, fuzzy
#| msgid "Click and move the mouse to add noise to parts of your picture."
msgid "Click and drag the mouse to add noise to parts of your picture."
msgstr ""
"Klik egin eta mugi ezazu sagua irudiaren parte batzuei zarata gehitzeko."
@ -1217,7 +1177,7 @@ msgstr "Klik egin irudiaren parte batean puzzle efektua sortzeko."
#: ../../magic/src/puzzle.c:113
msgid "Click to make a puzzle in fullscreen mode."
msgstr "Egin klik puzzle efektua pantaila osoan sortzeko!"
msgstr "Egin klik puzzle efektua pantaila osoan sortzeko."
#: ../../magic/src/rails.c:131
msgid "Rails"
@ -1225,7 +1185,7 @@ msgstr "Trenbidea"
#: ../../magic/src/rails.c:133
msgid "Click and drag to draw train track rails on your picture."
msgstr "Klik egin eta mugitu irudiaren gainean trenbidea marrazteko"
msgstr "Klik egin eta mugitu irudiaren gainean trenbidea marrazteko."
#: ../../magic/src/rainbow.c:139
msgid "Rainbow"
@ -1241,7 +1201,7 @@ msgstr "Euria"
#: ../../magic/src/rain.c:68
msgid "Click to place a rain drop onto your picture."
msgstr "Egin klik irudiaren gainean euri tanta bat kokatzeko"
msgstr "Egin klik irudiaren gainean euri tanta bat kokatzeko."
#: ../../magic/src/rain.c:69
msgid "Click to cover your picture with rain drops."
@ -1300,19 +1260,15 @@ msgid "Silhouette"
msgstr "Silueta"
#: ../../magic/src/sharpen.c:78
#, fuzzy
#| msgid "Click and move the mouse to trace edges in parts of your picture."
msgid "Click and drag the mouse to trace edges in parts of your picture."
msgstr ""
"Klik egin eta mugitu sagua irudiaren eremu batzuetan ertzak marrazteko."
#: ../../magic/src/sharpen.c:79
msgid "Click to trace edges in your entire picture."
msgstr "Klik egin irudi osoan ertzak marrazteko"
msgstr "Klik egin irudi osoan ertzak marrazteko."
#: ../../magic/src/sharpen.c:80
#, fuzzy
#| msgid "Click and move the mouse to sharpen parts of your picture."
msgid "Click and drag the mouse to sharpen parts of your picture."
msgstr "Klik egin eta mugitu sagua irudiaren eremu batzuk zorrozteko."
@ -1321,8 +1277,6 @@ msgid "Click to sharpen the entire picture."
msgstr "Egin klik irudi osoa zorrozteko."
#: ../../magic/src/sharpen.c:82
#, fuzzy
#| msgid "Click and move the mouse to create a black and white silhouette."
msgid "Click and drag the mouse to create a black and white silhouette."
msgstr "Klik egin eta mugitu sagua zuri eta beltzeko silueta sortzeko."
@ -1348,15 +1302,11 @@ msgid "Wet Paint"
msgstr "Pintura bustia"
#: ../../magic/src/smudge.c:115
#, fuzzy
#| msgid "Click and move the mouse around to smudge the picture."
msgid "Click and drag the mouse around to smudge the picture."
msgstr "Klik egin eta mugi ezazu sagua irudia zirriborratzeko."
#. if (which == 1)
#: ../../magic/src/smudge.c:117
#, fuzzy
#| msgid "Click and move the mouse around to draw with wet, smudgy paint."
msgid "Click and drag the mouse around to draw with wet, smudgy paint."
msgstr "Klik egin eta mugi ezazu sagua pintura bustiaz zirriborratzeko."
@ -1423,10 +1373,6 @@ msgid "Click to change the color of your entire picture."
msgstr "Klik egin irudi osoaren kolorea aldatzeko."
#: ../../magic/src/tint.c:77
#, fuzzy
#| msgid ""
#| "Click and move the mouse around to turn parts of your picture into white "
#| "and a color you choose."
msgid ""
"Click and drag the mouse around to turn parts of your picture into white and "
"a color you choose."
@ -1504,8 +1450,8 @@ msgstr "Xor koloreak"
#: ../../magic/src/xor.c:101
msgid "Click and drag to draw a XOR effect"
msgstr "Klik egin eta arrastatu XOR efektua marrazteko."
msgstr "Klik egin eta arrastatu XOR efektua marrazteko"
#: ../../magic/src/xor.c:103
msgid "Click to draw a XOR effect on the whole picture"
msgstr "Egizu klik XOR efektua irudi osoan marrazteko."
msgstr "Egizu klik XOR efektua irudi osoan marrazteko"

View file

@ -26,12 +26,12 @@ msgstr "Dubh!"
#. Response to Dark grey (128, 128, 128) color selected
#: ../colors.h:89
msgid "Dark grey! Some people spell it “dark gray”."
msgstr "Dorch-liath! No \"dorch-ghlas\"."
msgstr "Dorch-liath! No “dorch-ghlas”."
#. Response to Light grey (192, 192, 192) color selected
#: ../colors.h:92
msgid "Light grey! Some people spell it “light gray”."
msgstr "Soilleir-liath! No \"soilleir-ghlas\"."
msgstr "Soilleir-liath! No “soilleir-ghlas”."
#. Response to White (255, 255, 255) color selected
#: ../colors.h:95
@ -283,8 +283,7 @@ msgstr "Rionnag"
#. Description of a square
#: ../shapes.h:290 ../shapes.h:291
msgid "A square is a rectangle with four equal sides."
msgstr ""
"S e ceart-chearnach le ceithir taobhan co-ionnan a th anns a cheàrnag."
msgstr "S e ceart-cheàrnach le ceithir taobhan co-ionnan a th anns a cheàrnag."
#. Description of a rectangle
#: ../shapes.h:294 ../shapes.h:295
@ -294,9 +293,7 @@ msgstr "Tha ceithir taobhan is ceithir ceàrnan cearta aig ceàrnag."
#: ../shapes.h:299 ../shapes.h:301
msgid ""
"A circle is a curve where all points have the same distance from the center."
msgstr ""
"S e lùb a th anns a chearcall far a bheil an aon astar on mheadhan aig "
"gach puing."
msgstr "S e lùb a th anns a chearcall far a bheil an aon astar on mheadhan aig gach puing."
#. Description of an ellipse
#: ../shapes.h:304 ../shapes.h:305
@ -315,13 +312,11 @@ msgstr "Tha còig taobhan aig còig-cheàrnach."
#: ../shapes.h:317 ../shapes.h:319
msgid "A rhombus has four equal sides, and opposite sides are parallel."
msgstr ""
"Tha ceithir taobhan dhen aon fhaide aig rombas, is tha na taobhan mu "
"choinneamh co-shìnte."
msgstr "Tha ceithir taobhan dhen aon fhaide aig rombas, is tha na taobhan mu choinneamh co-shìnte."
#: ../shapes.h:323 ../shapes.h:325
msgid "An octagon has eight equal sides."
msgstr "Tha ochd taobhan de dh'fhaid co-ionnann aig ochd-cheàrnach."
msgstr "Tha ochd taobhan de dhfhaid co-ionnann aig ochd-cheàrnach."
#: ../shapes.h:327 ../shapes.h:328
msgid "A star with 3 points."
@ -457,30 +452,21 @@ msgstr "Tagh dealbh gus stampadh mu thimcheall an deilbh agad."
#. Line tool instructions
#: ../tools.h:121
msgid "Click to start drawing a line. Let go to complete it."
msgstr ""
"Briog gus tòiseachadh air loidhne a pheantadh. Leig às gus crìoch a chur "
"oirre."
msgstr "Briog gus tòiseachadh air loidhne a pheantadh. Leig às gus crìoch a chur oirre."
#. Shape tool instructions
#: ../tools.h:124
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."
msgstr ""
"Tagh cumadh. Briog gus am meadhan a thaghadh, slaod, is leig às nuair a "
"bhios am meud air a thogras tu. Gluais mu thimcheall gus car a chur air, is "
"briog nuair a bhios tu deiseil."
msgstr "Tagh cumadh. Briog gus am meadhan a thaghadh, slaod, is leig às nuair a bhios am meud air a thogras tu. Gluais mu thimcheall gus car a chur air, is briog nuair a bhios tu deiseil."
#. Text tool instructions
#: ../tools.h:127
msgid ""
"Choose a style of text. Click on your drawing and you can start typing. "
"Press [Enter] or [Tab] to complete the text."
msgstr ""
"Tagh seòrsa de theacsa. Briog air an dealbh agad gus tòiseachadh air "
"sgrìobhadh. Brùth air [Enter] no [Taba] nuair a bhios tu deiseil. Gus "
"fuaimreag le stràc fhaighinn (à è ì ò ù), brùth an iuchair san oisean clì "
"air a' bharr an toiseach agus A, E, I, O no U an uairsin."
msgstr "Tagh seòrsa de theacsa. Briog air an dealbh agad gus tòiseachadh air sgrìobhadh. Brùth air [Enter] no [Taba] nuair a bhios tu deiseil. Gus fuaimreag le stràc fhaighinn (à è ì ò ù), brùth an iuchair san oisean clì air a bharr an toiseach agus A, E, I, O no U an uairsin."
#. Label tool instructions
#: ../tools.h:130
@ -489,11 +475,7 @@ msgid ""
"Press [Enter] or [Tab] to complete the text. By using the selector button "
"and clicking an existing label, you can move it, edit it and change its text "
"style."
msgstr ""
"Tagh seòrsa de theacsa. Briog air an dealbh agad agus sgrìobh. Brùth air "
"[Enter] no [Taba] nuair a bhios tu deiseil. Ma chleachdas tu am putain-"
"taghaidh is ma bhriogas tu air leubail a tha ann mar-thà, s urrainn dhut a "
"ghluasad, a dheasachadh is stoidhle an teacsa atharrachadh."
msgstr "Tagh seòrsa de theacsa. Briog air an dealbh agad agus sgrìobh. Brùth air [Enter] no [Taba] nuair a bhios tu deiseil. Ma chleachdas tu am putan-taghaidh is ma bhriogas tu air leubail a tha ann mar-thà, s urrainn dhut a ghluasad, a dheasachadh is stoidhle an teacsa atharrachadh."
#. Magic tool instruction
#: ../tools.h:136
@ -533,7 +515,7 @@ msgstr "Chaidh an dealbh agad a shàbhaladh!"
#. Response to 'print' action (while printing, or print dialog is being used)
#: ../tools.h:157
msgid "Printing…"
msgstr "'Ga chlò-bhualadh…"
msgstr "Ga chlò-bhualadh…"
#. Response to 'quit' (exit) action
#: ../tools.h:160
@ -548,17 +530,17 @@ msgstr "Leig às dhan phutan gus crìoch a chur air an loidhne."
#. Instruction while using Shape tool (after first click, before release)
#: ../tools.h:167
msgid "Hold the button to stretch the shape."
msgstr "Fuirich air a' phutan gus an cumadh a shìneadh."
msgstr "Fuirich air a phutan gus an cumadh a shìneadh."
#. Instruction while finishing Shape tool (after release, during rotation step before second click)
#: ../tools.h:170
msgid "Move the mouse to rotate the shape. Click to draw it."
msgstr "Gluais an luchag gus car a chur air a' chumadh. Briog gus a pheantadh."
msgstr "Gluais an luchag gus car a chur air a chumadh. Briog gus a pheantadh."
#. Notification that 'New' action was aborted (current image would have been lost)
#: ../tools.h:173
msgid "OK then… Lets keep drawing this one!"
msgstr "Ceart ma-thà… Cumaidh sinn oirnn a' peantadh an fhir seo!"
msgstr "Ceart ma-thà… Cumaidh sinn oirnn a peantadh an fhir seo!"
#. Prompt to confirm user wishes to quit
#: ../tuxpaint.c:2054
@ -578,7 +560,7 @@ msgstr "Cha bu mhiann, thoir air ais mi!"
#. Current picture is not saved; user is quitting
#: ../tuxpaint.c:2064
msgid "If you quit, youll lose your picture! Save it?"
msgstr "Ma dh'fhàgas tu an seo, caillidh tu an dealbh agad! An sàbhail sinn e?"
msgstr "Ma dhfhàgas tu an seo, caillidh tu an dealbh agad! An sàbhail sinn e?"
#: ../tuxpaint.c:2065 ../tuxpaint.c:2070
msgid "Yes, save it!"
@ -626,7 +608,7 @@ msgstr "Chlò-bhuail mi an dealbh agad!"
#. We got an error printing
#: ../tuxpaint.c:2094
msgid "Sorry! Your picture could not be printed!"
msgstr "Tha mi duilich! Cha b' urrainn dhomh an dealbh agad a chlò-bhualadh!"
msgstr "Tha mi duilich! Cha b urrainn dhomh an dealbh agad a chlò-bhualadh!"
#. Notification that it's too soon to print again (--printdelay option is in effect)
#: ../tuxpaint.c:2097
@ -659,7 +641,7 @@ msgstr "Fuaim air a mùchadh."
#. Sound has been unmuted (unsilenced) via keyboard shortcut
#: ../tuxpaint.c:2319
msgid "Sound unmuted."
msgstr "Fuaim air a neo-mhùchadh."
msgstr "Fuaim air a dhì-mhùchadh."
#. Wait while Text tool finishes loading fonts
#: ../tuxpaint.c:3072
@ -715,7 +697,7 @@ msgstr "An cuir mi na h-atharraichean agad an àite an deilbh?"
#. (like a 'File:Save' action in other applications)
#: ../tuxpaint.c:12799
msgid "Yes, replace the old one!"
msgstr "Cuiridh, cuir an aite an t-seann fhir e!"
msgstr "Cuiridh, cuir an àite an t-seann fhir e!"
#. Negative response to saving over old version (saves a new image)
#. (like a 'File:Save As...' action in other applications)
@ -725,13 +707,13 @@ msgstr "Cha chuir, sàbhail ann am faidhle ùr e!"
#: ../tuxpaint.c:14048
msgid "Choose the picture you want, then click “Open”."
msgstr "Tagh an dealbh a tha thu ag iarraidh is briog air \"Fosgail\"."
msgstr "Tagh an dealbh a tha thu ag iarraidh is briog air “Fosgail”."
#. Let user choose images:
#. Instructions for Slideshow file dialog (FIXME: Make a #define)
#: ../tuxpaint.c:15079 ../tuxpaint.c:15407
msgid "Choose the pictures you want, then click “Play”."
msgstr "Tagh na dealbhan a tha thu ag iarraidh is briog air \"Cluich\"."
msgstr "Tagh na dealbhan a tha thu ag iarraidh is briog air “Cluich”."
#: ../tuxpaint.c:22873
msgid "Select a color from your drawing."
@ -751,7 +733,7 @@ msgstr "Prògram peantaidh"
#: ../tuxpaint.desktop.in.h:3
msgid "A drawing program for children."
msgstr "Prògram peantaidh do chloinn."
msgstr "Prògram peantaidh don chloinn."
#: ../../magic/src/alien.c:64
msgid "Color Shift"
@ -759,9 +741,7 @@ msgstr "Mùthadh datha"
#: ../../magic/src/alien.c:67
msgid "Click and drag the mouse to change the colors in parts of your picture."
msgstr ""
"Briog is slaod an luchag gus car a chur air na dathan ann am pàirt dhen "
"dealbh agad."
msgstr "Briog is slaod an luchag gus car a chur air na dathan ann am pàirt dhen dealbh agad."
#: ../../magic/src/alien.c:68
msgid "Click to change the colors in your entire picture."
@ -775,9 +755,7 @@ msgstr "Sgàil"
msgid ""
"Click towards the edge of your picture to pull window blinds over it. Move "
"perpendicularly to open or close the blinds."
msgstr ""
"Briog faisg air oir an deilbh agad gus sgàilean-uinneig a shlaodadh thairis. "
"Gluais gu dìreach gus an sgàilean fhosgladh is a dhùnadh."
msgstr "Briog faisg air oir an deilbh agad gus sgàilean-uinneig a shlaodadh thairis. Gluais gu dìreach gus an sgàilean fhosgladh is a dhùnadh."
#: ../../magic/src/blocks_chalk_drip.c:136
msgid "Blocks"
@ -793,21 +771,16 @@ msgstr "Sil"
#: ../../magic/src/blocks_chalk_drip.c:150
msgid "Click and drag the mouse around to make the picture blocky."
msgstr ""
"Briog is slaod an luchag mu thimcheall gus an tèid an dealbh 'na "
"bhlocaichean."
msgstr "Briog is slaod an luchag mu thimcheall gus an tèid an dealbh na bhlocaichean."
#: ../../magic/src/blocks_chalk_drip.c:153
msgid ""
"Click and drag the mouse around to turn the picture into a chalk drawing."
msgstr ""
"Briog is slaod an luchag mu thimcheall gus an tèid an dealbh 'na dhealbh "
"cailce."
msgstr "Briog is slaod an luchag mu thimcheall gus an tèid an dealbh na dhealbh cailce."
#: ../../magic/src/blocks_chalk_drip.c:156
msgid "Click and drag the mouse around to make the picture drip."
msgstr ""
"Briog is slaod an luchag mu thimcheall gus sileadh a thoirt air an dealbh."
msgstr "Briog is slaod an luchag mu thimcheall gus sileadh a thoirt air an dealbh."
#: ../../magic/src/blur.c:80
msgid "Blur"
@ -828,15 +801,11 @@ msgstr "Breigichean"
#: ../../magic/src/bricks.c:131
msgid "Click and drag to draw large bricks."
msgstr ""
"Briog is slaod an luchag mu thimcheall gus an tèid an dealbh 'na "
"bhreigichean mòra."
msgstr "Briog is slaod an luchag mu thimcheall gus an tèid an dealbh na bhreigichean mòra."
#: ../../magic/src/bricks.c:133
msgid "Click and drag to draw small bricks."
msgstr ""
"Briog is slaod an luchag mu thimcheall gus tèid an dealbh 'na bhreigichean "
"beaga."
msgstr "Briog is slaod an luchag mu thimcheall gus tèid an dealbh na bhreigichean beaga."
#: ../../magic/src/calligraphy.c:127
msgid "Calligraphy"
@ -844,8 +813,7 @@ msgstr "Snas-sgrìobhadh"
#: ../../magic/src/calligraphy.c:134
msgid "Click and drag the mouse around to draw in calligraphy."
msgstr ""
"Briog is slaod an luchag mu thimcheall gus peantadh ann an stoidhle snasail."
msgstr "Briog is slaod an luchag mu thimcheall gus peantadh ann an stoidhle snasail."
#: ../../magic/src/cartoon.c:106
msgid "Cartoon"
@ -853,8 +821,7 @@ msgstr "Cartùn"
#: ../../magic/src/cartoon.c:113
msgid "Click and drag the mouse around to turn the picture into a cartoon."
msgstr ""
"Briog is slaod an luchag mu thimcheall gus an tèid an dealbh 'na chartùn."
msgstr "Briog is slaod an luchag mu thimcheall gus an tèid an dealbh na chartùn."
#: ../../magic/src/confetti.c:85
msgid "Confetti"
@ -890,23 +857,19 @@ msgstr "Dorch"
#: ../../magic/src/fade_darken.c:134
msgid "Click and drag the mouse to lighten parts of your picture."
msgstr ""
"Briog is slaod an luchag gus pàirt dhen dealbh agad a dhèanamh nas soilleire."
msgstr "Briog is slaod an luchag gus pàirt dhen dealbh agad a dhèanamh nas soilleire."
#: ../../magic/src/fade_darken.c:136
msgid "Click to lighten your entire picture."
msgstr ""
"Briog is gluais an luchag gus an dealbh gu lèir a dhèanamh nas soilleire."
msgstr "Briog is gluais an luchag gus an dealbh gu lèir a dhèanamh nas soilleire."
#: ../../magic/src/fade_darken.c:141
msgid "Click and drag the mouse to darken parts of your picture."
msgstr ""
"Briog is slaod an luchag gus pàirt dhen dealbh agad a dhèanamh nas duirche."
msgstr "Briog is slaod an luchag gus pàirt dhen dealbh agad a dhèanamh nas duirche."
#: ../../magic/src/fade_darken.c:143
msgid "Click to darken your entire picture."
msgstr ""
"Briog is gluais an luchag gus an dealbh gu lèir a dhèanamh nas duirche."
msgstr "Briog is gluais an luchag gus an dealbh gu lèir a dhèanamh nas duirche."
#: ../../magic/src/fill.c:108
msgid "Fill"
@ -923,8 +886,7 @@ msgstr "Sùil èisg"
#. Needs better name
#: ../../magic/src/fisheye.c:106
msgid "Click on part of your picture to create a fisheye effect."
msgstr ""
"Briog air pàirt dhen dealbh agad gus èifeachd sùil èisg a chruthachadh."
msgstr "Briog air pàirt dhen dealbh agad gus èifeachd sùil èisg a chruthachadh."
#: ../../magic/src/flower.c:150
msgid "Flower"
@ -932,9 +894,7 @@ msgstr "Flùr"
#: ../../magic/src/flower.c:156
msgid "Click and drag to draw a flower stalk. Let go to finish the flower."
msgstr ""
"Briog is slaod gus cuiseag flùir a pheantadh. Leig às gus am flùr a "
"choileanadh."
msgstr "Briog is slaod gus cuiseag flùir a pheantadh. Leig às gus am flùr a choileanadh."
#: ../../magic/src/foam.c:121
msgid "Foam"
@ -942,8 +902,7 @@ msgstr "Cop"
#: ../../magic/src/foam.c:127
msgid "Click and drag the mouse to cover an area with foamy bubbles."
msgstr ""
"Briog is slaod an luchag gus roinn a chòmhdachadh le builgeanan copach."
msgstr "Briog is slaod an luchag gus roinn a chòmhdachadh le builgeanan copach."
#: ../../magic/src/fold.c:105
msgid "Fold"
@ -972,15 +931,11 @@ msgstr "Leac ghlainne"
#: ../../magic/src/glasstile.c:114
msgid "Click and drag the mouse to put glass tile over your picture."
msgstr ""
"Briog is slaod an luchag gus pàirt dhen dealbh agad a chòmhdachadh le "
"leacagan glainne."
msgstr "Briog is slaod an luchag gus pàirt dhen dealbh agad a chòmhdachadh le leacagan glainne."
#: ../../magic/src/glasstile.c:116
msgid "Click to cover your entire picture in glass tiles."
msgstr ""
"Briog is slaod an luchag gus an dealbh gu lèir a chòmhdachadh le leacagan "
"glainne."
msgstr "Briog is slaod an luchag gus an dealbh gu lèir a chòmhdachadh le leacagan glainne."
#: ../../magic/src/grass.c:112
msgid "Grass"
@ -1017,23 +972,19 @@ msgstr "Leacagan"
#. KAL_BOTH
#: ../../magic/src/kalidescope.c:128
msgid "Kaleidoscope"
msgstr "Kaleidoskop"
msgstr "Cailèideasgop"
#: ../../magic/src/kalidescope.c:136
msgid ""
"Click and drag the mouse to draw with two brushes that are symmetric across "
"the left and right of your picture."
msgstr ""
"Briog is slaod an luchag gus peantadh le dà bhruis a tha co-chothromach a "
"dh'ionnsaigh taobh deas is clì an deilbh agad."
msgstr "Briog is slaod an luchag gus peantadh le dà bhruis a tha co-chothromach a dhionnsaigh taobh deas is clì an deilbh agad."
#: ../../magic/src/kalidescope.c:138
msgid ""
"Click and drag the mouse to draw with two brushes that are symmetric across "
"the top and bottom of your picture."
msgstr ""
"Briog is slaod an luchag gus peantadh le dà bhruis a tha co-chothromach a "
"dh'ionnsaigh bàrr is bonn an deilbh agad."
msgstr "Briog is slaod an luchag gus peantadh le dà bhruis a tha co-chothromach a dhionnsaigh bàrr is bonn an deilbh agad."
#: ../../magic/src/kalidescope.c:140
msgid "Click and drag the mouse to draw a pattern across the picture."
@ -1043,17 +994,13 @@ msgstr "Briog is slaod an luchag gus pàtran a chur thairis air an dealbh."
msgid ""
"Click and drag the mouse to draw a pattern that is symmetric across the "
"picture."
msgstr ""
"Briog is slaod an luchag gus pàtran co-chothromach a pheantadh thairis air "
"an dealbh."
msgstr "Briog is slaod an luchag gus pàtran co-chothromach a pheantadh thairis air an dealbh."
#. KAL_BOTH
#: ../../magic/src/kalidescope.c:144
msgid ""
"Click and drag the mouse to draw with symmetric brushes (a kaleidoscope)."
msgstr ""
"Briog is slaod an luchag gus peantadh le dà bhruis a tha co-chothromach "
"(kaleidoscop)."
msgstr "Briog is slaod an luchag gus peantadh le dà bhruis a tha co-chothromach (cailèideasgop)."
#: ../../magic/src/light.c:107
msgid "Light"
@ -1094,14 +1041,11 @@ msgstr "Mosàig"
#: ../../magic/src/mosaic.c:103
msgid ""
"Click and drag the mouse to add a mosaic effect to parts of your picture."
msgstr ""
"Briog is slaod an luchag gus èifeachd mosàig a chur ri pàirt dhen dealbh "
"agad."
msgstr "Briog is slaod an luchag gus èifeachd mosàig a chur ri pàirt dhen dealbh agad."
#: ../../magic/src/mosaic.c:104
msgid "Click to add a mosaic effect to your entire picture."
msgstr ""
"Briog is slaod an luchag gus èifeachd mosàig a chur ris an dealbh gu lèir."
msgstr "Briog is slaod an luchag gus èifeachd mosàig a chur ris an dealbh gu lèir."
#: ../../magic/src/mosaic_shaped.c:139
msgid "Square Mosaic"
@ -1118,41 +1062,29 @@ msgstr "Mosàig neo-riaghailteach"
#: ../../magic/src/mosaic_shaped.c:148
msgid ""
"Click and drag the mouse to add a square mosaic to parts of your picture."
msgstr ""
"Briog is slaod an luchag gus èifeachd mosàig cheàrnach a chur ri pàirt dhen "
"dealbh agad."
msgstr "Briog is slaod an luchag gus èifeachd mosàig cheàrnach a chur ri pàirt dhen dealbh agad."
#: ../../magic/src/mosaic_shaped.c:149
msgid "Click to add a square mosaic to your entire picture."
msgstr ""
"Briog is slaod an luchag gus èifeachd mosàig cheàrnach a chur ris an dealbh "
"gu lèir."
msgstr "Briog is slaod an luchag gus èifeachd mosàig cheàrnach a chur ris an dealbh gu lèir."
#: ../../magic/src/mosaic_shaped.c:153
msgid ""
"Click and drag the mouse to add a hexagonal mosaic to parts of your picture."
msgstr ""
"Briog is slaod an luchag gus èifeachd mosàig sia-cheàrnach a chur ri pàirt "
"dhen dealbh agad."
msgstr "Briog is slaod an luchag gus èifeachd mosàig sia-cheàrnach a chur ri pàirt dhen dealbh agad."
#: ../../magic/src/mosaic_shaped.c:154
msgid "Click to add a hexagonal mosaic to your entire picture."
msgstr ""
"Briog is slaod an luchag gus èifeachd mosàig shia-cheàrnach a chur ris an "
"dealbh gu lèir."
msgstr "Briog is slaod an luchag gus èifeachd mosàig shia-cheàrnach a chur ris an dealbh gu lèir."
#: ../../magic/src/mosaic_shaped.c:158
msgid ""
"Click and drag the mouse to add an irregular mosaic to parts of your picture."
msgstr ""
"Briog is slaod an luchag gus èifeachd mosàig neo-riaghailteach a chur ri "
"pàirt dhen dealbh agad."
msgstr "Briog is slaod an luchag gus èifeachd mosàig neo-riaghailteach a chur ri pàirt dhen dealbh agad."
#: ../../magic/src/mosaic_shaped.c:159
msgid "Click to add an irregular mosaic to your entire picture."
msgstr ""
"Briog is slaod an luchag gus èifeachd mosàig neo-riaghailteach a chur ris an "
"dealbh gu lèir."
msgstr "Briog is slaod an luchag gus èifeachd mosàig neo-riaghailteach a chur ris an dealbh gu lèir."
#: ../../magic/src/negative.c:98
msgid "Negative"
@ -1160,14 +1092,11 @@ msgstr "Ais-thionndaidh"
#: ../../magic/src/negative.c:106
msgid "Click and drag the mouse around to make your painting negative."
msgstr ""
"Briog is slaod an luchag gus na dathan ann am pàirt dhen dealbh agad ais-"
"thionndadh."
msgstr "Briog is slaod an luchag gus na dathan ann am pàirt dhen dealbh agad ais-thionndadh."
#: ../../magic/src/negative.c:109
msgid "Click to turn your painting into its negative."
msgstr ""
"Briog is slaod an luchag gus na dathan san dealbh gu lèir ais-thionndadh."
msgstr "Briog is slaod an luchag gus na dathan san dealbh gu lèir ais-thionndadh."
#: ../../magic/src/noise.c:63
msgid "Noise"
@ -1175,8 +1104,7 @@ msgstr "Riasladh"
#: ../../magic/src/noise.c:66
msgid "Click and drag the mouse to add noise to parts of your picture."
msgstr ""
"Briog is slaod an luchag gus riasladh a thoirt air pàirt dhen dealbh agad."
msgstr "Briog is slaod an luchag gus riasladh a thoirt air pàirt dhen dealbh agad."
#: ../../magic/src/noise.c:67
msgid "Click to add noise to your entire picture."
@ -1192,15 +1120,11 @@ msgstr "Sùm"
#: ../../magic/src/perspective.c:151
msgid "Click on the corners and drag where you want to stretch the picture."
msgstr ""
"Briog air na h-oisean is slaod iad gu far a bheil thu ag iarraidh an dealbh "
"a shìneadh."
msgstr "Briog air na h-oisean is slaod iad gu far a bheil thu ag iarraidh an dealbh a shìneadh."
#: ../../magic/src/perspective.c:154
msgid "Click and drag up to zoom in or drag down to zoom out the picture."
msgstr ""
"Briog is slaod suas airson sùmadh a-steach dhan dealbh no sìos airson sùmadh "
"a-mach às an dealbh."
msgstr "Briog is slaod suas airson sùmadh a-steach dhan dealbh no sìos airson sùmadh a-mach às an dealbh."
#: ../../magic/src/puzzle.c:105
msgid "Puzzle"
@ -1220,8 +1144,7 @@ msgstr "Rèilean"
#: ../../magic/src/rails.c:133
msgid "Click and drag to draw train track rails on your picture."
msgstr ""
"Briog is slaod gus rèilean rathaid-iarainn a pheantadh air an dealbh agad."
msgstr "Briog is slaod gus rèilean rathaid-iarainn a pheantadh air an dealbh agad."
#: ../../magic/src/rainbow.c:139
msgid "Rainbow"
@ -1229,7 +1152,7 @@ msgstr "Dathan bogha-froise"
#: ../../magic/src/rainbow.c:146
msgid "You can draw in rainbow colors!"
msgstr "'S urrainn dhut peantadh le dathan na bogha-froise!"
msgstr "S urrainn dhut peantadh le dathan na bogha-froise!"
#: ../../magic/src/rain.c:65
msgid "Rain"
@ -1255,9 +1178,7 @@ msgstr "Bogha-froise"
msgid ""
"Click where you want your rainbow to start, drag to where you want it to "
"end, and then let go to draw a rainbow."
msgstr ""
"Briog gus bogha-froise a thòiseachadh, slaod gu far a bheil thu ag iarraidh "
"a chrìochnachadh is leig às."
msgstr "Briog gus bogha-froise a thòiseachadh, slaod gu far a bheil thu ag iarraidh a chrìochnachadh is leig às."
#: ../../magic/src/ripples.c:106
msgid "Ripples"
@ -1281,7 +1202,7 @@ msgstr "Briog is slaod gus cruth ròis a pheantadh."
#: ../../magic/src/rosette.c:123
msgid "You can draw just like Picasso!"
msgstr "'S urrainn dhut peantadh mar Phicasso!"
msgstr "S urrainn dhut peantadh mar Phicasso!"
#: ../../magic/src/sharpen.c:73
msgid "Edges"
@ -1317,7 +1238,7 @@ msgstr "Briog is slaod an luchag gus sgàil-riochd dubh is geal a chruthachadh."
#: ../../magic/src/sharpen.c:83
msgid "Click to create a black and white silhouette of your entire picture."
msgstr "Briog gus an tèid an dealbh gu lèir 'na sgàil-riochd."
msgstr "Briog gus an tèid an dealbh gu lèir na sgàil-riochd."
#: ../../magic/src/shift.c:109
msgid "Shift"
@ -1325,8 +1246,7 @@ msgstr "Gluais"
#: ../../magic/src/shift.c:115
msgid "Click and drag to shift your picture around on the canvas."
msgstr ""
"Briog is slaod gus an dealbh agad a ghluasad mu thimcheall a' chanabhais."
msgstr "Briog is slaod gus an dealbh agad a ghluasad mu thimcheall a chanabhais."
#: ../../magic/src/smudge.c:106
msgid "Smudge"
@ -1344,9 +1264,7 @@ msgstr "Briog is slaod an luchag mu thimcheall gus an dealbh a smalachadh."
#. if (which == 1)
#: ../../magic/src/smudge.c:117
msgid "Click and drag the mouse around to draw with wet, smudgy paint."
msgstr ""
"Briog is slaod an luchag mu thimcheall gus peantadh le peant fliuch is "
"smeurach."
msgstr "Briog is slaod an luchag mu thimcheall gus peantadh le peant fliuch is smeurach."
#: ../../magic/src/snow.c:68
msgid "Snow Ball"
@ -1366,28 +1284,25 @@ msgstr "Briog gus bleideagan sneachda a chur ris an dealbh agad."
#: ../../magic/src/string.c:123
msgid "String edges"
msgstr "Teud - oir"
msgstr "Teud oir"
#: ../../magic/src/string.c:126
msgid "String corner"
msgstr "Teud - oisean"
msgstr "Teud oisean"
#: ../../magic/src/string.c:129
msgid "String 'V'"
msgstr "Teud - saighead"
msgstr "Teud saighead"
#: ../../magic/src/string.c:137
msgid ""
"Click and drag to draw string art. Drag top-bottom to draw less or more "
"lines, left or right to make a bigger hole."
msgstr ""
"Briog is slaod gus ealain teuda a pheantadh. Slaod suas is sìos airson "
"barrachd no nas lugha de loidhnichean, is gu clì no deas airson toll nas "
"motha no nas lugha."
msgstr "Briog is slaod gus ealain teuda a pheantadh. Slaod suas is sìos airson barrachd no nas lugha de loidhnichean, is gu clì no deas airson toll nas motha no nas lugha."
#: ../../magic/src/string.c:140
msgid "Click and drag to draw arrows made of string art."
msgstr "Briog is slaod gus saigheadan de dh'ealain teuda a pheantadh."
msgstr "Briog is slaod gus saigheadan de dhealain teuda a pheantadh."
#: ../../magic/src/string.c:143
msgid "Draw string art arrows with free angles."
@ -1404,9 +1319,7 @@ msgstr "Dath ⁊ geal"
#: ../../magic/src/tint.c:75
msgid ""
"Click and drag the mouse around to change the color of parts of your picture."
msgstr ""
"Briog is slaod an luchag mu thimcheall gus na dathan ann am pàirt dhen "
"dealbh agad atharrachadh."
msgstr "Briog is slaod an luchag mu thimcheall gus na dathan ann am pàirt dhen dealbh agad atharrachadh."
#: ../../magic/src/tint.c:76
msgid "Click to change the color of your entire picture."
@ -1416,14 +1329,11 @@ msgstr "Briog gus an dath atharrachadh san dealbh gu lèir."
msgid ""
"Click and drag the mouse around to turn parts of your picture into white and "
"a color you choose."
msgstr ""
"Briog is slaod an luchag mu thimcheall gus pàirt dhen dealbh agad a "
"thionndadh gu geal is an dath a thaghas tu."
msgstr "Briog is slaod an luchag mu thimcheall gus pàirt dhen dealbh agad a thionndadh gu geal is an dath a thaghas tu."
#: ../../magic/src/tint.c:78
msgid "Click to turn your entire picture into white and a color you choose."
msgstr ""
"Briog gus an dealbh gu lèir a thionndadh gu geal is an dath a thaghas tu."
msgstr "Briog gus an dealbh gu lèir a thionndadh gu geal is an dath a thaghas tu."
#: ../../magic/src/toothpaste.c:65
msgid "Toothpaste"
@ -1440,8 +1350,7 @@ msgstr "Cuairt-ghaoth"
# Is the word "lainnir" appropriate/common?
#: ../../magic/src/tornado.c:163
msgid "Click and drag to draw a tornado funnel on your picture."
msgstr ""
"Briog is slaod gus fuineall cuairt-ghaoithe a pheantadh air an dealbh agad."
msgstr "Briog is slaod gus fuineall cuairt-ghaoithe a pheantadh air an dealbh agad."
#: ../../magic/src/tv.c:100
msgid "TV"
@ -1451,15 +1360,11 @@ msgstr "TBh"
msgid ""
"Click and drag to make parts of your picture look like they are on "
"television."
msgstr ""
"Briog is slaod gus coltas a thoirt air pàirt dhen dealbh agad nam b' ann air "
"an tbh a bhiodh iad."
msgstr "Briog is slaod gus coltas a thoirt air pàirt dhen dealbh agad nam b ann air an tbh a bhiodh iad."
#: ../../magic/src/tv.c:108
msgid "Click to make your picture look like it's on television."
msgstr ""
"Briog gus coltas a thoirt air an dealbh agad nam b' ann air an tbh a bhiodh "
"e."
msgstr "Briog gus coltas a thoirt air an dealbh agad nam b ann air an tbh a bhiodh e."
#: ../../magic/src/waves.c:103
msgid "Waves"
@ -1474,20 +1379,14 @@ msgid ""
"Click to make the picture horizontally wavy. Click toward the top for "
"shorter waves, the bottom for taller waves, the left for small waves, and "
"the right for long waves."
msgstr ""
"Briog gus an tèid an dealbh agad 'na thonnan còmhnard. Briog mun bhàrr "
"airson thonnan as giorra, mun bhonn airson thonnan as àirde, mu chlì airson "
"thonnan as lugha, is mu dheas airson thonnan as fhaide."
msgstr "Briog gus an tèid an dealbh agad na thonnan còmhnard. Briog mun bhàrr airson thonnan as giorra, mun bhonn airson thonnan as àirde, mu chlì airson thonnan as lugha, is mu dheas airson thonnan as fhaide."
#: ../../magic/src/waves.c:112
msgid ""
"Click to make the picture vertically wavy. Click toward the top for shorter "
"waves, the bottom for taller waves, the left for small waves, and the right "
"for long waves."
msgstr ""
"Briog gus an tèid an dealbh agad 'na thonnan inghearach. Briog mun bhàrr "
"airson thonnan as giorra, mun bhonn airson thonnan as àirde, mu chlì airson "
"thonnan as lugha, is mu dheas airson thonnan as fhaide."
msgstr "Briog gus an tèid an dealbh agad na thonnan inghearach. Briog mun bhàrr airson thonnan as giorra, mun bhonn airson thonnan as àirde, mu chlì airson thonnan as lugha, is mu dheas airson thonnan as fhaide."
#: ../../magic/src/xor.c:95
msgid "Xor Colors"
@ -1499,5 +1398,4 @@ msgstr "Briog is slaod gus èifeachd XOR a pheantadh."
#: ../../magic/src/xor.c:103
msgid "Click to draw a XOR effect on the whole picture"
msgstr ""
"Briog is slaod an luchag gus èifeachd XOR a chur ris an dealbh gu lèir."
msgstr "Briog is slaod an luchag gus èifeachd XOR a chur ris an dealbh gu lèir."

View file

@ -3,7 +3,7 @@
For Tux Paint
PostScript(r) printing routine.
(for non-Windows, non-Mac OS X, non-BeOS platforms, e.g. Linux)
(for non-Windows, non-BeOS platforms, e.g. Linux and macOS)
(moved from tuxpaint.c in 0.9.17)
Copyright (c) 2009 by Bill Kendrick and others
@ -51,6 +51,7 @@
#include <paper.h>
#include <math.h>
#include <errno.h>
#include "debug.h"
#ifndef PAPER_H
#error "---------------------------------------------------"
@ -296,13 +297,18 @@ int do_ps_save(FILE * fi,
pid_t child_pid, w;
int status;
#ifdef __APPLE__
/* macOS does not always reset errno so Tux Paint thinks print never
* succeeds - let's reset before calling pclose() on macOS */
errno = 0;
#endif
child_pid = pclose(fi);
/* debug */
/*
#ifdef DEBUG
printf("pclose returned %d\n", child_pid); fflush(stdout);
printf("errno = %d\n", errno); fflush(stdout);
*/
#endif
if (child_pid < 0 || (errno != 0 && errno != EAGAIN))
{ /* FIXME: This right? */
@ -317,8 +323,7 @@ int do_ps_save(FILE * fi,
{
w = waitpid(child_pid, &status, 0);
/* debug */
/*
#ifdef DEBUG
if (w == -1) { perror("waitpid"); exit(EXIT_FAILURE); }
if (WIFEXITED(status)) {
printf("exited, status=%d\n", WEXITSTATUS(status));
@ -329,7 +334,7 @@ int do_ps_save(FILE * fi,
} else if (WIFCONTINUED(status)) {
printf("continued\n");
}
*/
#endif
}
while (w != -1 && !WIFEXITED(status) && !WIFSIGNALED(status));

View file

@ -34,6 +34,11 @@
SDL_Surface *img_progress;
int progress_bar_disabled, prog_bar_ctr;
/**
* Draw & animate (as function is called repeatedly) the progress bar.
*
* @param screen Screen surface
*/
void show_progress_bar_(SDL_Surface * screen, SDL_Texture * texture, SDL_Renderer * renderer)
{
SDL_Rect dest, src, r;

View file

@ -30,6 +30,13 @@
#include "rgblinear.h"
#include "debug.h"
/**
* Return sRGB mapping (0-255 byte) of a linear (0.0 to 1.0) value
* (see rgblinear.h)
*
* @param linear Linear (float) value
* @return sRGB (byte) value
*/
unsigned char linear_to_sRGB(float linear)
{
unsigned slot;

File diff suppressed because it is too large Load diff

View file

@ -35,7 +35,14 @@
#include "win32_dirent.h"
#include "debug.h"
DIR * opendir(const char *pSpec)
/**
* Open a directory for reading
*
* @param pSpec Path of directory to open
* @return Opened directory, or NULL on failure
*/
DIR * opendir(const char *pSpec)
{
char pathname[MAX_PATH + 2];
@ -46,7 +53,6 @@
strcat(pathname, "/*");
pDir->hFind = FindFirstFile(pathname, &pDir->wfd);
if (pDir->hFind == INVALID_HANDLE_VALUE)
{
free(pDir);
pDir = NULL;
@ -54,11 +60,24 @@
return pDir;
}
/**
* Close an opened directory
*
* @param pDir Opened directory to close.
*/
void closedir(DIR * pDir)
{
assert(pDir != NULL);
free(pDir);
} struct dirent *readdir(struct DIR *pDir)
}
/**
* Read an entry from an opened directory.
*
* @param pDir Opened directory from which to read.
* @return The next entry from the directory
*/
struct dirent *readdir(struct DIR *pDir)
{
assert(pDir != NULL);
if (pDir->hFind)
@ -76,10 +95,30 @@ void closedir(DIR * pDir)
return NULL;
}
/**
* Callback for sorting directory entries by filenames.
*
* @param a Directory entry #1
* @param b Directory entry #2
* @return An integer less than, equal to, or greater than zero if the
* filename of dir entry 'a' is found, respectively, to be less than,
* to match, or be greater than that of 'b'.
*/
int alphasort(const void *a, const void *b)
{
return (strcmp((*(const struct dirent **)a)->d_name, (*(const struct dirent **)b)->d_name));
} static int addToList(int i, struct dirent ***namelist, struct dirent *entry)
}
/**
* Add directory entry filenames into a list.
*
* @param i Incoming count of items
* @param namelist Pointer to an array of directory entries, which will
* be resized as items are added
* @param entry The directory entry to add to 'namelist'
* @return New count of items, or -1 on error (e.g., failed malloc())
*/
static int addToList(int i, struct dirent ***namelist, struct dirent *entry)
{
int size;
struct dirent *block;
@ -96,6 +135,15 @@ int alphasort(const void *a, const void *b)
return ++i;
}
/**
* Scan a directory
*
* @param dir Path to the directory to be scanned.
* @param namelist Pointer to an array of directory entries, to be filled.
* @param select Callback function for selecting items to add to the list.
* @param compar Callback for sorting items in the list (via qsort()).
* @return Count of items, or -1 on error.
*/
int scandir(const char *dir, struct dirent ***namelist, selectCB select, comparCB compar)
{
DIR * pDir;
@ -108,7 +156,6 @@ int scandir(const char *dir, struct dirent ***namelist, selectCB select, comparC
return -1;
count = 0;
while ((entry = readdir(pDir)) != NULL)
{
if (select == NULL || (select != NULL && select(entry)))
if ((count = addToList(count, namelist, entry)) < 0)
@ -121,5 +168,3 @@ int scandir(const char *dir, struct dirent ***namelist, selectCB select, comparC
qsort((void *)(*namelist), (size_t) count, sizeof(struct dirent *), compar);
return count;
}

View file

@ -37,6 +37,9 @@
static HDC hDCprinter = NULL;
/**
* FIXME
*/
static SDL_Surface *make24bitDIB(SDL_Surface * surf)
{
SDL_PixelFormat pixfmt;
@ -84,6 +87,9 @@ static SDL_Surface *make24bitDIB(SDL_Surface * surf)
return surfDIB;
}
/**
* FIXME
*/
/* returns 0 if failed */
static int GetDefaultPrinterStrings(char *device, char *driver, char *output)
{
@ -115,6 +121,9 @@ static int GetDefaultPrinterStrings(char *device, char *driver, char *output)
#define dmDeviceNameSize 32
/**
* FIXME
*/
static HANDLE LoadCustomPrinterHDEVMODE(HWND hWnd, const char *filepath)
{
char device[MAX_PATH];
@ -179,7 +188,9 @@ err_exit:
return NULL;
}
/**
* FIXME
*/
static int SaveCustomPrinterHDEVMODE(HWND hWnd, const char *filepath, HANDLE hDevMode)
{
FILE *fp = NULL;
@ -202,6 +213,12 @@ static int SaveCustomPrinterHDEVMODE(HWND hWnd, const char *filepath, HANDLE hDe
return 0;
}
/**
* Returns whether or not a given file exists.
*
* @param filepath Path to the file
* @return 1 if file exists, 0 otherwise
*/
static int FileExists(const char *filepath)
{
FILE *fp;
@ -214,6 +231,10 @@ static int FileExists(const char *filepath)
return 0;
}
/**
* FIXME
*/
static int GetCustomPrinterDC(HWND hWnd, const char *printcfg, int show)
{
PRINTDLG pd = {
@ -254,6 +275,9 @@ static int GetCustomPrinterDC(HWND hWnd, const char *printcfg, int show)
}
/**
* FIXME
*/
static HDC GetDefaultPrinterDC(void)
{
char device[MAX_PATH], driver[MAX_PATH], output[MAX_PATH];
@ -264,6 +288,10 @@ static HDC GetDefaultPrinterDC(void)
return NULL;
}
/**
* FIXME
*/
static int GetPrinterDC(HWND hWnd, const char *printcfg, int show)
{
hDCprinter = NULL;
@ -277,6 +305,9 @@ static int GetPrinterDC(HWND hWnd, const char *printcfg, int show)
}
/**
* FIXME
*/
int IsPrinterAvailable(void)
{
return (GetDefaultPrinterStrings(NULL, NULL, NULL) != 0);
@ -285,6 +316,10 @@ int IsPrinterAvailable(void)
#define STRETCH_TO_FIT 0
#define SCALE_TO_FIT 1
/**
* FIXME
*/
const char *SurfacePrint(SDL_Surface * surf, const char *printcfg, int showdialog)
{
const char *res = NULL;
@ -472,6 +507,10 @@ error:
return res;
}
/**
* FIXME
*/
/*
Read access to Windows Registry
*/
@ -494,9 +533,12 @@ err_exit:
return HRESULT_FROM_WIN32(res);
}
/*
Removes a single '\' or '/' from end of path
*/
/**
* Removes a single '\' or '/' from end of path
*
* @param path Directory path
* @return the path argument, contents of which may have been modified
*/
static char *remove_slash(char *path)
{
int len = strlen(path);
@ -533,10 +575,13 @@ char *GetDefaultSaveDir(const char *suffix)
return strdup("userdata");
}
/*
Returns heap string containing system font directory.
E.g. 'C:\Windows\Fonts'
*/
/**
*
* Returns heap string containing system font directory.
* (e.g. 'C:\Windows\Fonts')
*
* @return system font dir
*/
char *GetSystemFontDir(void)
{
char path[MAX_PATH];
@ -567,6 +612,12 @@ static char *GetUserTempDir(void)
return strdup(temp);
}
/**
* Get path of a file in a temp directory
*
* @param name Filename for temp file
* @return full path to the temp file
*/
char *get_temp_fname(const char *const name)
{
char f[512];
@ -584,6 +635,9 @@ char *get_temp_fname(const char *const name)
static HHOOK g_hKeyboardHook = NULL;
static int g_bWindowActive = 0;
/**
* FIXME
*/
LRESULT CALLBACK LowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam)
{
int bEatKeystroke = 0;
@ -607,6 +661,9 @@ LRESULT CALLBACK LowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam)
return CallNextHookEx(g_hKeyboardHook, nCode, wParam, lParam);
}
/**
* FIXME
*/
int InstallKeyboardHook(void)
{
if (g_hKeyboardHook)
@ -615,6 +672,9 @@ int InstallKeyboardHook(void)
return g_hKeyboardHook ? 0 : -2;
}
/**
* FIXME
*/
int RemoveKeyboardHook(void)
{
if (!g_hKeyboardHook)
@ -624,6 +684,9 @@ int RemoveKeyboardHook(void)
return 0;
}
/**
* FIXME
*/
void SetActivationState(int state)
{
g_bWindowActive = state;

View file

@ -1,6 +1,6 @@
Summary: A drawing program for young children
Name: tuxpaint
Version: 0.9.22
Version: 0.9.23
Release: 1
Epoch: 1
License: GPL
@ -89,6 +89,9 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/bin/tp-magic-config
%changelog
* Sun Aug 19 2018 <nbs@sonic.net> -
- Set version number 0.9.23
* Mon Aug 20 2012 <shin1@wmail.plala.or.jp> -
- Corrected 'Requires' and 'BuildRequires'