Added "startblank" option, to cause Tux Paint to always start with a blank canvas.

This commit is contained in:
William Kendrick 2006-09-09 21:50:52 +00:00
parent e246a24f66
commit 4f902a3397
5 changed files with 56 additions and 8 deletions

View file

@ -9,7 +9,7 @@ http://www.newbreedsoftware.com/tuxpaint/
$Id$ $Id$
2006.September.6 (0.9.16) 2006.September.9 (0.9.16)
* Interface improvements: * Interface improvements:
----------------------- -----------------------
@ -43,6 +43,9 @@ $Id$
Discovered (or assumed) window size and directory settings are shown Discovered (or assumed) window size and directory settings are shown
when tuxpaint-import is first run (even with no arguments). when tuxpaint-import is first run (even with no arguments).
* "startblank" option added, to cause Tux Paint to always start with
a blank canvas (rather than loading the most-recently-edited image).
* In windowed mode, Tux Paint tries to open its window in the center * In windowed mode, Tux Paint tries to open its window in the center
of the screen (if supported by the OS or window manager). of the screen (if supported by the OS or window manager).

View file

@ -9,7 +9,7 @@
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.newbreedsoftware.com/tuxpaint/ http://www.newbreedsoftware.com/tuxpaint/
April 29, 2006 September 9, 2006
-------------------------------------------------------------------------- --------------------------------------------------------------------------
@ -310,6 +310,11 @@ Windows Users
situations where the program is only being used for fun, or in a situations where the program is only being used for fun, or in a
test environment. test environment.
startblank=yes
This causes Tux Paint to display a blank canvas when it first
starts up, rather than loading the last image that was being
edited.
lang=LANGUAGE lang=LANGUAGE
Run Tux Paint in one of the supported languages. Possible choice Run Tux Paint in one of the supported languages. Possible choice
@ -474,6 +479,7 @@ Windows Users
--1280x1204 --1280x1204
--1400x1050 --1400x1050
--1600x1200 --1600x1200
--startblank
--nosound --nosound
--noquit --noquit
--noprint --noprint
@ -504,6 +510,7 @@ Windows Users
--windowed --windowed
--640x480 --640x480
--startlast
--sound --sound
--quit --quit
--print --print

View file

@ -22,7 +22,7 @@ New Breed Software</p>
<p><a href="mailto:bill@newbreedsoftware.com">bill@newbreedsoftware.com</a><br> <p><a href="mailto:bill@newbreedsoftware.com">bill@newbreedsoftware.com</a><br>
<a href="http://www.newbreedsoftware.com/tuxpaint/">http://www.newbreedsoftware.com/tuxpaint/</a></p> <a href="http://www.newbreedsoftware.com/tuxpaint/">http://www.newbreedsoftware.com/tuxpaint/</a></p>
<p>April 29, 2006</p> <p>September 9, 2006</p>
</center> </center>
<hr size=2 noshade> <hr size=2 noshade>
@ -384,6 +384,12 @@ New Breed Software</p>
fun, or in a test environment. fun, or in a test environment.
</dd> </dd>
<dt><code><b>startblank=yes</b></code</dt>
<dd>
This causes Tux&nbsp;Paint to display a blank canvas when it first
starts up, rather than loading the last image that was being edited.
</dd>
<dt><code><b>lang=<i>LANGUAGE</i></b></code></dt> <dt><code><b>lang=<i>LANGUAGE</i></b></code></dt>
<dd> <dd>
<p>Run Tux&nbsp;Paint in one of the supported languages. <p>Run Tux&nbsp;Paint in one of the supported languages.
@ -752,6 +758,7 @@ New Breed Software</p>
--1280x1204<br> --1280x1204<br>
--1400x1050<br> --1400x1050<br>
--1600x1200<br> --1600x1200<br>
--startblank<br>
--nosound<br> --nosound<br>
--noquit<br> --noquit<br>
--noprint<br> --noprint<br>
@ -785,6 +792,7 @@ New Breed Software</p>
<dt><code><b> <dt><code><b>
--windowed<br> --windowed<br>
--640x480<br> --640x480<br>
--startlast<br>
--sound<br> --sound<br>
--quit<br> --quit<br>
--print<br> --print<br>

View file

