SOURCES: iceweasel.sh, iceweasel.desktop - taken from firefox 3.0 for new i...
hawk
hawk at pld-linux.org
Mon Jun 23 12:15:50 CEST 2008
Author: hawk Date: Mon Jun 23 10:15:50 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- taken from firefox 3.0 for new iceweasel
---- Files affected:
SOURCES:
iceweasel.sh (1.1 -> 1.2) , iceweasel.desktop (1.2 -> 1.3)
---- Diffs:
================================================================
Index: SOURCES/iceweasel.sh
diff -u SOURCES/iceweasel.sh:1.1 SOURCES/iceweasel.sh:1.2
--- SOURCES/iceweasel.sh:1.1 Sun Oct 15 20:30:19 2006
+++ SOURCES/iceweasel.sh Mon Jun 23 12:15:44 2008
@@ -1,21 +1,15 @@
#!/bin/sh
# based on script by (c) vip at linux.pl, wolf at pld-linux.org
-# using mozilla-launcher by glen at pld-linux.org
-# copied from swiftfox.sh by czarny at pld-linux.org
-#
-# Stub script to run mozilla-launcher. We used to use a symlink here
-# but OOo brokenness makes it necessary to use a stub instead:
-# http://bugs.gentoo.org/show_bug.cgi?id=78890
-
-export MOZILLA_LAUNCHER=@APPNAME@
-export MOZILLA_LIBDIR=@LIBDIR@/@APPNAME@
-
-mozlocale=$(/usr/bin/locale | awk -F= '/^LC_MESSAGES=/{print $2}' | xargs)
-mozlocale="$LANGUAGE ${mozlocale%.*}"
-for MOZLANG in $mozlocale; do
- MOZLANG=$(echo $MOZLANG | sed -e 's|_\([^.]*\).*|-\1|')
- if [ -f $MOZILLA_LIBDIR/chrome/$MOZLANG.jar ]; then
+LIBDIR="@LIBDIR@/iceweasel"
+
+MOZARGS=
+MOZLOCALE="$(/usr/bin/locale | grep "^LC_MESSAGES=" | \
+ sed -e "s|LC_MESSAGES=||g" -e "s|\"||g" )"
+for MOZLANG in $(echo $LANGUAGE | tr ":" " ") $MOZLOCALE; do
+ eval MOZLANG="$(echo $MOZLANG | sed -e "s|_\([^.]*\).*|-\1|g")"
+
+ if [ -f $LIBDIR/chrome/$MOZLANG.jar ]; then
MOZARGS="-UILocale $MOZLANG"
break
fi
@@ -23,10 +17,11 @@
if [ -z "$MOZARGS" ]; then
# try harder
- for MOZLANG in $mozlocale; do
- MOZLANG=$(echo $MOZLANG | sed -e 's|_.*||')
+ for MOZLANG in $(echo $LANGUAGE | tr ":" " ") $MOZLOCALE; do
+ eval MOZLANG="$(echo $MOZLANG | sed -e "s|_.*||g")"
- LANGFILE=$(echo ${MOZILLA_LIBDIR}/chrome/${MOZLANG}*.jar | sed 's/\s.*//g')
+ LANGFILE=$(echo $LIBDIR/chrome/${MOZLANG}*.jar \
+ | sed 's/\s.*//g' )
if [ -f "$LANGFILE" ]; then
MOZLANG=$(basename "$LANGFILE" | sed 's/\.jar//')
MOZARGS="-UILocale $MOZLANG"
@@ -35,4 +30,50 @@
done
fi
-exec /usr/lib/mozilla-launcher $MOZARGS "$@"
+# compreg.dat and/or chrome.rdf will screw things up if it's from an
+# older version. http://bugs.gentoo.org/show_bug.cgi?id=63999
+for f in ~/{.,.mozilla/}iceweasel/*/{compreg.dat,chrome.rdf,XUL.mfasl}; do
+ if [[ -f ${f} && ${f} -ot /usr/bin/iceweasel ]]; then
+ echo "Removing ${f} leftover from older iceweasel"
+ rm -f "${f}"
+ fi
+done
+
+if [ -n "$MOZARGS" ]; then
+ ICEWEASEL="$LIBDIR/iceweasel $MOZARGS"
+else
+ ICEWEASEL="$LIBDIR/iceweasel"
+fi
+
+if [ "$1" == "-remote" ]; then
+ exec $ICEWEASEL "$@"
+else
+ PING=`$ICEWEASEL -remote 'ping()' 2>&1 >/dev/null`
+ if [ -n "$PING" ]; then
+ if [ -f "`pwd`/$1" ]; then
+ exec $ICEWEASEL "file://`pwd`/$1"
+ else
+ exec $ICEWEASEL "$@"
+ fi
+ else
+ if [ -z "$1" ]; then
+ exec $ICEWEASEL -remote 'xfeDoCommand(openBrowser)'
+ elif [ "$1" == "-mail" ]; then
+ exec $ICEWEASEL -remote 'xfeDoCommand(openInbox)'
+ elif [ "$1" == "-compose" ]; then
+ exec $ICEWEASEL -remote 'xfeDoCommand(composeMessage)'
+ else
+ if [ -f "`pwd`/$1" ]; then
+ URL="file://`pwd`/$1"
+ else
+ URL="$1"
+ fi
+ grep browser.tabs.opentabfor.middleclick ~/.mozilla/iceweasel/*/prefs.js | grep false > /dev/null
+ if [ $? -ne 0 ]; then
+ exec $ICEWEASEL -new-tab "$URL"
+ else
+ exec $ICEWEASEL -new-window "$URL"
+ fi
+ fi
+ fi
+fi
================================================================
Index: SOURCES/iceweasel.desktop
diff -u SOURCES/iceweasel.desktop:1.2 SOURCES/iceweasel.desktop:1.3
--- SOURCES/iceweasel.desktop:1.2 Wed Dec 26 14:39:40 2007
+++ SOURCES/iceweasel.desktop Mon Jun 23 12:15:44 2008
@@ -1,8 +1,10 @@
[Desktop Entry]
Name=Iceweasel
Name[pl]=Iceweasel
-Comment=Web browser
-Comment[pl]=Przeglądarka WWW
+GenericName=Web Browser
+GenericName[pl]=Przeglądarka WWW
+Comment=Browse the Web powered by Mozilla technology
+Comment[pl]=Przeglądarka WWW oparta o technologię Mozilli
Exec=iceweasel
Icon=iceweasel
Terminal=false
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/iceweasel.sh?r1=1.1&r2=1.2&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/iceweasel.desktop?r1=1.2&r2=1.3&f=u
More information about the pld-cvs-commit
mailing list