diff options
author | marcus <marcus@FreeBSD.org> | 2002-11-24 08:24:04 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2002-11-24 08:24:04 +0800 |
commit | b1c38d310f23d32319e1c368aa770e49adc18521 (patch) | |
tree | d7b8b5c3cdbbd105c83dbc1cc47e48106580430a /www/seamonkey2/files | |
parent | f03697bdcc62a0dc29a18644b33ae22d07db423c (diff) | |
download | freebsd-ports-gnome-b1c38d310f23d32319e1c368aa770e49adc18521.tar.gz freebsd-ports-gnome-b1c38d310f23d32319e1c368aa770e49adc18521.tar.zst freebsd-ports-gnome-b1c38d310f23d32319e1c368aa770e49adc18521.zip |
Make the Mozilla startup scripts a little smarter. Instead of launching a
new Mozilla instance each time, check to see if one already exists, and if
so, spawn a new browser tab in the current window.
PR: 45610
Submitted by: Nick Jennings
Diffstat (limited to 'www/seamonkey2/files')
-rw-r--r-- | www/seamonkey2/files/mozilla.sh | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/www/seamonkey2/files/mozilla.sh b/www/seamonkey2/files/mozilla.sh index efea04a63e16..0e34950cd32c 100644 --- a/www/seamonkey2/files/mozilla.sh +++ b/www/seamonkey2/files/mozilla.sh @@ -1,6 +1,22 @@ #!/bin/sh -# -# $FreeBSD$ -cd @PREFIX@/lib/%%MOZILLA%% -exec ./mozilla "$@" +MOZILLA_DIR="%%PREFIX%%/lib/%%MOZILLA%%" +MOZILLA_EXEC="mozilla" +LOCATION='new-tab' + +cd $MOZILLA_DIR || exit 1 + +# catch calls for mozilla mail +if [ "$1" = "-mail" ]; then + REMOTE_COMMAND="xfeDoCommand (openInbox)" +else + REMOTE_COMMAND="openURL($@, $LOCATION)" +fi + +# process found +./$MOZILLA_EXEC -remote "ping()" && +./$MOZILLA_EXEC -remote "$REMOTE_COMMAND" && exit 0 + +# no existing process +exec ./$MOZILLA_EXEC "$@" + |