forked from pool/MozillaFirefox
This commit is contained in:
commit
533cbb3b1a
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
37
358797.patch
Normal file
37
358797.patch
Normal file
@ -0,0 +1,37 @@
|
||||
Index: parser/htmlparser/src/nsParser.cpp
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/parser/htmlparser/src/nsParser.cpp,v
|
||||
retrieving revision 3.370.4.4
|
||||
diff -u -p -6 -r3.370.4.4 nsParser.cpp
|
||||
--- parser/htmlparser/src/nsParser.cpp 13 Jul 2006 17:28:08 -0000 3.370.4.4
|
||||
+++ parser/htmlparser/src/nsParser.cpp 1 Nov 2006 23:28:14 -0000
|
||||
@@ -1870,19 +1870,27 @@ nsParser::ParseFragment(const nsAString&
|
||||
if (NS_FAILED(result)) {
|
||||
mFlags |= NS_PARSER_FLAG_OBSERVERS_ENABLED;
|
||||
return result;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIFragmentContentSink> fragSink = do_QueryInterface(mSink);
|
||||
- NS_ASSERTION(fragSink, "ParseFragment requires a fragment content sink");
|
||||
+ if (!fragSink) {
|
||||
+ NS_ERROR("ParseFragment requires a fragment content sink");
|
||||
+ mFlags |= NS_PARSER_FLAG_OBSERVERS_ENABLED;
|
||||
+ return kUnknownError;
|
||||
+ }
|
||||
|
||||
if (!aXMLMode) {
|
||||
// First, we have to flush any tags that don't belong in the head if there
|
||||
// was no <body> in the context.
|
||||
// XXX This is extremely ugly. Maybe CNavDTD should have FlushMisplaced()?
|
||||
- NS_ASSERTION(mParserContext, "Parsing didn't create a parser context?");
|
||||
+ if (!mParserContext) {
|
||||
+ NS_ERROR("Parsing didn't create a parser context?");
|
||||
+ mFlags |= NS_PARSER_FLAG_OBSERVERS_ENABLED;
|
||||
+ return kInvalidParserContext;
|
||||
+ }
|
||||
nsCOMPtr<CNavDTD> dtd = do_QueryInterface(mParserContext->mDTD);
|
||||
|
||||
if (dtd) {
|
||||
CStartToken bodyToken(NS_LITERAL_STRING("BODY"), eHTMLTag_body);
|
||||
nsCParserNode bodyNode(&bodyToken, 0);
|
||||
|
1238
MozillaFirefox.changes
Normal file
1238
MozillaFirefox.changes
Normal file
File diff suppressed because it is too large
Load Diff
12
MozillaFirefox.desktop
Normal file
12
MozillaFirefox.desktop
Normal file
@ -0,0 +1,12 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=Firefox
|
||||
GenericName=Web Browser
|
||||
Comment=Web Browser
|
||||
TryExec=firefox
|
||||
Exec=firefox %u
|
||||
Icon=firefox
|
||||
Terminal=false
|
||||
StartupNotify=true
|
||||
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;
|
||||
Type=Application
|
35
MozillaFirefox.desktop.nld
Normal file
35
MozillaFirefox.desktop.nld
Normal file
@ -0,0 +1,35 @@
|
||||
[Desktop Entry]
|
||||
Name=Firefox Web Browser
|
||||
Name[en]=Firefox Web Browser
|
||||
Name[cs]=Firefox
|
||||
Name[de]=Firefox-Webbrowser
|
||||
Name[fr]=Navigateur Web Firefox
|
||||
Name[es]=Navegador Web Firefox
|
||||
Name[hu]=Firefox webböngésző
|
||||
Name[it]=Browser Web Firefox
|
||||
Name[ja]=Firefox Webブラウザ
|
||||
Name[pl]=Przeglądarka WWW Firefox
|
||||
Name[pt_BR]=Browser da Web Firefox
|
||||
Name[sk]=Firefox
|
||||
Name[zh_CN]=Firefox 万维网浏览器
|
||||
Name[zh_TW]=Firefox 網頁瀏覽器
|
||||
Comment=Firefox Web Browser
|
||||
Comment[en]=Firefox Web Browser
|
||||
Comment[cs]=Prohlížeč Firefox
|
||||
Comment[de]=Firefox-Webbrowser
|
||||
Comment[fr]=Navigateur Web Firefox
|
||||
Comment[es]=Navegador Web Firefox
|
||||
Comment[hu]=Firefox webböngésző
|
||||
Comment[it]=Browser Web Firefox
|
||||
Comment[ja]=Firefox Webブラウザ
|
||||
Comment[pl]=Przeglądarka WWW Firefox
|
||||
Comment[pt_BR]=Browser da Web Firefox
|
||||
Comment[sk]=Firefox Web Browser
|
||||
Comment[zh_CN]=Firefox 万维网浏览器
|
||||
Comment[zh_TW]=Firefox 網頁瀏覽器
|
||||
TryExec=firefox
|
||||
Exec=firefox %u
|
||||
Icon=firefox
|
||||
Terminal=false
|
||||
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;
|
||||
Type=Application
|
1213
MozillaFirefox.spec
Normal file
1213
MozillaFirefox.spec
Normal file
File diff suppressed because it is too large
Load Diff
129
abuild.patch
Normal file
129
abuild.patch
Normal file
@ -0,0 +1,129 @@
|
||||
From: Wolfgang Rosenauer <stark@suse.de>
|
||||
Subject: Fix compiler warnings which disturb autobuild
|
||||
References:
|
||||
|
||||
### autobuild
|
||||
... testing for serious compiler warnings
|
||||
Program is using uninitialized variables. Note the difference between "is used"
|
||||
and "may be used". Please investigate and fix.
|
||||
Problematic file(s) and their linenumbers:
|
||||
certificate.c: 541
|
||||
nsUnicodeToJamoTTF.cpp: 855
|
||||
nsObjectFrame.cpp: 1933
|
||||
###
|
||||
|
||||
### autobuild
|
||||
... testing for serious compiler warnings
|
||||
Program returns random data in a function. Please fix.
|
||||
Problematic file(s) and their linenumbers:
|
||||
nsWebShell.cpp: 562
|
||||
nsOperaProfileMigrator.cpp: 831
|
||||
Program is using uninitialized variables. Note the difference between "is used" and "may be used".
|
||||
Please investigate and fix.
|
||||
Problematic file(s) and their linenumbers:
|
||||
nsFrame.cpp: 3536
|
||||
###
|
||||
|
||||
--- gfx/src/gtk/nsFontMetricsUtils.cpp.old 2005-03-24 07:27:33.000000000 +0100
|
||||
+++ gfx/src/gtk/nsFontMetricsUtils.cpp 2005-03-24 07:28:26.000000000 +0100
|
||||
@@ -75,6 +75,7 @@ NS_FontMetricsGetHints(void)
|
||||
#ifdef MOZ_ENABLE_COREXFONTS
|
||||
return nsFontMetricsGTK::GetHints();
|
||||
#endif
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
nsresult
|
||||
@@ -95,6 +96,7 @@ NS_FontMetricsFamilyExists(nsIDeviceCont
|
||||
#ifdef MOZ_ENABLE_COREXFONTS
|
||||
return nsFontMetricsGTK::FamilyExists(aDevice, aName);
|
||||
#endif
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
#ifdef MOZ_ENABLE_XFT
|
||||
Index: intl/uconv/ucvko/nsUnicodeToJamoTTF.cpp
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/intl/uconv/ucvko/nsUnicodeToJamoTTF.cpp,v
|
||||
retrieving revision 1.10
|
||||
diff -u -p -6 -r1.10 nsUnicodeToJamoTTF.cpp
|
||||
--- intl/uconv/ucvko/nsUnicodeToJamoTTF.cpp 19 Feb 2005 07:27:54 -0000 1.10
|
||||
+++ intl/uconv/ucvko/nsUnicodeToJamoTTF.cpp 7 Jun 2005 07:21:10 -0000
|
||||
@@ -842,12 +842,13 @@ PRInt16 JamoSrchReplace (const JamoNormM
|
||||
// we don't need a separate range check here because the one in
|
||||
// for-loop is sufficient.
|
||||
for (PRInt32 i = start; i <= end - clusterLen; i++)
|
||||
{
|
||||
const JamoNormMap *match;
|
||||
JamoNormMap key;
|
||||
+ key.liga = 0;
|
||||
|
||||
// cluster array is made up of PRUint8's to save memory
|
||||
// and we have to subtract aOffset from the input before looking it up.
|
||||
key.seq[0] = aIn[i] - aOffset;
|
||||
key.seq[1] = aIn[i + 1] - aOffset;
|
||||
key.seq[2] = clusterLen == 3 ? (aIn[i + 2] - aOffset) : 0;
|
||||
Index: layout/generic/nsObjectFrame.cpp
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/layout/generic/nsObjectFrame.cpp,v
|
||||
retrieving revision 1.505
|
||||
diff -u -p -6 -r1.505 nsObjectFrame.cpp
|
||||
--- layout/generic/nsObjectFrame.cpp 6 May 2005 03:14:31 -0000 1.505
|
||||
+++ layout/generic/nsObjectFrame.cpp 7 Jun 2005 07:23:27 -0000
|
||||
@@ -1850,12 +1850,13 @@ nsObjectFrame::Paint(nsPresContext*
|
||||
// now we need to setup the correct location for printing
|
||||
nsresult rv;
|
||||
nsPluginWindow window;
|
||||
nsPoint origin;
|
||||
float t2p;
|
||||
window.window = nsnull;
|
||||
+ window.ws_info = nsnull;
|
||||
|
||||
// prepare embedded mode printing struct
|
||||
nsPluginPrint npprint;
|
||||
npprint.mode = nsPluginMode_Embedded;
|
||||
|
||||
// we need to find out if we are windowless or not
|
||||
Index: docshell/base/nsWebShell.cpp
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/docshell/base/nsWebShell.cpp,v
|
||||
retrieving revision 1.656.2.1
|
||||
diff -u -p -6 -r1.656.2.1 nsWebShell.cpp
|
||||
--- docshell/base/nsWebShell.cpp 16 Sep 2005 19:11:52 -0000 1.656.2.1
|
||||
+++ docshell/base/nsWebShell.cpp 22 Sep 2005 06:30:30 -0000
|
||||
@@ -556,12 +556,13 @@ nsWebShell::OnLinkClickSync(nsIContent *
|
||||
// XXX TODO Should be similar to the HTML IMG ALT attribute handling
|
||||
// in NS 4.x
|
||||
default:
|
||||
NS_ABORT_IF_FALSE(0,"unexpected link verb");
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
+ return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWebShell::OnOverLink(nsIContent* aContent,
|
||||
nsIURI* aURI,
|
||||
const PRUnichar* aTargetSpec)
|
||||
Index: layout/generic/nsFrame.cpp
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/layout/generic/nsFrame.cpp,v
|
||||
retrieving revision 3.574.2.4
|
||||
diff -u -p -6 -r3.574.2.4 nsFrame.cpp
|
||||
--- layout/generic/nsFrame.cpp 20 Sep 2005 06:32:09 -0000 3.574.2.4
|
||||
+++ layout/generic/nsFrame.cpp 22 Sep 2005 06:31:42 -0000
|
||||
@@ -3528,13 +3528,13 @@ nsresult
|
||||
nsFrame::PeekOffsetParagraph(nsPresContext* aPresContext,
|
||||
nsPeekOffsetStruct *aPos)
|
||||
{
|
||||
#ifdef DEBUG_paragraph
|
||||
printf("Selecting paragraph\n");
|
||||
#endif
|
||||
- nsIFrame* blockFrame;
|
||||
+ nsIFrame* blockFrame = NULL;
|
||||
nsCOMPtr<nsILineIterator> iter (getter_AddRefs(GetBlockFrameAndLineIter(this, &blockFrame)));
|
||||
if (!blockFrame || !iter)
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
||||
PRInt32 thisLine;
|
||||
nsresult result = iter->FindLineContaining(this, &thisLine);
|
70
add-plugins.sh.in
Normal file
70
add-plugins.sh.in
Normal file
@ -0,0 +1,70 @@
|
||||
#! /bin/sh
|
||||
# Copyright (c) 2001 SuSE GmbH Nuernberg, Germany. All rights reserved.
|
||||
# 2002-2003 SuSE Linux AG, Nuernberg, Germany
|
||||
# 2005 SUSE Linux Products GmbH, Nuernberg, Germany
|
||||
#
|
||||
|
||||
# check if we are started as root
|
||||
# only one of UID and USER must be set correctly
|
||||
if test "$UID" != 0 -a "$USER" != root; then
|
||||
echo "You must be root to start $0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PREFIX="%PROGDIR"
|
||||
MOZ_APP="%APPNAME"
|
||||
|
||||
get_arch ()
|
||||
{
|
||||
file "$1" | sed -n 's/.*: ELF [^,]*, \([^,]*\),.*/\1/p'
|
||||
}
|
||||
|
||||
mozilla_arch=`get_arch $PREFIX/$MOZ_APP-bin`
|
||||
mozilla_lib=`file $PREFIX/$MOZ_APP-bin | awk '{ print $3 }'`
|
||||
|
||||
JAVA_CHECK_PATH="/usr/lib /usr/java"
|
||||
JAVA_ORDER="mozilla ns7 ns610 [Ss]un IBM BEA"
|
||||
case $mozilla_lib in
|
||||
64-bit)
|
||||
LIB=lib64
|
||||
;;
|
||||
*)
|
||||
LIB=lib
|
||||
;;
|
||||
esac
|
||||
|
||||
find_java ()
|
||||
{
|
||||
TMP=$(find $JAVA_CHECK_PATH -name "$1" -type f)
|
||||
for i in $TMP; do
|
||||
if [ "`get_arch $i`" = "$mozilla_arch" ]; then
|
||||
PLUGIN="$PLUGIN $i"
|
||||
fi
|
||||
done
|
||||
TMP=""
|
||||
}
|
||||
|
||||
# JAVA
|
||||
if [ ! -L $PREFIX/plugins/libjavaplugin_oji.so ] ||
|
||||
[ ! -f $PREFIX/plugins/libjavaplugin_oji.so ] ; then # link is here and valid
|
||||
PLUGIN=""
|
||||
find_java *javaplugin_oji.so
|
||||
find_java *javaplugin_ojigcc3.so # IBMJava
|
||||
if [ "$PLUGIN" ]; then
|
||||
for i in $PLUGIN; do
|
||||
if [[ $i == *mozilla* ]] || [[ $i == *gcc3* ]] || [[ $i == *ns7/* ]]; then
|
||||
TMP=$i
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if [ "$TMP" ]; then
|
||||
PLUGIN=$TMP
|
||||
ln -sf $PLUGIN $PREFIX/plugins/libjavaplugin_oji.so
|
||||
echo "-> added Java2 plugin ($PLUGIN)"
|
||||
else
|
||||
echo "-> Java2: no change (no suitable JRE available)"
|
||||
fi
|
||||
else
|
||||
echo "-> Java2: no change (existing link is valid)"
|
||||
fi
|
74
bookmarks.html.nld
Normal file
74
bookmarks.html.nld
Normal file
File diff suppressed because one or more lines are too long
36
bookmarks.html.suse
Normal file
36
bookmarks.html.suse
Normal file
@ -0,0 +1,36 @@
|
||||
<!DOCTYPE NETSCAPE-Bookmark-file-1>
|
||||
<!-- This is an automatically generated file.
|
||||
It will be read and overwritten.
|
||||
DO NOT EDIT! -->
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
|
||||
<TITLE>Bookmarks</TITLE>
|
||||
<H1 LAST_MODIFIED="1111480548">Bookmarks</H1>
|
||||
|
||||
<DL><p>
|
||||
<DT><A HREF="http://en-US.add-ons.mozilla.com/en-US/firefox/bookmarks/" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAFo9M%2F3AAAABGdBTUEAANbY1E9YMgAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAPkSURBVHjaYmAAgrjyOnOGiKxqxT9%2F%2FvwHCCCGuNJKLpAo49KTL%2F5%2F%2F8PMABBADJFZFWwXnn%2F%2FDxJYeOLNf0aQ9AIg48%2Ff%2Fwwfvv1hAAggZpBAYlWdnrqJLcPVE4e%2Bsuy7%2FfH%2F%2B88%2FGdjY2Bj%2BcCqHMey6%2Ben%2F379%2F%2F%2F8B6unZ9ew%2Fy54jV249f6%2Bm9uXnX4Y9qyaoAAQAhAB7%2FwEAAAAAY3h%2BG1RdbeMMCgkB9%2Fr%2BAPL2%2FAC3vsyi5NG6YQFcbnwdZ3F44uru9gAAAQAAUjEVALPT7wDu9v4A5erz%2FgL19vr16PD6AAUHBgDu9PwA%2F%2F8AAO%2F2%2FgD0%2BP0A7e7x8QPYzsX38vj9g%2BPk6hkLFiAxy%2BP4AeHj5%2FXFtp9GonxaagII7AawXyprpf%2F%2FZ5L5%2Fe%2Fv9%2B%2Fff91ZN7nrG0icJSqrkknJxHm1h5Nl0J8%2F%2Fxg%2B%2FwDa%2Febzv39%2FWKQ2TG97ycIvq%2Bvn52oVxMHGxHDj8RcGQT4uEGZyCct98e3LL3YmJ2enNYxAi%2B48%2B8QQaizGIMLFBLaSlYWZgYWDWZaJhY2V%2BcvPfwz%2BeiIMf%2F%2F%2BY9CV4GAQ42Zh%2BPPvP8O%2Fv%2F%2BZmG7cff7u49c%2FDNtufGZgYmJiOHLvG8Pt1z8Yfv3%2Bz%2FDn19%2B3TCd2LNV7%2F%2FU3w7vPvxkWnHzDcOPFd4ZvQBPv3L79aM%2BS3nfMN88d%2BfyXkW0Lq6BiGAs7J8fHT9%2F%2FXTy%2BY82Lp0cdb5889hcgQJNU85JYFMXP%2B5aHqRmmZJ9kKMGAEBgtDCYYY6BFa%2BlrPc6yRf0LYYtZzG4YaNGibUNJVLuIcBNUTLMQM8ZoppdiaXnf9Xlf5z4ounDu4p57f%2Ff8Pt50SH9ZEfUuLehy93yMRBNroVAg6PV2yBbO9c94tK5v7suF3%2FlMs1o8oU27ltvIMic7fJv7uuqLJGa2UpPxlCILICBtGz1pYWooakeoDaTFgBtNWm04zl%2Fkbs53FnZ%2FZO%2BldGbFP5aaP50cj41pigi8XFjF2zp8ivpgsFMFHp0GgrQZL4DuYGCE6f3pzoBnUwRB8sYi4QGKHf7b5d8HiHWpMBsPvLKDeFiHmVEPBN0yMJyMIUhfb6gXbMkr4xtq1J6Z36eLpmiDH508LNShbDzB4kTIATguNsBqA1CHElJDhGdCGWsDkYY%2FTJh3lUelu384yTlzrtgDWVaggvG8qhDnYcEwwWi0wET%2FTNTh9Gh%2FvVn7v%2B2I%2BHlpWXS59ORgfOr7UGRkVNMUAWPtCMnHdbjjATFNKJeKpdLZYQY0crDzLUvfbHxdqfllj6a7p2VVjUqyGhYwPpZFqxYlf6hZ%2F7X3c736%2Fv4LV1blv94gEvsAAAAASUVORK5CYII%3D" ID="rdf:#$CnoJ1">Get Bookmark Add-ons</A>
|
||||
<HR>
|
||||
<DT><H3 PERSONAL_TOOLBAR_FOLDER="true" ID="rdf:#$FvPhC3">Bookmarks Toolbar Folder</H3>
|
||||
<DD>Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar
|
||||
<DL><p>
|
||||
<DT><H3 ID="rdf:#$HNakM2">openSUSE</H3>
|
||||
<DL><p>
|
||||
<DT><A HREF="http://www.opensuse.org/" ICON="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACS3LlfreXK/5Lcuf+E2LD/W8uW/1vLlv9by5b/ac+e/5Lcuf+f4MH/1vLk//////////////////////////9fJbpz/yW6c/8lunP/Jbpz/yW6c/8lunP/Jbpz/yW6c/8lunP/Jbpz/yW6c/8yvnv/dtOn/+P27f///////////yW6c/8lunP/Jbpz/yW6c/8lunP/Jbpz/yW6c/8lunP/Jbpz/yW6c/8lunP/Jbpz/yW6c/8lunP/ac+e//H69v8lunP/Jbpz/yW6c/8lunP/Jbpz/yW6c/8lunP/Jbpz/0DChP+E2LD/kty5/5Lcuf9206f/Mr57/yW6c/+f4MH/Jbpz/yW6c/8lunP/Jbpz/yW6c/8yvnv/dtOn/9by5P/W8uT/n+DB/3bTp/9pz57/kty5/9by5P+t5cr/hNiw/yW6c/8lunP/Jbpz/zK+e/+S3Ln/8fr2/63lyv9Nxo3/Jbpz/yW6c/8lunP/Jbpz/yW6c/8lunP/W8uW/+P27f8lunP/Jbpz/yW6c/+S3Ln/uunT/0DChP8lunP/Mr57/5/gwf/I7dz/yO3c/5Lcuf8lunP/Jbpz/yW6c/9AwoT/Jbpz/yW6c/8lunP/QMKE/yW6c/8lunP/Jbpz/63lyv9by5b/Jbpz/yW6c/9206f/n+DB/yW6c/8lunP/ac+e/yW6c/8lunP/Jbpz/yW6c/8lunP/Jbpz/0DChP+t5cr/Jbpz/yW6c/8lunP/Jbpz/8jt3P8lunP/Jbpz/63lyv8lunP/Jbpz/yW6c/8lunP/Jbpz/yW6c/9by5b/kty5/yW6c/9pz57/yO3c/0DChP/I7dz/Jbpz/yW6c//x+vb/Jbpz/yW6c/8lunP/Jbpz/yW6c/8lunP/Jbpz/8jt3P8lunP/Jbpz/1vLlv8yvnv/reXK/yW6c/9206f//////yW6c/8lunP/Jbpz/yW6c/8lunP/Jbpz/yW6c/9Nxo3/uunT/2nPnv9206f/uunT/03Gjf8lunP/4/bt//////8lunP/Jbpz/yW6c/8lunP/Jbpz/yW6c/8lunP/Jbpz/zK+e/9206f/ac+e/zK+e/8yvnv/reXK////////////Jbpz/yW6c/8lunP/Jbpz/yW6c/8lunP/Jbpz/yW6c/8lunP/Jbpz/0DChP+S3Ln/8fr2/////////////////63lyv9Nxo3/Jbpz/yW6c/8lunP/Jbpz/yW6c/9by5b/kty5/9by5P////////////////////////////////////9fW8uW/1vLlv9206f/n+DB/8jt3P////////////////////////////////////////////////////9fgAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAEAAA==" LAST_CHARSET="UTF-8" ID="rdf:#$n8c6+1">openSUSE</A>
|
||||
<DT><A HREF="http://en.opensuse.org/Released_Version" ICON="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACS3LlfreXK/5Lcuf+E2LD/W8uW/1vLlv9by5b/ac+e/5Lcuf+f4MH/1vLk//////////////////////////9fJbpz/yW6c/8lunP/Jbpz/yW6c/8lunP/Jbpz/yW6c/8lunP/Jbpz/yW6c/8yvnv/dtOn/+P27f///////////yW6c/8lunP/Jbpz/yW6c/8lunP/Jbpz/yW6c/8lunP/Jbpz/yW6c/8lunP/Jbpz/yW6c/8lunP/ac+e//H69v8lunP/Jbpz/yW6c/8lunP/Jbpz/yW6c/8lunP/Jbpz/0DChP+E2LD/kty5/5Lcuf9206f/Mr57/yW6c/+f4MH/Jbpz/yW6c/8lunP/Jbpz/yW6c/8yvnv/dtOn/9by5P/W8uT/n+DB/3bTp/9pz57/kty5/9by5P+t5cr/hNiw/yW6c/8lunP/Jbpz/zK+e/+S3Ln/8fr2/63lyv9Nxo3/Jbpz/yW6c/8lunP/Jbpz/yW6c/8lunP/W8uW/+P27f8lunP/Jbpz/yW6c/+S3Ln/uunT/0DChP8lunP/Mr57/5/gwf/I7dz/yO3c/5Lcuf8lunP/Jbpz/yW6c/9AwoT/Jbpz/yW6c/8lunP/QMKE/yW6c/8lunP/Jbpz/63lyv9by5b/Jbpz/yW6c/9206f/n+DB/yW6c/8lunP/ac+e/yW6c/8lunP/Jbpz/yW6c/8lunP/Jbpz/0DChP+t5cr/Jbpz/yW6c/8lunP/Jbpz/8jt3P8lunP/Jbpz/63lyv8lunP/Jbpz/yW6c/8lunP/Jbpz/yW6c/9by5b/kty5/yW6c/9pz57/yO3c/0DChP/I7dz/Jbpz/yW6c//x+vb/Jbpz/yW6c/8lunP/Jbpz/yW6c/8lunP/Jbpz/8jt3P8lunP/Jbpz/1vLlv8yvnv/reXK/yW6c/9206f//////yW6c/8lunP/Jbpz/yW6c/8lunP/Jbpz/yW6c/9Nxo3/uunT/2nPnv9206f/uunT/03Gjf8lunP/4/bt//////8lunP/Jbpz/yW6c/8lunP/Jbpz/yW6c/8lunP/Jbpz/zK+e/9206f/ac+e/zK+e/8yvnv/reXK////////////Jbpz/yW6c/8lunP/Jbpz/yW6c/8lunP/Jbpz/yW6c/8lunP/Jbpz/0DChP+S3Ln/8fr2/////////////////63lyv9Nxo3/Jbpz/yW6c/8lunP/Jbpz/yW6c/9by5b/kty5/9by5P////////////////////////////////////9fW8uW/1vLlv9206f/n+DB/8jt3P////////////////////////////////////////////////////9fgAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAEAAA==" LAST_CHARSET="UTF-8" ID="rdf:#$n8c6+2">openSUSE Download</A>
|
||||
<DT><A HREF="http://www.novell.com/linux/" ICON="data:image/x-icon;base64,AAABAAIAICAQAAEABADoAgAAJgAAABAQEAABAAQAKAEAAA4DAAAoAAAAIAAAAEAAAAABAAQAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAgAAAgAAAAICAAIAAAACAAIAFgIAABcDAwACAgIAAAAD/AAD/AAAA//8A/wAAAP8A/wX//wAF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8oAAAAEAAAACAAAAABAAQAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAA////AAAAgAAAgAAAAICAAIAAAICAAICAgIAAgMDAwMCAgICAAAD/AAD/AAAA//8A/wAA//8A/////wD/AAAA////////////////////+f//mZ////+Z//+Zn///+Zn//5mf//+Zmf//mZ//+ZmZ//+Zn/+ZmZn//5mf+ZmZmf//mZ+ZmfmZ//+ZmZmf+Zn//5mZmf/5mf//mZmf//mZ//+Zmf//+Zn//5mf///5mf//mf////////////////////9BgP/7///H8//7x+PH88fDx+PHg8fDxwPHg8YDxwPEI8YDwGPEI8DjwGPB48Djw+PB48fjw+PP/8fj///P/w==" LAST_CHARSET="ISO-8859-1" ID="rdf:#$NNakM2">Novell / Linux</A>
|
||||
<DT><A HREF="http://www.novell.com/coolsolutions/slp/" ICON="data:image/x-icon;base64,AAABAAIAICAQAAEABADoAgAAJgAAABAQEAABAAQAKAEAAA4DAAAoAAAAIAAAAEAAAAABAAQAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAgAAAgAAAAICAAIAAAACAAIAFgIAABcDAwACAgIAAAAD/AAD/AAAA//8A/wAAAP8A/wX//wAF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8oAAAAEAAAACAAAAABAAQAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAA////AAAAgAAAgAAAAICAAIAAAICAAICAgIAAgMDAwMCAgICAAAD/AAD/AAAA//8A/wAA//8A/////wD/AAAA////////////////////+f//mZ////+Z//+Zn///+Zn//5mf//+Zmf//mZ//+ZmZ//+Zn/+ZmZn//5mf+ZmZmf//mZ+ZmfmZ//+ZmZmf+Zn//5mZmf/5mf//mZmf//mZ//+Zmf//+Zn//5mf///5mf//mf////////////////////9BgP/7///H8//7x+PH88fDx+PHg8fDxwPHg8YDxwPEI8YDwGPEI8DjwGPB48Djw+PB48fjw+PP/8fj///P/w==" LAST_CHARSET="ISO-8859-1" ID="rdf:#$ONakM2">SUSE Linux Cool Solutions</A>
|
||||
<DT><A HREF="http://www.novell.com/support/products/suselinux/" ICON="data:image/x-icon;base64,AAABAAIAICAQAAEABADoAgAAJgAAABAQEAABAAQAKAEAAA4DAAAoAAAAIAAAAEAAAAABAAQAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAgAAAgAAAAICAAIAAAACAAIAFgIAABcDAwACAgIAAAAD/AAD/AAAA//8A/wAAAP8A/wX//wAF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8oAAAAEAAAACAAAAABAAQAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAA////AAAAgAAAgAAAAICAAIAAAICAAICAgIAAgMDAwMCAgICAAAD/AAD/AAAA//8A/wAA//8A/////wD/AAAA////////////////////+f//mZ////+Z//+Zn///+Zn//5mf//+Zmf//mZ//+ZmZ//+Zn/+ZmZn//5mf+ZmZmf//mZ+ZmfmZ//+ZmZmf+Zn//5mZmf/5mf//mZmf//mZ//+Zmf//+Zn//5mf///5mf//mf////////////////////9BgP/7///H8//7x+PH88fDx+PHg8fDxwPHg8YDxwPEI8YDwGPEI8DjwGPB48Djw+PB48fjw+PP/8fj///P/w==" LAST_CHARSET="windows-1252" ID="rdf:#$PNakM2">SUSE Linux Support</A>
|
||||
</DL><p>
|
||||
<DL><p>
|
||||
<DT><A HREF="http://en-US.www.mozilla.com/en-US/firefox/central/" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg==" ID="rdf:#$GvPhC3">Getting Started</A>
|
||||
<DT><A HREF="http://en-US.fxfeeds.mozilla.com/en-US/firefox/livebookmarks/" FEEDURL="http://en-US.fxfeeds.mozilla.com/en-US/firefox/headlines.xml" ID="rdf:#$HvPhC3">Latest Headlines</A>
|
||||
</DL><p>
|
||||
<HR>
|
||||
<DT><H3 ID="rdf:#$ZvPhC3">Mozilla Firefox</H3>
|
||||
<DL><p>
|
||||
<DT><A HREF="http://en-US.www.mozilla.com/en-US/firefox/help/" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg==" ID="rdf:#$22iCK1">Help and Tutorials</A>
|
||||
<DT><A HREF="http://en-US.www.mozilla.com/en-US/firefox/customize/" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg==" ID="rdf:#$32iCK1">Customize Firefox</A>
|
||||
<DT><A HREF="http://en-US.www.mozilla.com/en-US/firefox/community/" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg==" ID="rdf:#$42iCK1">Get Involved</A>
|
||||
<DT><A HREF="http://en-US.www.mozilla.com/en-US/firefox/about/" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg==" ID="rdf:#$52iCK1">About Us</A>
|
||||
</DL><p>
|
||||
</DL><p>
|
||||
</DL><p>
|
28
cjk-postscript-fonts.dif
Normal file
28
cjk-postscript-fonts.dif
Normal file
@ -0,0 +1,28 @@
|
||||
--- modules/libpref/src/init/all.js
|
||||
+++ modules/libpref/src/init/all.js
|
||||
@@ -2250,8 +2250,10 @@
|
||||
pref("print.postscript.nativefont.ar", "");
|
||||
pref("print.postscript.nativefont.el", "");
|
||||
pref("print.postscript.nativefont.he", "");
|
||||
-pref("print.postscript.nativefont.ja", "");
|
||||
-pref("print.postscript.nativefont.ko", "");
|
||||
+pref("print.postscript.nativefont.ja", "UTF-8");
|
||||
+pref("print.postscript.nativefont.ja", "Ryumin-Light-UniJIS-UTF8-H");
|
||||
+pref("print.postscript.nativefont.ko", "UTF-8");
|
||||
+pref("print.postscript.nativefont.ko", "Baekmuk-Gulim-UniKS-UTF8-H");
|
||||
pref("print.postscript.nativefont.th", "");
|
||||
pref("print.postscript.nativefont.tr", "");
|
||||
pref("print.postscript.nativefont.x-baltic", "");
|
||||
@@ -2260,8 +2262,10 @@
|
||||
pref("print.postscript.nativefont.x-unicode", "");
|
||||
pref("print.postscript.nativefont.x-user-def", "");
|
||||
pref("print.postscript.nativefont.x-western", "");
|
||||
-pref("print.postscript.nativefont.zh-CN", "");
|
||||
-pref("print.postscript.nativefont.zh-TW", "");
|
||||
+pref("print.postscript.nativefont.zh-CN", "UTF-8");
|
||||
+pref("print.postscript.nativefont.zh-CN", "GB-Song-Medium-UniGB-UTF8-H");
|
||||
+pref("print.postscript.nativefont.zh-TW", "UTF-8");
|
||||
+pref("print.postscript.nativefont.zh-TW", "B5-Song-Medium-UniCNS-UTF8-H");
|
||||
pref("print.postscript.nativefont.zh-HK", "");
|
||||
|
||||
# XP_UNIX
|
6180
configure.patch
Normal file
6180
configure.patch
Normal file
File diff suppressed because it is too large
Load Diff
14
credits.patch
Normal file
14
credits.patch
Normal file
@ -0,0 +1,14 @@
|
||||
Index: browser/base/content/credits.xhtml
|
||||
================================================================================
|
||||
--- browser/base/content/credits.xhtml
|
||||
+++ browser/base/content/credits.xhtml
|
||||
@@ -431,6 +431,9 @@
|
||||
<li>Kohei Yoshino</li>
|
||||
<li>Boris Zbarsky</li>
|
||||
</ul>
|
||||
+
|
||||
+ <h3>openSUSE RPM packaging</h3>
|
||||
+ <ul><li>Wolfgang Rosenauer</li></ul>
|
||||
|
||||
&credit.translation;
|
||||
</div>
|
858
cups-paper.patch
Normal file
858
cups-paper.patch
Normal file
@ -0,0 +1,858 @@
|
||||
From: Wolfgang Rosenauer <stark@suse.de>, Arne John Glenstrup <panic@itu.dk>
|
||||
Subject: get paper sizes from CUPS
|
||||
References:
|
||||
https://bugzilla.novell.com/show_bug.cgi?id=65482
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=324060
|
||||
|
||||
|
||||
================================================================================
|
||||
--- gfx/src/gtk/nsDeviceContextSpecG.cpp
|
||||
+++ gfx/src/gtk/nsDeviceContextSpecG.cpp
|
||||
@@ -66,6 +66,7 @@
|
||||
#ifdef USE_POSTSCRIPT
|
||||
#include "nsPSPrinters.h"
|
||||
#include "nsPaperPS.h" /* Paper size list */
|
||||
+#include "nsPaperFactoryPS.h" /* Paper size list factory */
|
||||
#endif /* USE_POSTSCRIPT */
|
||||
|
||||
/* Ensure that the result is always equal to either PR_TRUE or PR_FALSE */
|
||||
@@ -1210,34 +1211,38 @@
|
||||
#ifdef SET_PRINTER_FEATURES_VIA_PREFS
|
||||
printerFeatures.SetCanChangePaperSize(PR_TRUE);
|
||||
#endif /* SET_PRINTER_FEATURES_VIA_PREFS */
|
||||
- nsXPIDLCString papername;
|
||||
- if (NS_SUCCEEDED(CopyPrinterCharPref(pPrefs, "postscript", printerName, "paper_size", getter_Copies(papername)))) {
|
||||
- nsPaperSizePS paper;
|
||||
-
|
||||
- if (paper.Find(papername)) {
|
||||
- DO_PR_DEBUG_LOG(("setting default paper size to '%s' (%g mm/%g mm)\n",
|
||||
- paper.Name(), paper.Width_mm(), paper.Height_mm()));
|
||||
- aPrintSettings->SetPaperSizeUnit(paper.IsMetric() ?
|
||||
- (int)nsIPrintSettings::kPaperSizeMillimeters :
|
||||
- (int)nsIPrintSettings::kPaperSizeInches);
|
||||
- aPrintSettings->SetPaperWidth(paper.Width_mm());
|
||||
- aPrintSettings->SetPaperHeight(paper.Height_mm());
|
||||
- aPrintSettings->SetPaperName(NS_ConvertASCIItoUCS2(paper.Name()).get());
|
||||
- }
|
||||
- else {
|
||||
- DO_PR_DEBUG_LOG(("Unknown paper size '%s' given.\n", papername.get()));
|
||||
+ {
|
||||
+ nsIPaperSizePS* paper;
|
||||
+ nsresult rv;
|
||||
+ rv = nsPaperFactoryPS::CreatePaper
|
||||
+ (fullPrinterName.get(), printerName.get(), paper);
|
||||
+ if (NS_FAILED(rv)) return rv;
|
||||
+ paper->FindDefault();
|
||||
+
|
||||
+ nsXPIDLCString papername;
|
||||
+ if (NS_SUCCEEDED(CopyPrinterCharPref(pPrefs, "postscript", fullPrinterName, "print_paper_name", getter_Copies(papername)))) {
|
||||
+ if (!paper->Find(papername)) {
|
||||
+ DO_PR_DEBUG_LOG(("Unknown paper size '%s' given.\n", papername.get()));
|
||||
+ }
|
||||
}
|
||||
+ DO_PR_DEBUG_LOG(("setting default paper size to '%s' (%g mm/%g mm)\n",
|
||||
+ paper->Name(), paper->Width_mm(), paper->Height_mm()));
|
||||
+ aPrintSettings->SetPaperSizeUnit(nsIPrintSettings::kPaperSizeMillimeters);
|
||||
+ aPrintSettings->SetPaperWidth(paper->Width_mm());
|
||||
+ aPrintSettings->SetPaperHeight(paper->Height_mm());
|
||||
+ aPrintSettings->SetPaperName(NS_ConvertASCIItoUTF16(paper->Name()).get());
|
||||
#ifdef SET_PRINTER_FEATURES_VIA_PREFS
|
||||
- paper.First();
|
||||
+ paper->First();
|
||||
int count = 0;
|
||||
- while (!paper.AtEnd())
|
||||
+ while (!paper->AtEnd())
|
||||
{
|
||||
- printerFeatures.SetPaperRecord(count++, paper.Name(),
|
||||
- (int)paper.Width_mm(), (int)paper.Height_mm(), !paper.IsMetric());
|
||||
- paper.Next();
|
||||
+ printerFeatures.SetPaperRecord(count++, paper->Name(),
|
||||
+ (int)paper->Width_mm(), (int)paper->Height_mm(), !paper->IsMetric());
|
||||
+ paper->Next();
|
||||
}
|
||||
printerFeatures.SetNumPaperSizeRecords(count);
|
||||
#endif /* SET_PRINTER_FEATURES_VIA_PREFS */
|
||||
+ delete(paper);
|
||||
}
|
||||
|
||||
PRBool hasSpoolerCmd = (nsPSPrinterList::kTypePS ==
|
||||
--- gfx/src/ps/nsPrintJobPS.cpp
|
||||
+++ gfx/src/ps/nsPrintJobPS.cpp
|
||||
@@ -364,6 +364,10 @@
|
||||
const char *slash = strchr(printerName, '/');
|
||||
mPrinterName = slash ? slash + 1 : printerName;
|
||||
mJobTitle.SetIsVoid(PR_TRUE);
|
||||
+ /* Paper name */
|
||||
+ const char* paperName = nsnull;
|
||||
+ aSpec->GetPaperName(&paperName);
|
||||
+ mPaperName = paperName;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -445,6 +449,11 @@
|
||||
mNumCopies.get(),
|
||||
dest->num_options,
|
||||
&dest->options);
|
||||
+ if (!mPaperName.IsEmpty())
|
||||
+ dest->num_options = (mCups.mCupsAddOption)("media",
|
||||
+ mPaperName.get(),
|
||||
+ dest->num_options,
|
||||
+ &dest->options);
|
||||
const char *title = mJobTitle.IsVoid() ?
|
||||
"Untitled Document" : mJobTitle.get();
|
||||
result = (mCups.mCupsPrintFile)(printer.CStringAt(0)->get(),
|
||||
--- gfx/src/ps/nsPrintJobPS.h
|
||||
+++ gfx/src/ps/nsPrintJobPS.h
|
||||
@@ -179,6 +179,7 @@
|
||||
nsCUPSShim mCups;
|
||||
nsCString mPrinterName;
|
||||
nsCString mNumCopies;
|
||||
+ nsCString mPaperName;
|
||||
nsCString mJobTitle; // IsVoid() if no title
|
||||
};
|
||||
#endif /* VMS */
|
||||
--- gfx/src/psshared/Makefile.in
|
||||
+++ gfx/src/psshared/Makefile.in
|
||||
@@ -57,13 +57,16 @@
|
||||
|
||||
EXPORTS = nsCUPSShim.h \
|
||||
nsPaperPS.h \
|
||||
+ nsIPaperPS.h \
|
||||
nsPSPrinters.h\
|
||||
psSharedCore.h \
|
||||
+ nsPaperFactoryPS.h \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = nsCUPSShim.cpp \
|
||||
nsPaperPS.cpp \
|
||||
nsPSPrinters.cpp \
|
||||
+ nsPaperFactoryPS.cpp \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
--- gfx/src/psshared/nsCUPSShim.cpp
|
||||
+++ gfx/src/psshared/nsCUPSShim.cpp
|
||||
@@ -45,13 +45,18 @@
|
||||
// List of symbols to find in libcups. Must match symAddr[] defined in Init().
|
||||
// Making this an array of arrays instead of pointers allows storing the
|
||||
// whole thing in read-only memory.
|
||||
-static const char gSymName[][sizeof("cupsPrintFile")] = {
|
||||
+static const char gSymName[][sizeof("ppdMarkDefaults")] = {
|
||||
{ "cupsAddOption" },
|
||||
{ "cupsFreeDests" },
|
||||
{ "cupsGetDest" },
|
||||
{ "cupsGetDests" },
|
||||
{ "cupsPrintFile" },
|
||||
{ "cupsTempFd" },
|
||||
+ { "cupsGetPPD" },
|
||||
+ { "ppdOpenFile" },
|
||||
+ { "ppdClose" },
|
||||
+ { "ppdMarkDefaults" },
|
||||
+ { "ppdIsMarked" },
|
||||
};
|
||||
static const int gSymNameCt = sizeof(gSymName) / sizeof(gSymName[0]);
|
||||
|
||||
@@ -71,6 +76,11 @@
|
||||
(void **)&mCupsGetDests,
|
||||
(void **)&mCupsPrintFile,
|
||||
(void **)&mCupsTempFd,
|
||||
+ (void **)&mCupsGetPPD,
|
||||
+ (void **)&mPpdOpenFile,
|
||||
+ (void **)&mPpdClose,
|
||||
+ (void **)&mPpdMarkDefaults,
|
||||
+ (void **)&mPpdIsMarked,
|
||||
};
|
||||
|
||||
for (int i = gSymNameCt; i--; ) {
|
||||
--- gfx/src/psshared/nsCUPSShim.h
|
||||
+++ gfx/src/psshared/nsCUPSShim.h
|
||||
@@ -62,6 +62,82 @@
|
||||
cups_option_t *options; /* Options */
|
||||
} cups_dest_t;
|
||||
|
||||
+typedef enum /**** Colorspaces ****/
|
||||
+{
|
||||
+ PPD_CS_CMYK = -4, /* CMYK colorspace */
|
||||
+ PPD_CS_CMY, /* CMY colorspace */
|
||||
+ PPD_CS_GRAY = 1, /* Grayscale colorspace */
|
||||
+ PPD_CS_RGB = 3, /* RGB colorspace */
|
||||
+ PPD_CS_RGBK, /* RGBK (K = gray) colorspace */
|
||||
+ PPD_CS_N /* DeviceN colorspace */
|
||||
+} ppd_cs_t;
|
||||
+
|
||||
+typedef struct /**** Page Sizes ****/
|
||||
+{
|
||||
+ int marked; /* Page size selected? */
|
||||
+ char name[41];
|
||||
+ /* Media size option */
|
||||
+ float width, /* Width of media in points */
|
||||
+ length, /* Length of media in points */
|
||||
+ left, /* Left printable margin in points */
|
||||
+ bottom, /* Bottom printable margin in points */
|
||||
+ right, /* Right printable margin in points */
|
||||
+ top; /* Top printable margin in points */
|
||||
+} ppd_size_t;
|
||||
+
|
||||
+typedef struct /**** Files ****/
|
||||
+{
|
||||
+ int language_level, /* Language level of device */
|
||||
+ color_device, /* 1 = color device, 0 = grayscale */
|
||||
+ variable_sizes, /* 1 = supports variable sizes, 0 = doesn't */
|
||||
+ accurate_screens, /* 1 = supports accurate screens, 0 = not */
|
||||
+ contone_only, /* 1 = continuous tone only, 0 = not */
|
||||
+ landscape, /* -90 or 90 */
|
||||
+ model_number, /* Device-specific model number */
|
||||
+ manual_copies, /* 1 = Copies done manually, 0 = hardware */
|
||||
+ throughput; /* Pages per minute */
|
||||
+ ppd_cs_t colorspace; /* Default colorspace */
|
||||
+ char *patches; /* Patch commands to be sent to printer */
|
||||
+ int num_emulations; /* Number of emulations supported */
|
||||
+ void *emulations; /* Emulations and the code to invoke them */
|
||||
+ char *jcl_begin, /* Start JCL commands */
|
||||
+ *jcl_ps, /* Enter PostScript interpreter */
|
||||
+ *jcl_end, /* End JCL commands */
|
||||
+ *lang_encoding, /* Language encoding */
|
||||
+ *lang_version, /* Language version (English, Spanish, etc.) */
|
||||
+ *modelname, /* Model name (general) */
|
||||
+ *ttrasterizer, /* Truetype rasterizer */
|
||||
+ *manufacturer, /* Manufacturer name */
|
||||
+ *product, /* Product name (from PS RIP/interpreter) */
|
||||
+ *nickname, /* Nickname (specific) */
|
||||
+ *shortnickname; /* Short version of nickname */
|
||||
+ int num_groups; /* Number of UI groups */
|
||||
+ void *groups; /* UI groups */
|
||||
+ int num_sizes; /* Number of page sizes */
|
||||
+ ppd_size_t *sizes; /* Page sizes */
|
||||
+ float custom_min[2], /* Minimum variable page size */
|
||||
+ custom_max[2], /* Maximum variable page size */
|
||||
+ custom_margins[4];/* Margins around page */
|
||||
+ int num_consts; /* Number of UI/Non-UI constraints */
|
||||
+ void *consts; /* UI/Non-UI constraints */
|
||||
+ int num_fonts; /* Number of pre-loaded fonts */
|
||||
+ char **fonts; /* Pre-loaded fonts */
|
||||
+ int num_profiles; /* Number of sRGB color profiles */
|
||||
+ void *profiles; /* sRGB color profiles */
|
||||
+ int num_filters; /* Number of filters */
|
||||
+ char **filters; /* Filter strings... */
|
||||
+
|
||||
+ /**** New in CUPS 1.1 ****/
|
||||
+ int flip_duplex; /* 1 = Flip page for back sides */
|
||||
+
|
||||
+ /**** New in CUPS 1.1.19 ****/
|
||||
+ char *protocols, /* Protocols (BCP, TBCP) string */
|
||||
+ *pcfilename; /* PCFileName string */
|
||||
+ int num_attrs, /* Number of attributes */
|
||||
+ cur_attr; /* Current attribute */
|
||||
+ void **attrs; /* Attributes */
|
||||
+} ppd_file_t;
|
||||
+
|
||||
typedef cups_dest_t* (PR_CALLBACK *CupsGetDestType)(const char *printer,
|
||||
const char *instance,
|
||||
int num_dests,
|
||||
@@ -80,6 +156,11 @@
|
||||
const char *value,
|
||||
int num_options,
|
||||
cups_option_t **options);
|
||||
+typedef const char* (PR_CALLBACK *CupsGetPPDType) (const char* name);
|
||||
+typedef ppd_file_t* (PR_CALLBACK *PPDOpenFileType) (const char* filename);
|
||||
+typedef void (PR_CALLBACK *PPDCloseType) (ppd_file_t* ppd);
|
||||
+typedef void (PR_CALLBACK *PPDMarkDefaultsType) (ppd_file_t* ppd);
|
||||
+typedef int (PR_CALLBACK *PPDIsMarkedType) (ppd_file_t* ppd, const char* pname, const char* pname_clear);
|
||||
|
||||
struct PRLibrary;
|
||||
|
||||
@@ -113,6 +194,11 @@
|
||||
CupsGetDestsType mCupsGetDests;
|
||||
CupsPrintFileType mCupsPrintFile;
|
||||
CupsTempFdType mCupsTempFd;
|
||||
+ CupsGetPPDType mCupsGetPPD;
|
||||
+ PPDOpenFileType mPpdOpenFile;
|
||||
+ PPDCloseType mPpdClose;
|
||||
+ PPDMarkDefaultsType mPpdMarkDefaults;
|
||||
+ PPDIsMarkedType mPpdIsMarked;
|
||||
|
||||
private:
|
||||
PRLibrary *mCupsLib;
|
||||
--- gfx/src/psshared/nsIPaperPS.h
|
||||
+++ gfx/src/psshared/nsIPaperPS.h
|
||||
@@ -0,0 +1,102 @@
|
||||
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
+/* ex: set tabstop=8 softtabstop=4 shiftwidth=4 expandtab: */
|
||||
+/* ***** BEGIN LICENSE BLOCK *****
|
||||
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
+ *
|
||||
+ * The contents of this file are subject to the Mozilla Public License Version
|
||||
+ * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
+ * the License. You may obtain a copy of the License at
|
||||
+ * http://www.mozilla.org/MPL/
|
||||
+ *
|
||||
+ * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
+ * for the specific language governing rights and limitations under the
|
||||
+ * License.
|
||||
+ *
|
||||
+ * Contributor(s):
|
||||
+ * Arne John Glenstrup <panic@itu.dk>
|
||||
+ *
|
||||
+ * Alternatively, the contents of this file may be used under the terms of
|
||||
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
+ * in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
+ * of those above. If you wish to allow use of your version of this file only
|
||||
+ * under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
+ * use your version of this file under the terms of the MPL, indicate your
|
||||
+ * decision by deleting the provisions above and replace them with the notice
|
||||
+ * and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
+ * the provisions above, a recipient may use your version of this file under
|
||||
+ * the terms of any one of the MPL, the GPL or the LGPL.
|
||||
+ *
|
||||
+ * ***** END LICENSE BLOCK ***** */
|
||||
+
|
||||
+
|
||||
+#ifndef _NSIPAPERPS_H_
|
||||
+#define _NSIPAPERPS_H_
|
||||
+
|
||||
+#include "prtypes.h"
|
||||
+#include "psSharedCore.h"
|
||||
+
|
||||
+class nsIPaperSizePS {
|
||||
+ public:
|
||||
+ /** ---------------------------------------------------
|
||||
+ * Virtual destructor.
|
||||
+ */
|
||||
+ virtual ~nsIPaperSizePS();
|
||||
+
|
||||
+ /* Allow the paper factory to create instances */
|
||||
+ friend class nsPaperFactoryPS;
|
||||
+
|
||||
+ /** ---------------------------------------------------
|
||||
+ * @return PR_TRUE if the cursor points past the last item.
|
||||
+ */
|
||||
+ virtual PRBool AtEnd() = 0;
|
||||
+
|
||||
+ /** ---------------------------------------------------
|
||||
+ * Position the cursor at the beginning of the paper size list.
|
||||
+ * @return VOID
|
||||
+ */
|
||||
+ virtual void First() = 0;
|
||||
+
|
||||
+ /** ---------------------------------------------------
|
||||
+ * Advance the cursor to the next item.
|
||||
+ * @return VOID
|
||||
+ */
|
||||
+ virtual void Next() = 0;
|
||||
+
|
||||
+ /** ---------------------------------------------------
|
||||
+ * Point the cursor to the entry with the given paper name.
|
||||
+ * @return PR_TRUE if pointing to a valid entry.
|
||||
+ */
|
||||
+ virtual PRBool Find(const char *aName) = 0;
|
||||
+
|
||||
+ /** ---------------------------------------------------
|
||||
+ * Point the cursor to a default entry if available.
|
||||
+ * Otherwise it's equivalent to First().
|
||||
+ * @return PR_TRUE if pointing to a valid entry.
|
||||
+ */
|
||||
+ virtual PRBool FindDefault() = 0;
|
||||
+
|
||||
+ /** ---------------------------------------------------
|
||||
+ * @return a pointer to the name of the current paper size
|
||||
+ */
|
||||
+ virtual const char *Name() = 0;
|
||||
+
|
||||
+ /** ---------------------------------------------------
|
||||
+ * @return the width of the page in millimeters
|
||||
+ */
|
||||
+ virtual float Width_mm() = 0;
|
||||
+
|
||||
+ /** ---------------------------------------------------
|
||||
+ * @return the height of the page in millimeters
|
||||
+ */
|
||||
+ virtual float Height_mm() = 0;
|
||||
+
|
||||
+ /** ---------------------------------------------------
|
||||
+ * @return PR_TRUE if the paper should be presented to
|
||||
+ * the user in metric units.
|
||||
+ */
|
||||
+ virtual PRBool IsMetric() { return PR_TRUE; };
|
||||
+};
|
||||
+
|
||||
+#endif /* _NSIPAPERPS_H_ */
|
||||
--- gfx/src/psshared/nsPSPrinters.h
|
||||
+++ gfx/src/psshared/nsPSPrinters.h
|
||||
@@ -44,6 +44,7 @@
|
||||
#include "prtypes.h"
|
||||
#include "nsCUPSShim.h"
|
||||
#include "psSharedCore.h"
|
||||
+#include "nsCOMPtr.h"
|
||||
|
||||
class nsIPrefService;
|
||||
class nsIPrefBranch;
|
||||
--- gfx/src/psshared/nsPaperFactoryPS.cpp
|
||||
+++ gfx/src/psshared/nsPaperFactoryPS.cpp
|
||||
@@ -0,0 +1,65 @@
|
||||
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
+/* ex: set tabstop=8 softtabstop=4 shiftwidth=4 expandtab: */
|
||||
+/* ***** BEGIN LICENSE BLOCK *****
|
||||
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
+ *
|
||||
+ * The contents of this file are subject to the Mozilla Public License Version
|
||||
+ * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
+ * the License. You may obtain a copy of the License at
|
||||
+ * http://www.mozilla.org/MPL/
|
||||
+ *
|
||||
+ * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
+ * for the specific language governing rights and limitations under the
|
||||
+ * License.
|
||||
+ *
|
||||
+ * The Original Code is mozilla.org code.
|
||||
+ *
|
||||
+ * The Initial Developer of the Original Code is
|
||||
+ * Kenneth Herron <kherron@fastmail.us>.
|
||||
+ * Portions created by the Initial Developer are Copyright (C) 2004
|
||||
+ * the Initial Developer. All Rights Reserved.
|
||||
+ *
|
||||
+ * Contributor(s):
|
||||
+ * Arne John Glenstrup <panic@itu.dk>
|
||||
+ *
|
||||
+ * Alternatively, the contents of this file may be used under the terms of
|
||||
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
+ * in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
+ * of those above. If you wish to allow use of your version of this file only
|
||||
+ * under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
+ * use your version of this file under the terms of the MPL, indicate your
|
||||
+ * decision by deleting the provisions above and replace them with the notice
|
||||
+ * and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
+ * the provisions above, a recipient may use your version of this file under
|
||||
+ * the terms of any one of the MPL, the GPL or the LGPL.
|
||||
+ *
|
||||
+ * ***** END LICENSE BLOCK ***** */
|
||||
+
|
||||
+
|
||||
+#include "nsDebug.h"
|
||||
+#include "nsPaperFactoryPS.h"
|
||||
+#include "nsIPaperPS.h"
|
||||
+#include "nsPaperPS.h"
|
||||
+#include "nsPSPrinters.h"
|
||||
+
|
||||
+nsresult
|
||||
+nsPaperFactoryPS::CreatePaper(const char* fullPrinterName,
|
||||
+ const char* printerName,
|
||||
+ nsIPaperSizePS* &aPaper)
|
||||
+{
|
||||
+ nsIPaperSizePS *newPZ;
|
||||
+
|
||||
+ if (nsPSPrinterList::kTypeCUPS == nsPSPrinterList::GetPrinterType
|
||||
+ (nsDependentCString(fullPrinterName)))
|
||||
+ newPZ = new nsPaperSizeCUPS(fullPrinterName, printerName);
|
||||
+ else
|
||||
+ newPZ = new nsPaperSizePS();
|
||||
+
|
||||
+ if (!newPZ)
|
||||
+ return NS_ERROR_OUT_OF_MEMORY;
|
||||
+
|
||||
+ aPaper = newPZ;
|
||||
+ return NS_OK;
|
||||
+}
|
||||
--- gfx/src/psshared/nsPaperFactoryPS.h
|
||||
+++ gfx/src/psshared/nsPaperFactoryPS.h
|
||||
@@ -0,0 +1,64 @@
|
||||
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
+/* ex: set tabstop=8 softtabstop=4 shiftwidth=4 expandtab: */
|
||||
+/* ***** BEGIN LICENSE BLOCK *****
|
||||
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
+ *
|
||||
+ * The contents of this file are subject to the Mozilla Public License Version
|
||||
+ * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
+ * the License. You may obtain a copy of the License at
|
||||
+ * http://www.mozilla.org/MPL/
|
||||
+ *
|
||||
+ * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
+ * for the specific language governing rights and limitations under the
|
||||
+ * License.
|
||||
+ *
|
||||
+ * Contributor(s):
|
||||
+ * Arne John Glenstrup <panic@itu.dk>
|
||||
+ *
|
||||
+ * Alternatively, the contents of this file may be used under the terms of
|
||||
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
+ * in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
+ * of those above. If you wish to allow use of your version of this file only
|
||||
+ * under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
+ * use your version of this file under the terms of the MPL, indicate your
|
||||
+ * decision by deleting the provisions above and replace them with the notice
|
||||
+ * and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
+ * the provisions above, a recipient may use your version of this file under
|
||||
+ * the terms of any one of the MPL, the GPL or the LGPL.
|
||||
+ *
|
||||
+ * ***** END LICENSE BLOCK ***** */
|
||||
+
|
||||
+#ifndef nsPaperFactoryPS_h__
|
||||
+#define nsPaperFactoryPS_h__
|
||||
+
|
||||
+#include "nscore.h"
|
||||
+#include "nsIPaperPS.h"
|
||||
+
|
||||
+/* Factory class for the paper sizes. This class determines
|
||||
+ * which paper size class should handle a request, and constructs
|
||||
+ * an object of the appropriate class.
|
||||
+ */
|
||||
+
|
||||
+class NS_PSSHARED nsPaperFactoryPS
|
||||
+{
|
||||
+public:
|
||||
+ /**
|
||||
+ * Construct a paper size object for the given device context spec.
|
||||
+ * On success, the paper size object is owned by the caller and should
|
||||
+ * be destroyed when no longer needed.
|
||||
+ *
|
||||
+ * @param fullPrinterName Fully qualified name, e.g., "CUPS/myprinter"
|
||||
+ * @param printerName Stripped name, e.g., "myprinter"
|
||||
+ * @param aPaper If NS_OK is returned, this will be filled
|
||||
+ * in with a pointer to a paper size object.
|
||||
+ * @return NS_OK or a suitable error value.
|
||||
+ */
|
||||
+ static nsresult CreatePaper(const char* fullPrinterName,
|
||||
+ const char* printerName,
|
||||
+ nsIPaperSizePS* &aPaper);
|
||||
+};
|
||||
+
|
||||
+
|
||||
+#endif /* nsPaperFactoryPS_h__ */
|
||||
--- gfx/src/psshared/nsPaperPS.cpp
|
||||
+++ gfx/src/psshared/nsPaperPS.cpp
|
||||
@@ -22,6 +22,7 @@
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
+ * Arne John Glenstrup <panic@itu.dk>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
@@ -37,9 +38,25 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
-
|
||||
+#ifdef MOZ_LOGGING
|
||||
+#define FORCE_PR_LOG 1 /* Allow logging in the release build */
|
||||
+#endif /* MOZ_LOGGING */
|
||||
+#include "prlog.h"
|
||||
+
|
||||
#include "nsPaperPS.h"
|
||||
#include "plstr.h"
|
||||
+#include "nsPSPrinters.h"
|
||||
+#include <math.h>
|
||||
+
|
||||
+#ifdef PR_LOGGING
|
||||
+static PRLogModuleInfo *PaperSizePSLM = PR_NewLogModule("PaperSizePS");
|
||||
+#endif /* PR_LOGGING */
|
||||
+/* Macro to make lines shorter */
|
||||
+#define DO_PR_DEBUG_LOG(x) PR_LOG(PaperSizePSLM, PR_LOG_DEBUG, x)
|
||||
+
|
||||
+#define MM_PER_PT (25.4 / 72.0)
|
||||
+#define HALF_INCH_PT 36.0
|
||||
+#define EPSILON 0.125
|
||||
|
||||
#define COUNTOF(x) (sizeof(x) / sizeof((x)[0]))
|
||||
|
||||
@@ -57,7 +74,15 @@
|
||||
#undef SIZE_MM
|
||||
};
|
||||
|
||||
-const unsigned int nsPaperSizePS::mCount = COUNTOF(mList);
|
||||
+nsCUPSShim nsPaperSizeCUPS::mCups;
|
||||
+
|
||||
+/* ~nsIPaperSizePS() is virtual, so must implement a destructor. */
|
||||
+nsIPaperSizePS::~nsIPaperSizePS () { }
|
||||
+
|
||||
+nsPaperSizePS::nsPaperSizePS() {
|
||||
+ mCount = COUNTOF(mList);
|
||||
+ mCurrent = 0;
|
||||
+}
|
||||
|
||||
PRBool
|
||||
nsPaperSizePS::Find(const char *aName)
|
||||
@@ -70,3 +95,125 @@
|
||||
}
|
||||
return PR_FALSE;
|
||||
}
|
||||
+
|
||||
+nsPaperSizeCUPS::nsPaperSizeCUPS(const char* fullPrinterName,
|
||||
+ const char* printerName) {
|
||||
+ DO_PR_DEBUG_LOG(("nsPaperSizeCUPS::nsPaperSizeCUPS('%s', '%s')\n",
|
||||
+ fullPrinterName, printerName));
|
||||
+ /* Don't use CUPS before we are sure we have access to the PPD */
|
||||
+ mUsingCups = false;
|
||||
+ mPPD = nsnull;
|
||||
+ mCount = COUNTOF(mList);
|
||||
+ mCurrent = 0;
|
||||
+ if (!fullPrinterName || !printerName ||
|
||||
+ nsPSPrinterList::kTypeCUPS !=
|
||||
+ nsPSPrinterList::GetPrinterType(nsDependentCString(fullPrinterName)))
|
||||
+ return;
|
||||
+ if (!mCups.IsInitialized()) { mCups.Init(); }
|
||||
+ if (!mCups.IsInitialized()) {
|
||||
+ DO_PR_DEBUG_LOG(("nsPaperSizeCUPS::nsPaperSizeCUPS: CUPS unavailable\n"));
|
||||
+ return;
|
||||
+ }
|
||||
+ const char* ppdFileName = mCups.mCupsGetPPD(printerName);
|
||||
+ if (!ppdFileName) {
|
||||
+ DO_PR_DEBUG_LOG(("nsPaperSizeCUPS::nsPaperSizeCUPS: "
|
||||
+ "cannot get PPD file name for printer '%s'\n",
|
||||
+ printerName));
|
||||
+ return;
|
||||
+ }
|
||||
+ mPPD = mCups.mPpdOpenFile(ppdFileName);
|
||||
+ if (!mPPD) {
|
||||
+ DO_PR_DEBUG_LOG(("nsPaperSizeCUPS::nsPaperSizeCUPS: "
|
||||
+ "cannot open PPD file '%s'\n",
|
||||
+ ppdFileName));
|
||||
+ return;
|
||||
+ }
|
||||
+ mCount = mPPD->num_sizes;
|
||||
+ mUsingCups = true;
|
||||
+}
|
||||
+
|
||||
+nsPaperSizeCUPS::~nsPaperSizeCUPS() {
|
||||
+ if (mPPD) mCups.mPpdClose(mPPD);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+nsPaperSizeCUPS::SkipZeroSizes() {
|
||||
+ if (!mUsingCups) return;
|
||||
+ while (mCurrent < mCount
|
||||
+ && (mPPD->sizes[mCurrent].width == 0.0f ||
|
||||
+ mPPD->sizes[mCurrent].length == 0.0f)) {
|
||||
+ mCurrent++;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+PRBool
|
||||
+nsPaperSizeCUPS::Find(const char* aName) {
|
||||
+ DO_PR_DEBUG_LOG(("nsPaperSizeCUPS::Find ('%s') ", aName));
|
||||
+ if (!mUsingCups) return nsPaperSizePS::Find(aName);
|
||||
+ for (int i = mCount; i--; ) {
|
||||
+ if (!PL_strcasecmp(aName, mPPD->sizes[i].name)) {
|
||||
+ DO_PR_DEBUG_LOG
|
||||
+ (("found paper '%s' (%gx%gmm)\n",
|
||||
+ aName,
|
||||
+ round(mPPD->sizes[i].width * MM_PER_PT),
|
||||
+ round(mPPD->sizes[i].length * MM_PER_PT)));
|
||||
+ mCurrent = i;
|
||||
+ return PR_TRUE;
|
||||
+ }
|
||||
+ }
|
||||
+ DO_PR_DEBUG_LOG(("did not find paper '%s'\n", aName));
|
||||
+ return PR_FALSE;
|
||||
+}
|
||||
+
|
||||
+PRBool
|
||||
+nsPaperSizeCUPS::FindDefault() {
|
||||
+ DO_PR_DEBUG_LOG(("nsPaperSizeCUPS::FindDefault"));
|
||||
+ if (!mUsingCups) return nsPaperSizePS::FindDefault();
|
||||
+ mCups.mPpdMarkDefaults(mPPD);
|
||||
+ for (int i = mCount; i--; ) {
|
||||
+ if (mCups.mPpdIsMarked(mPPD, "PageSize", mPPD->sizes[i].name )) {
|
||||
+ DO_PR_DEBUG_LOG
|
||||
+ (("found default paper '%s' (%gx%gmm)\n",
|
||||
+ mPPD->sizes[i].name,
|
||||
+ round(mPPD->sizes[i].width * MM_PER_PT),
|
||||
+ round(mPPD->sizes[i].length * MM_PER_PT)));
|
||||
+ mCurrent = i;
|
||||
+ return PR_TRUE;
|
||||
+ }
|
||||
+ }
|
||||
+ mCurrent = 0;
|
||||
+ DO_PR_DEBUG_LOG(("no default paper found, therefore set the first\n"));
|
||||
+ return PR_TRUE;
|
||||
+}
|
||||
+
|
||||
+const char*
|
||||
+nsPaperSizeCUPS::Name() {
|
||||
+ if (!mUsingCups) return nsPaperSizePS::Name();
|
||||
+ NS_PRECONDITION(!AtEnd(), "Invalid current item");
|
||||
+ return mPPD->sizes[mCurrent].name;
|
||||
+}
|
||||
+
|
||||
+float
|
||||
+nsPaperSizeCUPS::Width_mm() {
|
||||
+ if (!mUsingCups) return nsPaperSizePS::Width_mm();
|
||||
+ NS_PRECONDITION(!AtEnd(), "Invalid current item");
|
||||
+ return round(mPPD->sizes[mCurrent].width * MM_PER_PT);
|
||||
+}
|
||||
+
|
||||
+float
|
||||
+nsPaperSizeCUPS::Height_mm() {
|
||||
+ if (!mUsingCups) return nsPaperSizePS::Height_mm();
|
||||
+ NS_PRECONDITION(!AtEnd(), "Invalid current item");
|
||||
+ return round(mPPD->sizes[mCurrent].length * MM_PER_PT);
|
||||
+}
|
||||
+
|
||||
+PRBool
|
||||
+nsPaperSizeCUPS::IsMetric() {
|
||||
+ if (!mUsingCups) return nsPaperSizePS::IsMetric();
|
||||
+ NS_PRECONDITION(!AtEnd(), "Invalid current item");
|
||||
+ /* Educated guess: unless sizes are integral number */
|
||||
+ /* of half inches, present them to the user in metric. */
|
||||
+ return
|
||||
+ fabs(fmod(mPPD->sizes[mCurrent].width, HALF_INCH_PT)) > EPSILON ||
|
||||
+ fabs(fmod(mPPD->sizes[mCurrent].length, HALF_INCH_PT)) > EPSILON;
|
||||
+}
|
||||
--- gfx/src/psshared/nsPaperPS.h
|
||||
+++ gfx/src/psshared/nsPaperPS.h
|
||||
@@ -40,9 +40,9 @@
|
||||
#ifndef _PAPERPS_H_
|
||||
#define _PAPERPS_H_
|
||||
|
||||
-#include "prtypes.h"
|
||||
+#include "nsIPaperPS.h"
|
||||
#include "nsDebug.h"
|
||||
-#include "psSharedCore.h"
|
||||
+#include "nsCUPSShim.h"
|
||||
|
||||
struct nsPaperSizePS_ {
|
||||
const char *name;
|
||||
@@ -51,13 +51,13 @@
|
||||
PRBool isMetric; // Present to the user in metric, if possible
|
||||
};
|
||||
|
||||
-class NS_PSSHARED nsPaperSizePS {
|
||||
+class NS_PSSHARED nsPaperSizePS : public nsIPaperSizePS {
|
||||
public:
|
||||
/** ---------------------------------------------------
|
||||
* Constructor
|
||||
*/
|
||||
- nsPaperSizePS() { mCurrent = 0; }
|
||||
-
|
||||
+ nsPaperSizePS();
|
||||
+
|
||||
/** ---------------------------------------------------
|
||||
* @return PR_TRUE if the cursor points past the last item.
|
||||
*/
|
||||
@@ -85,6 +85,12 @@
|
||||
PRBool Find(const char *aName);
|
||||
|
||||
/** ---------------------------------------------------
|
||||
+ * Position the cursor at the beginning of the paper size list.
|
||||
+ * @return PR_TRUE
|
||||
+ */
|
||||
+ PRBool FindDefault() { mCurrent = 0; return PR_TRUE; }
|
||||
+
|
||||
+ /** ---------------------------------------------------
|
||||
* @return a pointer to the name of the current paper size
|
||||
*/
|
||||
const char *Name() {
|
||||
@@ -117,11 +123,83 @@
|
||||
return mList[mCurrent].isMetric;
|
||||
}
|
||||
|
||||
- private:
|
||||
+ protected:
|
||||
unsigned int mCurrent;
|
||||
// the class visibility should export these, but it doesn't
|
||||
static NS_PSSHARED_STATIC_MEMBER_(const nsPaperSizePS_) mList[];
|
||||
- static NS_PSSHARED_STATIC_MEMBER_(const unsigned int) mCount;
|
||||
+ unsigned int mCount;
|
||||
+};
|
||||
+
|
||||
+class NS_PSSHARED nsPaperSizeCUPS : public nsPaperSizePS {
|
||||
+ public:
|
||||
+ /** ---------------------------------------------------
|
||||
+ * Constructor for a specific CUPS printer.
|
||||
+ * @param fullPrinterName Fully qualified name, e.g., "CUPS/myprinter"
|
||||
+ * @param printerName Stripped name, e.g., "myprinter"
|
||||
+ */
|
||||
+ nsPaperSizeCUPS(const char* fullPrinterName, const char* printerName);
|
||||
+
|
||||
+ /** ---------------------------------------------------
|
||||
+ * Destructor.
|
||||
+ */
|
||||
+ ~nsPaperSizeCUPS();
|
||||
+
|
||||
+ /** ---------------------------------------------------
|
||||
+ * Position the cursor at the beginning of the paper size list.
|
||||
+ * @return VOID
|
||||
+ */
|
||||
+ void First() {
|
||||
+ nsPaperSizePS::First();
|
||||
+ SkipZeroSizes();
|
||||
+ }
|
||||
+
|
||||
+ /** ---------------------------------------------------
|
||||
+ * Advance the cursor to the next item.
|
||||
+ * @return VOID
|
||||
+ */
|
||||
+ void Next() {
|
||||
+ nsPaperSizePS::Next();
|
||||
+ SkipZeroSizes();
|
||||
+ }
|
||||
+
|
||||
+ /** ---------------------------------------------------
|
||||
+ * Point the cursor to the entry with the given paper name.
|
||||
+ * @return PR_TRUE if pointing to a valid entry.
|
||||
+ */
|
||||
+ PRBool Find(const char *aName);
|
||||
+
|
||||
+ /** ---------------------------------------------------
|
||||
+ * Point the cursor to the CUPS default entry for paper size.
|
||||
+ * @return PR_TRUE if pointing to a valid entry.
|
||||
+ */
|
||||
+ PRBool FindDefault();
|
||||
+
|
||||
+ /** ---------------------------------------------------
|
||||
+ * @return a pointer to the name of the current paper size
|
||||
+ */
|
||||
+ const char *Name();
|
||||
+
|
||||
+ /** ---------------------------------------------------
|
||||
+ * @return the width of the page in millimeters
|
||||
+ */
|
||||
+ float Width_mm();
|
||||
+
|
||||
+ /** ---------------------------------------------------
|
||||
+ * @return the height of the page in millimeters
|
||||
+ */
|
||||
+ float Height_mm();
|
||||
+
|
||||
+ /** ---------------------------------------------------
|
||||
+ * @return PR_TRUE if the paper should be presented to
|
||||
+ * the user in metric units.
|
||||
+ */
|
||||
+ PRBool IsMetric();
|
||||
+
|
||||
+ private:
|
||||
+ void SkipZeroSizes();
|
||||
+ PRBool mUsingCups;
|
||||
+ static NS_PSSHARED_STATIC_MEMBER_(nsCUPSShim) mCups;
|
||||
+ ppd_file_t* mPPD;
|
||||
};
|
||||
|
||||
#endif
|
||||
--- gfx/src/xlib/nsDeviceContextSpecXlib.cpp
|
||||
+++ gfx/src/xlib/nsDeviceContextSpecXlib.cpp
|
||||
@@ -1212,7 +1212,11 @@
|
||||
#endif /* SET_PRINTER_FEATURES_VIA_PREFS */
|
||||
nsXPIDLCString papername;
|
||||
if (NS_SUCCEEDED(CopyPrinterCharPref(pPrefs, "postscript", printerName, "paper_size", getter_Copies(papername)))) {
|
||||
- nsPaperSizePS paper;
|
||||
+ nsIPaperSizePS* paper;
|
||||
+ nsresult rv;
|
||||
+ rv = nsPaperFactoryPS::CreatePaper
|
||||
+ (fullPrinterName.get(), printerName.get(), paper);
|
||||
+ if (NS_FAILED(rv)) return rv;
|
||||
|
||||
if (paper.Find(papername)) {
|
||||
DO_PR_DEBUG_LOG(("setting default paper size to '%s' (%g mm/%g mm)\n",
|
||||
@@ -1238,6 +1242,7 @@
|
||||
}
|
||||
printerFeatures.SetNumPaperSizeRecords(count);
|
||||
#endif /* SET_PRINTER_FEATURES_VIA_PREFS */
|
||||
+ delete(paper);
|
||||
}
|
||||
|
||||
PRBool hasSpoolerCmd = (nsPSPrinterList::kTypePS ==
|
565
dbus.patch
Normal file
565
dbus.patch
Normal file
@ -0,0 +1,565 @@
|
||||
Index: configure.in
|
||||
================================================================================
|
||||
--- browser/installer/unix/packages-static
|
||||
+++ browser/installer/unix/packages-static
|
||||
@@ -341,6 +341,7 @@
|
||||
;
|
||||
bin/components/libnkgnomevfs.so
|
||||
bin/components/libauth.so
|
||||
+bin/components/libdbusservice.so
|
||||
|
||||
; [Additional Developer Tools]
|
||||
[adt]
|
||||
--- config/autoconf.mk.in
|
||||
+++ config/autoconf.mk.in
|
||||
@@ -458,6 +458,12 @@
|
||||
MOZ_GTK2_CFLAGS = @MOZ_GTK2_CFLAGS@
|
||||
MOZ_GTK2_LIBS = @MOZ_GTK2_LIBS@
|
||||
|
||||
+MOZ_DBUS_GLIB_CFLAGS = @MOZ_DBUS_GLIB_CFLAGS@
|
||||
+MOZ_DBUS_GLIB_LIBS = @MOZ_DBUS_GLIB_LIBS@
|
||||
+
|
||||
+MOZ_GTHREAD_CFLAGS = @MOZ_GTHREAD_CFLAGS@
|
||||
+MOZ_GTHREAD_LIBS = @MOZ_GTHREAD_LIBS@
|
||||
+
|
||||
MOZ_XLIB_CFLAGS = @MOZ_XLIB_CFLAGS@
|
||||
MOZ_XLIB_LDFLAGS = @MOZ_XLIB_LDFLAGS@
|
||||
|
||||
--- configure.in
|
||||
+++ configure.in
|
||||
@@ -4776,6 +4776,33 @@
|
||||
AC_SUBST(MOZ_GNOMEUI_LIBS)
|
||||
|
||||
dnl ========================================================
|
||||
+dnl = dbus support
|
||||
+dnl ========================================================
|
||||
+
|
||||
+if test "$MOZ_ENABLE_GTK2"
|
||||
+then
|
||||
+ MOZ_ARG_ENABLE_BOOL(dbus,
|
||||
+ [ --enable-dbus Enable dbus support (default: disabled) ],
|
||||
+ MOZ_ENABLE_DBUS=1,
|
||||
+ MOZ_ENABLE_DBUS=)
|
||||
+
|
||||
+ if test "$MOZ_ENABLE_DBUS"
|
||||
+ then
|
||||
+ PKG_CHECK_MODULES(MOZ_DBUS_GLIB, dbus-glib-1)
|
||||
+ PKG_CHECK_MODULES(MOZ_GTHREAD, gthread-2.0)
|
||||
+ fi
|
||||
+
|
||||
+ if test "$MOZ_ENABLE_DBUS"; then
|
||||
+ AC_DEFINE(MOZ_ENABLE_DBUS)
|
||||
+ fi
|
||||
+fi
|
||||
+AC_SUBST(MOZ_ENABLE_DBUS)
|
||||
+AC_SUBST(MOZ_DBUS_GLIB_CFLAGS)
|
||||
+AC_SUBST(MOZ_DBUS_GLIB_LIBS)
|
||||
+AC_SUBST(MOZ_GTHREAD_CFLAGS)
|
||||
+AC_SUBST(MOZ_GTHREAD_LIBS)
|
||||
+
|
||||
+dnl ========================================================
|
||||
dnl = Setting MOZ_EXTRA_X11CONVERTERS turns on additional
|
||||
dnl = converters in intl/uconv that are used only by X11 gfx
|
||||
dnl = implementations. By default, it's undefined so that
|
||||
@@ -5128,6 +5155,13 @@
|
||||
MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|gnomevfs||'`
|
||||
fi
|
||||
|
||||
+if test -z "$MOZ_ENABLE_DBUS" && test `echo "$MOZ_EXTENSIONS" | grep -c dbus` -ne 0; then
|
||||
+ if test -n "$MOZ_X11"; then
|
||||
+ AC_MSG_WARN([Cannot build dbus without required libraries. Removing dbus from MOZ_EXTENSIONS.])
|
||||
+ fi
|
||||
+ MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|dbus||'`
|
||||
+fi
|
||||
+
|
||||
if test -z "$MOZ_JSDEBUGGER" && test `echo "$MOZ_EXTENSIONS" | grep -c venkman` -ne 0; then
|
||||
AC_MSG_WARN([Cannot build venkman without JavaScript debug library. Removing venkman from MOZ_EXTENSIONS.])
|
||||
MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|venkman||'`
|
||||
--- extensions/dbus/Makefile.in
|
||||
+++ extensions/dbus/Makefile.in
|
||||
@@ -0,0 +1,68 @@
|
||||
+# ###### BEGIN LICENSE BLOCK ######
|
||||
+# Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
+#
|
||||
+#
|
||||
+# The contents of this file are subject to the Mozilla Public
|
||||
+# License Version 1.1 (the "License"); you may not use this file
|
||||
+# except in compliance with the License. You may obtain a copy of
|
||||
+# the License at http://www.mozilla.org/MPL/
|
||||
+#
|
||||
+# Software distributed under the License is distributed on an "AS
|
||||
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
+# implied. See the License for the specific language governing
|
||||
+# rights and limitations under the License.
|
||||
+#
|
||||
+# The Original Code is Novell code.
|
||||
+#
|
||||
+# The Initial Developer of the Original Code is Novell, Inc.
|
||||
+#
|
||||
+# Original Author: Robert O'Callahan (rocallahan@novell.com)
|
||||
+#
|
||||
+# Contributor(s):
|
||||
+#
|
||||
+# Alternatively, the contents of this file may be used under the terms of
|
||||
+# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
+# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
+# of those above. If you wish to allow use of your version of this file only
|
||||
+# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
+# use your version of this file under the terms of the NPL, indicate your
|
||||
+# decision by deleting the provisions above and replace them with the notice
|
||||
+# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
+# the provisions above, a recipient may use your version of this file under
|
||||
+# the terms of any one of the NPL, the GPL or the LGPL.
|
||||
+#
|
||||
+# ###### END LICENSE BLOCK ######
|
||||
+
|
||||
+DEPTH = ../..
|
||||
+topsrcdir = @top_srcdir@
|
||||
+srcdir = @srcdir@
|
||||
+VPATH = @srcdir@
|
||||
+
|
||||
+include $(DEPTH)/config/autoconf.mk
|
||||
+
|
||||
+MODULE = dbus
|
||||
+LIBRARY_NAME = dbusservice
|
||||
+GRE_MODULE = 1
|
||||
+#EXPORT_LIBRARY = 1
|
||||
+IS_COMPONENT = 1
|
||||
+FORCE_SHARED_LIB = 1
|
||||
+
|
||||
+REQUIRES = xpcom \
|
||||
+ string \
|
||||
+ necko \
|
||||
+ embedcomponents \
|
||||
+ $(NULL)
|
||||
+
|
||||
+EXTRA_DSO_LDOPTS = $(MOZ_DBUS_GLIB_LIBS) \
|
||||
+ $(MOZ_GTHREAD_LIBS) \
|
||||
+ $(MOZ_COMPONENT_LIBS)
|
||||
+
|
||||
+CPPSRCS = \
|
||||
+ nsDBusModule.cpp \
|
||||
+ $(NULL)
|
||||
+
|
||||
+include $(topsrcdir)/config/rules.mk
|
||||
+
|
||||
+CXXFLAGS += $(TK_CFLAGS) $(MOZ_DBUS_GLIB_CFLAGS) $(MOZ_GTHREAD_CFLAGS)
|
||||
+CXXFLAGS := $(subst -pedantic,,$(CXXFLAGS))
|
||||
--- extensions/dbus/nsDBusModule.cpp
|
||||
+++ extensions/dbus/nsDBusModule.cpp
|
||||
@@ -0,0 +1,414 @@
|
||||
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
+/* vim:expandtab:shiftwidth=4:tabstop=4:
|
||||
+ */
|
||||
+/* ***** BEGIN LICENSE BLOCK *****
|
||||
+ * Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
+ *
|
||||
+ *
|
||||
+ * The contents of this file are subject to the Mozilla Public
|
||||
+ * License Version 1.1 (the "License"); you may not use this file
|
||||
+ * except in compliance with the License. You may obtain a copy of
|
||||
+ * the License at http://www.mozilla.org/MPL/
|
||||
+ *
|
||||
+ * Software distributed under the License is distributed on an "AS
|
||||
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
+ * implied. See the License for the specific language governing
|
||||
+ * rights and limitations under the License.
|
||||
+ *
|
||||
+ * The Original Code is Novell code.
|
||||
+ *
|
||||
+ * The Initial Developer of the Original Code is Novell, Inc.
|
||||
+ *
|
||||
+ * Original Author: Robert O'Callahan (rocallahan@novell.com)
|
||||
+ *
|
||||
+ * Contributor(s):
|
||||
+ *
|
||||
+ * Alternatively, the contents of this file may be used under the terms of
|
||||
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
+ * in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
+ * of those above. If you wish to allow use of your version of this file only
|
||||
+ * under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
+ * use your version of this file under the terms of the NPL, indicate your
|
||||
+ * decision by deleting the provisions above and replace them with the notice
|
||||
+ * and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
+ * the provisions above, a recipient may use your version of this file under
|
||||
+ * the terms of any one of the NPL, the GPL or the LGPL.
|
||||
+ *
|
||||
+ * ***** END LICENSE BLOCK ***** */
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+#define DBUS_API_SUBJECT_TO_CHANGE
|
||||
+
|
||||
+#include <glib.h>
|
||||
+#include <dbus/dbus.h>
|
||||
+#include <dbus/dbus-glib-lowlevel.h>
|
||||
+#include <dbus/dbus-glib.h>
|
||||
+
|
||||
+#include "nsIObserverService.h"
|
||||
+#include "nsIObserver.h"
|
||||
+#include "nsIIOService.h"
|
||||
+#include "nsWeakReference.h"
|
||||
+#include "nsIPrefBranch2.h"
|
||||
+#include "nsIPrefService.h"
|
||||
+#include "nsServiceManagerUtils.h"
|
||||
+#include "nsNetCID.h"
|
||||
+#include "nsCRT.h"
|
||||
+#include "nsICategoryManager.h"
|
||||
+#include "nsIGenericFactory.h"
|
||||
+#include "nsIAppStartupNotifier.h"
|
||||
+#include "nsITimer.h"
|
||||
+#include "nsComponentManagerUtils.h"
|
||||
+
|
||||
+#include "nsStringAPI.h"
|
||||
+
|
||||
+// Define NetworkManager API constants. This avoids a dependency on
|
||||
+// NetworkManager-devel.
|
||||
+#define NM_DBUS_SERVICE "org.freedesktop.NetworkManager"
|
||||
+#define NM_DBUS_PATH "/org/freedesktop/NetworkManager"
|
||||
+#define NM_DBUS_INTERFACE "org.freedesktop.NetworkManager"
|
||||
+#define NM_DBUS_SIGNAL_STATE_CHANGE "StateChange"
|
||||
+typedef enum NMState
|
||||
+{
|
||||
+ NM_STATE_UNKNOWN = 0,
|
||||
+ NM_STATE_ASLEEP,
|
||||
+ NM_STATE_CONNECTING,
|
||||
+ NM_STATE_CONNECTED,
|
||||
+ NM_STATE_DISCONNECTED
|
||||
+} NMState;
|
||||
+
|
||||
+#define NS_DBUS_CONTRACTID "@mozilla.org/dbus;1"
|
||||
+#define NS_DBUS_CLASSNAME "DBus Interface"
|
||||
+#define NS_DBUS_CID \
|
||||
+ { 0x85899443, \
|
||||
+ 0x2842, \
|
||||
+ 0x4cc4, \
|
||||
+ { 0x87, 0x0c, 0x7a, 0x6f, 0x22, 0xb0, 0xaa, 0x11 } \
|
||||
+ }
|
||||
+
|
||||
+/**
|
||||
+ * The nsDBusService component interfaces with DBUS to communicate with daemons
|
||||
+ * in systems supporting DBUS. It links dynamically to the DBUS libraries so
|
||||
+ * will not load on systems without those libraries ... but that's harmless.
|
||||
+ *
|
||||
+ * Currently the only daemon we communicate with is NetworkManager. We listen
|
||||
+ * for NetworkManager state changes; we set nsIOService's offline status to
|
||||
+ * FALSE when NetworkManager reports NM_STATE_CONNECTED, and to TRUE otherwise.
|
||||
+ * We also solicit the current status from NetworkManager when this component
|
||||
+ * gets loaded. In addition to setting IOService, we also set the
|
||||
+ * "browser.offline" preference (because Firefox treats that preference as
|
||||
+ * authoritative). We have to wait until prefs have been loaded before setting
|
||||
+ * "browser.offline".
|
||||
+ *
|
||||
+ * In the future we could extend this class to talk to other daemons.
|
||||
+ *
|
||||
+ * Currently all communication is asynchronous. This isn't hard to implement
|
||||
+ * and avoids blocking our main thread.
|
||||
+ */
|
||||
+class nsDBusService : public nsIObserver,
|
||||
+ public nsSupportsWeakReference
|
||||
+{
|
||||
+public:
|
||||
+ NS_DECL_ISUPPORTS
|
||||
+ NS_DECL_NSIOBSERVER
|
||||
+
|
||||
+ nsDBusService();
|
||||
+ virtual ~nsDBusService();
|
||||
+
|
||||
+ nsresult Init();
|
||||
+
|
||||
+ /**
|
||||
+ * This gets called when NetworkManager sends us a StateChange signal,
|
||||
+ * or when we receive a reply to our inquiry.
|
||||
+ * The message contains the current NMState.
|
||||
+ */
|
||||
+ void UpdateNetworkStatus(DBusMessage* message);
|
||||
+
|
||||
+ /**
|
||||
+ * Handle a message.
|
||||
+ * @return PR_TRUE to indicate that the message has been handled
|
||||
+ */
|
||||
+ PRBool HandleMessage(DBusMessage* message);
|
||||
+
|
||||
+ void DoTimerCallback(nsITimer* aTimer);
|
||||
+
|
||||
+private:
|
||||
+ /**
|
||||
+ * Try to connect to the dbus service.
|
||||
+ */
|
||||
+ nsresult ConnectToDBus();
|
||||
+ /**
|
||||
+ * Ask NetworkManager to send us the current status.
|
||||
+ */
|
||||
+ void RequestNetworkStatus();
|
||||
+ /**
|
||||
+ * Update Gecko networking settings based on information we have received.
|
||||
+ */
|
||||
+ void SetGeckoNetworkStatus();
|
||||
+ /**
|
||||
+ * DBUS has disconnected. Hopefull it will restart; we need to restore
|
||||
+ * our connection.
|
||||
+ */
|
||||
+ void HandleDBusDisconnect();
|
||||
+
|
||||
+ DBusConnection* mConnection;
|
||||
+ nsCOMPtr<nsITimer> mReconnectTimer;
|
||||
+
|
||||
+ /**
|
||||
+ * Set to PR_TRUE after we have received at least one status indication
|
||||
+ * from NetworkManager.
|
||||
+ */
|
||||
+ PRPackedBool mGotNetworkStatus;
|
||||
+ /**
|
||||
+ * When mGotNetworkStatus is PR_TRUE, this contains the status indicated
|
||||
+ * by NetworkManager.
|
||||
+ */
|
||||
+ PRPackedBool mNetworkOnline;
|
||||
+ /**
|
||||
+ * Set to PR_TRUE after prefs have been loaded.
|
||||
+ */
|
||||
+ PRPackedBool mPrefsLoaded;
|
||||
+};
|
||||
+
|
||||
+NS_IMPL_ISUPPORTS2(nsDBusService, nsIObserver, nsISupportsWeakReference)
|
||||
+
|
||||
+nsDBusService::nsDBusService() {
|
||||
+ mConnection = nsnull;
|
||||
+ mGotNetworkStatus = PR_FALSE;
|
||||
+ mPrefsLoaded = PR_FALSE;
|
||||
+}
|
||||
+
|
||||
+nsDBusService::~nsDBusService() {
|
||||
+ if (mConnection) {
|
||||
+ dbus_connection_unref(mConnection);
|
||||
+ }
|
||||
+ if (mReconnectTimer) {
|
||||
+ mReconnectTimer->Cancel();
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void nsDBusService::SetGeckoNetworkStatus() {
|
||||
+ // Don't set Gecko status until after prefs have been loaded. When
|
||||
+ // prefs are loaded, we'll get called again.
|
||||
+ if (!mPrefsLoaded || !mGotNetworkStatus)
|
||||
+ return;
|
||||
+
|
||||
+ nsCOMPtr<nsIPrefBranch2> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID));
|
||||
+ if (prefs) {
|
||||
+ prefs->SetBoolPref("browser.offline", !mNetworkOnline);
|
||||
+ }
|
||||
+
|
||||
+ nsCOMPtr<nsIIOService> ios(do_GetService(NS_IOSERVICE_CONTRACTID));
|
||||
+ if (ios) {
|
||||
+ ios->SetOffline(!mNetworkOnline);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void nsDBusService::UpdateNetworkStatus(DBusMessage* msg) {
|
||||
+ PRInt32 result;
|
||||
+ if (dbus_message_get_args(msg, NULL, DBUS_TYPE_UINT32, &result,
|
||||
+ DBUS_TYPE_INVALID)) {
|
||||
+ mGotNetworkStatus = PR_TRUE;
|
||||
+ mNetworkOnline = result == NM_STATE_CONNECTED;
|
||||
+ SetGeckoNetworkStatus();
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void NetworkStatusNotify(DBusPendingCall *pending,
|
||||
+ void* user_data) {
|
||||
+ DBusMessage* msg = dbus_pending_call_steal_reply(pending);
|
||||
+ if (!msg)
|
||||
+ return;
|
||||
+ if (dbus_message_get_type(msg) == DBUS_MESSAGE_TYPE_METHOD_RETURN) {
|
||||
+ NS_STATIC_CAST(nsDBusService*, user_data)->UpdateNetworkStatus(msg);
|
||||
+ }
|
||||
+ dbus_message_unref(msg);
|
||||
+}
|
||||
+
|
||||
+void nsDBusService::RequestNetworkStatus() {
|
||||
+ DBusMessage* msg =
|
||||
+ dbus_message_new_method_call(NM_DBUS_SERVICE, NM_DBUS_PATH,
|
||||
+ NM_DBUS_INTERFACE, "state");
|
||||
+ if (!msg)
|
||||
+ return;
|
||||
+
|
||||
+ DBusPendingCall* reply;
|
||||
+ if (dbus_connection_send_with_reply(mConnection, msg, &reply, -1)) {
|
||||
+ dbus_pending_call_set_notify(reply, NetworkStatusNotify, this, NULL);
|
||||
+ dbus_pending_call_unref(reply);
|
||||
+ }
|
||||
+ dbus_message_unref(msg);
|
||||
+}
|
||||
+
|
||||
+void nsDBusService::DoTimerCallback(nsITimer *aTimer) {
|
||||
+ if (aTimer == mReconnectTimer.get()) {
|
||||
+ nsresult rv = ConnectToDBus();
|
||||
+ if (NS_SUCCEEDED(rv)) {
|
||||
+ mReconnectTimer->Cancel();
|
||||
+ mReconnectTimer = nsnull;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void TimerCallback(nsITimer *aTimer, void *aClosure) {
|
||||
+ NS_STATIC_CAST(nsDBusService*, aClosure)->DoTimerCallback(aTimer);
|
||||
+}
|
||||
+
|
||||
+void nsDBusService::HandleDBusDisconnect() {
|
||||
+ if (mConnection) {
|
||||
+ dbus_connection_unref(mConnection);
|
||||
+ mConnection = nsnull;
|
||||
+ }
|
||||
+
|
||||
+ nsresult rv;
|
||||
+ mReconnectTimer = do_CreateInstance("@mozilla.org/timer;1", &rv);
|
||||
+ if (NS_FAILED(rv))
|
||||
+ return;
|
||||
+ rv = mReconnectTimer->InitWithFuncCallback(TimerCallback, this,
|
||||
+ 5000, nsITimer::TYPE_REPEATING_SLACK);
|
||||
+ if (NS_FAILED(rv)) {
|
||||
+ mReconnectTimer = nsnull;
|
||||
+ return;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+PRBool nsDBusService::HandleMessage(DBusMessage* message) {
|
||||
+ if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL,
|
||||
+ "Disconnected")) {
|
||||
+ HandleDBusDisconnect();
|
||||
+ return PR_FALSE;
|
||||
+ }
|
||||
+
|
||||
+ if (dbus_message_is_signal(message, NM_DBUS_INTERFACE,
|
||||
+ NM_DBUS_SIGNAL_STATE_CHANGE)) {
|
||||
+ UpdateNetworkStatus(message);
|
||||
+ return PR_TRUE;
|
||||
+ }
|
||||
+
|
||||
+ return PR_FALSE;
|
||||
+}
|
||||
+
|
||||
+NS_IMETHODIMP nsDBusService::Observe(nsISupports *aSubject,
|
||||
+ const char *aTopic,
|
||||
+ const PRUnichar *aData) {
|
||||
+ if (!aTopic)
|
||||
+ return NS_OK;
|
||||
+
|
||||
+ if (!nsCRT::strcmp(aTopic, NS_PREFSERVICE_READ_TOPIC_ID)) {
|
||||
+ mPrefsLoaded = PR_TRUE;
|
||||
+ SetGeckoNetworkStatus();
|
||||
+ }
|
||||
+ return NS_OK;
|
||||
+}
|
||||
+
|
||||
+static DBusHandlerResult dbus_filter(DBusConnection* connection,
|
||||
+ DBusMessage* message,
|
||||
+ void* user_data) {
|
||||
+ return NS_STATIC_CAST(nsDBusService*, user_data)->HandleMessage(message)
|
||||
+ ? DBUS_HANDLER_RESULT_HANDLED : DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
||||
+}
|
||||
+
|
||||
+nsresult nsDBusService::ConnectToDBus() {
|
||||
+ DBusError error;
|
||||
+ dbus_error_init(&error);
|
||||
+
|
||||
+ mConnection = dbus_bus_get(DBUS_BUS_SYSTEM, &error);
|
||||
+ if (!mConnection) {
|
||||
+ dbus_error_free(&error);
|
||||
+ return NS_ERROR_FAILURE;
|
||||
+ }
|
||||
+
|
||||
+ dbus_connection_set_exit_on_disconnect(mConnection, PR_FALSE);
|
||||
+ dbus_connection_setup_with_g_main(mConnection, NULL);
|
||||
+
|
||||
+ if (!dbus_connection_add_filter(mConnection, dbus_filter, this, NULL)) {
|
||||
+ dbus_error_free(&error);
|
||||
+ return NS_ERROR_FAILURE;
|
||||
+ }
|
||||
+
|
||||
+ dbus_bus_add_match(mConnection,
|
||||
+ "type='signal',"
|
||||
+ "interface='" NM_DBUS_INTERFACE "',"
|
||||
+ "sender='" NM_DBUS_SERVICE "',"
|
||||
+ "path='" NM_DBUS_PATH "'", &error);
|
||||
+ if (dbus_error_is_set(&error)) {
|
||||
+ dbus_error_free(&error);
|
||||
+ return NS_ERROR_FAILURE;
|
||||
+ }
|
||||
+
|
||||
+ RequestNetworkStatus();
|
||||
+
|
||||
+ dbus_error_free(&error);
|
||||
+
|
||||
+ return NS_OK;
|
||||
+}
|
||||
+
|
||||
+nsresult nsDBusService::Init() {
|
||||
+ nsresult rv;
|
||||
+ nsCOMPtr<nsIObserverService> observerService =
|
||||
+ do_GetService("@mozilla.org/observer-service;1", &rv);
|
||||
+ if (NS_FAILED(rv))
|
||||
+ return rv;
|
||||
+
|
||||
+ rv = observerService->AddObserver(this, NS_PREFSERVICE_READ_TOPIC_ID,
|
||||
+ PR_FALSE);
|
||||
+ if (NS_FAILED(rv))
|
||||
+ return rv;
|
||||
+
|
||||
+ if (!g_thread_supported ())
|
||||
+ g_thread_init (NULL);
|
||||
+ dbus_g_thread_init();
|
||||
+
|
||||
+ return ConnectToDBus();
|
||||
+}
|
||||
+
|
||||
+NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsDBusService, Init)
|
||||
+
|
||||
+static NS_METHOD
|
||||
+RegisterDBus(nsIComponentManager *aCompMgr,
|
||||
+ nsIFile *aPath,
|
||||
+ const char *registryLocation,
|
||||
+ const char *componentType,
|
||||
+ const nsModuleComponentInfo *info) {
|
||||
+ nsresult rv;
|
||||
+
|
||||
+ nsCOMPtr<nsICategoryManager>
|
||||
+ categoryManager(do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv));
|
||||
+ if (NS_SUCCEEDED(rv)) {
|
||||
+ rv = categoryManager->AddCategoryEntry(APPSTARTUP_CATEGORY,
|
||||
+ "DBus Module",
|
||||
+ NS_DBUS_CONTRACTID,
|
||||
+ PR_TRUE, PR_TRUE, nsnull);
|
||||
+ }
|
||||
+
|
||||
+ return rv;
|
||||
+}
|
||||
+
|
||||
+static NS_METHOD
|
||||
+UnRegisterDBus(nsIComponentManager *aCompMgr,
|
||||
+ nsIFile *aPath,
|
||||
+ const char *registryLocation,
|
||||
+ const nsModuleComponentInfo *info) {
|
||||
+ nsresult rv;
|
||||
+ nsCOMPtr<nsICategoryManager>
|
||||
+ categoryManager(do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv));
|
||||
+ if (NS_SUCCEEDED(rv)) {
|
||||
+ rv = categoryManager->DeleteCategoryEntry(APPSTARTUP_CATEGORY,
|
||||
+ "DBus Module",
|
||||
+ PR_TRUE);
|
||||
+ }
|
||||
+ return rv;
|
||||
+}
|
||||
+
|
||||
+static const nsModuleComponentInfo components[] = {
|
||||
+ { NS_DBUS_CLASSNAME,
|
||||
+ NS_DBUS_CID,
|
||||
+ NS_DBUS_CONTRACTID,
|
||||
+ nsDBusServiceConstructor,
|
||||
+ RegisterDBus,
|
||||
+ UnRegisterDBus,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+NS_IMPL_NSGETMODULE(nsDBusModule, components)
|
3
firefox-2.0-source.tar.bz2
Normal file
3
firefox-2.0-source.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5631f4936535866481f6ce190446b516288eb1e94bdb6d34e9b93464b203345d
|
||||
size 37350148
|
26
firefox-appname.patch
Normal file
26
firefox-appname.patch
Normal file
@ -0,0 +1,26 @@
|
||||
--- browser/app/profile/firefox.js
|
||||
+++ browser/app/profile/firefox.js
|
||||
@@ -173,7 +173,7 @@
|
||||
|
||||
// Whether or not the application should check at startup each time if it
|
||||
// is the default browser.
|
||||
-pref("browser.shell.checkDefaultBrowser", true);
|
||||
+pref("browser.shell.checkDefaultBrowser", false);
|
||||
|
||||
// 0 = blank, 1 = home (browser.startup.homepage), 2 = last visited page, 3 = resume previous browser session
|
||||
// The behavior of option 3 is detailed at: http://wiki.mozilla.org/Session_Restore
|
||||
--- browser/components/shell/src/nsGNOMEShellService.cpp
|
||||
+++ browser/components/shell/src/nsGNOMEShellService.cpp
|
||||
@@ -133,7 +133,11 @@
|
||||
rv = appPath->AppendNative(NS_LITERAL_CSTRING(MOZ_APP_NAME));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
- return appPath->GetNativePath(mAppPath);
|
||||
+ /* This path to firefox is hardcoded for the default path setting */
|
||||
+ mAppPath.Assign ("/usr/bin/firefox");
|
||||
+
|
||||
+ //return appPath->GetNativePath(mAppPath);
|
||||
+ return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS2(nsGNOMEShellService, nsIShellService, nsIShellService_MOZILLA_1_8_BRANCH)
|
106
firefox-no-update.patch
Normal file
106
firefox-no-update.patch
Normal file
@ -0,0 +1,106 @@
|
||||
Index: browser/app/profile/firefox.js
|
||||
================================================================================
|
||||
--- browser/app/profile/firefox.js
|
||||
+++ browser/app/profile/firefox.js
|
||||
@@ -77,65 +77,6 @@
|
||||
// Dictionary download preference
|
||||
pref("browser.dictionaries.download.url", "https://%LOCALE%.add-ons.mozilla.com/%LOCALE%/firefox/%VERSION%/dictionaries/");
|
||||
|
||||
-// App-specific update preferences
|
||||
-
|
||||
-// Whether or not app updates are enabled
|
||||
-pref("app.update.enabled", true);
|
||||
-
|
||||
-// This preference turns on app.update.mode and allows automatic download and
|
||||
-// install to take place. We use a separate boolean toggle for this to make
|
||||
-// the UI easier to construct.
|
||||
-pref("app.update.auto", true);
|
||||
-
|
||||
-// Defines how the Application Update Service notifies the user about updates:
|
||||
-//
|
||||
-// AUM Set to: Minor Releases: Major Releases:
|
||||
-// 0 download no prompt download no prompt
|
||||
-// 1 download no prompt download no prompt if no incompatibilities
|
||||
-// 2 download no prompt prompt
|
||||
-//
|
||||
-// See chart in nsUpdateService.js.in for more details
|
||||
-//
|
||||
-pref("app.update.mode", 1);
|
||||
-
|
||||
-// If set to true, the Update Service will present no UI for any event.
|
||||
-pref("app.update.silent", false);
|
||||
-
|
||||
-// Update service URL:
|
||||
-pref("app.update.url", "https://aus2.mozilla.org/update/2/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/update.xml");
|
||||
-// app.update.url.manual is in branding section
|
||||
-// app.update.url.details is in branding section
|
||||
-
|
||||
-// User-settable override to app.update.url for testing purposes.
|
||||
-//pref("app.update.url.override", "");
|
||||
-
|
||||
-// Interval: Time between checks for a new version (in seconds)
|
||||
-// default=1 day
|
||||
-pref("app.update.interval", 86400);
|
||||
-// Interval: Time before prompting the user to download a new version that
|
||||
-// is available (in seconds) default=1 day
|
||||
-pref("app.update.nagTimer.download", 86400);
|
||||
-// Interval: Time before prompting the user to restart to install the latest
|
||||
-// download (in seconds) default=30 minutes
|
||||
-pref("app.update.nagTimer.restart", 1800);
|
||||
-// Interval: When all registered timers should be checked (in milliseconds)
|
||||
-// default=5 seconds
|
||||
-pref("app.update.timer", 600000);
|
||||
-
|
||||
-// Whether or not we show a dialog box informing the user that the update was
|
||||
-// successfully applied. This is off in Firefox by default since we show a
|
||||
-// upgrade start page instead! Other apps may wish to show this UI, and supply
|
||||
-// a whatsNewURL field in their brand.properties that contains a link to a page
|
||||
-// which tells users what's new in this new update.
|
||||
-pref("app.update.showInstalledUI", false);
|
||||
-
|
||||
-// 0 = suppress prompting for incompatibilities if there are updates available
|
||||
-// to newer versions of installed addons that resolve them.
|
||||
-// 1 = suppress prompting for incompatibilities only if there are VersionInfo
|
||||
-// updates available to installed addons that resolve them, not newer
|
||||
-// versions.
|
||||
-pref("app.update.incompatible.mode", 0);
|
||||
-
|
||||
// Symmetric (can be overridden by individual extensions) update preferences.
|
||||
// e.g.
|
||||
// extensions.{GUID}.update.enabled
|
||||
--- browser/base/content/baseMenuOverlay.xul
|
||||
+++ browser/base/content/baseMenuOverlay.xul
|
||||
@@ -76,7 +76,7 @@
|
||||
label="&helpMenu.label;"
|
||||
accesskey="&helpMenu.accesskey;">
|
||||
#endif
|
||||
- <menupopup id="menu_HelpPopup" onpopupshowing="buildHelpMenu();">
|
||||
+ <menupopup id="menu_HelpPopup">
|
||||
<menuitem oncommand="openHelp('firefox-help', 'chrome://browser/locale/help/help.rdf');"
|
||||
#ifdef XP_MACOSX
|
||||
label="&helpContentsMac.label;"
|
||||
@@ -102,10 +102,8 @@
|
||||
accesskey="&updateCmd.accesskey;"
|
||||
label="&updateCmd.label;"
|
||||
class="menuitem-iconic"
|
||||
- oncommand="checkForUpdates();"/>
|
||||
-#ifndef XP_MACOSX
|
||||
- <menuseparator/>
|
||||
-#endif
|
||||
+ oncommand="checkForUpdates();"
|
||||
+ hidden="true"/>
|
||||
<menuitem id="aboutName"
|
||||
accesskey="&aboutCmd.accesskey;"
|
||||
label="&aboutCmd.label;"
|
||||
--- browser/components/preferences/advanced.js
|
||||
+++ browser/components/preferences/advanced.js
|
||||
@@ -252,7 +252,8 @@
|
||||
var enabledPref = document.getElementById("app.update.enabled");
|
||||
var enableAppUpdate = document.getElementById("enableAppUpdate");
|
||||
|
||||
- enableAppUpdate.disabled = !aus.canUpdate || enabledPref.locked;
|
||||
+ enableAppUpdate.disabled = true;
|
||||
+ enableAppUpdate.hidden = true;
|
||||
},
|
||||
|
||||
/**
|
21
firefox-suse-default-prefs.js
Normal file
21
firefox-suse-default-prefs.js
Normal file
@ -0,0 +1,21 @@
|
||||
pref("browser.display.use_system_colors", true);
|
||||
pref("general.smoothScroll", true);
|
||||
pref("general.useragent.vendor", "SUSE");
|
||||
pref("general.useragent.vendorSub", "RPM_VERSION");
|
||||
pref("network.protocol-handler.app.rtsp", "/usr/bin/realplay");
|
||||
pref("network.protocol-handler.app.file", "desktop-launch");
|
||||
pref("browser.link.open_external", 2);
|
||||
pref("browser.startup.homepage_override.mstone", "ignore");
|
||||
pref("font.default", "sans-serif");
|
||||
pref("font.default.x-western", "sans-serif");
|
||||
pref("font.name.monospace.x-western", "monospace");
|
||||
pref("font.name.monospace.x-unicode", "monospace");
|
||||
pref("network.negotiate-auth.gsslib", "GSSAPI");
|
||||
pref("network.proxy.type", 5);
|
||||
pref("print.print_edge_top", 14); // 1/100 of an inch
|
||||
pref("print.print_edge_left", 16); // 1/100 of an inch
|
||||
pref("print.print_edge_right", 16); // 1/100 of an inch
|
||||
pref("print.print_edge_bottom", 14); // 1/100 of an inch
|
||||
pref("startup.homepage_override_url", "resource:/browserconfig.properties");
|
||||
pref("browser.throbber.url", "resource:/browserconfig.properties");
|
||||
pref("browser.backspace_action", 2);
|
367
firefox-ui-lockdown.patch
Normal file
367
firefox-ui-lockdown.patch
Normal file
@ -0,0 +1,367 @@
|
||||
--- browser/base/content/browser-menubar.inc
|
||||
+++ browser/base/content/browser-menubar.inc
|
||||
@@ -55,9 +55,9 @@
|
||||
<menuitem id="menu_saveFrame" label="&saveFrameCmd.label;" accesskey="&saveFrameCmd.accesskey;" command="Browser:SaveFrame" hidden="true"/>
|
||||
<menuitem id="menu_sendLink" label="&sendPageCmd.label;" accesskey="&sendPageCmd.accesskey;" command="Browser:SendLink"/>
|
||||
<menuseparator/>
|
||||
- <menuitem label="&printSetupCmd.label;" accesskey="&printSetupCmd.accesskey;" command="cmd_pageSetup"/>
|
||||
+ <menuitem id="menu_printSetup" label="&printSetupCmd.label;" accesskey="&printSetupCmd.accesskey;" command="cmd_pageSetup"/>
|
||||
#ifndef XP_MACOSX
|
||||
- <menuitem label="&printPreviewCmd.label;" accesskey="&printPreviewCmd.accesskey;" command="cmd_printPreview"/>
|
||||
+ <menuitem id="menu_printPreview" label="&printPreviewCmd.label;" accesskey="&printPreviewCmd.accesskey;" oncommand="PrintUtils.printPreview(onEnterPrintPreview, onExitPrintPreview);"/>
|
||||
#endif
|
||||
<menuitem label="&printCmd.label;" accesskey="&printCmd.accesskey;" key="printKb" command="cmd_print"/>
|
||||
<menuseparator/>
|
||||
@@ -458,7 +458,7 @@
|
||||
#endif
|
||||
label="&bookmarkAllCmd.label;"
|
||||
command="Browser:BookmarkAllTabs"/>
|
||||
- <menuitem key="manBookmarkKb"
|
||||
+ <menuitem id="manBookmark" key="manBookmarkKb"
|
||||
label="&manBookmarksCmd.label;"
|
||||
oncommand="toOpenWindowByType('bookmarks:manager', 'chrome://browser/content/bookmarks/bookmarksManager.xul');"/>
|
||||
<menuseparator/>
|
||||
--- browser/base/content/browser.js
|
||||
+++ browser/base/content/browser.js
|
||||
@@ -183,6 +183,12 @@
|
||||
var backBroadcaster = document.getElementById("Browser:Back");
|
||||
var forwardBroadcaster = document.getElementById("Browser:Forward");
|
||||
|
||||
+ if (gPrefService.getBoolPref("config.lockdown.history")) {
|
||||
+ backBroadcaster.setAttribute("disabled", true);
|
||||
+ forwardBroadcaster.setAttribute("disabled", true);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
var webNavigation = gBrowser.webNavigation;
|
||||
|
||||
// Avoid setting attributes on broadcasters if the value hasn't changed!
|
||||
@@ -953,6 +959,107 @@
|
||||
BrowserSearch.init();
|
||||
}
|
||||
|
||||
+function lockdownElement(ident, disable)
|
||||
+{
|
||||
+ var e = document.getElementById(ident);
|
||||
+ if (disable) {
|
||||
+ e.setAttribute("disabled", "true");
|
||||
+ } else {
|
||||
+ e.removeAttribute("disabled");
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+function applyLockdown(isStartup)
|
||||
+{
|
||||
+ // It is important to check that Firefox code does not change the
|
||||
+ // "disabled" state of these UI elements. Fortunately it mostly hides
|
||||
+ // elements rather than disables them.
|
||||
+ var disablePrinting = gPrefService.getBoolPref("config.lockdown.printing");
|
||||
+ var disablePrintSetup = gPrefService.getBoolPref("config.lockdown.printsetup");
|
||||
+ if (!isStartup || disablePrintSetup || disablePrintSetup) {
|
||||
+ lockdownElement("menu_printSetup", disablePrinting || disablePrintSetup);
|
||||
+ lockdownElement("menu_printPreview", disablePrinting || disablePrintSetup);
|
||||
+ lockdownElement("cmd_print", disablePrinting);
|
||||
+ }
|
||||
+
|
||||
+ var disableSave = gPrefService.getBoolPref("config.lockdown.savepage");
|
||||
+ if (!isStartup || disableSave) {
|
||||
+ lockdownElement("Browser:SavePage", disableSave);
|
||||
+ lockdownElement("menu_saveFrame", disableSave);
|
||||
+ lockdownElement("context-savepage", disableSave);
|
||||
+ lockdownElement("context-savelink", disableSave);
|
||||
+ lockdownElement("context-saveimage", disableSave);
|
||||
+ }
|
||||
+
|
||||
+ var disableBookmarks = gPrefService.getBoolPref("config.lockdown.hidebookmark");
|
||||
+ var disableBookmarkEditing = gPrefService.getBoolPref("config.lockdown.bookmark");
|
||||
+ if (!isStartup || disableBookmarks || disableBookmarkEditing) {
|
||||
+ lockdownElement("viewBookmarksSidebar", disableBookmarks);
|
||||
+ lockdownElement("PersonalToolbar", disableBookmarks); // XXX check
|
||||
+ lockdownElement("Browser:AddBookmarkAs", disableBookmarks || disableBookmarkEditing);
|
||||
+ lockdownElement("manBookmark", disableBookmarks || disableBookmarkEditing);
|
||||
+ lockdownElement("context-bookmarkpage", disableBookmarks || disableBookmarkEditing);
|
||||
+ lockdownElement("context-bookmarklink", disableBookmarks || disableBookmarkEditing);
|
||||
+
|
||||
+ // hide the personal bookmarks toolbar if necessary
|
||||
+ if (disableBookmarks) {
|
||||
+ document.getElementById("PersonalToolbar").setAttribute("collapsed", "true");
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ var disableHistory = gPrefService.getBoolPref("config.lockdown.history");
|
||||
+ if (!isStartup || disableHistory) {
|
||||
+ lockdownElement("viewHistorySidebar", disableHistory);
|
||||
+ UpdateBackForwardButtons();
|
||||
+ var urlBar = document.getElementById("urlbar");
|
||||
+ urlBar.setAttribute("enablehistory", disableHistory ? "false" : "true");
|
||||
+ }
|
||||
+
|
||||
+ var disableURLBar = gPrefService.getBoolPref("config.lockdown.urlbar");
|
||||
+ if (!isStartup || disableURLBar) {
|
||||
+ lockdownElement("urlbar", disableURLBar);
|
||||
+ lockdownElement("Browser:OpenLocation", disableURLBar);
|
||||
+ lockdownElement("Browser:OpenFile", disableURLBar);
|
||||
+ }
|
||||
+
|
||||
+ var disableSearchBar = gPrefService.getBoolPref("config.lockdown.searchbar");
|
||||
+ if (!isStartup || disableSearchBar) {
|
||||
+ lockdownElement("searchbar-textfield", disableSearchBar);
|
||||
+ lockdownElement("searchbar-dropmarker", disableSearchBar);
|
||||
+ }
|
||||
+
|
||||
+ var disableToolbarEditing = gPrefService.getBoolPref("config.lockdown.toolbarediting");
|
||||
+ if (!isStartup || disableToolbarEditing) {
|
||||
+ var e = document.getElementById("cmd_CustomizeToolbars");
|
||||
+ if (!e.getAttribute("inCustomization")) {
|
||||
+ lockdownElement("cmd_CustomizeToolbars", disableToolbarEditing);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ // Close sidebar if we disabled the command that's currently in use
|
||||
+ var sidebarBox = document.getElementById("sidebar-box");
|
||||
+ var cmd = sidebarBox.getAttribute("sidebarcommand");
|
||||
+ if (cmd) {
|
||||
+ var elt = document.getElementById(cmd);
|
||||
+ if (elt && elt.getAttribute("disabled") == "true") {
|
||||
+ toggleSidebar(cmd, false);
|
||||
+ gMustLoadSidebar = false;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+var lockdownObserver = {
|
||||
+ observe: function(aSubject, aTopic, aPrefName)
|
||||
+ {
|
||||
+ try {
|
||||
+ applyLockdown(false);
|
||||
+ } catch (ex) {
|
||||
+ dump("Failed lockdown: " + ex + "\n");
|
||||
+ }
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+
|
||||
function delayedStartup()
|
||||
{
|
||||
var os = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
|
||||
@@ -961,7 +1068,15 @@
|
||||
|
||||
if (!gPrefService)
|
||||
gPrefService = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
- .getService(Components.interfaces.nsIPrefBranch);
|
||||
+ .getService(Components.interfaces.nsIPrefBranchInternal);
|
||||
+ try {
|
||||
+ // do lockdown stuff in an exception handler so that if it fails
|
||||
+ // catastrophically, the browser should still come up and function
|
||||
+ applyLockdown(true);
|
||||
+ gPrefService.addObserver("config.lockdown.", lockdownObserver, false);
|
||||
+ } catch (ex) {
|
||||
+ dump("Failed lockdown: " + ex + "\n");
|
||||
+ }
|
||||
BrowserOffline.init();
|
||||
|
||||
if (gURLBar && document.documentElement.getAttribute("chromehidden").indexOf("toolbar") != -1) {
|
||||
@@ -980,8 +1095,8 @@
|
||||
window.addEventListener("keypress", ctrlNumberTabSelection, false);
|
||||
|
||||
if (gMustLoadSidebar) {
|
||||
- var sidebar = document.getElementById("sidebar");
|
||||
var sidebarBox = document.getElementById("sidebar-box");
|
||||
+ var sidebar = document.getElementById("sidebar");
|
||||
sidebar.setAttribute("src", sidebarBox.getAttribute("src"));
|
||||
}
|
||||
|
||||
@@ -1154,6 +1269,8 @@
|
||||
os.removeObserver(gSessionHistoryObserver, "browser:purge-session-history");
|
||||
os.removeObserver(gXPInstallObserver, "xpinstall-install-blocked");
|
||||
|
||||
+ gPrefService.removeObserver("config.lockdown.", lockdownObserver);
|
||||
+
|
||||
try {
|
||||
gBrowser.removeProgressListener(window.XULBrowserWindow);
|
||||
} catch (ex) {
|
||||
@@ -1739,6 +1856,9 @@
|
||||
|
||||
var history = document.getElementById("hiddenHistoryTree");
|
||||
|
||||
+ if (gPrefService.getBoolPref("config.lockdown.history"))
|
||||
+ return;
|
||||
+
|
||||
if (history.hidden) {
|
||||
history.hidden = false;
|
||||
var globalHistory = Components.classes["@mozilla.org/browser/global-history;2"]
|
||||
@@ -3405,6 +3525,7 @@
|
||||
|
||||
var cmd = document.getElementById("cmd_CustomizeToolbars");
|
||||
cmd.setAttribute("disabled", "true");
|
||||
+ cmd.setAttribute("inCustomization", "true");
|
||||
|
||||
#ifdef TOOLBAR_CUSTOMIZATION_SHEET
|
||||
document.getElementById("customizeToolbarSheetBox").hidden = false;
|
||||
@@ -3432,6 +3553,15 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
+function BrowserRestoreCustomizationDisabledState()
|
||||
+{
|
||||
+ var cmd = document.getElementById("cmd_CustomizeToolbars");
|
||||
+ if (!gPrefService.getBoolPref("config.lockdown.toolbarediting")) {
|
||||
+ cmd.removeAttribute("disabled", "true");
|
||||
+ }
|
||||
+ cmd.removeAttribute("inCustomization");
|
||||
+}
|
||||
+
|
||||
function BrowserToolboxCustomizeDone(aToolboxChanged)
|
||||
{
|
||||
#ifdef TOOLBAR_CUSTOMIZATION_SHEET
|
||||
@@ -3464,8 +3594,7 @@
|
||||
var menubar = document.getElementById("main-menubar");
|
||||
for (var i = 0; i < menubar.childNodes.length; ++i)
|
||||
menubar.childNodes[i].setAttribute("disabled", false);
|
||||
- var cmd = document.getElementById("cmd_CustomizeToolbars");
|
||||
- cmd.removeAttribute("disabled");
|
||||
+ BrowserRestoreCustomizationDisabledState();
|
||||
|
||||
// XXXmano bug 287105: wallpaper to bug 309953,
|
||||
// the reload button isn't in sync with the reload command.
|
||||
@@ -4225,6 +4354,9 @@
|
||||
menuItem.setAttribute("toolbarindex", i);
|
||||
menuItem.setAttribute("type", "checkbox");
|
||||
menuItem.setAttribute("label", toolbarName);
|
||||
+ if (toolbar.getAttribute("disabled") == "true") {
|
||||
+ menuItem.setAttribute("disabled", "true");
|
||||
+ }
|
||||
menuItem.setAttribute("accesskey", toolbar.getAttribute("accesskey"));
|
||||
menuItem.setAttribute("checked", toolbar.getAttribute("collapsed") != "true");
|
||||
popup.insertBefore(menuItem, firstMenuItem);
|
||||
@@ -4466,7 +4598,8 @@
|
||||
#endif
|
||||
this.showItem( "context-setDesktopBackground", haveSetDesktopBackground && this.onLoadedImage );
|
||||
|
||||
- if ( haveSetDesktopBackground && this.onLoadedImage )
|
||||
+ var lockedSetDesktopBackground = gPrefService.getBoolPref("config.lockdown.setwallpaper");
|
||||
+ if ( haveSetDesktopBackground && this.onLoadedImage && !lockedSetDesktopBackground )
|
||||
this.setItemAttr( "context-setDesktopBackground", "disabled", this.disableSetDesktopBackground());
|
||||
|
||||
// View Image depends on whether an image was clicked on.
|
||||
--- browser/components/bookmarks/content/bookmarksProperties.js
|
||||
+++ browser/components/bookmarks/content/bookmarksProperties.js
|
||||
@@ -138,6 +138,15 @@
|
||||
// set initial focus
|
||||
nameNode.focus();
|
||||
nameNode.select();
|
||||
+
|
||||
+ // I don't know why doing this is a good idea. If bookmark editing
|
||||
+ // is disabled we shouldn't let the user into the preferences
|
||||
+ // dialog.
|
||||
+ var prefs = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
+ .getService(Components.interfaces.nsIPrefBranch);
|
||||
+ if (prefs.getBoolPref("config.lockdown.bookmark")) {
|
||||
+ document.getElementById("url").setAttribute("disabled", "true");
|
||||
+ }
|
||||
}
|
||||
|
||||
|
||||
--- modules/libpref/src/init/all.js
|
||||
+++ modules/libpref/src/init/all.js
|
||||
@@ -1011,6 +1011,20 @@
|
||||
// if the system has enabled accessibility
|
||||
pref("config.use_system_prefs.accessibility", false);
|
||||
|
||||
+// UI lockdown settings
|
||||
+pref("config.lockdown.printing", false);
|
||||
+pref("config.lockdown.printsetup", false);
|
||||
+pref("config.lockdown.savepage", false);
|
||||
+pref("config.lockdown.history",false);
|
||||
+pref("config.lockdown.toolbarediting",false);
|
||||
+pref("config.lockdown.urlbar",false);
|
||||
+pref("config.lockdown.bookmark",false);
|
||||
+pref("config.lockdown.disable_themes",false);
|
||||
+pref("config.lockdown.disable_extensions",false);
|
||||
+pref("config.lockdown.searchbar",false);
|
||||
+pref("config.lockdown.hidebookmark",false);
|
||||
+pref("config.lockdown.setwallpaper",false);
|
||||
+
|
||||
/*
|
||||
* What are the entities that you want Mozilla to save using mnemonic
|
||||
* names rather than numeric codes? E.g. If set, we'll output
|
||||
--- toolkit/components/help/content/toolbarCustomization.js
|
||||
+++ toolkit/components/help/content/toolbarCustomization.js
|
||||
@@ -42,11 +42,23 @@
|
||||
{
|
||||
var customizePopup = document.getElementById("cmd_CustomizeToolbars");
|
||||
customizePopup.setAttribute("disabled", "true");
|
||||
+ customizePopup.setAttribute("inEdit", "true");
|
||||
|
||||
window.openDialog("chrome://help/content/customizeToolbar.xul", "CustomizeToolbar",
|
||||
"chrome,all,dependent", document.getElementById(id));
|
||||
}
|
||||
|
||||
+function RestoreCustomizationDisabledState()
|
||||
+{
|
||||
+ var prefs = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
+ .getService(Components.interfaces.nsIPrefBranchInternal);
|
||||
+ var customizePopup = document.getElementById("cmd_CustomizeToolbars");
|
||||
+ if (!prefs.getBoolPref("config.lockdown.toolbarediting")) {
|
||||
+ customizePopup.removeAttribute("disabled");
|
||||
+ }
|
||||
+ customizePopup.removeAttribute("inEdit");
|
||||
+}
|
||||
+
|
||||
# ToolboxCustomizeDone() - Resets the toolbar back to its default state. Reenables
|
||||
# toolbar buttons and the "Customize Toolbar" command.
|
||||
#
|
||||
@@ -54,8 +66,7 @@
|
||||
function ToolboxCustomizeDone(aToolboxChanged)
|
||||
{
|
||||
# Update global UI elements that may have been added or removed
|
||||
- var customizePopup = document.getElementById("cmd_CustomizeToolbars");
|
||||
- customizePopup.removeAttribute("disabled");
|
||||
+ RestoreCustomizationDisabledState();
|
||||
|
||||
# make sure our toolbar buttons have the correct enabled state restored to them...
|
||||
if (this.UpdateToolbar != undefined)
|
||||
@@ -77,8 +88,7 @@
|
||||
document.commandDispatcher.updateCommands('help-toolbar');
|
||||
|
||||
# re-enable toolbar customization command
|
||||
- var customizePopup = document.getElementById("cmd_CustomizeToolbars");
|
||||
- customizePopup.removeAttribute("disabled");
|
||||
+ RestoreCustomizationDisabledState();
|
||||
|
||||
# hook for extra toolbar items
|
||||
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
|
||||
--- toolkit/components/printing/content/printdialog.js
|
||||
+++ toolkit/components/printing/content/printdialog.js
|
||||
@@ -51,6 +51,7 @@
|
||||
var gWebBrowserPrint = null;
|
||||
var gPrintSetInterface = Components.interfaces.nsIPrintSettings;
|
||||
var doDebug = false;
|
||||
+var gPrefService = null;
|
||||
|
||||
//---------------------------------------------------
|
||||
function initDialog()
|
||||
@@ -88,11 +89,23 @@
|
||||
dialog.fpDialog = document.getElementById("fpDialog");
|
||||
|
||||
dialog.enabled = false;
|
||||
+
|
||||
+ gPrefService = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
+ .getService(Components.interfaces.nsIPrefService).getBranch(null);
|
||||
+ if (gPrefService.getBoolPref("config.lockdown.savepage")) {
|
||||
+ dialog.fileRadio.setAttribute("disabled", "true");
|
||||
+ }
|
||||
+ if (gPrefService.getBoolPref("config.lockdown.printing")) {
|
||||
+ dialog.printButton.setAttribute("disabled", "true");
|
||||
+ }
|
||||
}
|
||||
|
||||
//---------------------------------------------------
|
||||
function checkInteger(element)
|
||||
{
|
||||
+ if (gPrefService.getBoolPref("config.lockdown.printing"))
|
||||
+ return;
|
||||
+
|
||||
var value = element.value;
|
||||
if (value && value.length > 0) {
|
||||
value = value.replace(/[^0-9]/g,"");
|
125
firefox.1
Normal file
125
firefox.1
Normal file
@ -0,0 +1,125 @@
|
||||
.TH FIREFOX 1 "January 04, 2006" firefox "Linux User's Manual"
|
||||
.SH NAME
|
||||
firefox \- a Web browser for X11 derived from the Mozilla browser
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B firefox
|
||||
[\fIOPTIONS\fR] [\fIURL\fR]
|
||||
|
||||
.B firefox-bin
|
||||
[\fIOPTIONS\fR] [\fIURL\fR]
|
||||
|
||||
.SH DESCRIPTION
|
||||
\fBMozilla Firefox\fR is an open-source web browser, designed for
|
||||
standards compliance, performance and portability.
|
||||
|
||||
.SH USAGE
|
||||
\fBfirefox\fR is a simple shell script that will set up the
|
||||
environment for the actual executable, \fBfirefox-bin\fR.
|
||||
|
||||
.SH OPTIONS
|
||||
A summary of the options supported by \fBfirefox\fR is included below.
|
||||
|
||||
.SS "GTK options"
|
||||
\fB\-\-gdk-debug=\fR\fIFLAGS\fR
|
||||
Gdk debugging flags to set
|
||||
.TP
|
||||
\fB\-\-gdk-no-debug=\fR\fIFLAGS\fR
|
||||
Gdk debugging flags to unset
|
||||
.TP
|
||||
\fB\-\-gtk-debug=\fR\fIFLAGS\fR
|
||||
Gtk+ debugging flags to set
|
||||
.TP
|
||||
\fB\-\-gtk-no-debug=\fR\fIFLAGS\fR
|
||||
Gtk+ debugging flags to unset
|
||||
.TP
|
||||
\fB\-\-gtk-module=\fR\fIMODULE\fR
|
||||
Load an additional Gtk module
|
||||
|
||||
.SS "X11 options"
|
||||
.TP
|
||||
.BI \-\-display= DISPLAY
|
||||
X display to use
|
||||
.TP
|
||||
.B \--sync
|
||||
Make X calls synchronous
|
||||
.TP
|
||||
.B \-\-no-xshm
|
||||
Don't use X shared memory extension
|
||||
.TP
|
||||
.BI \-\-xim-preedit= STYLE
|
||||
.TP
|
||||
.BI \-\-xim-status= STYLE
|
||||
.TP
|
||||
.B \-\-g-fatal-warnings
|
||||
Make all warnings fatal
|
||||
|
||||
.SS "Firefox options"
|
||||
.TP
|
||||
.B \-h, \-help
|
||||
Show summary of options.
|
||||
.TP
|
||||
\fB\-height\fR \fIvalue\fR
|
||||
Set height of startup window to \fIvalue\fR.
|
||||
.TP
|
||||
\fB\-width\fR \fIvalue\fR
|
||||
Set width of startup window to \fIvalue\fR.
|
||||
.TP
|
||||
.B \-v, \-version
|
||||
Print \fB/usr/bin/firefox-bin\fR version.
|
||||
.TP
|
||||
\fB\-CreateProfile\fR \fIprofile\fR
|
||||
Create \fIprofile\fR.
|
||||
.TP
|
||||
\fB\-P\fR \fIprofile\fR
|
||||
Start with \fIprofile\fR.
|
||||
.TP
|
||||
.B \-ProfileManager
|
||||
Start with profile manager.
|
||||
.TP
|
||||
\fB\-UILocale\fR \fIlang-region\fR
|
||||
Start with \fIlang-region\fR resources.
|
||||
.TP
|
||||
\fB\-contentLocale\fR \fIlang-region\fR
|
||||
Start with \fIlang-region\fR resources.
|
||||
.TP
|
||||
\fB\-remote\fR \fIcommand\fR
|
||||
Execute \fIcommand\fR in an already running Firefox process. For more info,
|
||||
see: \fIhttp://www.mozilla.org/unix/remote.html\fR
|
||||
.TP
|
||||
.B \-jsconsole
|
||||
Start with Javascript Console
|
||||
.TP
|
||||
\fB\-chrome\fR \fIurl\fR
|
||||
Load the specified chrome.
|
||||
.TP
|
||||
\fB\-new-window\fR \fIurl\fR
|
||||
Open URL in a new window if Firefox is already running.
|
||||
.TP
|
||||
\fB\-new-tab\fR \fIurl\fR
|
||||
Open URL in a new tab if Firefox is already running.
|
||||
.TP
|
||||
\fB\-preferences\fR
|
||||
Open Firefox preferences menu.
|
||||
.TP
|
||||
|
||||
.SH FILES
|
||||
\fI/usr/bin/firefox\fR - shell script wrapping
|
||||
\fBfirefox\fR
|
||||
.br
|
||||
\fI/usr/lib/firefox/firefox-bin\fR - \fBfirefox\fR
|
||||
executable
|
||||
|
||||
.SH VERSION
|
||||
1.5
|
||||
|
||||
.SH BUGS
|
||||
To report a bug, please visit \fIhttp://bugzilla.mozilla.org/\fR
|
||||
|
||||
.SH "SEE ALSO"
|
||||
.BR mozilla(1)
|
||||
|
||||
.SH AUTHORS
|
||||
.TP
|
||||
.B The Mozilla Organization
|
||||
.I http://www.mozilla.org/about.html
|
287
firefox.schemas
Normal file
287
firefox.schemas
Normal file
@ -0,0 +1,287 @@
|
||||
<gconfschemafile>
|
||||
<schemalist>
|
||||
<schema>
|
||||
<key>/schemas/apps/firefox/lockdown/disable_history</key>
|
||||
<applyto>/apps/firefox/lockdown/disable_history</applyto>
|
||||
<owner>firefox</owner>
|
||||
<type>bool</type>
|
||||
<default>false</default>
|
||||
<locale name="C">
|
||||
<short>To disable the History.</short>
|
||||
<long>To disable the histroy.</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/firefox/lockdown/disable_toolbar_editing</key>
|
||||
<applyto>/apps/firefox/lockdown/disable_toolbar_editing</applyto>
|
||||
<owner>firefox</owner>
|
||||
<type>bool</type>
|
||||
<default>false</default>
|
||||
<locale name="C">
|
||||
<short>Disable toolbar editing.</short>
|
||||
<long>Disable ToolBar Editing.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/firefox/lockdown/disable_themes</key>
|
||||
<applyto>/apps/firefox/lockdown/disable_themes</applyto>
|
||||
<owner>firefox</owner>
|
||||
<type>bool</type>
|
||||
<default>false</default>
|
||||
<locale name="C">
|
||||
<short>Disable installing themes</short>
|
||||
<long>Disable installing theme
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/firefox/lockdown/disable_extensions</key>
|
||||
<applyto>/apps/firefox/lockdown/disable_extensions</applyto>
|
||||
<owner>firefox</owner>
|
||||
<type>bool</type>
|
||||
<default>false</default>
|
||||
<locale name="C">
|
||||
<short>Disable installing extensions</short>
|
||||
<long>Disable installing extensions
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/firefox/web/disable_popups</key>
|
||||
<applyto>/apps/firefox/web/disable_popups</applyto>
|
||||
<owner>firefox</owner>
|
||||
<type>bool</type>
|
||||
<default>false</default>
|
||||
<locale name="C">
|
||||
<short>Allow Popups.</short>
|
||||
<long>Allow Popups.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/firefox/web/java_enabled</key>
|
||||
<applyto>/apps/firefox/web/java_enabled</applyto>
|
||||
<owner>firefox</owner>
|
||||
<type>bool</type>
|
||||
<default>true</default>
|
||||
<locale name="C">
|
||||
<short>Enable java.</short>
|
||||
<long>Enable java.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/firefox/web/javascript_enabled</key>
|
||||
<applyto>/apps/firefox/web/javascript_enabled</applyto>
|
||||
<owner>firefox</owner>
|
||||
<type>bool</type>
|
||||
<default>true</default>
|
||||
<locale name="C">
|
||||
<short>Enable javascript.</short>
|
||||
<long>Enable javascript.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/firefox/lockdown/disable_url_bar</key>
|
||||
<applyto>/apps/firefox/lockdown/disable_url_bar</applyto>
|
||||
<owner>firefox</owner>
|
||||
<type>bool</type>
|
||||
<default>false</default>
|
||||
<locale name="C">
|
||||
<short>Disable URL bar.</short>
|
||||
<long>Disable URL bar.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/firefox/lockdown/disable_searchbar</key>
|
||||
<applyto>/apps/firefox/lockdown/disable_searchbar</applyto>
|
||||
<owner>firefox</owner>
|
||||
<type>bool</type>
|
||||
<default>false</default>
|
||||
<locale name="C">
|
||||
<short>Disable search bar.</short>
|
||||
<long>Disable search bar.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/firefox/web/disable_cookies</key>
|
||||
<applyto>/apps/firefox/web/disable_cookies</applyto>
|
||||
<owner>firefox</owner>
|
||||
<type>bool</type>
|
||||
<default>false</default>
|
||||
<locale name="C">
|
||||
<short>Disable Cookies.</short>
|
||||
<long>Disable Cookies.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/firefox/web/disable_save_password</key>
|
||||
<applyto>/apps/firefox/web/disable_save_password</applyto>
|
||||
<owner>firefox</owner>
|
||||
<type>bool</type>
|
||||
<default>false</default>
|
||||
<locale name="C">
|
||||
<short>Disable Save Password.</short>
|
||||
<long>Disable Save Password.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/firefox/web/cache_size</key>
|
||||
<applyto>/apps/firefox/web/cache_size</applyto>
|
||||
<owner>firefox</owner>
|
||||
<type>int</type>
|
||||
<default>50000</default>
|
||||
<locale name="C">
|
||||
<short>Cache Size.</short>
|
||||
<long>Cache Size.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/firefox/general/homepage_url</key>
|
||||
<applyto>/apps/firefox/general/homepage_url</applyto>
|
||||
<owner>firefox</owner>
|
||||
<type>string</type>
|
||||
<default>www.novell.com/linux</default>
|
||||
<locale name="C">
|
||||
<short>Home Page URL.</short>
|
||||
<long>Home Page URL.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/firefox/web/download_defaultfolder</key>
|
||||
<applyto>/apps/firefox/web/download_defaultfolder</applyto>
|
||||
<owner>firefox</owner>
|
||||
<type>string</type>
|
||||
<default>Desktop</default>
|
||||
<locale name="C">
|
||||
<short>Default downloadfolder location.</short>
|
||||
<long> This is the default download folder location.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/firefox/lockdown/disable_unsafe_protocol</key>
|
||||
<applyto>/apps/firefox/lockdown/disable_unsafe_protocol</applyto>
|
||||
<owner>firefox</owner>
|
||||
<type>bool</type>
|
||||
<default>false</default>
|
||||
<locale name="C">
|
||||
<short>Disable Unsafe Protocol.</short>
|
||||
<long>Disable Unsafe Protocol.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/firefox/lockdown/disable_bookmark_editing</key>
|
||||
<applyto>/apps/firefox/lockdown/disable_bookmark_editing</applyto>
|
||||
<owner>firefox</owner>
|
||||
<type>bool</type>
|
||||
<default>false</default>
|
||||
<locale name="C">
|
||||
<short>disable_bookmark_editing.</short>
|
||||
<long>disable_bookmark_editing.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/firefox/lockdown/hide_bookmark</key>
|
||||
<applyto>/apps/firefox/lockdown/hide_bookmark</applyto>
|
||||
<owner>firefox</owner>
|
||||
<type>bool</type>
|
||||
<default>false</default>
|
||||
<locale name="C">
|
||||
<short>Hide Bookmarks</short>
|
||||
<long>Hide Bookmarks.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/firefox/lockdown/disable_javascript_chrome</key>
|
||||
<applyto>/apps/firefox/lockdown/disable_javascript_chrome</applyto>
|
||||
<owner>firefox</owner>
|
||||
<type>bool</type>
|
||||
<default>false</default>
|
||||
<locale name="C">
|
||||
<short>Disable Javascript Chrome.</short>
|
||||
<long>Disable Javascript Chrome.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/firefox/web/cookie_accept</key>
|
||||
<applyto>/apps/firefox/web/cookie_accept</applyto>
|
||||
<owner>firefox</owner>
|
||||
<type>int</type>
|
||||
<default>0</default>
|
||||
<locale name="C">
|
||||
<short>Setting Cookies.</short>
|
||||
<long>Setting Cookies.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/firefox/web/images_load</key>
|
||||
<applyto>/apps/firefox/web/images_load</applyto>
|
||||
<owner>firefox</owner>
|
||||
<type>int</type>
|
||||
<default>0</default>
|
||||
<locale name="C">
|
||||
<short>Setting Loadimages.</short>
|
||||
<long>Setting Loadimages.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/firefox/lockdown/additional_safe_protocols</key>
|
||||
<applyto>/apps/firefox/lockdown/additional_safe_protocols</applyto>
|
||||
<owner>firefox</owner>
|
||||
<type>string</type>
|
||||
<default></default>
|
||||
<locale name="C">
|
||||
<short>Additional Safe Protocols.</short>
|
||||
<long>Additional Safe Protocols.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/firefox/general/trusted_URIs</key>
|
||||
<applyto>/apps/firefox/general/trusted_URIs</applyto>
|
||||
<owner>firefox</owner>
|
||||
<type>list</type>
|
||||
<list_type>string</list_type>
|
||||
<default>[]</default>
|
||||
<locale name="C">
|
||||
<short>List of URIs for which Kerberos/NTLM is enabled</short>
|
||||
<long>A comma-separated list of URI keys, of the form
|
||||
[scheme "://"] [host [":" port]], for which login should be allowed
|
||||
via SPNEGO Kerberos or NTLM authentication.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/firefox/general/delegated_URIs</key>
|
||||
<applyto>/apps/firefox/general/delegated_URIs</applyto>
|
||||
<owner>firefox</owner>
|
||||
<type>list</type>
|
||||
<list_type>string</list_type>
|
||||
<default>[]</default>
|
||||
<locale name="C">
|
||||
<short>List of URIs for which Kerberos/NTLM delegation is enabled</short>
|
||||
<long>A comma-separated list of URI keys, of the form
|
||||
[scheme "://"] [host [":" port]], for which delegation should be allowed
|
||||
using SPNEGO Kerberos or NTLM authentication.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
</schemalist>
|
||||
</gconfschemafile>
|
3
firefox48.png
Normal file
3
firefox48.png
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bab5478fce79ea10ad689b7678118c90c87649f46e232e432337db783d054006
|
||||
size 5211
|
90
gcc-undefined-ops.patch
Normal file
90
gcc-undefined-ops.patch
Normal file
@ -0,0 +1,90 @@
|
||||
--- layout/base/nsCSSRendering.cpp.orig 2006-10-25 23:59:19.000000000 +0200
|
||||
+++ layout/base/nsCSSRendering.cpp 2006-10-26 00:00:04.000000000 +0200
|
||||
@@ -1000,14 +1000,14 @@
|
||||
FillOrInvertRect(aContext, dashRect.x, borderOutside.y,dashRect.width, dashRect.height-adjust,isInvert);
|
||||
FillOrInvertRect(aContext,dashRect.x,(borderOutside.YMost()-(dashRect.height-adjust)),dashRect.width, dashRect.height-adjust,isInvert);
|
||||
currRect.y += (dashRect.height-adjust);
|
||||
- temp = temp-= (dashRect.height-adjust);
|
||||
+ temp -= (dashRect.height-adjust);
|
||||
} else {
|
||||
adjust = (temp%dashRect.width)/2; // adjust a tad longer
|
||||
// draw in the left and right
|
||||
FillOrInvertRect(aContext, dashRect.x, borderOutside.y,dashRect.width, dashRect.height+adjust,isInvert);
|
||||
FillOrInvertRect(aContext, dashRect.x,(borderOutside.YMost()-(dashRect.height+adjust)),dashRect.width, dashRect.height+adjust,isInvert);
|
||||
currRect.y += (dashRect.height+adjust);
|
||||
- temp = temp-= (dashRect.height+adjust);
|
||||
+ temp -= (dashRect.height+adjust);
|
||||
}
|
||||
|
||||
if( temp > ywidth)
|
||||
@@ -1066,14 +1066,14 @@
|
||||
FillOrInvertRect(aContext, borderOutside.x,dashRect.y,dashRect.width-adjust,dashRect.height,isInvert);
|
||||
FillOrInvertRect(aContext, (borderOutside.XMost()-(dashRect.width-adjust)),dashRect.y,dashRect.width-adjust,dashRect.height,isInvert);
|
||||
currRect.x += (dashRect.width-adjust);
|
||||
- temp = temp-= (dashRect.width-adjust);
|
||||
+ temp -= (dashRect.width-adjust);
|
||||
} else {
|
||||
adjust = (temp%dashRect.width)/2;
|
||||
// draw in the left and right
|
||||
FillOrInvertRect(aContext, borderOutside.x,dashRect.y,dashRect.width+adjust,dashRect.height,isInvert);
|
||||
FillOrInvertRect(aContext, (borderOutside.XMost()-(dashRect.width+adjust)),dashRect.y,dashRect.width+adjust,dashRect.height,isInvert);
|
||||
currRect.x += (dashRect.width+adjust);
|
||||
- temp = temp-= (dashRect.width+adjust);
|
||||
+ temp -= (dashRect.width+adjust);
|
||||
}
|
||||
|
||||
|
||||
--- layout/xul/base/src/nsBox.cpp.orig 2006-10-26 00:00:26.000000000 +0200
|
||||
+++ layout/xul/base/src/nsBox.cpp 2006-10-26 00:01:30.000000000 +0200
|
||||
@@ -863,7 +863,7 @@
|
||||
while (box) {
|
||||
nsRect* overflowArea = box->GetOverflowAreaProperty();
|
||||
nsRect bounds = overflowArea ? *overflowArea + box->GetPosition() :
|
||||
- bounds = box->GetRect();
|
||||
+ box->GetRect();
|
||||
rect.UnionRect(rect, bounds);
|
||||
|
||||
box->GetNextBox(&box);
|
||||
--- intl/unicharutil/src/nsEntityConverter.cpp.orig 2005-04-02 20:44:00.000000000 +0200
|
||||
+++ intl/unicharutil/src/nsEntityConverter.cpp 2006-10-26 00:07:24.000000000 +0200
|
||||
@@ -236,7 +236,8 @@
|
||||
if (IS_HIGH_SURROGATE(inString[i]) &&
|
||||
i + 2 < len &&
|
||||
IS_LOW_SURROGATE(inString[i + 1])) {
|
||||
- key.AppendInt(SURROGATE_TO_UCS4(inString[i], inString[++i]), 10);
|
||||
+ key.AppendInt(SURROGATE_TO_UCS4(inString[i], inString[i + 1]), 10);
|
||||
+ ++i;
|
||||
}
|
||||
else {
|
||||
key.AppendInt(inString[i],10);
|
||||
--- content/events/src/nsEventStateManager.cpp.orig 2006-08-06 00:19:17.000000000 +0200
|
||||
+++ content/events/src/nsEventStateManager.cpp 2006-10-26 00:11:16.000000000 +0200
|
||||
@@ -4301,7 +4301,7 @@
|
||||
do_QueryInterface(GetDocumentOuterWindow(mDocument));
|
||||
if (newWindow) {
|
||||
nsIFocusController *newFocusController =
|
||||
- newFocusController = newWindow->GetRootFocusController();
|
||||
+ newWindow->GetRootFocusController();
|
||||
nsCOMPtr<nsPIDOMWindow> oldWindow =
|
||||
do_QueryInterface(GetDocumentOuterWindow(gLastFocusedDocument));
|
||||
if (oldWindow) {
|
||||
--- netwerk/cache/src/nsDiskCacheMap.h.orig 2006-02-04 23:01:22.000000000 +0100
|
||||
+++ netwerk/cache/src/nsDiskCacheMap.h 2006-10-26 00:15:09.000000000 +0200
|
||||
@@ -168,7 +168,7 @@
|
||||
|
||||
// set blockCount
|
||||
NS_ASSERTION( (blockCount>=1) && (blockCount<=4),"invalid block count");
|
||||
- blockCount = --blockCount;
|
||||
+ --blockCount;
|
||||
mDataLocation |= (blockCount << eExtraBlocksOffset) & eExtraBlocksMask;
|
||||
|
||||
mDataLocation |= eLocationInitializedMask;
|
||||
@@ -236,7 +236,7 @@
|
||||
|
||||
// set blockCount
|
||||
NS_ASSERTION( (blockCount>=1) && (blockCount<=4),"invalid block count");
|
||||
- blockCount = --blockCount;
|
||||
+ --blockCount;
|
||||
mMetaLocation |= (blockCount << eExtraBlocksOffset) & eExtraBlocksMask;
|
||||
|
||||
mMetaLocation |= eLocationInitializedMask;
|
3267
gconf-backend.patch
Normal file
3267
gconf-backend.patch
Normal file
File diff suppressed because it is too large
Load Diff
330
gecko-lockdown.patch
Normal file
330
gecko-lockdown.patch
Normal file
@ -0,0 +1,330 @@
|
||||
Index: extensions/cookie/nsCookiePermission.cpp
|
||||
================================================================================
|
||||
--- extensions/cookie/nsCookiePermission.cpp
|
||||
+++ extensions/cookie/nsCookiePermission.cpp
|
||||
@@ -83,6 +83,7 @@
|
||||
// obsolete pref names for migration
|
||||
static const char kCookiesLifetimeEnabled[] = "network.cookie.lifetime.enabled";
|
||||
static const char kCookiesLifetimeBehavior[] = "network.cookie.lifetime.behavior";
|
||||
+static const char kCookiesHonorExceptions[] = "network.cookie.honorExceptions";
|
||||
static const char kCookiesAskPermission[] = "network.cookie.warnAboutCookies";
|
||||
|
||||
static const char kPermissionType[] = "cookie";
|
||||
@@ -126,6 +127,7 @@
|
||||
prefBranch->AddObserver(kCookiesLifetimePolicy, this, PR_FALSE);
|
||||
prefBranch->AddObserver(kCookiesLifetimeDays, this, PR_FALSE);
|
||||
prefBranch->AddObserver(kCookiesAlwaysAcceptSession, this, PR_FALSE);
|
||||
+ prefBranch->AddObserver(kCookiesHonorExceptions, this, PR_FALSE);
|
||||
#ifdef MOZ_MAIL_NEWS
|
||||
prefBranch->AddObserver(kCookiesDisabledForMailNews, this, PR_FALSE);
|
||||
#endif
|
||||
@@ -182,6 +184,10 @@
|
||||
if (PREF_CHANGED(kCookiesAlwaysAcceptSession) &&
|
||||
NS_SUCCEEDED(aPrefBranch->GetBoolPref(kCookiesAlwaysAcceptSession, &val)))
|
||||
mCookiesAlwaysAcceptSession = val;
|
||||
+
|
||||
+ if (PREF_CHANGED(kCookiesHonorExceptions) &&
|
||||
+ NS_SUCCEEDED(aPrefBranch->GetBoolPref(kCookiesHonorExceptions, &val)))
|
||||
+ mCookiesHonorExceptions = val;
|
||||
|
||||
#ifdef MOZ_MAIL_NEWS
|
||||
if (PREF_CHANGED(kCookiesDisabledForMailNews) &&
|
||||
@@ -249,6 +255,11 @@
|
||||
#endif // MOZ_MAIL_NEWS
|
||||
|
||||
// finally, check with permission manager...
|
||||
+ if (!mCookiesHonorExceptions) {
|
||||
+ *aResult = ACCESS_DEFAULT;
|
||||
+ return NS_OK;
|
||||
+ }
|
||||
+
|
||||
nsresult rv = mPermMgr->TestPermission(aURI, kPermissionType, (PRUint32 *) aResult);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
switch (*aResult) {
|
||||
--- extensions/cookie/nsCookiePermission.h
|
||||
+++ extensions/cookie/nsCookiePermission.h
|
||||
@@ -58,10 +58,11 @@
|
||||
nsCookiePermission()
|
||||
: mCookiesLifetimeSec(LL_MAXINT)
|
||||
, mCookiesLifetimePolicy(0) // ACCEPT_NORMALLY
|
||||
- , mCookiesAlwaysAcceptSession(PR_FALSE)
|
||||
+ , mCookiesAlwaysAcceptSession(PR_FALSE),
|
||||
#ifdef MOZ_MAIL_NEWS
|
||||
- , mCookiesDisabledForMailNews(PR_TRUE)
|
||||
+ , mCookiesDisabledForMailNews(PR_TRUE),
|
||||
#endif
|
||||
+ mCookiesHonorExceptions(PR_TRUE)
|
||||
{}
|
||||
virtual ~nsCookiePermission() {}
|
||||
|
||||
@@ -77,7 +78,7 @@
|
||||
#ifdef MOZ_MAIL_NEWS
|
||||
PRPackedBool mCookiesDisabledForMailNews;
|
||||
#endif
|
||||
-
|
||||
+ PRPackedBool mCookiesHonorExceptions;
|
||||
};
|
||||
|
||||
// {CE002B28-92B7-4701-8621-CC925866FB87}
|
||||
--- extensions/permissions/nsContentBlocker.cpp
|
||||
+++ extensions/permissions/nsContentBlocker.cpp
|
||||
@@ -74,6 +74,7 @@
|
||||
nsContentBlocker::nsContentBlocker()
|
||||
{
|
||||
memset(mBehaviorPref, BEHAVIOR_ACCEPT, NUMBER_OF_TYPES);
|
||||
+ memset(mHonorExceptions, PR_TRUE, NUMBER_OF_TYPES);
|
||||
}
|
||||
|
||||
nsresult
|
||||
@@ -90,6 +91,11 @@
|
||||
rv = prefService->GetBranch("permissions.default.", getter_AddRefs(prefBranch));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
+ nsCOMPtr<nsIPrefBranch> honorExceptionsPrefBranch;
|
||||
+ rv = prefService->GetBranch("permissions.honorExceptions.",
|
||||
+ getter_AddRefs(honorExceptionsPrefBranch));
|
||||
+ NS_ENSURE_SUCCESS(rv, rv);
|
||||
+
|
||||
// Migrate old image blocker pref
|
||||
nsCOMPtr<nsIPrefBranch> oldPrefBranch;
|
||||
oldPrefBranch = do_QueryInterface(prefService);
|
||||
@@ -119,8 +125,15 @@
|
||||
mPrefBranchInternal = do_QueryInterface(prefBranch, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
+ mHonorExceptionsPrefBranchInternal =
|
||||
+ do_QueryInterface(honorExceptionsPrefBranch, &rv);
|
||||
+ NS_ENSURE_SUCCESS(rv, rv);
|
||||
+
|
||||
rv = mPrefBranchInternal->AddObserver("", this, PR_TRUE);
|
||||
- PrefChanged(prefBranch, nsnull);
|
||||
+ NS_ENSURE_SUCCESS(rv, rv);
|
||||
+
|
||||
+ rv = mHonorExceptionsPrefBranchInternal->AddObserver("", this, PR_TRUE);
|
||||
+ PrefChanged(nsnull);
|
||||
|
||||
return rv;
|
||||
}
|
||||
@@ -129,19 +142,22 @@
|
||||
#define LIMIT(x, low, high, default) ((x) >= (low) && (x) <= (high) ? (x) : (default))
|
||||
|
||||
void
|
||||
-nsContentBlocker::PrefChanged(nsIPrefBranch *aPrefBranch,
|
||||
- const char *aPref)
|
||||
+nsContentBlocker::PrefChanged(const char *aPref)
|
||||
{
|
||||
- PRInt32 val;
|
||||
-
|
||||
-#define PREF_CHANGED(_P) (!aPref || !strcmp(aPref, _P))
|
||||
-
|
||||
- for(PRUint32 i = 0; i < NUMBER_OF_TYPES; ++i) {
|
||||
- if (PREF_CHANGED(kTypeString[i]) &&
|
||||
- NS_SUCCEEDED(aPrefBranch->GetIntPref(kTypeString[i], &val)))
|
||||
- mBehaviorPref[i] = LIMIT(val, 1, 3, 1);
|
||||
+ for (PRUint32 i = 0; i < NUMBER_OF_TYPES; ++i) {
|
||||
+ if (!aPref || !strcmp(kTypeString[i], aPref)) {
|
||||
+ PRInt32 val;
|
||||
+ PRBool b;
|
||||
+ if (mPrefBranchInternal &&
|
||||
+ NS_SUCCEEDED(mPrefBranchInternal->GetIntPref(kTypeString[i], &val))) {
|
||||
+ mBehaviorPref[i] = LIMIT(val, 1, 3, 1);
|
||||
+ }
|
||||
+ if (mHonorExceptionsPrefBranchInternal &&
|
||||
+ NS_SUCCEEDED(mHonorExceptionsPrefBranchInternal->GetBoolPref(kTypeString[i], &b))) {
|
||||
+ mHonorExceptions[i] = b;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
-
|
||||
}
|
||||
|
||||
// nsIContentPolicy Implementation
|
||||
@@ -234,11 +250,13 @@
|
||||
// default prefs.
|
||||
// Don't forget the aContentType ranges from 1..8, while the
|
||||
// array is indexed 0..7
|
||||
- PRUint32 permission;
|
||||
- nsresult rv = mPermissionManager->TestPermission(aCurrentURI,
|
||||
- kTypeString[aContentType - 1],
|
||||
- &permission);
|
||||
- NS_ENSURE_SUCCESS(rv, rv);
|
||||
+ PRUint32 permission = 0;
|
||||
+ if (mHonorExceptions[aContentType - 1]) {
|
||||
+ nsresult rv = mPermissionManager->TestPermission(aCurrentURI,
|
||||
+ kTypeString[aContentType - 1],
|
||||
+ &permission);
|
||||
+ NS_ENSURE_SUCCESS(rv, rv);
|
||||
+ }
|
||||
|
||||
// If there is nothing on the list, use the default.
|
||||
if (!permission) {
|
||||
@@ -264,7 +282,7 @@
|
||||
return NS_OK;
|
||||
|
||||
PRBool trustedSource = PR_FALSE;
|
||||
- rv = aFirstURI->SchemeIs("chrome", &trustedSource);
|
||||
+ nsresult rv = aFirstURI->SchemeIs("chrome", &trustedSource);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
if (!trustedSource) {
|
||||
rv = aFirstURI->SchemeIs("resource", &trustedSource);
|
||||
@@ -329,8 +347,6 @@
|
||||
{
|
||||
NS_ASSERTION(!strcmp(NS_PREFBRANCH_PREFCHANGE_TOPIC_ID, aTopic),
|
||||
"unexpected topic - we only deal with pref changes!");
|
||||
-
|
||||
- if (mPrefBranchInternal)
|
||||
- PrefChanged(mPrefBranchInternal, NS_LossyConvertUTF16toASCII(aData).get());
|
||||
+ PrefChanged(NS_LossyConvertUTF16toASCII(aData).get());
|
||||
return NS_OK;
|
||||
}
|
||||
--- extensions/permissions/nsContentBlocker.h
|
||||
+++ extensions/permissions/nsContentBlocker.h
|
||||
@@ -66,7 +66,7 @@
|
||||
private:
|
||||
~nsContentBlocker() {}
|
||||
|
||||
- void PrefChanged(nsIPrefBranch *, const char *);
|
||||
+ void PrefChanged(const char *);
|
||||
nsresult TestPermission(nsIURI *aCurrentURI,
|
||||
nsIURI *aFirstURI,
|
||||
PRInt32 aContentType,
|
||||
@@ -75,7 +75,9 @@
|
||||
|
||||
nsCOMPtr<nsIPermissionManager> mPermissionManager;
|
||||
nsCOMPtr<nsIPrefBranch2> mPrefBranchInternal;
|
||||
+ nsCOMPtr<nsIPrefBranch2> mHonorExceptionsPrefBranchInternal;
|
||||
PRUint8 mBehaviorPref[NUMBER_OF_TYPES];
|
||||
+ PRPackedBool mHonorExceptions[NUMBER_OF_TYPES];
|
||||
};
|
||||
|
||||
#define NS_CONTENTBLOCKER_CID \
|
||||
--- modules/libpref/src/init/all.js
|
||||
+++ modules/libpref/src/init/all.js
|
||||
@@ -716,6 +716,7 @@
|
||||
pref("network.hosts.nntp_server", "news.mozilla.org");
|
||||
|
||||
pref("permissions.default.image", 1); // 1-Accept, 2-Deny, 3-dontAcceptForeign
|
||||
+pref("permissions.honorExceptions.image", true);
|
||||
pref("network.image.warnAboutImages", false);
|
||||
pref("network.proxy.type", 0);
|
||||
pref("network.proxy.ftp", "");
|
||||
@@ -734,6 +735,7 @@
|
||||
pref("network.proxy.failover_timeout", 1800); // 30 minutes
|
||||
pref("network.online", true); //online/offline
|
||||
pref("network.cookie.cookieBehavior", 0); // 0-Accept, 1-dontAcceptForeign, 2-dontUse, 3-p3p
|
||||
+pref("network.cookie.honorExceptions", true);
|
||||
pref("network.cookie.disableCookieForMailNews", true); // disable all cookies for mail
|
||||
pref("network.cookie.lifetimePolicy", 0); // accept normally, 1-askBeforeAccepting, 2-acceptForSession,3-acceptForNDays
|
||||
pref("network.cookie.alwaysAcceptSessionCookies", false);
|
||||
--- netwerk/base/src/nsIOService.cpp
|
||||
+++ netwerk/base/src/nsIOService.cpp
|
||||
@@ -371,6 +371,16 @@
|
||||
nsCOMPtr<nsIPrefBranch2> prefBranch;
|
||||
GetPrefBranch(getter_AddRefs(prefBranch));
|
||||
if (prefBranch) {
|
||||
+ nsCAutoString protocolBlockedPref("network.protocol-handler.blocked.");
|
||||
+ protocolBlockedPref += scheme;
|
||||
+ PRBool blockedProtocol = PR_FALSE;
|
||||
+ rv = prefBranch->GetBoolPref(protocolBlockedPref.get(), &blockedProtocol);
|
||||
+ if (NS_FAILED(rv)) {
|
||||
+ rv = prefBranch->GetBoolPref("network.protocol-handler.blocked-default", &blockedProtocol);
|
||||
+ }
|
||||
+ if (NS_SUCCEEDED(rv) && blockedProtocol)
|
||||
+ return NS_ERROR_UNKNOWN_PROTOCOL;
|
||||
+
|
||||
nsCAutoString externalProtocolPref("network.protocol-handler.external.");
|
||||
externalProtocolPref += scheme;
|
||||
rv = prefBranch->GetBoolPref(externalProtocolPref.get(), &externalProtocol);
|
||||
--- widget/src/gtk2/nsWindow.cpp
|
||||
+++ widget/src/gtk2/nsWindow.cpp
|
||||
@@ -64,6 +64,7 @@
|
||||
#include "nsIPrefBranch.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsGfxCIID.h"
|
||||
+#include "nsIPrefService.h"
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
#include "nsPIAccessNode.h"
|
||||
@@ -73,7 +74,6 @@
|
||||
#include "stdlib.h"
|
||||
static PRBool sAccessibilityChecked = PR_FALSE;
|
||||
static PRBool sAccessibilityEnabled = PR_FALSE;
|
||||
-static const char sSysPrefService [] = "@mozilla.org/system-preference-service;1";
|
||||
static const char sAccEnv [] = "GNOME_ACCESSIBILITY";
|
||||
static const char sAccessibilityKey [] = "config.use_system_prefs.accessibility";
|
||||
#endif
|
||||
@@ -2644,18 +2644,18 @@
|
||||
sAccessibilityEnabled = atoi(envValue);
|
||||
LOG(("Accessibility Env %s=%s\n", sAccEnv, envValue));
|
||||
}
|
||||
- //check gconf-2 setting
|
||||
+ //check preference setting
|
||||
else {
|
||||
- nsCOMPtr<nsIPrefBranch> sysPrefService =
|
||||
- do_GetService(sSysPrefService, &rv);
|
||||
- if (NS_SUCCEEDED(rv) && sysPrefService) {
|
||||
-
|
||||
- // do the work to get gconf setting.
|
||||
- // will be done soon later.
|
||||
- sysPrefService->GetBoolPref(sAccessibilityKey,
|
||||
+ nsCOMPtr<nsIPrefService> prefService =
|
||||
+ do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
|
||||
+ if (NS_SUCCEEDED(rv) && prefService) {
|
||||
+ nsCOMPtr<nsIPrefBranch> prefBranch;
|
||||
+ rv = prefService->GetBranch(nsnull, getter_AddRefs(prefBranch));
|
||||
+ if (NS_SUCCEEDED(rv) && prefBranch) {
|
||||
+ prefBranch->GetBoolPref(sAccessibilityKey,
|
||||
&sAccessibilityEnabled);
|
||||
+ }
|
||||
}
|
||||
-
|
||||
}
|
||||
}
|
||||
if (sAccessibilityEnabled) {
|
||||
--- xpinstall/src/nsXPInstallManager.cpp
|
||||
+++ xpinstall/src/nsXPInstallManager.cpp
|
||||
@@ -285,6 +285,7 @@
|
||||
//-----------------------------------------------------
|
||||
// Get permission to install
|
||||
//-----------------------------------------------------
|
||||
+ nsCOMPtr<nsIPrefBranch> pref(do_GetService(NS_PREFSERVICE_CONTRACTID));
|
||||
|
||||
#ifdef ENABLE_SKIN_SIMPLE_INSTALLATION_UI
|
||||
if ( mChromeType == CHROME_SKIN )
|
||||
@@ -294,7 +295,11 @@
|
||||
|
||||
// skins get a simpler/friendlier dialog
|
||||
// XXX currently not embeddable
|
||||
- OKtoInstall = ConfirmChromeInstall( mParentWindow, packageList );
|
||||
+ PRBool themesDisabled = PR_FALSE;
|
||||
+ if (pref)
|
||||
+ pref->GetBoolPref("config.lockdown.disable_themes", &themesDisabled);
|
||||
+ OKtoInstall = !themesDisabled &&
|
||||
+ ConfirmChromeInstall( mParentWindow, packageList );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -304,12 +304,17 @@ nsXPInstallManager::InitManagerInternal(
|
||||
else
|
||||
{
|
||||
#endif
|
||||
- rv = dlgSvc->ConfirmInstall( mParentWindow,
|
||||
- packageList,
|
||||
- numStrings,
|
||||
- &OKtoInstall );
|
||||
- if (NS_FAILED(rv))
|
||||
- OKtoInstall = PR_FALSE;
|
||||
+ PRBool extensionsDisabled = PR_FALSE;
|
||||
+ if (pref)
|
||||
+ pref->GetBoolPref("config.lockdown.disable_extensions", &extensionsDisabled);
|
||||
+ if (!extensionsDisabled) {
|
||||
+ rv = dlgSvc->ConfirmInstall( mParentWindow,
|
||||
+ packageList,
|
||||
+ numStrings,
|
||||
+ &OKtoInstall );
|
||||
+ if (NS_FAILED(rv))
|
||||
+ OKtoInstall = PR_FALSE;
|
||||
+ }
|
||||
#ifdef ENABLE_SKIN_SIMPLE_INSTALLATION_UI
|
||||
}
|
||||
#endif
|
47
gnome-vfs-default.patch
Normal file
47
gnome-vfs-default.patch
Normal file
@ -0,0 +1,47 @@
|
||||
Index: uriloader/exthandler/unix/nsOSHelperAppService.cpp
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/uriloader/exthandler/unix/nsOSHelperAppService.cpp,v
|
||||
retrieving revision 1.58
|
||||
diff -d -u -p -r1.58 nsOSHelperAppService.cpp
|
||||
--- uriloader/exthandler/unix/nsOSHelperAppService.cpp 25 Oct 2004 07:46:01 -0000 1.58
|
||||
+++ uriloader/exthandler/unix/nsOSHelperAppService.cpp 21 Jul 2005 03:07:40 -0000
|
||||
@@ -1486,6 +1487,17 @@ nsOSHelperAppService::GetFromType(const
|
||||
|
||||
LOG(("Here we do a mimetype lookup for '%s'\n", aMIMEType.get()));
|
||||
|
||||
+#ifdef MOZ_WIDGET_GTK2
|
||||
+ // Look in GNOME registry first since it is the preferred method in GNOME,
|
||||
+ // should trump the mailcap entry
|
||||
+ LOG(("Looking in GNOME registry\n"));
|
||||
+ nsMIMEInfoBase *gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType.get()).get();
|
||||
+ if (gnomeInfo) {
|
||||
+ LOG(("Got MIMEInfo from GNOME registry\n"));
|
||||
+ return gnomeInfo;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
// extract the major and minor types
|
||||
NS_ConvertASCIItoUTF16 mimeType(aMIMEType);
|
||||
nsAString::const_iterator start_iter, end_iter,
|
||||
@@ -1522,21 +1534,6 @@ nsOSHelperAppService::GetFromType(const
|
||||
mozillaFlags,
|
||||
PR_TRUE);
|
||||
|
||||
-
|
||||
- if (handler.IsEmpty() && extensions.IsEmpty() &&
|
||||
- mailcap_description.IsEmpty() && mime_types_description.IsEmpty()) {
|
||||
- // No useful data yet
|
||||
-
|
||||
-#ifdef MOZ_WIDGET_GTK2
|
||||
- LOG(("Looking in GNOME registry\n"));
|
||||
- nsMIMEInfoBase *gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType.get()).get();
|
||||
- if (gnomeInfo) {
|
||||
- LOG(("Got MIMEInfo from GNOME registry\n"));
|
||||
- return gnomeInfo;
|
||||
- }
|
||||
-#endif
|
||||
- }
|
||||
-
|
||||
if (handler.IsEmpty() && mailcap_description.IsEmpty()) {
|
||||
DoLookUpHandlerAndDescription(majorType,
|
||||
minorType,
|
393
gnome-vfs.patch
Normal file
393
gnome-vfs.patch
Normal file
@ -0,0 +1,393 @@
|
||||
Index: uriloader/exthandler/Makefile.in
|
||||
================================================================================
|
||||
--- uriloader/exthandler/Makefile.in
|
||||
+++ uriloader/exthandler/Makefile.in
|
||||
@@ -103,7 +103,7 @@
|
||||
LOCAL_INCLUDES = -I$(srcdir)
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
||||
-OSHELPER += nsGNOMERegistry.cpp
|
||||
+OSHELPER += nsMIMEInfoUnix.cpp nsGNOMERegistry.cpp
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
|
||||
--- uriloader/exthandler/unix/nsGNOMERegistry.cpp
|
||||
+++ uriloader/exthandler/unix/nsGNOMERegistry.cpp
|
||||
@@ -42,7 +42,7 @@
|
||||
#include "nsString.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsILocalFile.h"
|
||||
-#include "nsMIMEInfoImpl.h"
|
||||
+#include "nsMIMEInfoUnix.h"
|
||||
#include "nsAutoPtr.h"
|
||||
|
||||
#include <glib.h>
|
||||
@@ -56,12 +56,12 @@
|
||||
typedef struct _GnomeProgram GnomeProgram;
|
||||
typedef struct _GnomeModuleInfo GnomeModuleInfo;
|
||||
|
||||
-typedef struct {
|
||||
+struct GnomeVFSMimeApplication {
|
||||
char *id;
|
||||
char *name;
|
||||
char *command;
|
||||
/* there is more here, but we don't need it */
|
||||
-} GnomeVFSMimeApplication;
|
||||
+};
|
||||
|
||||
typedef GConfClient * (*_gconf_client_get_default_fn)();
|
||||
typedef gchar * (*_gconf_client_get_string_fn)(GConfClient *,
|
||||
@@ -264,7 +264,7 @@
|
||||
}
|
||||
|
||||
|
||||
-/* static */ already_AddRefed<nsMIMEInfoBase>
|
||||
+/* static */ already_AddRefed<nsMIMEInfoUnix>
|
||||
nsGNOMERegistry::GetFromExtension(const char *aFileExt)
|
||||
{
|
||||
if (!gconfLib)
|
||||
@@ -286,7 +286,7 @@
|
||||
return GetFromType(mimeType);
|
||||
}
|
||||
|
||||
-/* static */ already_AddRefed<nsMIMEInfoBase>
|
||||
+/* static */ already_AddRefed<nsMIMEInfoUnix>
|
||||
nsGNOMERegistry::GetFromType(const char *aMIMEType)
|
||||
{
|
||||
if (!gconfLib)
|
||||
@@ -296,9 +296,11 @@
|
||||
if (!handlerApp)
|
||||
return nsnull;
|
||||
|
||||
- nsRefPtr<nsMIMEInfoImpl> mimeInfo = new nsMIMEInfoImpl(aMIMEType);
|
||||
+ nsRefPtr<nsMIMEInfoUnix> mimeInfo = new nsMIMEInfoUnix(aMIMEType);
|
||||
NS_ENSURE_TRUE(mimeInfo, nsnull);
|
||||
|
||||
+ mimeInfo->SetDefaultGnomeVFSMimeApplication(handlerApp);
|
||||
+
|
||||
// Get the list of extensions and append then to the mimeInfo.
|
||||
GList *extensions = _gnome_vfs_mime_get_extensions_list(aMIMEType);
|
||||
for (GList *extension = extensions; extension; extension = extension->next)
|
||||
@@ -320,11 +322,21 @@
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
- gchar *commandPath = g_find_program_in_path(nativeCommand);
|
||||
+ gchar **argv;
|
||||
+ gboolean res = g_shell_parse_argv(nativeCommand, NULL, &argv, NULL);
|
||||
+ if (!res) {
|
||||
+ NS_ERROR("Could not convert helper app command to filesystem encoding");
|
||||
+ _gnome_vfs_mime_application_free(handlerApp);
|
||||
+ return nsnull;
|
||||
+ }
|
||||
+
|
||||
+ gchar *commandPath = g_find_program_in_path(argv[0]);
|
||||
|
||||
g_free(nativeCommand);
|
||||
+ g_strfreev(argv);
|
||||
|
||||
if (!commandPath) {
|
||||
+ NS_WARNING("could not find command in path");
|
||||
_gnome_vfs_mime_application_free(handlerApp);
|
||||
return nsnull;
|
||||
}
|
||||
@@ -342,7 +354,7 @@
|
||||
|
||||
_gnome_vfs_mime_application_free(handlerApp);
|
||||
|
||||
- nsMIMEInfoBase* retval;
|
||||
+ nsMIMEInfoUnix* retval;
|
||||
NS_ADDREF((retval = mimeInfo));
|
||||
return retval;
|
||||
}
|
||||
--- uriloader/exthandler/unix/nsGNOMERegistry.h
|
||||
+++ uriloader/exthandler/unix/nsGNOMERegistry.h
|
||||
@@ -35,10 +35,13 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
+#ifndef nsGNOMERegistry_h__
|
||||
+#define nsGNOMERegistry_h__
|
||||
+
|
||||
#include "nsIURI.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
-class nsMIMEInfoBase;
|
||||
+class nsMIMEInfoUnix;
|
||||
|
||||
class nsGNOMERegistry
|
||||
{
|
||||
@@ -52,7 +55,9 @@
|
||||
static void GetAppDescForScheme(const nsACString& aScheme,
|
||||
nsAString& aDesc);
|
||||
|
||||
- static already_AddRefed<nsMIMEInfoBase> GetFromExtension(const char *aFileExt);
|
||||
+ static already_AddRefed<nsMIMEInfoUnix> GetFromExtension(const char *aFileExt);
|
||||
|
||||
- static already_AddRefed<nsMIMEInfoBase> GetFromType(const char *aMIMEType);
|
||||
+ static already_AddRefed<nsMIMEInfoUnix> GetFromType(const char *aMIMEType);
|
||||
};
|
||||
+
|
||||
+#endif // nsGNOMERegistry_h__
|
||||
--- uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
|
||||
+++ uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
|
||||
@@ -0,0 +1,196 @@
|
||||
+/* ***** BEGIN LICENSE BLOCK *****
|
||||
+ * Version: MPL 1.1
|
||||
+ *
|
||||
+ * The contents of this file are subject to the Mozilla Public License Version
|
||||
+ * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
+ * the License. You may obtain a copy of the License at
|
||||
+ * http://www.mozilla.org/MPL/
|
||||
+ *
|
||||
+ * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
+ * for the specific language governing rights and limitations under the
|
||||
+ * License.
|
||||
+ *
|
||||
+ * The Original Code is mozilla.org Code.
|
||||
+ *
|
||||
+ * The Initial Developer of the Original Code is
|
||||
+ * Red Hat, Inc.
|
||||
+ * Portions created by the Initial Developer are Copyright (C) 2005
|
||||
+ * the Initial Developer. All Rights Reserved.
|
||||
+ *
|
||||
+ * Contributor(s):
|
||||
+ * Christopher Aillon <caillon@redhat.com> (Original author)
|
||||
+ *
|
||||
+ *
|
||||
+ * ***** END LICENSE BLOCK ***** */
|
||||
+
|
||||
+#include "nsMIMEInfoUnix.h"
|
||||
+#include "prlink.h"
|
||||
+#include "prmem.h"
|
||||
+#include <glib.h>
|
||||
+#include <glib-object.h>
|
||||
+
|
||||
+static PRLibrary *gnomeLib;
|
||||
+static PRLibrary *vfsLib;
|
||||
+
|
||||
+typedef struct _GnomeProgram GnomeProgram;
|
||||
+typedef struct _GnomeModuleInfo GnomeModuleInfo;
|
||||
+
|
||||
+typedef enum {
|
||||
+ GNOME_VFS_OK // there's more but we don't care about them.
|
||||
+} GnomeVFSResult;
|
||||
+
|
||||
+typedef GnomeVFSResult (*_gnome_vfs_mime_application_launch_fn)
|
||||
+ (GnomeVFSMimeApplication *app,
|
||||
+ GList *uris);
|
||||
+typedef void (*_gnome_vfs_mime_application_free_fn)(GnomeVFSMimeApplication *);
|
||||
+typedef GnomeVFSMimeApplication * (*_gnome_vfs_mime_application_copy_fn)(GnomeVFSMimeApplication *);
|
||||
+typedef GnomeProgram * (*_gnome_program_init_fn)(const char *, const char *,
|
||||
+ const GnomeModuleInfo *, int,
|
||||
+ char **, const char *, ...);
|
||||
+typedef const char * (*_gnome_vfs_mime_application_get_name_fn)(GnomeVFSMimeApplication *);
|
||||
+typedef const GnomeModuleInfo * (*_libgnome_module_info_get_fn)();
|
||||
+typedef GnomeProgram * (*_gnome_program_get_fn)();
|
||||
+typedef char * (*_gnome_vfs_make_uri_from_input_fn)(const char *);
|
||||
+
|
||||
+#define DECL_FUNC_PTR(func) static _##func##_fn _##func
|
||||
+
|
||||
+DECL_FUNC_PTR(gnome_vfs_mime_application_launch);
|
||||
+DECL_FUNC_PTR(gnome_vfs_mime_application_free);
|
||||
+DECL_FUNC_PTR(gnome_vfs_mime_application_copy);
|
||||
+DECL_FUNC_PTR(gnome_vfs_mime_application_get_name);
|
||||
+DECL_FUNC_PTR(gnome_program_init);
|
||||
+DECL_FUNC_PTR(gnome_program_get);
|
||||
+DECL_FUNC_PTR(libgnome_module_info_get);
|
||||
+DECL_FUNC_PTR(gnome_vfs_make_uri_from_input);
|
||||
+
|
||||
+static PRLibrary *
|
||||
+LoadVersionedLibrary(const char* libName, const char* libVersion)
|
||||
+{
|
||||
+ char *platformLibName = PR_GetLibraryName(nsnull, libName);
|
||||
+ nsCAutoString versionLibName(platformLibName);
|
||||
+ versionLibName.Append(libVersion);
|
||||
+ PR_Free(platformLibName);
|
||||
+ return PR_LoadLibrary(versionLibName.get());
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+Cleanup()
|
||||
+{
|
||||
+ // Unload all libraries
|
||||
+ if (gnomeLib)
|
||||
+ PR_UnloadLibrary(gnomeLib);
|
||||
+ if (vfsLib)
|
||||
+ PR_UnloadLibrary(vfsLib);
|
||||
+
|
||||
+ gnomeLib = vfsLib = nsnull;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+InitGnomeVFS()
|
||||
+{
|
||||
+ static PRBool initialized = PR_FALSE;
|
||||
+
|
||||
+ if (initialized)
|
||||
+ return;
|
||||
+
|
||||
+ #define ENSURE_LIB(lib) \
|
||||
+ PR_BEGIN_MACRO \
|
||||
+ if (!lib) { \
|
||||
+ Cleanup(); \
|
||||
+ return; \
|
||||
+ } \
|
||||
+ PR_END_MACRO
|
||||
+
|
||||
+ #define GET_LIB_FUNCTION(lib, func, failure) \
|
||||
+ PR_BEGIN_MACRO \
|
||||
+ _##func = (_##func##_fn) PR_FindFunctionSymbol(lib##Lib, #func); \
|
||||
+ if (!_##func) { \
|
||||
+ failure; \
|
||||
+ } \
|
||||
+ PR_END_MACRO
|
||||
+
|
||||
+ // Attempt to open libgnome
|
||||
+ gnomeLib = LoadVersionedLibrary("gnome-2", ".0");
|
||||
+ ENSURE_LIB(gnomeLib);
|
||||
+
|
||||
+ GET_LIB_FUNCTION(gnome, gnome_program_init, return Cleanup());
|
||||
+ GET_LIB_FUNCTION(gnome, libgnome_module_info_get, return Cleanup());
|
||||
+ GET_LIB_FUNCTION(gnome, gnome_program_get, return Cleanup());
|
||||
+
|
||||
+ // Attempt to open libgnomevfs
|
||||
+ vfsLib = LoadVersionedLibrary("gnomevfs-2", ".0");
|
||||
+ ENSURE_LIB(vfsLib);
|
||||
+
|
||||
+ GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_launch, /* do nothing */);
|
||||
+ GET_LIB_FUNCTION(vfs, gnome_vfs_make_uri_from_input, return Cleanup());
|
||||
+ GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_get_name, return Cleanup());
|
||||
+ GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_free, return Cleanup());
|
||||
+ GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_copy, return Cleanup());
|
||||
+
|
||||
+ // Initialize GNOME, if it's not already initialized. It's not
|
||||
+ // necessary to tell GNOME about our actual command line arguments.
|
||||
+
|
||||
+ if (!_gnome_program_get()) {
|
||||
+ char *argv[1] = { "gecko" };
|
||||
+ _gnome_program_init("Gecko", "1.0", _libgnome_module_info_get(),
|
||||
+ 1, argv, NULL);
|
||||
+ }
|
||||
+
|
||||
+ // Note: after GNOME has been initialized, do not ever unload these
|
||||
+ // libraries. They register atexit handlers, so if they are unloaded, we'll
|
||||
+ // crash on exit.
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+nsMIMEInfoUnix::SetDefaultGnomeVFSMimeApplication(GnomeVFSMimeApplication* app)
|
||||
+{
|
||||
+ if (_gnome_vfs_mime_application_copy && _gnome_vfs_mime_application_free) {
|
||||
+ mDefaultVFSApplication = _gnome_vfs_mime_application_copy(app);
|
||||
+
|
||||
+ mPreferredAction = nsIMIMEInfo::useSystemDefault;
|
||||
+
|
||||
+ const gchar * name = _gnome_vfs_mime_application_get_name(mDefaultVFSApplication);
|
||||
+ if (name)
|
||||
+ mDefaultAppDescription = NS_ConvertUTF8toUCS2(name);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+nsMIMEInfoUnix::~nsMIMEInfoUnix()
|
||||
+{
|
||||
+ if (mDefaultVFSApplication)
|
||||
+ _gnome_vfs_mime_application_free(mDefaultVFSApplication);
|
||||
+}
|
||||
+
|
||||
+nsresult
|
||||
+nsMIMEInfoUnix::LaunchDefaultWithFile(nsIFile* aFile)
|
||||
+{
|
||||
+ NS_ENSURE_ARG_POINTER(aFile);
|
||||
+
|
||||
+ InitGnomeVFS();
|
||||
+
|
||||
+ if (_gnome_vfs_mime_application_launch && mDefaultVFSApplication) {
|
||||
+ nsCAutoString nativePath;
|
||||
+ aFile->GetNativePath(nativePath);
|
||||
+
|
||||
+ gchar *uri = _gnome_vfs_make_uri_from_input(nativePath.get());
|
||||
+
|
||||
+ GList *uris = NULL;
|
||||
+ uris = g_list_append(uris, uri);
|
||||
+
|
||||
+ GnomeVFSResult result = _gnome_vfs_mime_application_launch(mDefaultVFSApplication, uris);
|
||||
+
|
||||
+ g_free(uri);
|
||||
+ g_list_free(uris);
|
||||
+
|
||||
+ if (result != GNOME_VFS_OK)
|
||||
+ return NS_ERROR_FAILURE;
|
||||
+
|
||||
+ return NS_OK;
|
||||
+ }
|
||||
+
|
||||
+ if (!mDefaultApplication)
|
||||
+ return NS_ERROR_FILE_NOT_FOUND;
|
||||
+
|
||||
+ return LaunchWithIProcess(mDefaultApplication, aFile);
|
||||
+}
|
||||
--- uriloader/exthandler/unix/nsMIMEInfoUnix.h
|
||||
+++ uriloader/exthandler/unix/nsMIMEInfoUnix.h
|
||||
@@ -0,0 +1,50 @@
|
||||
+/* ***** BEGIN LICENSE BLOCK *****
|
||||
+ * Version: MPL 1.1
|
||||
+ *
|
||||
+ * The contents of this file are subject to the Mozilla Public License Version
|
||||
+ * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
+ * the License. You may obtain a copy of the License at
|
||||
+ * http://www.mozilla.org/MPL/
|
||||
+ *
|
||||
+ * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
+ * for the specific language governing rights and limitations under the
|
||||
+ * License.
|
||||
+ *
|
||||
+ * The Original Code is mozilla.org Code.
|
||||
+ *
|
||||
+ * The Initial Developer of the Original Code is
|
||||
+ * Red Hat, Inc.
|
||||
+ * Portions created by the Initial Developer are Copyright (C) 2005
|
||||
+ * the Initial Developer. All Rights Reserved.
|
||||
+ *
|
||||
+ * Contributor(s):
|
||||
+ * Christopher Aillon <caillon@redhat.com> (Original author)
|
||||
+ *
|
||||
+ *
|
||||
+ * ***** END LICENSE BLOCK ***** */
|
||||
+
|
||||
+#ifndef nsMimeInfoUnix_h__
|
||||
+#define nsMimeInfoUnix_h__
|
||||
+
|
||||
+#include "nsMIMEInfoImpl.h"
|
||||
+
|
||||
+struct GnomeVFSMimeApplication;
|
||||
+
|
||||
+class nsMIMEInfoUnix : public nsMIMEInfoImpl
|
||||
+{
|
||||
+public:
|
||||
+ nsMIMEInfoUnix(const char* aType = "") : nsMIMEInfoImpl(aType), mDefaultVFSApplication(nsnull) {}
|
||||
+ nsMIMEInfoUnix(const nsACString& aMIMEType) : nsMIMEInfoImpl(aMIMEType) {};
|
||||
+
|
||||
+ virtual ~nsMIMEInfoUnix();
|
||||
+
|
||||
+ void SetDefaultGnomeVFSMimeApplication(GnomeVFSMimeApplication *app);
|
||||
+
|
||||
+protected:
|
||||
+ virtual NS_HIDDEN_(nsresult) LaunchDefaultWithFile(nsIFile* aFile);
|
||||
+
|
||||
+ GnomeVFSMimeApplication *mDefaultVFSApplication;
|
||||
+};
|
||||
+
|
||||
+#endif // nsMimeInfoUnix_h__
|
||||
--- uriloader/exthandler/unix/nsOSHelperAppService.cpp
|
||||
+++ uriloader/exthandler/unix/nsOSHelperAppService.cpp
|
||||
@@ -44,6 +44,7 @@
|
||||
#include "nsOSHelperAppService.h"
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
#include "nsGNOMERegistry.h"
|
||||
+#include "nsMIMEInfoUnix.h"
|
||||
#endif
|
||||
#include "nsISupports.h"
|
||||
#include "nsString.h"
|
28
greasemonkey.patch
Normal file
28
greasemonkey.patch
Normal file
@ -0,0 +1,28 @@
|
||||
Index: docshell/base/nsDocShell.cpp
|
||||
================================================================================
|
||||
--- docshell/base/nsDocShell.cpp
|
||||
+++ docshell/base/nsDocShell.cpp
|
||||
@@ -5758,6 +5758,9 @@
|
||||
if (onLocationChangeNeeded) {
|
||||
FireOnLocationChange(this, request, mCurrentURI);
|
||||
}
|
||||
+
|
||||
+ FireOnStateChange(this, request,
|
||||
+ STATE_TRANSFERRING|STATE_IS_NETWORK|STATE_IS_DOCUMENT, NS_OK);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
--- xpfe/browser/src/nsBrowserStatusFilter.cpp
|
||||
+++ xpfe/browser/src/nsBrowserStatusFilter.cpp
|
||||
@@ -152,8 +152,10 @@
|
||||
if (aStateFlags & STATE_IS_REQUEST) {
|
||||
if (!mUseRealProgressFlag && mTotalRequests)
|
||||
return OnProgressChange(nsnull, nsnull, 0, 0, mFinishedRequests, mTotalRequests);
|
||||
+ } else if (aStateFlags & STATE_IS_DOCUMENT) {
|
||||
+ return mListener->OnStateChange(aWebProgress, aRequest, aStateFlags,
|
||||
+ aStatus);
|
||||
}
|
||||
-
|
||||
// no need to forward this state change
|
||||
return NS_OK;
|
||||
} else {
|
3
l10n.tar.bz2
Normal file
3
l10n.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0b6d85090c1d464c570fb198e12d59f27081f0db6f295c7a71d28281e11e4781
|
||||
size 11407982
|
11
locale.patch
Normal file
11
locale.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- modules/libpref/src/init/all.js.orig 2004-10-15 14:50:11.740865580 +0200
|
||||
+++ modules/libpref/src/init/all.js 2004-10-15 14:50:34.371625152 +0200
|
||||
@@ -653,7 +653,7 @@
|
||||
pref("intl.charset.detector", "chrome://navigator/locale/navigator.properties");
|
||||
pref("intl.charset.default", "chrome://navigator-platform/locale/navigator.properties");
|
||||
pref("intl.content.langcode", "chrome://communicator-region/locale/region.properties");
|
||||
-pref("intl.locale.matchOS", false);
|
||||
+pref("intl.locale.matchOS", true);
|
||||
// fallback charset list for Unicode conversion (converting from Unicode)
|
||||
// currently used for mail send only to handle symbol characters (e.g Euro, trademark, smartquotes)
|
||||
// for ISO-8859-1
|
17
make-perl.patch
Normal file
17
make-perl.patch
Normal file
@ -0,0 +1,17 @@
|
||||
Index: toolkit/mozapps/installer/packager.mk
|
||||
================================================================================
|
||||
--- toolkit/mozapps/installer/packager.mk
|
||||
+++ toolkit/mozapps/installer/packager.mk
|
||||
@@ -304,9 +304,9 @@
|
||||
@mkdir $(DIST)/$(MOZ_PKG_APPNAME)
|
||||
ifdef MOZ_PKG_MANIFEST
|
||||
$(RM) -rf $(DIST)/xpt
|
||||
- $(PERL) -I$(topsrcdir)/xpinstall/packager -e 'use Packager; \
|
||||
- Packager::Copy("$(DIST)", "$(DIST)/$(MOZ_PKG_APPNAME)", \
|
||||
- "$(MOZ_PKG_MANIFEST)", "$(PKGCP_OS)", 1, 0, 1);'
|
||||
+ $(PERL) -I$(topsrcdir)/xpinstall/packager -e 'use Packager;' \
|
||||
+ -e 'Packager::Copy("$(DIST)", "$(DIST)/$(MOZ_PKG_APPNAME)", ' \
|
||||
+ -e '"$(MOZ_PKG_MANIFEST)", "$(PKGCP_OS)", 1, 0, 1);'
|
||||
$(PERL) $(topsrcdir)/xpinstall/packager/xptlink.pl -s $(DIST) -d $(DIST)/xpt -f $(DIST)/$(MOZ_PKG_APPNAME)/components -v
|
||||
else # !MOZ_PKG_MANIFEST
|
||||
ifeq ($(MOZ_PKG_FORMAT),DMG)
|
20
misc.dif
Normal file
20
misc.dif
Normal file
@ -0,0 +1,20 @@
|
||||
--- gfx/src/x11shared/nsFT2FontCatalog.cpp
|
||||
+++ gfx/src/x11shared/nsFT2FontCatalog.cpp
|
||||
@@ -49,6 +49,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
+#include <time.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <dirent.h>
|
||||
@@ -92,9 +93,6 @@
|
||||
// Called to get the TrueType font summary from the disk font catalog.
|
||||
//
|
||||
|
||||
-// Solaris is missing a prototype for ctime
|
||||
-extern "C" {char *ctime(const time_t *timep);}
|
||||
-
|
||||
#include <ft2build.h>
|
||||
#include FT_GLYPH_H
|
||||
#include FT_FREETYPE_H
|
165
mozilla.sh.in
Normal file
165
mozilla.sh.in
Normal file
@ -0,0 +1,165 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Wolfgang Rosenauer <wolfgang.rosenauer@suse.de>
|
||||
#
|
||||
|
||||
##
|
||||
## Usage:
|
||||
##
|
||||
## $ mozilla
|
||||
##
|
||||
## This script is meant to run a mozilla program from the mozilla
|
||||
## rpm installation.
|
||||
##
|
||||
## The script will setup all the environment voodoo needed to make
|
||||
## mozilla work.
|
||||
|
||||
cmdname=`basename $0`
|
||||
|
||||
##
|
||||
## Variables
|
||||
##
|
||||
MOZ_DIST_BIN="%PREFIX"
|
||||
MOZ_DIST_LIB="%PROGDIR"
|
||||
MOZ_APPNAME="%APPNAME"
|
||||
MOZ_PROFILE="%PROFILE"
|
||||
MOZ_PROGRAM="$MOZ_DIST_LIB/$MOZ_APPNAME-bin"
|
||||
|
||||
mozilla_lib=`file $MOZ_PROGRAM | awk '{ print $3 }'`
|
||||
case $mozilla_lib in
|
||||
64-bit)
|
||||
LIB=lib64
|
||||
;;
|
||||
*)
|
||||
LIB=lib
|
||||
;;
|
||||
esac
|
||||
BROWSER_PLUGIN_DIR=/usr/$LIB/browser-plugins
|
||||
if [ ! -d $BROWSER_PLUGIN_DIR ]; then
|
||||
BROWSER_PLUGIN_DIR=/opt/netscape/plugins
|
||||
fi
|
||||
|
||||
# Force use of GTK+ 2.0 for Flash player to get better performance
|
||||
# (no impact when using mozilla gtk1 build
|
||||
#
|
||||
export FLASH_GTK_LIBRARY=libgtk-x11-2.0.so.0
|
||||
|
||||
# ignore composite extension
|
||||
export XLIB_SKIP_ARGB_VISUALS=1
|
||||
|
||||
# Pango support
|
||||
if [ -z "$MOZ_ENABLE_PANGO" -a -z "$MOZ_DISABLE_PANGO" ]; then
|
||||
case "${LC_ALL-${LC_CTYPE-${LANG-en_US}}}" in
|
||||
bn*|gu*|hi*|km*|kn*|ml*|mr*|pa*|ta*|te*) # list of languages which need pango
|
||||
;;
|
||||
*)
|
||||
export MOZ_DISABLE_PANGO=1 # disable by default
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
##
|
||||
## Set MOZILLA_FIVE_HOME
|
||||
##
|
||||
MOZILLA_FIVE_HOME="$MOZ_DIST_LIB"
|
||||
export MOZILLA_FIVE_HOME
|
||||
|
||||
##
|
||||
## Set LD_LIBRARY_PATH
|
||||
##
|
||||
if [ "$LD_LIBRARY_PATH" ]
|
||||
then
|
||||
LD_LIBRARY_PATH=$MOZ_DIST_LIB/plugins:$MOZ_DIST_LIB:$LD_LIBRARY_PATH
|
||||
else
|
||||
LD_LIBRARY_PATH=$MOZ_DIST_LIB/plugins:$MOZ_DIST_LIB
|
||||
fi
|
||||
export LD_LIBRARY_PATH
|
||||
|
||||
## Make sure that we set the plugin path for backwards compatibility
|
||||
## Set MOZ_PLUGIN_PATH to $HOME/.mozilla/plugins if not set
|
||||
##
|
||||
if [ -z "$MOZ_PLUGIN_PATH" ]; then
|
||||
export MOZ_PLUGIN_PATH=$MOZILLA_FIVE_HOME/plugins:$BROWSER_PLUGIN_DIR
|
||||
if [ "$HOME" ] ; then
|
||||
export MOZ_PLUGIN_PATH=$HOME/$MOZ_PROFILE/plugins:$MOZ_PLUGIN_PATH
|
||||
fi
|
||||
else
|
||||
# make sure that BROWSER_PLUGIN_DIR is in MOZ_PLUGIN_PATH
|
||||
echo "$MOZ_PLUGIN_PATH" | grep "$BROWSER_PLUGIN_DIR" 2>&1 >/dev/null
|
||||
_retval=$?
|
||||
if [ ${_retval} -ne 0 ]; then
|
||||
export MOZ_PLUGIN_PATH=$MOZ_PLUGIN_PATH:$BROWSER_PLUGIN_DIR
|
||||
fi
|
||||
fi
|
||||
|
||||
moz_pis_startstop_scripts()
|
||||
{
|
||||
MOZ_USER_DIR="$MOZ_PROFILE"
|
||||
# MOZ_PIS_ is the name space for "Mozilla Plugable Init Scripts"
|
||||
# These variables and there meaning are specified in
|
||||
# mozilla/xpfe/bootstrap/init.d/README
|
||||
MOZ_PIS_API=2
|
||||
MOZ_PIS_MOZBINDIR="$MOZ_DIST_LIB"
|
||||
MOZ_PIS_SESSION_PID="$$"
|
||||
MOZ_PIS_USER_DIR="${MOZ_USER_DIR}"
|
||||
export MOZ_PIS_API MOZ_PIS_MOZBINDIR MOZ_PIS_SESSION_PID MOZ_PIS_USER_DIR
|
||||
|
||||
case "${1}" in
|
||||
"start")
|
||||
for curr_pis in "$MOZ_DIST_LIB/init.d"/S* "${HOME}/${MOZ_USER_DIR}/init.d"/S* ; do
|
||||
if [ -x "${curr_pis}" ] ; then
|
||||
case "${curr_pis}" in
|
||||
*.sh) . "${curr_pis}" ;;
|
||||
*) "${curr_pis}" "start" ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
;;
|
||||
"stop")
|
||||
for curr_pis in "${HOME}/${MOZ_USER_DIR}/init.d"/K* "$MOZ_DIST_LIB/init.d"/K* ; do
|
||||
if [ -x "${curr_pis}" ] ; then
|
||||
case "${curr_pis}" in
|
||||
*.sh) . "${curr_pis}" ;;
|
||||
*) "${curr_pis}" "stop" ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
;;
|
||||
*)
|
||||
echo 1>&2 "$0: Internal error in moz_pis_startstop_scripts."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
## Start addon scripts
|
||||
moz_pis_startstop_scripts "start"
|
||||
|
||||
if [ -d /proc/asound ]; then
|
||||
LD_PRELOAD=/usr/$LIB/libaoss.so${LD_PRELOAD:+:$LD_PRELOAD} $MOZ_PROGRAM $@
|
||||
else
|
||||
$MOZ_PROGRAM $@
|
||||
fi
|
||||
|
||||
## Stop addon scripts
|
||||
moz_pis_startstop_scripts "stop"
|
||||
|
||||
exit 0
|
17
nspr-prdtoa.patch
Normal file
17
nspr-prdtoa.patch
Normal file
@ -0,0 +1,17 @@
|
||||
--- nsprpub/pr/src/misc/Makefile.in.foo Wed Jun 11 15:42:57 2003
|
||||
+++ nsprpub/pr/src/misc/Makefile.in Wed Jun 11 15:42:49 2003
|
||||
@@ -82,6 +82,14 @@
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
+NONOPT_CFLAGS=$(filter-out -O%, $(CFLAGS))
|
||||
+
|
||||
+ifeq ($(OS_ARCH),Linux)
|
||||
+$(OBJDIR)/prdtoa.$(OBJ_SUFFIX): prdtoa.c
|
||||
+ @$(MAKE_OBJDIR)
|
||||
+ $(CC) -o $@ -c $(NONOPT_CFLAGS) -ffloat-store $<
|
||||
+endif
|
||||
+
|
||||
#
|
||||
# Generate prerr.h, prerr.c, and prerr.properties from prerr.et.
|
||||
#
|
22
nss-opt.patch
Normal file
22
nss-opt.patch
Normal file
@ -0,0 +1,22 @@
|
||||
From: Wolfgang Rosenauer <stark@suse.de>
|
||||
Subject: NSS doesn't inherit CFLAGS
|
||||
References: https://bugzilla.mozilla.org/show_bug.cgi?id=101249
|
||||
Description:
|
||||
CFLAGS are not taken from mozilla build
|
||||
|
||||
Index: security/manager/Makefile.in
|
||||
================================================================================
|
||||
--- security/manager/Makefile.in
|
||||
+++ security/manager/Makefile.in
|
||||
@@ -154,7 +154,10 @@
|
||||
ifneq ($(ABS_topsrcdir),$(MOZ_BUILD_ROOT))
|
||||
DEFAULT_GMAKE_FLAGS += BUILD_TREE=$(MOZ_BUILD_ROOT)
|
||||
endif
|
||||
-ifndef MOZ_DEBUG
|
||||
+ifdef MOZ_DEBUG
|
||||
+DEFAULT_GMAKE_FLAGS += OPTIMIZER="$(MOZ_DEBUG_FLAGS)"
|
||||
+else
|
||||
+DEFAULT_GMAKE_FLAGS += OPTIMIZER="$(MOZ_OPTIMIZE_FLAGS)"
|
||||
DEFAULT_GMAKE_FLAGS += BUILD_OPT=1
|
||||
endif
|
||||
ifdef GNU_CC
|
134
pango-cairo.patch
Normal file
134
pango-cairo.patch
Normal file
@ -0,0 +1,134 @@
|
||||
Index: config/autoconf.mk.in
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/config/autoconf.mk.in,v
|
||||
retrieving revision 3.363.2.1
|
||||
diff -u -p -6 -r3.363.2.1 autoconf.mk.in
|
||||
--- config/autoconf.mk.in 17 Aug 2005 17:17:17 -0000 3.363.2.1
|
||||
+++ config/autoconf.mk.in 27 Aug 2005 19:57:29 -0000
|
||||
@@ -456,12 +456,13 @@ MOZ_XFT_CFLAGS = @MOZ_XFT_CFLAGS@
|
||||
MOZ_XFT_LIBS = @MOZ_XFT_LIBS@
|
||||
MOZ_ENABLE_COREXFONTS = @MOZ_ENABLE_COREXFONTS@
|
||||
|
||||
MOZ_ENABLE_PANGO = @MOZ_ENABLE_PANGO@
|
||||
MOZ_PANGO_CFLAGS = @MOZ_PANGO_CFLAGS@
|
||||
MOZ_PANGO_LIBS = @MOZ_PANGO_LIBS@
|
||||
+MOZ_PANGOCAIRO = @MOZ_PANGOCAIRO@
|
||||
|
||||
MOZ_EXTRA_X11CONVERTERS = @MOZ_EXTRA_X11CONVERTERS@
|
||||
|
||||
MOZ_ENABLE_XINERAMA = @MOZ_ENABLE_XINERAMA@
|
||||
MOZ_XINERAMA_LIBS = @MOZ_XINERAMA_LIBS@
|
||||
|
||||
Index: gfx/src/gtk/mozilla-decoder.cpp
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/gfx/src/gtk/mozilla-decoder.cpp,v
|
||||
retrieving revision 1.3
|
||||
diff -u -p -6 -r1.3 mozilla-decoder.cpp
|
||||
--- gfx/src/gtk/mozilla-decoder.cpp 7 Nov 2004 23:59:23 -0000 1.3
|
||||
+++ gfx/src/gtk/mozilla-decoder.cpp 27 Aug 2005 19:57:49 -0000
|
||||
@@ -37,13 +37,17 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define PANGO_ENABLE_BACKEND
|
||||
#define PANGO_ENABLE_ENGINE
|
||||
|
||||
#include "mozilla-decoder.h"
|
||||
+#ifdef MOZ_PANGOCAIRO
|
||||
+#include <pango/pangocairo.h>
|
||||
+#else
|
||||
#include <pango/pangoxft.h>
|
||||
+#endif
|
||||
#include <pango/pangofc-fontmap.h>
|
||||
#include <pango/pangofc-font.h>
|
||||
#include <gdk/gdkx.h>
|
||||
|
||||
#include "nsString.h"
|
||||
#include "nsIPersistentProperties2.h"
|
||||
@@ -205,13 +209,17 @@ mozilla_decoders_init(void)
|
||||
}
|
||||
else {
|
||||
printf("unknown suffix used for mapping\n");
|
||||
}
|
||||
}
|
||||
|
||||
+#ifdef MOZ_PANGOCAIRO
|
||||
+ pango_fc_font_map_add_decoder_find_func(PANGO_FC_FONT_MAP(pango_cairo_font_map_get_default()),
|
||||
+#else
|
||||
pango_fc_font_map_add_decoder_find_func(PANGO_FC_FONT_MAP(pango_xft_get_font_map(GDK_DISPLAY(),gdk_x11_get_default_screen())),
|
||||
+#endif
|
||||
mozilla_find_decoder,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
initialized = PR_TRUE;
|
||||
|
||||
Index: configure.in
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/configure.in,v
|
||||
retrieving revision 1.1503.2.6
|
||||
diff -u -p -6 -r1.1503.2.6 configure.in
|
||||
--- configure.in 25 Aug 2005 19:05:34 -0000 1.1503.2.6
|
||||
+++ configure.in 29 Aug 2005 08:03:32 -0000
|
||||
@@ -3707,14 +3707,14 @@ gtk)
|
||||
;;
|
||||
|
||||
gtk2)
|
||||
MOZ_ENABLE_GTK2=1
|
||||
MOZ_ENABLE_XREMOTE=1
|
||||
MOZ_ENABLE_COREXFONTS=${MOZ_ENABLE_COREXFONTS-}
|
||||
- TK_CFLAGS='$(MOZ_GTK2_CFLAGS)'
|
||||
- TK_LIBS='$(MOZ_GTK2_LIBS)'
|
||||
+ TK_CFLAGS='$(MOZ_GTK2_CFLAGS) $(MOZ_PANGO_CFLAGS)'
|
||||
+ TK_LIBS='$(MOZ_GTK2_LIBS) $(MOZ_PANGO_LIBS)'
|
||||
AC_DEFINE(MOZ_WIDGET_GTK2)
|
||||
;;
|
||||
|
||||
xlib)
|
||||
MOZ_ENABLE_XLIB=1
|
||||
if test "$_HAVE_FREETYPE2"; then
|
||||
@@ -4277,33 +4277,44 @@ if test "$MOZ_ENABLE_XFT" && test "$MOZ_
|
||||
fi
|
||||
|
||||
if test "$MOZ_ENABLE_XFT"
|
||||
then
|
||||
AC_DEFINE(MOZ_ENABLE_XFT)
|
||||
PKG_CHECK_MODULES(MOZ_XFT, xft)
|
||||
- PKG_CHECK_MODULES(_PANGOCHK, pango >= 1.1.0)
|
||||
+ PKG_CHECK_MODULES(MOZ_PANGO, pangoxft >= 1.1.0 pangox)
|
||||
fi
|
||||
|
||||
AC_SUBST(MOZ_ENABLE_XFT)
|
||||
AC_SUBST(MOZ_XFT_CFLAGS)
|
||||
AC_SUBST(MOZ_XFT_LIBS)
|
||||
+AC_SUBST(MOZ_PANGO_CFLAGS)
|
||||
+AC_SUBST(MOZ_PANGO_LIBS)
|
||||
|
||||
dnl ========================================================
|
||||
dnl = pango font rendering
|
||||
dnl ========================================================
|
||||
MOZ_ARG_ENABLE_BOOL(pango,
|
||||
[ --enable-pango Enable Pango font rendering support],
|
||||
MOZ_ENABLE_PANGO=1,
|
||||
MOZ_ENABLE_PANGO=)
|
||||
|
||||
if test "$MOZ_ENABLE_PANGO"
|
||||
then
|
||||
AC_DEFINE(MOZ_ENABLE_PANGO)
|
||||
PKG_CHECK_MODULES(MOZ_PANGO, pangoxft >= 1.6.0)
|
||||
+ PKG_CHECK_MODULES(PANGOCAIRO_CHK, pangocairo >= 1.10.0,
|
||||
+ [
|
||||
+ MOZ_PANGOCAIRO=1
|
||||
+ AC_DEFINE(MOZ_PANGOCAIRO)
|
||||
+ MOZ_PANGO_CFLAGS="$PANGOCAIRO_CHK_CFLAGS $MOZ_PANGO_CFLAGS"
|
||||
+ MOZ_PANGO_LIBS="$PANGOCAIRO_CHK_LIBS $MOZ_PANGO_LIBS"
|
||||
+ ],
|
||||
+ [:])
|
||||
|
||||
AC_SUBST(MOZ_ENABLE_PANGO)
|
||||
+ AC_SUBST(MOZ_PANGOCAIRO)
|
||||
AC_SUBST(MOZ_PANGO_CFLAGS)
|
||||
AC_SUBST(MOZ_PANGO_LIBS)
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl = x11 core font support (default and ability to enable depend on toolkit)
|
3
plastikfox-theme.tar.bz2
Normal file
3
plastikfox-theme.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a227d241e6e9f588871e23af27097c099cddfd345387f843c847ca4f9222f9ea
|
||||
size 608690
|
29
postscript.patch
Normal file
29
postscript.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From: Wolfgang Rosenauer <stark@suse.de>
|
||||
Subject: make pagesize postscript DSC conform
|
||||
References:
|
||||
http://www.cups.org/str.php?L1542
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=334485
|
||||
|
||||
Index: gfx/src/ps/nsPostScriptObj.cpp
|
||||
================================================================================
|
||||
--- gfx/src/ps/nsPostScriptObj.cpp
|
||||
+++ gfx/src/ps/nsPostScriptObj.cpp
|
||||
@@ -466,6 +466,7 @@
|
||||
|
||||
// Tell the printer what size paper it should use
|
||||
fprintf(f,
|
||||
+ "%%%%BeginFeature: *PageSize %s\n"
|
||||
"/setpagedevice where\n" // Test for the feature
|
||||
"{ pop 2 dict\n"
|
||||
" dup /PageSize [ %s %s ] put\n" // Paper dimensions
|
||||
@@ -473,7 +474,9 @@
|
||||
" dup /PageSize 3 put\n" // Select the nearest page size to fit
|
||||
" put\n"
|
||||
" setpagedevice\n" // Install settings
|
||||
- "} if\n",
|
||||
+ "} if\n"
|
||||
+ "%%%%EndFeature\n",
|
||||
+ mPrintSetup->paper_name,
|
||||
fpCString(NSTwipsToFloatPoints(paper_width)).get(),
|
||||
fpCString(NSTwipsToFloatPoints(paper_height)).get());
|
||||
|
168
proxy-dev.patch
Normal file
168
proxy-dev.patch
Normal file
@ -0,0 +1,168 @@
|
||||
From: Robert O'Callahan <rocallahan@novell.com>
|
||||
Subject: proxy.pac: host resolution error
|
||||
References:
|
||||
https://bugzilla.novell.com/show_bug.cgi?id=196506
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=347307
|
||||
|
||||
Index: netwerk/base/src/nsProxyAutoConfig.js
|
||||
================================================================================
|
||||
--- netwerk/base/src/nsProxyAutoConfig.js
|
||||
+++ netwerk/base/src/nsProxyAutoConfig.js
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
const nsISupports = Components.interfaces.nsISupports;
|
||||
const nsIProxyAutoConfig = Components.interfaces.nsIProxyAutoConfig;
|
||||
-const nsIDNSService = Components.interfaces.nsIDNSService;
|
||||
+const nsPIDNSService = Components.interfaces.nsPIDNSService;
|
||||
|
||||
// implementor of nsIProxyAutoConfig
|
||||
function nsProxyAutoConfig() {};
|
||||
@@ -114,7 +114,7 @@
|
||||
// wrapper for getting local IP address called by PAC file
|
||||
function myIpAddress() {
|
||||
try {
|
||||
- return dns.resolve(dns.myHostName, 0).getNextAddrAsString();
|
||||
+ return dns.getNetworkAddrAsString();
|
||||
} catch (e) {
|
||||
return '127.0.0.1';
|
||||
}
|
||||
@@ -176,7 +176,7 @@
|
||||
}
|
||||
|
||||
var pac = new nsProxyAutoConfig() ;
|
||||
-var dns = Components.classes[kDNS_CONTRACTID].getService(nsIDNSService);
|
||||
+var dns = Components.classes[kDNS_CONTRACTID].getService(nsPIDNSService);
|
||||
|
||||
var pacUtils =
|
||||
"function dnsDomainIs(host, domain) {\n" +
|
||||
--- netwerk/dns/public/nsPIDNSService.idl
|
||||
+++ netwerk/dns/public/nsPIDNSService.idl
|
||||
@@ -58,4 +58,11 @@
|
||||
* this method.
|
||||
*/
|
||||
void shutdown();
|
||||
+
|
||||
+ /**
|
||||
+ * Returns the IP address of the machine that is most suitable for
|
||||
+ * identifying the machine's network. Favour VPN addresses above
|
||||
+ * wired/wireless addresses above 127.x.x.x addresses.
|
||||
+ */
|
||||
+ ACString getNetworkAddrAsString();
|
||||
};
|
||||
--- netwerk/dns/src/nsDNSService2.cpp
|
||||
+++ netwerk/dns/src/nsDNSService2.cpp
|
||||
@@ -56,6 +56,11 @@
|
||||
#include "prio.h"
|
||||
#include "plstr.h"
|
||||
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/socket.h>
|
||||
+#include <ifaddrs.h>
|
||||
+#include <net/if.h>
|
||||
+
|
||||
static const char kPrefDnsCacheEntries[] = "network.dnsCacheEntries";
|
||||
static const char kPrefDnsCacheExpiration[] = "network.dnsCacheExpiration";
|
||||
static const char kPrefEnableIDN[] = "network.enableIDN";
|
||||
@@ -135,6 +140,18 @@
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
+static nsresult
|
||||
+AddrToString(PRNetAddr* aAddr, nsACString& aResult)
|
||||
+{
|
||||
+ char buf[64];
|
||||
+ if (PR_NetAddrToString(aAddr, buf, sizeof(buf)) == PR_SUCCESS) {
|
||||
+ aResult.Assign(buf);
|
||||
+ return NS_OK;
|
||||
+ }
|
||||
+ NS_ERROR("PR_NetAddrToString failed unexpectedly");
|
||||
+ return NS_ERROR_FAILURE; // conversion failed for some reason
|
||||
+}
|
||||
+
|
||||
NS_IMETHODIMP
|
||||
nsDNSRecord::GetNextAddrAsString(nsACString &result)
|
||||
{
|
||||
@@ -142,13 +159,7 @@
|
||||
nsresult rv = GetNextAddr(0, &addr);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
- char buf[64];
|
||||
- if (PR_NetAddrToString(&addr, buf, sizeof(buf)) == PR_SUCCESS) {
|
||||
- result.Assign(buf);
|
||||
- return NS_OK;
|
||||
- }
|
||||
- NS_ERROR("PR_NetAddrToString failed unexpectedly");
|
||||
- return NS_ERROR_FAILURE; // conversion failed for some reason
|
||||
+ return AddrToString(&addr, result);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
@@ -580,3 +591,68 @@
|
||||
|
||||
return af;
|
||||
}
|
||||
+
|
||||
+static PRInt32
|
||||
+GetScoreForInterface(struct ifaddrs* aInterface)
|
||||
+{
|
||||
+ // Interface must be up
|
||||
+ if (!(aInterface->ifa_flags & IFF_UP))
|
||||
+ return 0;
|
||||
+ // Interface must be configured
|
||||
+ if (!(aInterface->ifa_flags & IFF_RUNNING))
|
||||
+ return 0;
|
||||
+
|
||||
+ // Only look at IP interfaces
|
||||
+ sa_family_t type = aInterface->ifa_addr->sa_family;
|
||||
+ if (type != AF_INET && type != AF_INET6)
|
||||
+ return 0;
|
||||
+
|
||||
+ // Loopback interfaces get the lowest score
|
||||
+ if (aInterface->ifa_flags & IFF_LOOPBACK)
|
||||
+ return 1;
|
||||
+
|
||||
+ if (strchr(aInterface->ifa_name, ':')) {
|
||||
+ // guess that it's probably a VPN address
|
||||
+ return 3;
|
||||
+ }
|
||||
+
|
||||
+ // Regular interface
|
||||
+ return 2;
|
||||
+}
|
||||
+
|
||||
+nsresult
|
||||
+SockaddrToString(struct sockaddr* aAddr, nsACString& aResult)
|
||||
+{
|
||||
+ PRNetAddr* addr = NS_REINTERPRET_CAST(PRNetAddr*, aAddr);
|
||||
+ return AddrToString(addr, aResult);
|
||||
+}
|
||||
+
|
||||
+NS_IMETHODIMP
|
||||
+nsDNSService::GetNetworkAddrAsString(nsACString& aResult)
|
||||
+{
|
||||
+ aResult.AssignLiteral("127.0.0.1");
|
||||
+
|
||||
+ struct ifaddrs* addrs;
|
||||
+ if (getifaddrs(&addrs) < 0)
|
||||
+ return NS_OK;
|
||||
+
|
||||
+ struct ifaddrs* bestAddr = nsnull;
|
||||
+ PRInt32 bestScore = 0;
|
||||
+ struct ifaddrs* addr;
|
||||
+ for (addr = addrs; addr; addr = addr->ifa_next) {
|
||||
+ PRInt32 score = GetScoreForInterface(addr);
|
||||
+ if (score > 0 && (!bestAddr || score > bestScore)) {
|
||||
+ bestAddr = addr;
|
||||
+ bestScore = score;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!bestAddr) {
|
||||
+ freeifaddrs(addrs);
|
||||
+ return NS_OK;
|
||||
+ }
|
||||
+
|
||||
+ nsresult rv = SockaddrToString(bestAddr->ifa_addr, aResult);
|
||||
+ freeifaddrs(addrs);
|
||||
+ return rv;
|
||||
+}
|
21
rpath.patch
Normal file
21
rpath.patch
Normal file
@ -0,0 +1,21 @@
|
||||
Index: browser/app/Makefile.in
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/browser/app/Makefile.in,v
|
||||
retrieving revision 1.52.2.2.2.19.2.1
|
||||
diff -u -p -6 -r1.52.2.2.2.19.2.1 Makefile.in
|
||||
--- browser/app/Makefile.in 8 Apr 2005 23:29:22 -0000 1.52.2.2.2.19.2.1
|
||||
+++ browser/app/Makefile.in 18 Aug 2005 10:20:26 -0000
|
||||
@@ -72,12 +72,13 @@ TK_LIBS := -framework Cocoa $(TK_LIBS)
|
||||
endif
|
||||
|
||||
LIBS = \
|
||||
$(STATIC_COMPONENTS_LINKER_PATH) \
|
||||
$(EXTRA_DSO_LIBS) \
|
||||
$(DIST)/lib/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX) \
|
||||
+ $(RPATH) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(XPCOM_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(TK_LIBS) \
|
||||
$(NULL)
|
||||
|
3
search-addons.tar.bz2
Normal file
3
search-addons.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cf5066695cf24ea4f0dc28a86f4e5e7fc69112b5761caecb81c3dd276cba29c2
|
||||
size 2809
|
51
skin-selection.patch
Normal file
51
skin-selection.patch
Normal file
@ -0,0 +1,51 @@
|
||||
From: Wolfgang Rosenauer <stark@suse.de>
|
||||
Subject: choose default theme at first startup according to the Desktop Env
|
||||
References:
|
||||
|
||||
|
||||
Index: browser/app/profile/firefox.js
|
||||
================================================================================
|
||||
--- browser/app/profile/firefox.js
|
||||
+++ browser/app/profile/firefox.js
|
||||
@@ -102,7 +102,7 @@
|
||||
pref("keyword.URL", "chrome://browser-region/locale/region.properties");
|
||||
|
||||
pref("general.useragent.locale", "@AB_CD@");
|
||||
-pref("general.skins.selectedSkin", "classic/1.0");
|
||||
+//pref("general.skins.selectedSkin", "classic/1.0");
|
||||
pref("general.useragent.extra.firefox", "@APP_UA_NAME@/@APP_VERSION@");
|
||||
|
||||
pref("general.smoothScroll", false);
|
||||
--- modules/libpref/src/nsPrefService.cpp
|
||||
+++ modules/libpref/src/nsPrefService.cpp
|
||||
@@ -36,6 +36,7 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
+#include <string.h>
|
||||
#include "nsPrefService.h"
|
||||
#include "nsAppDirectoryServiceDefs.h"
|
||||
#include "nsDirectoryServiceDefs.h"
|
||||
@@ -207,11 +208,22 @@
|
||||
NS_IMETHODIMP nsPrefService::ReadUserPrefs(nsIFile *aFile)
|
||||
{
|
||||
nsresult rv;
|
||||
+ PRBool rv2;
|
||||
|
||||
if (nsnull == aFile) {
|
||||
rv = UseDefaultPrefFile();
|
||||
UseUserPrefFile();
|
||||
|
||||
+ rv2 = PREF_HasUserPref("general.skins.selectedSkin");
|
||||
+ if (!rv2) {
|
||||
+ if (getenv("KDE_FULL_SESSION"))
|
||||
+ PREF_SetCharPref("general.skins.selectedSkin", "plastikfox");
|
||||
+ else if (getenv("DESKTOP_SESSION") && !strcmp("gnome", getenv("DESKTOP_SESSION")))
|
||||
+ PREF_SetCharPref("general.skins.selectedSkin", "tango");
|
||||
+ else
|
||||
+ PREF_SetCharPref("general.skins.selectedSkin", "classic/1.0");
|
||||
+ }
|
||||
+
|
||||
NotifyServiceObservers(NS_PREFSERVICE_READ_TOPIC_ID);
|
||||
|
||||
} else {
|
1075
startup.patch
Normal file
1075
startup.patch
Normal file
File diff suppressed because it is too large
Load Diff
58
system-extensions.patch
Normal file
58
system-extensions.patch
Normal file
@ -0,0 +1,58 @@
|
||||
Index: toolkit/mozapps/extensions/src/nsExtensionManager.js.in
|
||||
================================================================================
|
||||
--- toolkit/mozapps/extensions/src/nsExtensionManager.js.in
|
||||
+++ toolkit/mozapps/extensions/src/nsExtensionManager.js.in
|
||||
@@ -119,6 +119,7 @@
|
||||
|
||||
const KEY_APP_PROFILE = "app-profile";
|
||||
const KEY_APP_GLOBAL = "app-global";
|
||||
+const KEY_APP_SYSTEM = "app-system";
|
||||
|
||||
const CATEGORY_INSTALL_LOCATIONS = "extension-install-locations";
|
||||
|
||||
@@ -2676,6 +2677,16 @@
|
||||
priority);
|
||||
InstallLocations.put(profileLocation);
|
||||
|
||||
+ // Register App-System Install Location
|
||||
+ try {
|
||||
+ var appSystemExtensions = getDirNoCreate("DrvD", ["usr","lib","browser-extensions","firefox"]);
|
||||
+ var priority = nsIInstallLocation.PRIORITY_APP_PROFILE - 1;
|
||||
+ var systemLocation = new DirectoryInstallLocation(KEY_APP_SYSTEM,
|
||||
+ appSystemExtensions, true,
|
||||
+ priority);
|
||||
+ InstallLocations.put(systemLocation);
|
||||
+ } catch (e) {}
|
||||
+
|
||||
#ifdef XP_WIN
|
||||
// Register HKEY_LOCAL_MACHINE Install Location
|
||||
InstallLocations.put(
|
||||
@@ -3852,7 +3863,7 @@
|
||||
|
||||
// Prepare themes for installation
|
||||
// Only enumerate directories in the app-profile and app-global locations.
|
||||
- var locations = [KEY_APP_PROFILE, KEY_APP_GLOBAL];
|
||||
+ var locations = [KEY_APP_PROFILE, KEY_APP_GLOBAL, KEY_APP_SYSTEM];
|
||||
for (var i = 0; i < locations.length; ++i) {
|
||||
var location = InstallLocations.get(locations[i]);
|
||||
if (!location.canAccess)
|
||||
@@ -3918,7 +3929,8 @@
|
||||
var items = PendingOperations.getOperations(OP_NEEDS_INSTALL);
|
||||
for (i = items.length - 1; i >= 0; --i) {
|
||||
if (items[i].locationKey == KEY_APP_PROFILE ||
|
||||
- items[i].locationKey == KEY_APP_GLOBAL)
|
||||
+ items[i].locationKey == KEY_APP_GLOBAL ||
|
||||
+ items[i].locationKey == KEY_APP_SYSTEM)
|
||||
itemsToCheck.push(items[i].id);
|
||||
}
|
||||
this._finishOperations();
|
||||
@@ -4903,7 +4915,8 @@
|
||||
}
|
||||
}
|
||||
else if (installLocation.name == KEY_APP_PROFILE ||
|
||||
- installLocation.name == KEY_APP_GLOBAL) {
|
||||
+ installLocation.name == KEY_APP_GLOBAL ||
|
||||
+ installLocation.name == KEY_APP_SYSTEM) {
|
||||
// Check for a pointer file and remove it if it exists
|
||||
var pointerFile = installLocation.location.clone();
|
||||
pointerFile.append(id);
|
894
system-proxies.patch
Normal file
894
system-proxies.patch
Normal file
@ -0,0 +1,894 @@
|
||||
Index: netwerk/base/public/nsISystemProxySettings.idl
|
||||
================================================================================
|
||||
--- allmakefiles.sh
|
||||
+++ allmakefiles.sh
|
||||
@@ -984,6 +984,7 @@
|
||||
toolkit/components/downloads/src/Makefile
|
||||
toolkit/components/filepicker/Makefile
|
||||
toolkit/components/gnome/Makefile
|
||||
+toolkit/components/unixproxy/Makefile
|
||||
toolkit/components/help/Makefile
|
||||
toolkit/components/history/Makefile
|
||||
toolkit/components/history/public/Makefile
|
||||
--- browser/components/preferences/connection.xul
|
||||
+++ browser/components/preferences/connection.xul
|
||||
@@ -38,7 +38,12 @@
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
-<!DOCTYPE prefwindow SYSTEM "chrome://browser/locale/preferences/connection.dtd">
|
||||
+<!DOCTYPE prefwindow [
|
||||
+ <!ENTITY % connectionDTD SYSTEM "chrome://browser/locale/preferences/connection.dtd">
|
||||
+ %connectionDTD;
|
||||
+ <!ENTITY % mainDTD SYSTEM "chrome://browser/locale/preferences/main.dtd">
|
||||
+ %mainDTD;
|
||||
+]>
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/"?>
|
||||
|
||||
@@ -99,6 +104,7 @@
|
||||
<radiogroup id="networkProxyType" preference="network.proxy.type"
|
||||
onsyncfrompreference="return gConnectionsDialog.readProxyType();">
|
||||
<radio value="0" label="&directTypeRadio.label;" accesskey="&directTypeRadio.accesskey;"/>
|
||||
+ <radio value="5" label="&systemDefaults.label;" />
|
||||
<radio value="4" label="&WPADTypeRadio.label;" accesskey="&WPADTypeRadio.accesskey;"/>
|
||||
<radio value="1" label="&manualTypeRadio.label;" accesskey="&manualTypeRadio.accesskey;"/>
|
||||
<grid class="indent" flex="1">
|
||||
--- browser/installer/unix/packages-static
|
||||
+++ browser/installer/unix/packages-static
|
||||
@@ -51,6 +51,7 @@
|
||||
bin/xpicleanup
|
||||
|
||||
; [Components]
|
||||
+bin/components/libunixproxy.so
|
||||
bin/components/accessibility.xpt
|
||||
bin/components/accessibility-atk.xpt
|
||||
bin/components/appshell.xpt
|
||||
--- netwerk/base/public/Makefile.in
|
||||
+++ netwerk/base/public/Makefile.in
|
||||
@@ -98,6 +98,7 @@
|
||||
nsIStreamTransportService.idl \
|
||||
nsIStreamLoader.idl \
|
||||
nsISyncStreamListener.idl \
|
||||
+ nsISystemProxySettings.idl \
|
||||
nsIUnicharStreamLoader.idl \
|
||||
nsIStandardURL.idl \
|
||||
nsIURLParser.idl \
|
||||
--- netwerk/base/public/nsISystemProxySettings.idl
|
||||
+++ netwerk/base/public/nsISystemProxySettings.idl
|
||||
@@ -0,0 +1,65 @@
|
||||
+/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
+/* ***** BEGIN LICENSE BLOCK *****
|
||||
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
+ *
|
||||
+ * The contents of this file are subject to the Mozilla Public License Version
|
||||
+ * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
+ * the License. You may obtain a copy of the License at
|
||||
+ * http://www.mozilla.org/MPL/
|
||||
+ *
|
||||
+ * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
+ * for the specific language governing rights and limitations under the
|
||||
+ * License.
|
||||
+ *
|
||||
+ * The Original Code is Novell code.
|
||||
+ *
|
||||
+ * The Initial Developer of the Original Code is Novell.
|
||||
+ * Portions created by the Initial Developer are Copyright (C) 2005
|
||||
+ * the Initial Developer. All Rights Reserved.
|
||||
+ *
|
||||
+ * Contributor(s):
|
||||
+ * Robert O'Callahan (rocallahan@novell.com)
|
||||
+ *
|
||||
+ * Alternatively, the contents of this file may be used under the terms of
|
||||
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
+ * in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
+ * of those above. If you wish to allow use of your version of this file only
|
||||
+ * under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
+ * use your version of this file under the terms of the MPL, indicate your
|
||||
+ * decision by deleting the provisions above and replace them with the notice
|
||||
+ * and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
+ * the provisions above, a recipient may use your version of this file under
|
||||
+ * the terms of any one of the MPL, the GPL or the LGPL.
|
||||
+ *
|
||||
+ * ***** END LICENSE BLOCK ***** */
|
||||
+
|
||||
+#include "nsISupports.idl"
|
||||
+#include "nsIURI.idl"
|
||||
+
|
||||
+%{C++
|
||||
+#define NS_SYSTEMPROXYSETTINGS_CONTRACTID "@mozilla.org/system-proxy-settings;1"
|
||||
+%}
|
||||
+
|
||||
+/**
|
||||
+ * This interface allows the proxy code to use platform-specific proxy
|
||||
+ * settings when the proxy preference is set to "automatic discovery". If it can
|
||||
+ * load a service with the above contract ID, it will use it to determine the
|
||||
+ * PAC file name. If no PAC file is specified then the service itself will behave
|
||||
+ * like a PAC file.
|
||||
+ */
|
||||
+[scriptable, uuid(a9f3ae38-b769-4e0b-9317-578388e326c9)]
|
||||
+interface nsISystemProxySettings : nsISupports
|
||||
+{
|
||||
+ /**
|
||||
+ * If non-empty, use this PAC file. If empty, call getProxyForURI instead.
|
||||
+ */
|
||||
+ readonly attribute AUTF8String PACURI;
|
||||
+
|
||||
+ /**
|
||||
+ * See nsIProxyAutoConfig::getProxyForURI; this function behaves exactly
|
||||
+ * the same way.
|
||||
+ */
|
||||
+ ACString getProxyForURI(in nsIURI aURI);
|
||||
+};
|
||||
--- netwerk/base/src/nsPACMan.h
|
||||
+++ netwerk/base/src/nsPACMan.h
|
||||
@@ -128,6 +128,14 @@
|
||||
*/
|
||||
PRBool IsLoading() { return mLoader != nsnull; }
|
||||
|
||||
+ /**
|
||||
+ * Returns true if the given URI matches the URI of our PAC file.
|
||||
+ */
|
||||
+ PRBool IsPACURI(nsIURI *uri) {
|
||||
+ PRBool result;
|
||||
+ return mPACURI && NS_SUCCEEDED(mPACURI->Equals(uri, &result)) && result;
|
||||
+ }
|
||||
+
|
||||
private:
|
||||
NS_DECL_NSISTREAMLOADEROBSERVER
|
||||
NS_DECL_NSIINTERFACEREQUESTOR
|
||||
@@ -163,14 +171,6 @@
|
||||
void OnLoadFailure();
|
||||
|
||||
/**
|
||||
- * Returns true if the given URI matches the URI of our PAC file.
|
||||
- */
|
||||
- PRBool IsPACURI(nsIURI *uri) {
|
||||
- PRBool result;
|
||||
- return mPACURI && NS_SUCCEEDED(mPACURI->Equals(uri, &result)) && result;
|
||||
- }
|
||||
-
|
||||
- /**
|
||||
* Event fu for calling StartLoading asynchronously.
|
||||
*/
|
||||
PR_STATIC_CALLBACK(void *) LoadEvent_Handle(PLEvent *);
|
||||
--- netwerk/base/src/nsProtocolProxyService.cpp
|
||||
+++ netwerk/base/src/nsProtocolProxyService.cpp
|
||||
@@ -411,6 +411,12 @@
|
||||
mProxyConfig = NS_STATIC_CAST(ProxyConfig, type);
|
||||
reloadPAC = PR_TRUE;
|
||||
}
|
||||
+
|
||||
+ if (mProxyConfig == eProxyConfig_System) {
|
||||
+ mSystemProxySettings = do_GetService(NS_SYSTEMPROXYSETTINGS_CONTRACTID);
|
||||
+ } else {
|
||||
+ mSystemProxySettings = nsnull;
|
||||
+ }
|
||||
}
|
||||
|
||||
if (!pref || !strcmp(pref, "network.proxy.http"))
|
||||
@@ -466,8 +472,10 @@
|
||||
LoadHostFilters(tempString.get());
|
||||
}
|
||||
|
||||
- // We're done if not using PAC or WPAD
|
||||
- if (mProxyConfig != eProxyConfig_PAC && mProxyConfig != eProxyConfig_WPAD)
|
||||
+ // We're done if not using something that could give us a PAC URL
|
||||
+ // (PAC, WPAD or System)
|
||||
+ if (mProxyConfig != eProxyConfig_PAC && mProxyConfig != eProxyConfig_WPAD &&
|
||||
+ mProxyConfig != eProxyConfig_System)
|
||||
return;
|
||||
|
||||
// OK, we need to reload the PAC file if:
|
||||
@@ -482,17 +490,21 @@
|
||||
if (mProxyConfig == eProxyConfig_PAC) {
|
||||
prefBranch->GetCharPref("network.proxy.autoconfig_url",
|
||||
getter_Copies(tempString));
|
||||
- }
|
||||
- else if (mProxyConfig == eProxyConfig_WPAD) {
|
||||
+ } else {
|
||||
// We diverge from the WPAD spec here in that we don't walk the
|
||||
// hosts's FQDN, stripping components until we hit a TLD. Doing so
|
||||
// is dangerous in the face of an incomplete list of TLDs, and TLDs
|
||||
// get added over time. We could consider doing only a single
|
||||
// substitution of the first component, if that proves to help
|
||||
// compatibility.
|
||||
- tempString.AssignLiteral("http://wpad/wpad.dat");
|
||||
+ if (mSystemProxySettings)
|
||||
+ mSystemProxySettings->GetPACURI(tempString);
|
||||
+ else
|
||||
+ tempString.AssignLiteral("http://wpad/wpad.dat");
|
||||
+ }
|
||||
+ if (!tempString.IsEmpty()) {
|
||||
+ ConfigureFromPAC(tempString);
|
||||
}
|
||||
- ConfigureFromPAC(tempString);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -901,13 +913,16 @@
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
- mFailedProxies.Clear();
|
||||
-
|
||||
nsCOMPtr<nsIURI> pacURI;
|
||||
nsresult rv = NS_NewURI(getter_AddRefs(pacURI), spec);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
+ if (mPACMan->IsPACURI(pacURI))
|
||||
+ return NS_OK;
|
||||
+
|
||||
+ mFailedProxies.Clear();
|
||||
+
|
||||
return mPACMan->LoadPACFromURI(pacURI);
|
||||
}
|
||||
|
||||
@@ -917,8 +932,10 @@
|
||||
nsresult aStatus,
|
||||
nsIProxyInfo **aResult)
|
||||
{
|
||||
- // We only support failover when a PAC file is configured.
|
||||
- if (mProxyConfig != eProxyConfig_PAC && mProxyConfig != eProxyConfig_WPAD)
|
||||
+ // We only support failover when a PAC file is configured, either
|
||||
+ // directly or via system settings
|
||||
+ if (mProxyConfig != eProxyConfig_PAC && mProxyConfig != eProxyConfig_WPAD &&
|
||||
+ mProxyConfig != eProxyConfig_System)
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
// Verify that |aProxy| is one of our nsProxyInfo objects.
|
||||
@@ -1214,15 +1231,37 @@
|
||||
if (!(info.flags & nsIProtocolHandler::ALLOWS_PROXY))
|
||||
return NS_OK; // Can't proxy this (filters may not override)
|
||||
|
||||
+ if (mSystemProxySettings) {
|
||||
+ nsCAutoString PACURI;
|
||||
+ if (NS_SUCCEEDED(mSystemProxySettings->GetPACURI(PACURI)) &&
|
||||
+ !PACURI.IsEmpty()) {
|
||||
+ // Switch to new PAC file if that setting has changed. If the setting
|
||||
+ // hasn't changed, ConfigureFromPAC will exit early.
|
||||
+ nsresult rv = ConfigureFromPAC(PACURI);
|
||||
+ if (NS_FAILED(rv))
|
||||
+ return rv;
|
||||
+ } else {
|
||||
+ nsCAutoString proxy;
|
||||
+ nsresult rv = mSystemProxySettings->GetProxyForURI(uri, proxy);
|
||||
+ if (NS_SUCCEEDED(rv)) {
|
||||
+ ProcessPACString(proxy, result);
|
||||
+ return NS_OK;
|
||||
+ }
|
||||
+ // no proxy, stop search
|
||||
+ return NS_OK;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
// if proxies are enabled and this host:port combo is supposed to use a
|
||||
// proxy, check for a proxy.
|
||||
if (mProxyConfig == eProxyConfig_Direct ||
|
||||
(mProxyConfig == eProxyConfig_Manual &&
|
||||
!CanUseProxy(uri, info.defaultPort)))
|
||||
return NS_OK;
|
||||
-
|
||||
+
|
||||
// Proxy auto config magic...
|
||||
- if (mProxyConfig == eProxyConfig_PAC || mProxyConfig == eProxyConfig_WPAD) {
|
||||
+ if (mProxyConfig == eProxyConfig_PAC || mProxyConfig == eProxyConfig_WPAD ||
|
||||
+ mProxyConfig == eProxyConfig_System) {
|
||||
// Do not query PAC now.
|
||||
*usePAC = PR_TRUE;
|
||||
return NS_OK;
|
||||
--- netwerk/base/src/nsProtocolProxyService.h
|
||||
+++ netwerk/base/src/nsProtocolProxyService.h
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "nsPIProtocolProxyService.h"
|
||||
#include "nsIProtocolProxyFilter.h"
|
||||
#include "nsIProxyAutoConfig.h"
|
||||
+#include "nsISystemProxySettings.h"
|
||||
#include "nsIProxyInfo.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsDataHashtable.h"
|
||||
@@ -310,6 +311,7 @@
|
||||
eProxyConfig_PAC,
|
||||
eProxyConfig_Direct4x,
|
||||
eProxyConfig_WPAD,
|
||||
+ eProxyConfig_System, // use system proxy settings if available, otherwise WPAD
|
||||
eProxyConfig_Last
|
||||
};
|
||||
|
||||
@@ -371,6 +373,7 @@
|
||||
PRBool mSOCKSProxyRemoteDNS;
|
||||
|
||||
nsRefPtr<nsPACMan> mPACMan; // non-null if we are using PAC
|
||||
+ nsCOMPtr<nsISystemProxySettings> mSystemProxySettings;
|
||||
|
||||
PRTime mSessionStart;
|
||||
nsFailedProxyTable mFailedProxies;
|
||||
--- toolkit/components/gnome/nsGConfService.cpp
|
||||
+++ toolkit/components/gnome/nsGConfService.cpp
|
||||
@@ -39,6 +39,8 @@
|
||||
#include "nsGConfService.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsString.h"
|
||||
+#include "nsSupportsPrimitives.h"
|
||||
+#include "nsArray.h"
|
||||
|
||||
#include <gconf/gconf-client.h>
|
||||
|
||||
@@ -125,6 +127,37 @@
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
+nsGConfService::GetStringList(const nsACString &aKey, nsIArray** aResult)
|
||||
+{
|
||||
+ nsCOMPtr<nsIMutableArray> items;
|
||||
+ NS_NewArray(getter_AddRefs(items));
|
||||
+ if (!items)
|
||||
+ return NS_ERROR_OUT_OF_MEMORY;
|
||||
+
|
||||
+ GError* error = nsnull;
|
||||
+ GSList* list = gconf_client_get_list(mClient, PromiseFlatCString(aKey).get(),
|
||||
+ GCONF_VALUE_STRING, &error);
|
||||
+ if (error) {
|
||||
+ g_error_free(error);
|
||||
+ return NS_ERROR_FAILURE;
|
||||
+ }
|
||||
+
|
||||
+ for (GSList* l = list; l; l = l->next) {
|
||||
+ nsSupportsCStringImpl* obj = new nsSupportsCStringImpl();
|
||||
+ if (!obj) {
|
||||
+ g_slist_free(list);
|
||||
+ return NS_ERROR_OUT_OF_MEMORY;
|
||||
+ }
|
||||
+ obj->SetData(nsDependentCString((const char*)l->data));
|
||||
+ items->AppendElement(obj, PR_FALSE);
|
||||
+ }
|
||||
+
|
||||
+ g_slist_free(list);
|
||||
+ NS_ADDREF(*aResult = items);
|
||||
+ return NS_OK;
|
||||
+}
|
||||
+
|
||||
+NS_IMETHODIMP
|
||||
nsGConfService::SetBool(const nsACString &aKey, PRBool aValue)
|
||||
{
|
||||
PRBool res = gconf_client_set_bool(mClient, PromiseFlatCString(aKey).get(),
|
||||
--- toolkit/components/gnome/nsIGConfService.idl
|
||||
+++ toolkit/components/gnome/nsIGConfService.idl
|
||||
@@ -37,6 +37,7 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsISupports.idl"
|
||||
+#include "nsIArray.idl"
|
||||
|
||||
[scriptable, uuid(01ac7b2e-c07c-465f-b35c-542eaef420a9)]
|
||||
interface nsIGConfService : nsISupports
|
||||
@@ -46,6 +47,7 @@
|
||||
AUTF8String getString(in AUTF8String key);
|
||||
long getInt(in AUTF8String key);
|
||||
float getFloat(in AUTF8String key);
|
||||
+ nsIArray getStringList(in AUTF8String key);
|
||||
|
||||
void setBool(in AUTF8String key, in boolean value);
|
||||
void setString(in AUTF8String key, in AUTF8String value);
|
||||
--- toolkit/components/unixproxy/nsUnixSystemProxySettings.cpp
|
||||
+++ toolkit/components/unixproxy/nsUnixSystemProxySettings.cpp
|
||||
@@ -0,0 +1,425 @@
|
||||
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
+/* ***** BEGIN LICENSE BLOCK *****
|
||||
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
+ *
|
||||
+ * The contents of this file are subject to the Mozilla Public License Version
|
||||
+ * 1.1 (the "License"); you may not use this file except in compliance with
|
||||
+ * the License. You may obtain a copy of the License at
|
||||
+ * http://www.mozilla.org/MPL/
|
||||
+ *
|
||||
+ * Software distributed under the License is distributed on an "AS IS" basis,
|
||||
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
+ * for the specific language governing rights and limitations under the
|
||||
+ * License.
|
||||
+ *
|
||||
+ * The Original Code is mozilla.org code.
|
||||
+ *
|
||||
+ * The Initial Developer of the Original Code is
|
||||
+ * Netscape Communications Corporation.
|
||||
+ * Portions created by the Initial Developer are Copyright (C) 1998
|
||||
+ * the Initial Developer. All Rights Reserved.
|
||||
+ *
|
||||
+ * Contributor(s):
|
||||
+ * Robert O'Callahan (rocallahan@novell.com)
|
||||
+ *
|
||||
+ * Alternatively, the contents of this file may be used under the terms of
|
||||
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
+ * in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
+ * of those above. If you wish to allow use of your version of this file only
|
||||
+ * under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
+ * use your version of this file under the terms of the MPL, indicate your
|
||||
+ * decision by deleting the provisions above and replace them with the notice
|
||||
+ * and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
+ * the provisions above, a recipient may use your version of this file under
|
||||
+ * the terms of any one of the MPL, the GPL or the LGPL.
|
||||
+ *
|
||||
+ * ***** END LICENSE BLOCK ***** */
|
||||
+
|
||||
+#include "nsISystemProxySettings.h"
|
||||
+#include "nsIGenericFactory.h"
|
||||
+#include "nsIServiceManager.h"
|
||||
+#include "nsIGConfService.h"
|
||||
+#include "nsIURI.h"
|
||||
+#include "nsReadableUtils.h"
|
||||
+#include "nsArray.h"
|
||||
+#include "prnetdb.h"
|
||||
+#include "prenv.h"
|
||||
+#include "nsPrintfCString.h"
|
||||
+#include "nsNetUtil.h"
|
||||
+#include "nsISupportsPrimitives.h"
|
||||
+
|
||||
+class nsUnixSystemProxySettings : public nsISystemProxySettings {
|
||||
+public:
|
||||
+ NS_DECL_ISUPPORTS
|
||||
+ NS_DECL_NSISYSTEMPROXYSETTINGS
|
||||
+
|
||||
+ nsUnixSystemProxySettings() {}
|
||||
+ nsresult Init();
|
||||
+
|
||||
+private:
|
||||
+ ~nsUnixSystemProxySettings() {}
|
||||
+
|
||||
+ nsCOMPtr<nsIGConfService> mGConf;
|
||||
+};
|
||||
+
|
||||
+NS_IMPL_ISUPPORTS1(nsUnixSystemProxySettings, nsISystemProxySettings)
|
||||
+
|
||||
+nsresult
|
||||
+nsUnixSystemProxySettings::Init()
|
||||
+{
|
||||
+ // If this is a GNOME session, load gconf and try to use its preferences.
|
||||
+ // If gconf is not available (which would be stupid) we'll proceed as if this
|
||||
+ // was not a GNOME session, using *_PROXY environment variables.
|
||||
+ const char* sessionType = PR_GetEnv("DESKTOP_SESSION");
|
||||
+ if (sessionType && !strcmp(sessionType, "gnome")) {
|
||||
+ mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
|
||||
+ }
|
||||
+ return NS_OK;
|
||||
+}
|
||||
+
|
||||
+static PRBool
|
||||
+IsProxyMode(nsIGConfService* aGConf, const char* aMode)
|
||||
+{
|
||||
+ nsCAutoString mode;
|
||||
+ return NS_SUCCEEDED(aGConf->GetString(NS_LITERAL_CSTRING("/system/proxy/mode"), mode)) &&
|
||||
+ mode.EqualsASCII(aMode);
|
||||
+}
|
||||
+
|
||||
+nsresult
|
||||
+nsUnixSystemProxySettings::GetPACURI(nsACString& aResult)
|
||||
+{
|
||||
+ if (!mGConf || !IsProxyMode(mGConf, "auto"))
|
||||
+ return NS_ERROR_FAILURE;
|
||||
+ return mGConf->GetString(NS_LITERAL_CSTRING("/system/proxy/autoconfig_url"),
|
||||
+ aResult);
|
||||
+}
|
||||
+
|
||||
+static PRBool
|
||||
+IsInNoProxyList(const nsACString& aHost, PRInt32 aPort, const char* noProxyVal)
|
||||
+{
|
||||
+ NS_ASSERTION(aPort >= 0, "Negative port?");
|
||||
+
|
||||
+ nsCAutoString noProxy(noProxyVal);
|
||||
+ if (noProxy.EqualsLiteral("*"))
|
||||
+ return PR_TRUE;
|
||||
+
|
||||
+ noProxy.StripWhitespace();
|
||||
+
|
||||
+ nsReadingIterator<char> pos;
|
||||
+ nsReadingIterator<char> end;
|
||||
+ noProxy.BeginReading(pos);
|
||||
+ noProxy.EndReading(end);
|
||||
+ while (pos != end) {
|
||||
+ nsReadingIterator<char> last = pos;
|
||||
+ nsReadingIterator<char> nextPos;
|
||||
+ if (FindCharInReadable(',', last, end)) {
|
||||
+ nextPos = last;
|
||||
+ ++nextPos;
|
||||
+ } else {
|
||||
+ last = end;
|
||||
+ nextPos = end;
|
||||
+ }
|
||||
+
|
||||
+ nsReadingIterator<char> colon = pos;
|
||||
+ PRInt32 port = -1;
|
||||
+ if (FindCharInReadable(':', colon, last)) {
|
||||
+ ++colon;
|
||||
+ nsDependentCSubstring portStr(colon, last);
|
||||
+ nsCAutoString portStr2(portStr);
|
||||
+ PRInt32 err;
|
||||
+ port = portStr2.ToInteger(&err);
|
||||
+ if (err != 0) {
|
||||
+ port = -2; // don't match any port, so we ignore this pattern
|
||||
+ }
|
||||
+ --colon;
|
||||
+ } else {
|
||||
+ colon = last;
|
||||
+ }
|
||||
+
|
||||
+ if (port == -1 || port == aPort) {
|
||||
+ nsDependentCSubstring hostStr(pos, colon);
|
||||
+ if (StringEndsWith(aHost, hostStr, nsCaseInsensitiveCStringComparator()))
|
||||
+ return PR_TRUE;
|
||||
+ }
|
||||
+
|
||||
+ pos = nextPos;
|
||||
+ }
|
||||
+
|
||||
+ return PR_FALSE;
|
||||
+}
|
||||
+
|
||||
+static void SetProxyResult(const char* aType, const nsACString& aHost,
|
||||
+ PRInt32 aPort, nsACString& aResult)
|
||||
+{
|
||||
+ aResult.AppendASCII(aType);
|
||||
+ aResult.Append(' ');
|
||||
+ aResult.Append(aHost);
|
||||
+ aResult.Append(':');
|
||||
+ aResult.Append(nsPrintfCString("%d", aPort));
|
||||
+}
|
||||
+
|
||||
+static nsresult
|
||||
+GetProxyForURIFromEnvironment(const nsACString& aScheme,
|
||||
+ const nsACString& aHost,
|
||||
+ PRInt32 aPort,
|
||||
+ nsACString& aResult)
|
||||
+{
|
||||
+ nsCAutoString envVar;
|
||||
+ envVar.Append(aScheme);
|
||||
+ envVar.AppendLiteral("_proxy");
|
||||
+ const char* proxyVal = PR_GetEnv(envVar.get());
|
||||
+ if (!proxyVal) {
|
||||
+ proxyVal = PR_GetEnv("all_proxy");
|
||||
+ if (!proxyVal) {
|
||||
+ // Return failure so that the caller can detect the failure and
|
||||
+ // fall back to other proxy detection (e.g., WPAD)
|
||||
+ return NS_ERROR_FAILURE;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ const char* noProxyVal = PR_GetEnv("no_proxy");
|
||||
+ if (noProxyVal && IsInNoProxyList(aHost, aPort, noProxyVal)) {
|
||||
+ aResult.AppendLiteral("DIRECT");
|
||||
+ return NS_OK;
|
||||
+ }
|
||||
+
|
||||
+ // Use our URI parser to crack the proxy URI
|
||||
+ nsCOMPtr<nsIURI> proxyURI;
|
||||
+ nsresult rv = NS_NewURI(getter_AddRefs(proxyURI), proxyVal);
|
||||
+ if (NS_FAILED(rv))
|
||||
+ return rv;
|
||||
+
|
||||
+ // Is there a way to specify "socks://" or something in these environment
|
||||
+ // variables? I can't find any documentation.
|
||||
+ PRBool isHTTP;
|
||||
+ rv = proxyURI->SchemeIs("http", &isHTTP);
|
||||
+ if (NS_FAILED(rv))
|
||||
+ return rv;
|
||||
+ if (!isHTTP)
|
||||
+ return NS_ERROR_FAILURE;
|
||||
+
|
||||
+ nsCAutoString proxyHost;
|
||||
+ rv = proxyURI->GetHost(proxyHost);
|
||||
+ if (NS_FAILED(rv))
|
||||
+ return rv;
|
||||
+ PRInt32 proxyPort;
|
||||
+ rv = proxyURI->GetPort(&proxyPort);
|
||||
+ if (NS_FAILED(rv))
|
||||
+ return rv;
|
||||
+
|
||||
+ SetProxyResult("PROXY", proxyHost, proxyPort, aResult);
|
||||
+ return NS_OK;
|
||||
+}
|
||||
+
|
||||
+static nsresult
|
||||
+SetProxyResultFromGConf(nsIGConfService* aGConf, const char* aKeyBase,
|
||||
+ const char* aType, nsACString& aResult)
|
||||
+{
|
||||
+ nsCAutoString hostKey;
|
||||
+ hostKey.AppendASCII(aKeyBase);
|
||||
+ hostKey.AppendLiteral("host");
|
||||
+ nsCAutoString host;
|
||||
+ nsresult rv = aGConf->GetString(hostKey, host);
|
||||
+ if (NS_FAILED(rv))
|
||||
+ return rv;
|
||||
+ if (host.IsEmpty())
|
||||
+ return NS_ERROR_FAILURE;
|
||||
+
|
||||
+ nsCAutoString portKey;
|
||||
+ portKey.AppendASCII(aKeyBase);
|
||||
+ portKey.AppendLiteral("port");
|
||||
+ PRInt32 port;
|
||||
+ rv = aGConf->GetInt(portKey, &port);
|
||||
+ if (NS_FAILED(rv))
|
||||
+ return rv;
|
||||
+
|
||||
+ SetProxyResult(aType, host, port, aResult);
|
||||
+ return NS_OK;
|
||||
+}
|
||||
+
|
||||
+/* copied from nsProtocolProxyService.cpp --- we should share this! */
|
||||
+static void
|
||||
+proxy_MaskIPv6Addr(PRIPv6Addr &addr, PRUint16 mask_len)
|
||||
+{
|
||||
+ if (mask_len == 128)
|
||||
+ return;
|
||||
+
|
||||
+ if (mask_len > 96) {
|
||||
+ addr.pr_s6_addr32[3] = PR_htonl(
|
||||
+ PR_ntohl(addr.pr_s6_addr32[3]) & (~0L << (128 - mask_len)));
|
||||
+ }
|
||||
+ else if (mask_len > 64) {
|
||||
+ addr.pr_s6_addr32[3] = 0;
|
||||
+ addr.pr_s6_addr32[2] = PR_htonl(
|
||||
+ PR_ntohl(addr.pr_s6_addr32[2]) & (~0L << (96 - mask_len)));
|
||||
+ }
|
||||
+ else if (mask_len > 32) {
|
||||
+ addr.pr_s6_addr32[3] = 0;
|
||||
+ addr.pr_s6_addr32[2] = 0;
|
||||
+ addr.pr_s6_addr32[1] = PR_htonl(
|
||||
+ PR_ntohl(addr.pr_s6_addr32[1]) & (~0L << (64 - mask_len)));
|
||||
+ }
|
||||
+ else {
|
||||
+ addr.pr_s6_addr32[3] = 0;
|
||||
+ addr.pr_s6_addr32[2] = 0;
|
||||
+ addr.pr_s6_addr32[1] = 0;
|
||||
+ addr.pr_s6_addr32[0] = PR_htonl(
|
||||
+ PR_ntohl(addr.pr_s6_addr32[0]) & (~0L << (32 - mask_len)));
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static PRBool ConvertToIPV6Addr(const nsACString& aName,
|
||||
+ PRIPv6Addr* aAddr)
|
||||
+{
|
||||
+ PRNetAddr addr;
|
||||
+ if (PR_StringToNetAddr(PromiseFlatCString(aName).get(), &addr) != PR_SUCCESS)
|
||||
+ return PR_FALSE;
|
||||
+
|
||||
+ PRIPv6Addr ipv6;
|
||||
+ // convert parsed address to IPv6
|
||||
+ if (addr.raw.family == PR_AF_INET) {
|
||||
+ // convert to IPv4-mapped address
|
||||
+ PR_ConvertIPv4AddrToIPv6(addr.inet.ip, &ipv6);
|
||||
+ } else if (addr.raw.family == PR_AF_INET6) {
|
||||
+ // copy the address
|
||||
+ memcpy(&ipv6, &addr.ipv6.ip, sizeof(PRIPv6Addr));
|
||||
+ } else {
|
||||
+ return PR_FALSE;
|
||||
+ }
|
||||
+
|
||||
+ return PR_TRUE;
|
||||
+}
|
||||
+
|
||||
+static PRBool GConfIgnoreHost(const nsACString& aIgnore,
|
||||
+ const nsACString& aHost)
|
||||
+{
|
||||
+ if (aIgnore.Equals(aHost, nsCaseInsensitiveCStringComparator()))
|
||||
+ return PR_TRUE;
|
||||
+
|
||||
+ if (StringBeginsWith(aIgnore, NS_LITERAL_CSTRING("*")) &&
|
||||
+ StringEndsWith(aHost, nsDependentCSubstring(aIgnore, 1),
|
||||
+ nsCaseInsensitiveCStringComparator()))
|
||||
+ return PR_TRUE;
|
||||
+
|
||||
+ PRInt32 mask = 128;
|
||||
+ nsReadingIterator<char> start;
|
||||
+ nsReadingIterator<char> slash;
|
||||
+ nsReadingIterator<char> end;
|
||||
+ aIgnore.BeginReading(start);
|
||||
+ aIgnore.BeginReading(slash);
|
||||
+ aIgnore.EndReading(end);
|
||||
+ if (FindCharInReadable('/', slash, end)) {
|
||||
+ ++slash;
|
||||
+ nsDependentCSubstring maskStr(slash, end);
|
||||
+ nsCAutoString maskStr2(maskStr);
|
||||
+ PRInt32 err;
|
||||
+ mask = maskStr2.ToInteger(&err);
|
||||
+ if (err != 0) {
|
||||
+ mask = 128;
|
||||
+ }
|
||||
+ --slash;
|
||||
+ } else {
|
||||
+ slash = end;
|
||||
+ }
|
||||
+
|
||||
+ PRIPv6Addr ignoreAddr, hostAddr;
|
||||
+ if (!ConvertToIPV6Addr(aIgnore, &ignoreAddr) ||
|
||||
+ !ConvertToIPV6Addr(aHost, &hostAddr))
|
||||
+ return PR_FALSE;
|
||||
+
|
||||
+ proxy_MaskIPv6Addr(ignoreAddr, mask);
|
||||
+ proxy_MaskIPv6Addr(hostAddr, mask);
|
||||
+
|
||||
+ return memcmp(&ignoreAddr, &hostAddr, sizeof(PRIPv6Addr)) == 0;
|
||||
+}
|
||||
+
|
||||
+static nsresult
|
||||
+GetProxyForURIFromGConf(nsIGConfService* aGConf,
|
||||
+ const nsACString& aScheme,
|
||||
+ const nsACString& aHost,
|
||||
+ PRInt32 aPort,
|
||||
+ nsACString& aResult)
|
||||
+{
|
||||
+ if (!IsProxyMode(aGConf, "manual")) {
|
||||
+ aResult.AppendLiteral("DIRECT");
|
||||
+ return NS_OK;
|
||||
+ }
|
||||
+
|
||||
+ nsCOMPtr<nsIArray> ignoreList;
|
||||
+ if (NS_SUCCEEDED(aGConf->GetStringList(NS_LITERAL_CSTRING("/system/http_proxy/ignore_hosts"),
|
||||
+ getter_AddRefs(ignoreList))) && ignoreList) {
|
||||
+ PRUint32 len = 0;
|
||||
+ ignoreList->GetLength(&len);
|
||||
+ for (PRUint32 i = 0; i < len; ++i) {
|
||||
+ nsCOMPtr<nsISupportsCString> str = do_QueryElementAt(ignoreList, i);
|
||||
+ if (str) {
|
||||
+ nsCAutoString s;
|
||||
+ if (NS_SUCCEEDED(str->GetData(s)) && !s.IsEmpty()) {
|
||||
+ if (GConfIgnoreHost(s, aHost)) {
|
||||
+ aResult.AppendLiteral("DIRECT");
|
||||
+ return NS_OK;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ nsresult rv = SetProxyResultFromGConf(aGConf, "/system/proxy/socks_", "SOCKS", aResult);
|
||||
+ if (NS_SUCCEEDED(rv))
|
||||
+ return rv;
|
||||
+
|
||||
+ if (aScheme.LowerCaseEqualsLiteral("http")) {
|
||||
+ rv = SetProxyResultFromGConf(aGConf, "/system/http_proxy/", "PROXY", aResult);
|
||||
+ } else if (aScheme.LowerCaseEqualsLiteral("https")) {
|
||||
+ rv = SetProxyResultFromGConf(aGConf, "/system/proxy/secure_", "PROXY", aResult);
|
||||
+ } else if (aScheme.LowerCaseEqualsLiteral("ftp")) {
|
||||
+ rv = SetProxyResultFromGConf(aGConf, "/system/proxy/ftp_", "PROXY", aResult);
|
||||
+ } else {
|
||||
+ rv = NS_ERROR_FAILURE;
|
||||
+ }
|
||||
+
|
||||
+ if (NS_FAILED(rv)) {
|
||||
+ aResult.AppendLiteral("DIRECT");
|
||||
+ }
|
||||
+ return NS_OK;
|
||||
+}
|
||||
+
|
||||
+nsresult
|
||||
+nsUnixSystemProxySettings::GetProxyForURI(nsIURI* aURI, nsACString& aResult)
|
||||
+{
|
||||
+ nsCAutoString scheme;
|
||||
+ nsresult rv = aURI->GetScheme(scheme);
|
||||
+ if (NS_FAILED(rv))
|
||||
+ return rv;
|
||||
+
|
||||
+ nsCAutoString host;
|
||||
+ rv = aURI->GetHost(host);
|
||||
+ if (NS_FAILED(rv))
|
||||
+ return rv;
|
||||
+
|
||||
+ PRInt32 port;
|
||||
+ rv = aURI->GetPort(&port);
|
||||
+ if (NS_FAILED(rv))
|
||||
+ return rv;
|
||||
+
|
||||
+ if (!mGConf)
|
||||
+ return GetProxyForURIFromEnvironment(scheme, host, port, aResult);
|
||||
+
|
||||
+ return GetProxyForURIFromGConf(mGConf, scheme, host, port, aResult);
|
||||
+}
|
||||
+
|
||||
+#define NS_UNIXSYSTEMPROXYSERVICE_CID /* 0fa3158c-d5a7-43de-9181-a285e74cf1d4 */\
|
||||
+ { 0x0fa3158c, 0xd5a7, 0x43de, \
|
||||
+ {0x91, 0x81, 0xa2, 0x85, 0xe7, 0x4c, 0xf1, 0xd4 } }
|
||||
+
|
||||
+NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsUnixSystemProxySettings, Init)
|
||||
+
|
||||
+static const nsModuleComponentInfo components[] = {
|
||||
+ { "Unix System Proxy Settings Service",
|
||||
+ NS_UNIXSYSTEMPROXYSERVICE_CID,
|
||||
+ NS_SYSTEMPROXYSETTINGS_CONTRACTID,
|
||||
+ nsUnixSystemProxySettingsConstructor }
|
||||
+};
|
||||
+
|
||||
+NS_IMPL_NSGETMODULE(unixproxy, components)
|
||||
Index: Makefile.in
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/Makefile.in,v
|
||||
retrieving revision 1.299.2.18
|
||||
diff -u -p -6 -r1.299.2.18 Makefile.in
|
||||
--- Makefile.in 14 Sep 2006 18:07:02 -0000 1.299.2.18
|
||||
+++ Makefile.in 27 Nov 2006 19:04:14 -0000
|
||||
@@ -282,12 +282,13 @@ tier_50_dirs += directory/xpcom
|
||||
endif
|
||||
|
||||
ifndef MINIMO
|
||||
ifdef MOZ_XUL_APP
|
||||
ifdef MOZ_ENABLE_GTK2
|
||||
tier_50_dirs += toolkit/components/gnome
|
||||
+tier_50_dirs += toolkit/components/unixproxy
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef MOZ_LEAKY
|
||||
tier_50_dirs += tools/leaky
|
||||
--- toolkit/components/unixproxy/Makefile.in.orig 2006-11-27 21:25:50.000000000 +0100
|
||||
+++ toolkit/components/unixproxy/Makefile.in 2006-11-27 21:26:18.000000000 +0100
|
||||
@@ -0,0 +1,67 @@
|
||||
+# ***** BEGIN LICENSE BLOCK *****
|
||||
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
+#
|
||||
+# The contents of this file are subject to the Mozilla Public License Version
|
||||
+# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
+# the License. You may obtain a copy of the License at
|
||||
+# http://www.mozilla.org/MPL/
|
||||
+#
|
||||
+# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
+# for the specific language governing rights and limitations under the
|
||||
+# License.
|
||||
+#
|
||||
+# The Original Code is the Mozilla GNOME integration code.
|
||||
+#
|
||||
+# The Initial Developer of the Original Code is
|
||||
+# IBM Corporation.
|
||||
+# Portions created by the Initial Developer are Copyright (C) 2004
|
||||
+# the Initial Developer. All Rights Reserved.
|
||||
+#
|
||||
+# Contributor(s):
|
||||
+# Brian Ryner <bryner@brianryner.com>
|
||||
+#
|
||||
+# Alternatively, the contents of this file may be used under the terms of
|
||||
+# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
+# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
+# of those above. If you wish to allow use of your version of this file only
|
||||
+# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
+# use your version of this file under the terms of the MPL, indicate your
|
||||
+# decision by deleting the provisions above and replace them with the notice
|
||||
+# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
+# the provisions above, a recipient may use your version of this file under
|
||||
+# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
+#
|
||||
+# ***** END LICENSE BLOCK *****
|
||||
+
|
||||
+DEPTH = ../../..
|
||||
+topsrcdir = @top_srcdir@
|
||||
+srcdir = @srcdir@
|
||||
+VPATH = @srcdir@
|
||||
+
|
||||
+include $(DEPTH)/config/autoconf.mk
|
||||
+
|
||||
+MODULE = unixproxy
|
||||
+MOZILLA_INTERNAL_API = 1
|
||||
+
|
||||
+REQUIRES = \
|
||||
+ xpcom \
|
||||
+ string \
|
||||
+ necko \
|
||||
+ mozgnome \
|
||||
+ $(NULL)
|
||||
+
|
||||
+CPPSRCS = \
|
||||
+ nsUnixSystemProxySettings.cpp \
|
||||
+ $(NULL)
|
||||
+
|
||||
+LIBRARY_NAME = unixproxy
|
||||
+IS_COMPONENT = 1
|
||||
+FORCE_SHARED_LIB = 1
|
||||
+
|
||||
+EXTRA_DSO_LDOPTS += \
|
||||
+ $(MOZ_COMPONENT_LIBS) \
|
||||
+ $(NULL)
|
||||
+
|
||||
+include $(topsrcdir)/config/rules.mk
|
13
tab-close.patch
Normal file
13
tab-close.patch
Normal file
@ -0,0 +1,13 @@
|
||||
Index: browser/themes/winstripe/browser/browser.css
|
||||
================================================================================
|
||||
--- browser/themes/winstripe/browser/browser.css
|
||||
+++ browser/themes/winstripe/browser/browser.css
|
||||
@@ -1172,7 +1172,7 @@
|
||||
list-style-image: url("chrome://global/skin/icons/close.png");
|
||||
-moz-appearance: none;
|
||||
-moz-image-region: rect(0px, 16px, 16px, 0px);
|
||||
- padding: 4px 2px;
|
||||
+ padding: 0px 0px;
|
||||
border: none !important;
|
||||
}
|
||||
|
3
tango-theme.tar.bz2
Normal file
3
tango-theme.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:36f5e5df7f49358c4fe9c5f69ff77d1a1efdf06d3f364e8e39c00ce771b3a2a9
|
||||
size 674974
|
31
visibility.patch
Normal file
31
visibility.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From: Wolfgang Rosenauer <stark@suse.de>
|
||||
Subject: disable visibility feature
|
||||
References:
|
||||
https://bugzilla.novell.com/show_bug.cgi?id=83908
|
||||
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20297
|
||||
|
||||
because of a gcc bug it's not possible to build with that
|
||||
feature at the moment
|
||||
|
||||
Index: configure
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/configure,v
|
||||
retrieving revision 1.1443
|
||||
diff -u -p -6 -r1.1443 configure
|
||||
--- configure 2 Jun 2005 04:00:20 -0000 1.1443
|
||||
+++ configure 6 Jun 2005 07:34:06 -0000
|
||||
@@ -7303,13 +7303,13 @@ else
|
||||
int foo_default = 1;
|
||||
EOF
|
||||
ac_cv_visibility_pragma=no
|
||||
if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
|
||||
if grep '\.hidden.*foo_hidden' conftest.s >/dev/null; then
|
||||
if ! grep '\.hidden.*foo_default' conftest.s > /dev/null; then
|
||||
- ac_cv_visibility_pragma=yes
|
||||
+ ac_cv_visibility_pragma=no
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
rm -f conftest.cs
|
||||
|
||||
fi
|
Loading…
Reference in New Issue
Block a user