From ceba973d946742c845c38b8116d629b3c9cdce08 Mon Sep 17 00:00:00 2001 From: wkendrick Date: Fri, 23 Sep 2011 18:41:09 +0000 Subject: Right-side image on dialogs would be scaled/cut-off even if it was the only one. Could not print the first time until 'print delay' passed. --- diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index f10e06a..1f355ac 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -6,9 +6,9 @@ Copyright (c) 2002-2011 by Bill Kendrick and others bill@newbreedsoftware.com http://www.tuxpaint.org/ -$Id: CHANGES.txt,v 1.786 2011/08/09 18:41:30 wkendrick Exp $ +$Id: CHANGES.txt,v 1.787 2011/09/23 18:41:09 wkendrick Exp $ -2011.July.2 (0.9.22) +2011.September.23 (0.9.22) * New Tools: ---------- @@ -480,6 +480,12 @@ $Id: CHANGES.txt,v 1.786 2011/08/09 18:41:30 wkendrick Exp $ * Bug Fixes --------- + * Image on right of dialogs would get scaled/cut-off even if there was + room for them. + + * When using 'print delay' option, it would not allow printing the + first time until the delay had passed. + * Fixed error reporting when make_directory() fails. (Fixes spurious SF.net Bug #2765872) diff --git a/src/tuxpaint.c b/src/tuxpaint.c index d4e9e6b..3852e76 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - June 14, 2002 - July 26, 2011 + June 14, 2002 - September 23, 2011 */ @@ -1111,6 +1111,7 @@ static int starter_modified; static Uint8 canvas_color_r, canvas_color_g, canvas_color_b; static Uint8 * touched; +static int last_print_time = 0; static int shape_radius; @@ -11892,7 +11893,7 @@ static int do_prompt_image_flash_snd(const char *const text, if (img1 != NULL) { - if (img1->h > 64) + if (img1->h > 64 && img2 != NULL /* Only scale if it matters */) { img1b = thumbnail(img1, 80, 64, 1); free_img1b = 1; @@ -16121,7 +16122,6 @@ static void hsvtorgb(float h, float s, float v, Uint8 * r8, Uint8 * g8, static void print_image(void) { - static int last_print_time = 0; int cur_time; cur_time = SDL_GetTicks() / 1000; @@ -21578,8 +21578,10 @@ static void setup_config(char *argv[]) rotate_orientation = !strcmp(tmpcfg.rotate_orientation, "portrait"); // alternative is "landscape" if(tmpcfg.colorfile) strcpy(colorfile, tmpcfg.colorfile); // FIXME can overflow - if(tmpcfg.print_delay) + if(tmpcfg.print_delay) { print_delay = atoi(tmpcfg.print_delay); + last_print_time = -print_delay; + } #ifdef PAPER_H if(tmpcfg.printcommand) printcommand = tmpcfg.printcommand; -- cgit v0.9.1