@ -1,5 +1,5 @@
.\" tuxpaint.1 - 2006.09.08 .\" tuxpaint.1 - 2006.09.09
.TH TUXPAINT 1 "8 Sept 2006" "0.9.16" "Tux Paint" .TH TUXPAINT 1 "9 Sept 2006" "0.9.16" "Tux Paint"
.SH NAME .SH NAME
tuxpaint -- A drawing program for young children. tuxpaint -- A drawing program for young children.
@ -11,6 +11,7 @@ tuxpaint -- A drawing program for young children.
.B tuxpaint .B tuxpaint
[\-\-fullscreen] [\-\-fullscreen]
[\-\-800x600 | \-\-1024x768 | \-\-1280x1024 | \-\-1400x1050 | \-\-1600x1200 | \-\-WxH ] [\-\-800x600 | \-\-1024x768 | \-\-1280x1024 | \-\-1400x1050 | \-\-1600x1200 | \-\-WxH ]
[\-\-startblank]
[\-\-nosound] [\-\-nosound]
[\-\-noquit] [\-\-noquit]
[\-\-noprint] [\-\-noprint]
@ -38,6 +39,7 @@ tuxpaint -- A drawing program for young children.
.B tuxpaint .B tuxpaint
[\-\-windowed] [\-\-windowed]
[\-\-640x480] [\-\-640x480]
[\-\-startlast]
[\-\-sound] [\-\-sound]
[\-\-quit] [\-\-quit]
[\-\-print] [\-\-print]
@ -244,6 +246,12 @@ The \fInosave\fP option disables \fITux Paint's\fP ability to save files.
This can be used in situations where the program is only being used for This can be used in situations where the program is only being used for
fun, or in a test environment. fun, or in a test environment.
.TP 8
.B \-\-startblank \-\-startlast
When you start \fITux Paint\fP, it loads the last image that was being worked
on. The \fI\-\-startblank\fP option disables this, so it always starts with
a blank canvas. The default behavior is \fI\-\-startlast\fP.
.SH OPTIONS - LANGUAGE .SH OPTIONS - LANGUAGE
.l .l
Various parts of \fITux Paint\fP have been translated into numerous languages. Various parts of \fITux Paint\fP have been translated into numerous languages.

View file

@ -776,7 +776,8 @@ static int fullscreen, disable_quit, simple_shapes,
dont_do_xor, use_print_config, dont_load_stamps, noshortcuts, dont_do_xor, use_print_config, dont_load_stamps, noshortcuts,
no_button_distinction, no_button_distinction,
mirrorstamps, disable_stamp_controls, disable_save, ok_to_use_lockfile, mirrorstamps, disable_stamp_controls, disable_save, ok_to_use_lockfile,
alt_print_command_default, scrolling = 0; alt_print_command_default, scrolling = 0,
start_blank;
static int want_alt_printcommand; static int want_alt_printcommand;
static int starter_mirrored, starter_flipped, starter_personal; static int starter_mirrored, starter_flipped, starter_personal;
static int recording, playing; static int recording, playing;
@ -1427,7 +1428,9 @@ int main(int argc, char *argv[])
/* Load current image (if any): */ /* Load current image (if any): */
if (start_blank == 0)
load_current(); load_current();
been_saved = 1; been_saved = 1;
tool_avail[TOOL_SAVE] = 0; tool_avail[TOOL_SAVE] = 0;
@ -5164,6 +5167,7 @@ static void show_usage(FILE * f, char *prg)
" %s [--windowed | --fullscreen]\n" " %s [--windowed | --fullscreen]\n"
" %s [--640x480 | --800x600 | --1024x768 |\n" " %s [--640x480 | --800x600 | --1024x768 |\n"
" %s --1280x1024 | --1400x1050 | --1600x1200]\n" " %s --1280x1024 | --1400x1050 | --1600x1200]\n"
" %s [--startblank | --startlast ]\n"
" %s [--sound | --nosound] [--quit | --noquit]\n" " %s [--sound | --nosound] [--quit | --noquit]\n"
" %s [--print | --noprint] [--complexshapes | --simpleshapes]\n" " %s [--print | --noprint] [--complexshapes | --simpleshapes]\n"
" %s [--mixedcase | --uppercase] [--fancycursors | --nofancycursors]\n" " %s [--mixedcase | --uppercase] [--fancycursors | --nofancycursors]\n"
@ -5188,7 +5192,7 @@ static void show_usage(FILE * f, char *prg)
prg, prg, prg, prg,
blank, blank, blank, blank, blank, blank,
blank, blank, blank, blank, blank, blank,
blank, blank, blank, blank, blank, blank, blank, blank, blank, blank, blank, blank, blank, blank, blank, blank, blank,
#ifdef WIN32 #ifdef WIN32
blank, blank,
#endif #endif
@ -5807,6 +5811,7 @@ static void setup(int argc, char *argv[])
recording = 0; recording = 0;
playing = 0; playing = 0;
ok_to_use_lockfile = 1; ok_to_use_lockfile = 1;
start_blank = 0;
#ifdef __BEOS__ #ifdef __BEOS__
@ -5920,6 +5925,14 @@ static void setup(int argc, char *argv[])
{ {
fullscreen = 0; fullscreen = 0;
} }
else if (strcmp(argv[i], "--startblank") == 0 || strcmp(argv[i], "-b") == 0)
{
start_blank = 1;
}
else if (strcmp(argv[i], "--startlast") == 0)
{
start_blank = 0;
}
else if (strcmp(argv[i], "--mirrorstamps") == 0) else if (strcmp(argv[i], "--mirrorstamps") == 0)
{ {
mirrorstamps = 1; mirrorstamps = 1;
@ -14529,6 +14542,15 @@ static void parse_options(FILE * fi)
{ {
fullscreen = 0; fullscreen = 0;
} }
else if (strcmp(str, "startblank=yes") == 0)
{
start_blank = 1;
}
else if (strcmp(str, "startblank=no") == 0 ||
strcmp(str, "startlast=yes") == 0)
{
start_blank = 0;
}
else if (strcmp(str, "nostampcontrols=yes") == 0) else if (strcmp(str, "nostampcontrols=yes") == 0)
{ {
disable_stamp_controls = 1; disable_stamp_controls = 1;