From a87a7dcff54e10d1f16630228b87ca7648881bdd Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Mon, 2 Nov 2009 18:33:44 -0800 Subject: [PATCH] New "-w" option to luminotes.py that prevents web browser from opening when Luminotes Desktop is started. Patch from Pete Burgers. --- NEWS | 2 ++ luminotes.py | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index c9762fa..3665fbe 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,8 @@ * Now stripping certain invisible placeholder characters from print version of Luminotes notebooks. These characters could show up when copy and pasted into another application. + * New "-w" option to luminotes.py that prevents web browser from opening when + Luminotes Desktop is started. Patch from Pete Burgers. 1.6.17: July 26, 2009 * Fixed a bug that caused ever-growing notes in Internet Explorer 8. diff --git a/luminotes.py b/luminotes.py index d7e7022..7de54aa 100755 --- a/luminotes.py +++ b/luminotes.py @@ -50,7 +50,11 @@ def main( args ): cherrypy.config.update( settings ) - launch_browser = cherrypy.config.configMap[ u"global" ].get( u"luminotes.launch_browser" ) + # Don't launch web browser if -w flag is set + if args and "-w" in args: + launch_browser = False + else: + launch_browser = cherrypy.config.configMap[ u"global" ].get( u"luminotes.launch_browser" ) socket.setdefaulttimeout( INITIAL_SOCKET_TIMEOUT_SECONDS ) port_filename = cherrypy.config.configMap[ u"global" ].get( u"luminotes.port_file" )