Maemo Nokia 770 and 800 debian packaging.

Fixed the "Home" button missing icon problem
Fixed cursor (now it's hidden)
Files are saved on /media/mmc1/tuxpaint by default so users can see them
from the filemanager
Added xpm icon to hildon desktop
This commit is contained in:
Alessandro Pasotti 2007-03-24 09:00:28 +00:00
parent 52a8db16ac
commit cb9a159ba5
8 changed files with 511 additions and 56 deletions

View file

@ -243,8 +243,10 @@ nokia770:
make \
DATA_PREFIX=/usr/share/tuxpaint \
SVG_LIB= SVG_CFLAGS= NOSVGFLAG=NOSVG \
MAEMOFLAG=NOKIA_770
MAEMOFLAG=NOKIA_770 \
LOCALE_PREFIX=$(PREFIX)/share/locale \
CONFDIR=/etc/tuxpaint
# "make install" installs all of the various parts
# (depending on the *PREFIX variables at the top, you probably need
@ -348,7 +350,7 @@ install-win32:
LOCALE_PREFIX=$(PREFIX)/share/locale \
CONFDIR=$(PREFIX)/etc/tuxpaint \
# "make bdist-win32" recompiles Tux Paint to work with executable-relative
# "make bdist-win32" recompiles Tux Paint to work with executable-relative
# data, docs and locale directories. Also copies all files, including DLLs,
# into a 'bdist' output directory ready for processing by an installer script.
bdist-win32:
@ -548,12 +550,22 @@ install-nokia770:
@echo "...Installing launcher icon into the Nokia 770..."
@if [ "x$(NOKIA770_PREFIX)" != "x" ]; then \
install -d $(PKG_ROOT)$(NOKIA770_PREFIX)/share/pixmaps; \
cp data/images/icon.png $(PKG_ROOT)/$(NOKIA770_PREFIX)/share/pixmaps/tuxpaint.png; \
cp data/images/icon.png $(PKG_ROOT)$(NOKIA770_PREFIX)/share/pixmaps/tuxpaint.png; \
chmod 644 $(PKG_ROOT)$(NOKIA770_PREFIX)/share/pixmaps/tuxpaint.png; \
cp hildon/tuxpaint.xpm $(PKG_ROOT)/$(NOKIA770_PREFIX)/share/pixmaps/tuxpaint.xpm; \
chmod 644 $(PKG_ROOT)$(NOKIA770_PREFIX)/share/pixmaps/tuxpaint.xpm; \
install -d $(PKG_ROOT)$(NOKIA770_PREFIX)/share/applications/hildon; \
cp hildon/tuxpaint.desktop $(PKG_ROOT)$(NOKIA770_PREFIX)/share/applications/hildon/; \
chmod 644 $(PKG_ROOT)$(NOKIA770_PREFIX)/share/applications/hildon/tuxpaint.desktop; \
install -d $(PKG_ROOT)/etc/tuxpaint; \
cp hildon/tuxpaint.conf $(PKG_ROOT)/etc/tuxpaint; \
chmod 644 $(PKG_ROOT)/etc/tuxpaint/tuxpaint.conf; \
rm -rf $(PKG_ROOT)$(NOKIA770_PREFIX)/X11R6; \
rm -rf $(PKG_ROOT)$(NOKIA770_PREFIX)/share/doc; \
rm -rf $(PKG_ROOT)$(NOKIA770_PREFIX)/share/man; \
fi
@-find $(PKG_ROOT)$(NOKIA770_PREFIX) -name CVS -type d -exec rm -rf \{\} \;
# Install a launcher icon in the KDE menu...

28
debian/control vendored Normal file
View file

@ -0,0 +1,28 @@
Source: tuxpaint
Version: 0.9.17
Section: user/games
Priority: optional
Installed-Size: 2828
Maintainer: Alessandro Pasotti <apasotti@gmail.com>
Package: tuxpaint
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: A paint program for young children
Tux Paint is meant to be a simple drawing program for young
children. It is not meant as a general-purpose drawing tool.
It IS meant to be fun and easy to use. Sound effects and a
cartoon character help let the user know what's going on, and
keeps them entertained.
.
Tux Paint is extensible. Brushes and "rubber stamp" shapes can be
dropped in and pulled out. For example, a teacher can drop in a
collection of animal shapes and ask their students to draw an
ecosystem. Each shape can have a sound which is played, and
textual facts which are displayed, when the child selects the shape.
.
There is no direct access to the computer's underlying intricacies.
The current image is kept when the program quits, and reappears when
it is restarted. Saving images requires no need to create filenames
or use the keyboard. Opening an image is done by selecting it from
a collection of thumbnails.

16
debian/postinst vendored Executable file
View file

@ -0,0 +1,16 @@
#! /bin/sh
# The clock might be wrong and we know that we need to update the icon
# cache so we just force it.
gtk-update-icon-cache -f /usr/share/icons/hicolor
if [ ! -d /media/mmc1/tuxpaint ]
then
mkdir /media/mmc1/tuxpaint
fi
echo " Lets ask about the location"
maemo-select-menu-location tuxpaint.desktop tana_fi_games
exit 0

100
debian/rules vendored Executable file
View file

@ -0,0 +1,100 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Builds tuxpaint for MAEMO NOKIA DEVICES
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
configure: configure-stamp
configure-stamp:
dh_testdir
# Add here commands to configure the package.
touch configure-stamp
build: build-stamp
build-stamp: configure-stamp
dh_testdir
# Add here commands to compile the package.
$(MAKE) nokia770 PKG_ROOT=$(CURDIR)/debian/tuxpaint PREFIX=/usr
#docbook-to-man debian/tuxpaint.sgml > tuxpaint.1
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process.
-$(MAKE) clean
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/tuxpaint.
$(MAKE) install PKG_ROOT=$(CURDIR)/debian/tuxpaint PREFIX=/usr
$(MAKE) install-nokia770 PKG_ROOT=$(CURDIR)/debian/tuxpaint NOKIA770_PREFIX=/usr
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
# dh_installchangelogs
# dh_installdocs
# dh_installexamples
# dh_install
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_installinit
# dh_installcron
# dh_installinfo
# dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_perl
# dh_python
# dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure

231
hildon/tuxpaint.conf Normal file
View file

@ -0,0 +1,231 @@
# /etc/tuxpaint/tuxpaint.conf
#
# Configuration file for Tux Paint
# See tuxpaint(1) or run 'tuxpaint --help' for details on using Tux Paint
#
# Bill Kendrick <bill@newbreedsoftware.com>
# Default distribution version last modified:
# October 24, 2004
# The variables described below are initially commented out.
#
# Most options come in pairs:
#
# The top examples change the default behavior
# (e.g., "fullscreen=yes" enables full-screen mode, while
# the default mode is windowed, not fullscreen.)
#
# The bottom examples reenable the default behavior
# (e.g., "windowed=yes" enables fullscreen mode.)
#
# In the system-wide Tux Paint configuration file
# (e.g. "/etc/tuxpaint/tuxpaint.conf"
# or "/usr/local/etc/tuxpaint/tuxpaint.conf")
# the default options are redundant.
#
# They are, however, useful to place in a user's personal confiugration file
# ("~/.tuxpaintrc"), to override any settings they don't like in the
# system-wide configuration file, and which they don't want to always have
# to override via command-line options.
#
# For more information, see Tux Paint's main documentation file: README.txt
### Fullscreen or Windowed?
### -----------------------
#
fullscreen=yes
# windowed=yes
### Window size / screen resolution. (640x480 is the default.)
### -----------------------------------------------------------
#
# windowsize=1600x1200
# windowsize=1400x1050
# windowsize=1280x1024
# windowsize=1024x768
# windowsize=800x600
# windowsize=640x480
windowsize=800x480
### Disable sound effects?
### ----------------------
#
# nosound=yes
# sound=yes
### Disable the on-screen 'Quit' button in the toolbar?
### ---------------------------------------------------
### Note: Pressing the [Escape] key,
### or clicking the window's 'Close' button will still work
#
# noquit=yes
# quit=yes
### Disable the printing feature?
### -----------------------------
#
noprint=yes
# print=yes
### Restrict printing?
### ------------------
### For example, if 'printdelay=60',
### the user can only print once per minute (60 seconds)
#
# printdelay={SECONDS}
# printdelay=0
### Use stored printer configuration?
### ---------------------------------
#
# printcfg=yes
# printcfg=no
### Use a different print command?
### ------------------------------
### Note: The command should expect a PNG file on its STDIN (standard-in)
###
### For example, to convert the image to greyscale before converting
### to PostScript, use "pngtopnm | ppmtopgm | pnmtops | lpr" as the command
#
# printcommand={COMMAND}
# printcommand=pngtopnm | pnmtops | lpr
### Use the simpler shape tool? (No rotating)
### -----------------------------------------
#
# simpleshapes=yes
# complexshapes=yes
### Display only uppercase letters?
### -------------------------------
#
# uppercase=yes
# mixedcase=yes
### Grab the mouse and keyboard?
### ----------------------------
#
# grab=yes
# dontgrab=yes
### Disable [Control] key shortcuts?
### --------------------------------
#
# noshortcuts=yes
# shortcuts=yes
### Disable wheel mouse support?
### ----------------------------
#
# nowheelmouse=yes
# wheelmouse=yes
### Don't use special mouse pointer (cursor) shapes?
### ------------------------------------------------
#
nofancycursors=yes
# fancycursors=yes
### Use the keyboard to control the mouse pointer (cursor)?
### -------------------------------------------------------
#
# keyboard=yes
# mouse=yes
### Use less graphics-intensive outlines?
### -------------------------------------
#
nooutlines=yes
# outlines=yes
### Disable the Stamp tool?
### -----------------------
#
# nostamps=yes
# stamps=yes
### Disable Stamp controls (flip, mirror, size)?
### --------------------------------------------
#
# nostampcontrols=yes
# stampcontrols=yes
### Show mirrored stamps by default? (e.g., for those prefering right-to-left)
### --------------------------------------------------------------------------
#
# mirrorstamps=yes
# dontmirrorstamps=yes
### Use keyboard arrow keys to control mouse pointer?
### -------------------------------------------------
#
# keyboard=yes
# mouse=yes
### Disable 'Save Over Older Picture?' Prompt
### Always save over, instead
### -----------------------------------------
#
# saveover=yes
# saveover=ask
### Save images somewhere different?
### --------------------------------
### Note: Window users, use the form: savedir=C:\WINDOWS\TUXPAINT
#
# savedir=~/.tuxpaint/saved
savedir=/media/mmc1/tuxpaint
### Disable 'Save Over Older Picture?' Prompt
### Always make a new picture, instead
### -----------------------------------------
#
# saveover=new
# saveover=ask
### Disable the 'Save' feature altogether?
### --------------------------------------
#
# nosave=yes
# save=yes
### Use a different language?
### -------------------------
### Note: Where the language is a known language name (e.g., "spanish")
###
### For a full list, see tuxpaint(1) man page, README.txt documentation,
### or language usage output (by running the command "tuxpaint --lang help")
#
# lang={LANGUAGE}
# lang=english
# (End of configuration file)

View file

@ -2,8 +2,13 @@
Encoding=UTF-8
Name=Tux Paint
Type=Application
Exec=/var/lib/install/usr/bin/tuxpaint
Exec=/usr/bin/tuxpaint
Icon=tuxpaint
Terminal=false
GenericName=Drawing program
Comment=A drawing program for children.
StartupWMClass=TuxPaint.TuxPaint
X-Icon-path=/usr/share/pixmaps/
X-Window-Icon=tuxpaint
X-Window-Icon-Dimmed=tuxpaint
X-HildonDesk-ShowInToolbar=true

49
hildon/tuxpaint.xpm Normal file
View file

@ -0,0 +1,49 @@
/* XPM */
static char * icon32x32_xpm[] = {
"32 32 14 1",
" c None",
". c #000000",
"+ c #FFFF00",
"@ c #191919",
"# c #7F7F00",
"$ c #333333",
"% c #666667",
"& c #4C4C4C",
"* c #B2B2B2",
"= c #FFFFFF",
"- c #CCCCCC",
"; c #E5E5E5",
"> c #999999",
", c #7F7F7F",
"..... ..... ... ... ",
".+++. .+++.. .+@ .+. ",
"..#.....@..@..#.##.......@..#.. ",
" .#@#.#.##.##.#@##.##@#@##..##. ",
" .+.+.+..+++..+.+@+@+@+@+.+.+.. ",
" .+.+.+..+++.@++@++.+.+.+@+.+.. ",
" .#@#@#@##@##.#..##.#.#.#.#@##..",
" .+..++.++@++.+...+++@+@+.+@@++.",
" ............... .......@@......",
" @@.......@@ ",
" @$%$..@@...@ ",
" &*=*@%-*@..@ ",
"$@@@@@@@ %;--%;==%..@ ",
"@....@@@@ >*&*>;==%..@@ ",
"......... @-;-**$-;$...@ ",
"........@@ @$#&%>%;>;-@...@ ",
".........@@ ##+#++##,--&....@ ",
"..........@@ #++++++++&$@....@@",
"@..........@@@####+++++#@.....@@",
" @@.........@@+#$+++++++#......@",
" @@@........@#+++++++++#......@",
" @@@......@@#++++++++@......@",
" @@.......@##+++++#.......@",
" $@........@####$@.......@",
" @@.......@@@@...........",
" @@.....$>-*>$..........",
" @@..@-====;$...@.....",
" @@..%======*@.$>.....",
" @@..*======;$.$-@....",
" @@..$-======;&..*%....",
" @@..@-========%..$*@...",
" @@.@>=========>...%%..."};

View file

@ -1,6 +1,6 @@
/*
tuxpaint.c
Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt
@ -11,12 +11,12 @@
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -1366,6 +1366,8 @@ static void eat_sdl_events(void)
int main(int argc, char *argv[])
{
CLOCK_TYPE time1;
CLOCK_TYPE time2;
SDL_Rect dest;
@ -1500,7 +1502,6 @@ int main(int argc, char *argv[])
/* Main loop! */
mainloop();
/* Close and quit! */
save_current();
@ -3918,7 +3919,7 @@ hue_range_retry:;
mc = work + i;
// if not in the first range, and not in the second range, skip this one
//
//
if ((mc->hue < lower_hue_1 || mc->hue > upper_hue_1) &&
(mc->hue < lower_hue_2 || mc->hue > upper_hue_2))
continue;
@ -5319,16 +5320,16 @@ static void loadbrush_callback(SDL_Surface * screen,
realloc(img_brushes, num_brushes_max * sizeof *img_brushes);
brushes_frames =
realloc(brushes_frames, num_brushes_max * sizeof(int));
brushes_directional =
brushes_directional =
realloc(brushes_directional, num_brushes_max * sizeof(short));
brushes_spacing =
brushes_spacing =
realloc(brushes_spacing, num_brushes_max * sizeof(int));
}
img_brushes[num_brushes] = loadimage(fname);
/* Load brush metadata, if any: */
brushes_frames[num_brushes] = 1;
brushes_directional[num_brushes] = 0;
brushes_spacing[num_brushes] = img_brushes[num_brushes]->h / 4;
@ -5337,7 +5338,7 @@ static void loadbrush_callback(SDL_Surface * screen,
fi = fopen(fname, "r");
want_rand = 0;
if (fi != NULL)
{
do
@ -5369,7 +5370,7 @@ static void loadbrush_callback(SDL_Surface * screen,
if (want_rand)
brushes_frames[num_brushes] *= -1;
}
num_brushes++;
}
free(files[i].str);
@ -5855,6 +5856,7 @@ static int load_user_fonts_stub(void *vp)
static void setup(int argc, char *argv[])
{
int i, j, ok_to_use_sysconfig;
char str[128];
char *upstr;
@ -5945,6 +5947,11 @@ static void setup(int argc, char *argv[])
mirrorstamps = 0;
disable_stamp_controls = 0;
#ifndef WINDOW_WIDTH
WINDOW_WIDTH = 800;
WINDOW_HEIGHT = 600;
#endif
#ifdef NOKIA_770
WINDOW_WIDTH = 800;
WINDOW_HEIGHT = 480;
@ -5955,11 +5962,6 @@ static void setup(int argc, char *argv[])
WINDOW_WIDTH = 1200;
WINDOW_HEIGHT = 900;
#endif
#ifndef WINDOW_WIDTH
WINDOW_WIDTH = 800;
WINDOW_HEIGHT = 600;
#endif
playfile = NULL;
recording = 0;
playing = 0;
@ -6556,6 +6558,7 @@ static void setup(int argc, char *argv[])
}
}
#ifndef NOSOUND
#ifndef WIN32
if (use_sound && Mix_OpenAudio(44100, AUDIO_S16SYS, 2, 1024) < 0)
@ -6654,14 +6657,14 @@ static void setup(int argc, char *argv[])
if (strlen(tmp_str) == 6)
{
/* Byte (#rrggbb) form */
color_hexes[NUM_COLORS][0] =
(hex2dec(tmp_str[0]) << 4) + hex2dec(tmp_str[1]);
color_hexes[NUM_COLORS][1] =
(hex2dec(tmp_str[2]) << 4) + hex2dec(tmp_str[3]);
color_hexes[NUM_COLORS][2] =
(hex2dec(tmp_str[4]) << 4) + hex2dec(tmp_str[5]);
color_names[NUM_COLORS] = strdup(str + count);
NUM_COLORS++;
}
@ -6675,7 +6678,7 @@ static void setup(int argc, char *argv[])
(hex2dec(tmp_str[1]) << 4) + hex2dec(tmp_str[1]);
color_hexes[NUM_COLORS][2] =
(hex2dec(tmp_str[2]) << 4) + hex2dec(tmp_str[2]);
color_names[NUM_COLORS] = strdup(str + count);
NUM_COLORS++;
}
@ -6710,13 +6713,13 @@ static void setup(int argc, char *argv[])
free(color_names[i]);
free(color_hexes[i]);
}
free(color_names);
free(color_hexes);
}
}
}
/* Use default, if no file specified (or trouble opening it) */
if (colorfile[0] == '\0')
@ -6725,7 +6728,7 @@ static void setup(int argc, char *argv[])
color_hexes = malloc(sizeof(Uint8 *) * NUM_COLORS);
color_names = malloc(sizeof(char *) * NUM_COLORS);
for (i = 0; i < NUM_COLORS; i++)
{
color_hexes[i] = malloc(sizeof(Uint8 *) * 3);
@ -6740,7 +6743,7 @@ static void setup(int argc, char *argv[])
setup_screen_layout();
/* Set window icon and caption: */
#ifndef __APPLE__
@ -6748,6 +6751,10 @@ static void setup(int argc, char *argv[])
#endif
SDL_WM_SetCaption("Tux Paint", "Tux Paint");
#ifdef NOKIA_770
SDL_ShowCursor (SDL_DISABLE);
#endif
/* Open Window: */
if (fullscreen)
@ -6845,8 +6852,14 @@ static void setup(int argc, char *argv[])
exit(1);
}
#ifdef NOKIA_770
snprintf(tmp_str, sizeof(tmp_str), "Version: %s %s - Maemo", VER_VERSION,
VER_DATE);
#else
snprintf(tmp_str, sizeof(tmp_str), "Version: %s %s", VER_VERSION,
VER_DATE);
#endif
tmp_surf = render_text(medium_font, tmp_str, black);
dest.x = 10;
dest.y = WINDOW_HEIGHT - img_progress->h - tmp_surf->h;
@ -6857,7 +6870,7 @@ static void setup(int argc, char *argv[])
printf("%s\n", tmp_str);
#endif
snprintf(tmp_str, sizeof(tmp_str), "© 20022006 Bill Kendrick et al.");
snprintf(tmp_str, sizeof(tmp_str), "© 2002~@~S2006 Bill Kendrick et al.");
tmp_surf = render_text(medium_font, tmp_str, black);
dest.x = 10;
dest.y = WINDOW_HEIGHT - img_progress->h - (tmp_surf->h * 2);
@ -7906,11 +7919,11 @@ static void draw_brushes(void)
{
src.x = 0;
src.y = brushes_directional[brush] ? (img_brushes[brush]->h / 3) : 0;
src.w = (img_brushes[brush]->w / abs(brushes_frames[brush])) /
(brushes_directional[brush] ? 3 : 1);
src.h = (img_brushes[brush]->h / (brushes_directional[brush] ? 3 : 1));
dest.x = ((i % 2) * 48) + (WINDOW_WIDTH - 96) + ((48 - src.w) >> 1);
dest.y = ((i / 2) * 48) + 40 + ((48 - src.h) >> 1) + off_y;
@ -9392,8 +9405,8 @@ static void do_eraser(int x, int y)
update_canvas(x - sz / 2, y - sz / 2, x + sz / 2, y + sz / 2);
rect_xor(x - sz / 2, y - sz / 2, x + sz / 2, y + sz / 2);
#ifdef __APPLE__
#ifdef __APPLE__
/* Prevent ghosted eraser outlines from remaining on the screen in windowed mode */
update_screen(0, 0, WINDOW_WIDTH, WINDOW_HEIGHT);
#endif
@ -11299,11 +11312,13 @@ static void cleanup(void)
free(lock_fname);
}
/* Close up! */
TTF_Quit();
SDL_Quit();
}
@ -13653,7 +13668,7 @@ int do_slideshow(void)
(THUMB_W - 20 - thumbs[i]->w) / 2) + thumbs[i]->w;
dest.y = (THUMB_H * ((i - cur) / 4) + 24 + 10 +
(THUMB_H - 20 - thumbs[i]->h) / 2) + thumbs[i]->h;
draw_selection_digits(dest.x, dest.y, found + 1);
}
}
@ -13699,9 +13714,9 @@ int do_slideshow(void)
dest.y = (48 * 7 + 40 + HEIGHTOFFSET) - img_openlabels_back->h;
SDL_BlitSurface(img_openlabels_back, NULL, screen, &dest);
/* Speed control: */
speeds = 10;
x_per = 96.0 / speeds;
y_per = 48.0 / speeds;
@ -13815,10 +13830,10 @@ int do_slideshow(void)
for (i = found; i < num_selected - 1; i++)
selected[i] = selected[i + 1];
num_selected--;
}
update_list = 1;
}
}
@ -13878,7 +13893,7 @@ int do_slideshow(void)
selected[i] = i;
num_selected = num_files;
}
play_slideshow(selected, num_selected, dirname, d_names, d_exts, speed);
@ -13888,12 +13903,12 @@ int do_slideshow(void)
draw_toolbar();
draw_colors(COLORSEL_CLOBBER_WIPE);
draw_none();
freeme = textdir(gettext_noop("Choose the pictures you want, "
"then click “Play”."));
draw_tux_text(TUX_BORED, freeme, 1);
free(freeme);
SDL_Flip(screen);
update_list = 1;
@ -13903,7 +13918,7 @@ int do_slideshow(void)
event.button.y < (48 * 7 + 40 + HEIGHTOFFSET))
{
/* Speed slider */
int old_speed, control_sound, click_x;
old_speed = speed;
@ -14072,7 +14087,7 @@ void play_slideshow(int * selected, int num_selected, char * dirname,
do_setcursor(cursor_tiny);
done = 0;
do
{
for (i = 0; i < num_selected && !done; i++)
@ -14126,7 +14141,7 @@ void play_slideshow(int * selected, int num_selected, char * dirname,
dest.y = screen->h - img_openlabels_back->h;
SDL_BlitSurface(img_openlabels_back, NULL, screen, &dest);
/* "Next" button: */
dest.x = 0;
@ -14137,7 +14152,7 @@ void play_slideshow(int * selected, int num_selected, char * dirname,
dest.y = screen->h - img_openlabels_next->h;
SDL_BlitSurface(img_openlabels_next, NULL, screen, &dest);
SDL_Flip(screen);
@ -14145,7 +14160,7 @@ void play_slideshow(int * selected, int num_selected, char * dirname,
next = 0;
last_ticks = SDL_GetTicks();
do
{
while (SDL_PollEvent(&event))
@ -14153,7 +14168,7 @@ void play_slideshow(int * selected, int num_selected, char * dirname,
if (event.type == SDL_QUIT)
{
/* FIXME: Handle SDL_QUIT better! */
next = 1;
done = 1;
}
@ -14166,7 +14181,7 @@ void play_slideshow(int * selected, int num_selected, char * dirname,
if (key == SDLK_RETURN || key == SDLK_SPACE || key == SDLK_RIGHT)
{
/* RETURN, SPACE or RIGHT: Skip to next right away! */
next = 1;
playsound(screen, 1, SND_CLICK, 1, SNDPOS_LEFT, SNDDIST_NEAR);
}
@ -14248,7 +14263,7 @@ void play_slideshow(int * selected, int num_selected, char * dirname,
}
}
while (!done);
strcpy(starter_id, tmp_starter_id);
free(tmp_starter_id);
@ -15758,7 +15773,7 @@ SDL_Surface * load_svg(char * file)
#endif
return(NULL);
}
// Parse the SVG file:
if (svg_cairo_parse(scr, file) != SVG_CAIRO_STATUS_SUCCESS)
{
@ -15774,7 +15789,7 @@ SDL_Surface * load_svg(char * file)
#ifdef DEBUG
printf("svg_get_size(): %d x %d\n", rwidth, rheight);
#endif
if (rwidth == 0 || rheight == 0)
{
svg_cairo_destroy(scr);
@ -15788,7 +15803,7 @@ SDL_Surface * load_svg(char * file)
// the screen SDL format, but we are interested in the alpha bit...
bpp = 32;
btpp = 4;
// We want to render at full Tux Paint canvas size, so that the stamp
// at its largest scale remains highest quality (no pixelization):
// (but not messing up the aspect ratio)
@ -15856,7 +15871,7 @@ SDL_Surface * load_svg(char * file)
// Create the SDL surface using the pixel data stored:
sdl_surface_tmp = SDL_CreateRGBSurfaceFrom((void *) image, width, height,
bpp, stride,
bpp, stride,
rmask, gmask, bmask, amask);
if (sdl_surface_tmp == NULL)
@ -15951,7 +15966,7 @@ float pick_best_scape(unsigned int orig_w, unsigned int orig_h,
// Taller-than-wide
scale = hscale;
#ifdef DEBUG
printf("Taller-than-wide. Using hscale.\n");
printf("new size would be: %d x %d\n",
@ -15962,7 +15977,7 @@ float pick_best_scape(unsigned int orig_w, unsigned int orig_h,
if ((float) orig_w * scale > (float) max_w)
{
scale = wscale;
#ifdef DEBUG
printf("Too wide! Using wscale!\n");
printf("new size would be: %d x %d\n",
@ -15982,4 +15997,3 @@ float pick_best_scape(unsigned int orig_w, unsigned int orig_h,
}
#endif