summaryrefslogtreecommitdiff
path: root/!NetSurf/!Run,feb
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2006-05-20 19:25:52 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2006-05-20 19:25:52 +0000
commit581ad55c90102c9ac79a6068f125dcc2d84c3a3f (patch)
tree794389bb28712da17f9bdd0d06b7b7ddf6d4e8e1 /!NetSurf/!Run,feb
parentfa5156cfcaa91b29855b2679f1537bc7815a83ee (diff)
downloadnetsurf-581ad55c90102c9ac79a6068f125dcc2d84c3a3f.tar.gz
netsurf-581ad55c90102c9ac79a6068f125dcc2d84c3a3f.tar.bz2
Improve handling of attempts to run NetSurf twice
svn path=/trunk/netsurf/; revision=2604
Diffstat (limited to '!NetSurf/!Run,feb')
-rw-r--r--!NetSurf/!Run,feb11
1 files changed, 11 insertions, 0 deletions
diff --git a/!NetSurf/!Run,feb b/!NetSurf/!Run,feb
index 248f67678..130668174 100644
--- a/!NetSurf/!Run,feb
+++ b/!NetSurf/!Run,feb
@@ -9,6 +9,17 @@ Set NetSurf$ForceVars 1
<Obey$Dir>.!Boot
UnSet NetSurf$ForceVars
+| Detect if NetSurf is already running and, if so, force the
+| current instance to open a new window. Then stop this script.
+Set Alias$NetSurfRunning UnSet Alias$NetSurfRunning|mUnSet NetSurf$Running|mObey
+Set NetSurf$Running 0
+WimpSlot -min 64k -max 64k
+/<NetSurf$Dir>.KickNS
+| If not running, then unset system variables and continue
+If "<NetSurf$Running>" = "0" Then Set Alias$NetSurfRunning UnSet Alias$NetSurfRunning|mUnSet NetSurf$Running
+| Invoke our alias to clean up
+NetSurfRunning
+
| Resource Locations
| The following are read-only locations
SetMacro NetSurf$Path Choices:WWW.NetSurf.,<NetSurf$Dir>.