[PC-BSD Commits] r1133 - in pbibuild/modules/firefox: . overlay-dir overlay-dir/bin
svn at pcbsd.org
svn at pcbsd.org
Thu Jan 10 09:00:22 PST 2008
Author: kris
Date: 2008-01-10 09:00:22 -0800 (Thu, 10 Jan 2008)
New Revision: 1133
Added:
pbibuild/modules/firefox/overlay-dir/bin/defaultemail
Modified:
pbibuild/modules/firefox/build.sh
pbibuild/modules/firefox/overlay-dir/PBI.SetupScript.sh
pbibuild/modules/firefox/pbi.conf
Log:
Updated Firefox to use a defaultemail client when clicking mailto: links,
and also to ask if the user wants to make FF the default browser
Modified: pbibuild/modules/firefox/build.sh
===================================================================
--- pbibuild/modules/firefox/build.sh 2008-01-10 16:31:34 UTC (rev 1132)
+++ pbibuild/modules/firefox/build.sh 2008-01-10 17:00:22 UTC (rev 1133)
@@ -40,4 +40,6 @@
# Copy over the lang-packs
tar cvf - -C /usr/local/lib/xpi/ . | tar xvf - -C ${PBIDIR}/autolibs/firefox/extensions/
+# Now append our prefs file with the default email script
+echo "pref("network.protocol-handler.app.mailto", "/Programs/Firefox${PORTVER}/bin/defaultemail");" >> ${PBIDIR}/autolibs/firefox/greprefs/all.js
Modified: pbibuild/modules/firefox/overlay-dir/PBI.SetupScript.sh
===================================================================
--- pbibuild/modules/firefox/overlay-dir/PBI.SetupScript.sh 2008-01-10 16:31:34 UTC (rev 1132)
+++ pbibuild/modules/firefox/overlay-dir/PBI.SetupScript.sh 2008-01-10 17:00:22 UTC (rev 1133)
@@ -16,4 +16,45 @@
#########################################
ln -s /Programs/${PROGDIR}/.sbin/firefox /usr/local/bin/firefox
ln -s /Programs/${PROGDIR}/autolibs/firefox /usr/local/lib/firefox
+
+
+if [ ! -z "$DISPLAY" ]
+then
+
+USER="$USERNAME"
+if [ "$USER" != "root" ]
+then
+ HOMEDIR="/home/${USER}"
+else
+ HOMEDIR="/root"
+fi
+
+ # Ask if we should make this the default browser application for our user
+ kdialog --yesno "Do you want to make Firefox the default browser?" --title "Default browser?"
+ if [ "$?" = "0" ]
+ then
+ # Strip out the old BrowserApplication line to make way for the new
+ cat ${HOMEDIR}/.kde/share/config/kdeglobals | grep -v '^BrowserApplication' > ${HOMEDIR}/.kdeglobals.new
+
+ touch ${HOMEDIR}/.kdeglobals.new2
+ while read line
+ do
+
+ if [ "$line" = "[General]" ]
+ then
+ echo "$line" >> ${HOMEDIR}/.kdeglobals.new2
+ echo "BrowserApplication=/usr/local/bin/firefox" >> ${HOMEDIR}/.kdeglobals.new2
+ else
+ echo "$line" >> ${HOMEDIR}/.kdeglobals.new2
+ fi
+ done < ${HOMEDIR}/.kdeglobals.new
+
+ # all finished, now move it back over kdeglobals
+ rm ${HOMEDIR}/.kdeglobals.new
+ chown ${USERNAME}:${USERNAME} ${HOMEDIR}/.kdeglobals.new2
+ mv ${HOMEDIR}/.kdeglobals.new2 ${HOMEDIR}/.kde/share/config/kdeglobals
+ fi
+
+fi
+
echo "LAUNCHCLOSE: /usr/local/bin/firefox"
Added: pbibuild/modules/firefox/overlay-dir/bin/defaultemail
Property changes on: pbibuild/modules/firefox/overlay-dir/bin/defaultemail
___________________________________________________________________
Name: svn:executable
+ *
Modified: pbibuild/modules/firefox/pbi.conf
===================================================================
--- pbibuild/modules/firefox/pbi.conf 2008-01-10 16:31:34 UTC (rev 1132)
+++ pbibuild/modules/firefox/pbi.conf 2008-01-10 17:00:22 UTC (rev 1133)
@@ -32,6 +32,6 @@
# Build Key - Change this to anything else to trigger a rebuild
# - The rebuild will take place even if port is still the same ver
-BUILDKEY="20"
+BUILDKEY="10"
export PBIPORT MAKEOPTS PROGNAME PROGWEB PROGAUTHOR OTHERPORT PROGICON PROGLIBS PBIUPDATE BUILDKEY
More information about the Commits
mailing list