From 10fc8351a84a2df9f7f230824eec998ff29149ed Mon Sep 17 00:00:00 2001 From: William Kendrick Date: Tue, 23 Oct 2007 16:11:12 +0000 Subject: [PATCH] Lockfile usage can be disabled via config. file now, too. --- Makefile | 4 ++-- docs/CHANGES.txt | 4 +++- docs/OPTIONS.txt | 36 +++++++++++++++++++----------------- docs/html/OPTIONS.html | 41 ++++++++++++++++++++++------------------- src/tuxpaint.c | 12 +++++++++++- 5 files changed, 57 insertions(+), 40 deletions(-) diff --git a/Makefile b/Makefile index bf72ca8fd..66e39398d 100644 --- a/Makefile +++ b/Makefile @@ -7,12 +7,12 @@ # bill@newbreedsoftware.com # http://www.tuxpaint.org/ -# June 14, 2002 - Octobr 20, 2007 +# June 14, 2002 - Octobr 23, 2007 # The version number, for release: -VER_VERSION=0.9.18rc1 +VER_VERSION=0.9.18rc2 VER_DATE=`date +"%Y-%m-%d"` MAGIC_API_VERSION=0x00000001 diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index 1e9a66fee..2a23e68d6 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -9,7 +9,7 @@ http://www.tuxpaint.org/ $Id$ -2007.October.14 (0.9.18) +2007.October.23 (0.9.18) * Interface Improvements: ----------------------- * Improved 'New' and 'Open' interface: @@ -104,6 +104,8 @@ $Id$ * Windows installation (Innosetup .iss file) more silent, to help it work with WPKG software deployment tool. [SourceForge Bug #1787000] + * Lockfile can be disabled via options file ("nolockfile=yes") now, too. + * New Brushes ----------- * Sparkles (based on old Magic Tool) diff --git a/docs/OPTIONS.txt b/docs/OPTIONS.txt index ac78e256a..c9ca2463d 100644 --- a/docs/OPTIONS.txt +++ b/docs/OPTIONS.txt @@ -9,7 +9,7 @@ bill@newbreedsoftware.com http://www.tuxpaint.org/ - October 14, 2007 + October 23, 2007 -------------------------------------------------------------------------- @@ -212,6 +212,22 @@ Windows Users halfnote, folio, quarto, ledger, archA, archB, archC, archD, archE, flsa, flse, csheet, dsheet, esheet. + nolockfile=yes + + By default, Tux Paint uses what's known as a 'lockfile' to + prevent it from being launched more than once in 30 seconds. + (This is to avoid accidentally running multiple copies; for + example, by double-clicking a single-click launcher, or simply + impatiently clicking the icon multiple times.) + + To make Tux Paint ignore the lockfile, allowing it to run again, + even if it was just launched less than 30 seconds ago, enable + this setting in the configuration file, or run Tux Paint with + the '--nolockfile' option on the command-line. + + By default, the lockfile is stored in "~/.tuxpaint/" under Linux + and Unix, and "userdata\" under Windows. + simpleshapes=yes Disable the rotation step of the 'Shape' tool. Click, drag and release is all that will be needed to draw a shape. @@ -639,6 +655,7 @@ Windows Users --altprintnever --altprintalways --papersize=PAPERSIZE + --nolockfile --simpleshapes --uppercase --grab @@ -676,6 +693,7 @@ Windows Users --printdelay=0 --noprintcfg --altprintmod + --lockfile --complexshapes --mixedcase --dontgrab @@ -718,22 +736,6 @@ Windows Users Only your own configuration file, "~/.tuxpaintrc", if it exists, will be used. - --nolockfile - - By default, Tux Paint uses what's known as a 'lockfile' to - prevent it from being launched more than once in 30 seconds. - (This is to avoid accidentally running multiple copies; for - example, by double-clicking a single-click launcher, or simply - impatiently clicking the icon multiple times.) - - To make Tux Paint ignore the lockfile, allowing it to run - again, even if it was just launched less than 30 seconds ago, - run Tux Paint with the '--nolockfile' option on the - command-line. - - By default, the lockfile is stored in "~/.tuxpaint/" under - Linux and Unix, and "userdata\" under Windows. - -------------------------------------------------------------------------- Command-Line Informational Options diff --git a/docs/html/OPTIONS.html b/docs/html/OPTIONS.html index 369aaaa98..ce952fad0 100644 --- a/docs/html/OPTIONS.html +++ b/docs/html/OPTIONS.html @@ -23,7 +23,7 @@ New Breed Software

http://www.tuxpaint.org/

-

October 14, 2007

+

October 23, 2007

@@ -276,6 +276,25 @@ New Breed Software

+
nolockfile=yes
+
+

By default, Tux Paint uses what's known as a 'lockfile' + to prevent it from being launched more than once in 30 seconds. + (This is to avoid accidentally running multiple copies; for example, + by double-clicking a single-click launcher, or simply + impatiently clicking the icon multiple times.)

+ +

To make Tux Paint ignore the lockfile, allowing it to + run again, even if it was just launched less than 30 seconds + ago, enable this setting in the configuration file, or + run Tux Paint with the '--nolockfile' option + on the command-line.

+ +

By default, the lockfile is stored in + "~/.tuxpaint/" under Linux and Unix, + and "userdata\" under Windows.

+
+
simpleshapes=yes
Disable the rotation step of the 'Shape' tool. @@ -983,6 +1002,7 @@ New Breed Software

--altprintnever
--altprintalways
--papersize=PAPERSIZE
+ --nolockfile
--simpleshapes
--uppercase
--grab
@@ -1023,6 +1043,7 @@ New Breed Software

--printdelay=0
--noprintcfg
--altprintmod
+ --lockfile
--complexshapes
--mixedcase
--dontgrab
@@ -1071,24 +1092,6 @@ New Breed Software

Only your own configuration file, "~/.tuxpaintrc", if it exists, will be used.

- -
--nolockfile
-
-

By default, Tux Paint uses what's known as a 'lockfile' - to prevent it from being launched more than once in 30 seconds. - (This is to avoid accidentally running multiple copies; for example, - by double-clicking a single-click launcher, or simply - impatiently clicking the icon multiple times.)

- -

To make Tux Paint ignore the lockfile, allowing it to - run again, even if it was just launched less than 30 seconds - ago, run Tux Paint with the '--nolockfile' option - on the command-line.

- -

By default, the lockfile is stored in - "~/.tuxpaint/" under Linux and Unix, - and "userdata\" under Windows.

-
diff --git a/src/tuxpaint.c b/src/tuxpaint.c index 0c409dbac..aabdece33 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 - September 25, 2007 + June 14, 2002 - October 23, 2007 $Id$ */ @@ -6655,6 +6655,11 @@ static void setup(int argc, char *argv[]) debug("Not using lockfile"); ok_to_use_lockfile = 0; } + else if (strcmp(argv[i], "--lockfile") == 0) + { + debug("Using lockfile"); + ok_to_use_lockfile = 1; + } else { show_usage(stderr, (char *) getfilename(argv[0])); @@ -15761,6 +15766,11 @@ static void parse_options(FILE * fi) printf("datadir set to: %s\n", datadir); #endif } + else if (strcmp(str, "nolockfile=yes") == 0 || + strcmp(str, "lockfile=no") == 0) + { + ok_to_use_lockfile = 0; + } } } while (!feof(fi));