--- a/mozilla-kde.patch Tue Feb 21 20:51:21 2012 +0100
+++ b/mozilla-kde.patch Tue Feb 21 21:10:03 2012 +0100
@@ -133,7 +133,7 @@
NS_WARNING("Error parsing application default preferences.");
// Load jar:$app/omni.jar!/defaults/preferences/*.js
- nsZipArchive *appJarReader = mozilla::Omnijar::GetReader(mozilla::Omnijar::APP);
+ nsRefPtr<nsZipArchive> appJarReader = mozilla::Omnijar::GetReader(mozilla::Omnijar::APP);
if (appJarReader) {
rv = appJarReader->FindInit("defaults/preferences/*.js$", &findPtr);
diff --git a/toolkit/components/downloads/Makefile.in b/toolkit/components/downloads/Makefile.in
@@ -170,7 +170,7 @@
#include <CoreFoundation/CoreFoundation.h>
#endif
- #ifdef ANDROID
+ #ifdef MOZ_WIDGET_ANDROID
#include "AndroidBridge.h"
#endif
@@ -215,7 +215,7 @@
}
+ }
- #if defined(XP_WIN) || defined(XP_MACOSX) || defined(ANDROID)
+ #if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_ANDROID)
nsCOMPtr<nsIFileURL> fileURL = do_QueryInterface(mTarget);
nsCOMPtr<nsIFile> file;
nsAutoString path;
@@ -2092,8 +2092,7 @@
diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
--- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
+++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
-@@ -44,32 +44,35 @@
- #include "nsIURI.h"
+@@ -45,16 +45,18 @@
#include "nsReadableUtils.h"
#include "nsArrayUtils.h"
#include "prnetdb.h"
@@ -2101,6 +2100,7 @@
#include "nsPrintfCString.h"
#include "nsNetUtil.h"
#include "nsISupportsPrimitives.h"
+ #include "nsIGSettingsService.h"
+#include "nsVoidArray.h"
+#include "nsKDEUtils.h"
@@ -2111,14 +2111,15 @@
nsUnixSystemProxySettings() {}
nsresult Init();
-
- private:
- ~nsUnixSystemProxySettings() {}
+@@ -64,16 +66,17 @@ private:
nsCOMPtr<nsIGConfService> mGConf;
+ nsCOMPtr<nsIGSettingsService> mGSettings;
bool IsProxyMode(const char* aMode);
nsresult SetProxyResultFromGConf(const char* aKeyBase, const char* aType, nsACString& aResult);
nsresult GetProxyFromGConf(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult);
+ nsresult GetProxyFromGSettings(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult);
+ nsresult SetProxyResultFromGSettings(const char* aKeyBase, const char* aType, nsACString& aResult);
+ nsresult GetProxyFromKDE(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult);
};
@@ -2127,8 +2128,8 @@
nsresult
nsUnixSystemProxySettings::Init()
{
- mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
-@@ -408,16 +411,19 @@ nsUnixSystemProxySettings::GetProxyForUR
+ // If this is a GNOME session, load gconf and try to use its preferences.
+@@ -526,16 +529,19 @@ nsUnixSystemProxySettings::GetProxyForUR
nsCAutoString host;
rv = aURI->GetHost(host);
NS_ENSURE_SUCCESS(rv, rv);
@@ -2138,17 +2139,17 @@
NS_ENSURE_SUCCESS(rv, rv);
+ if( nsKDEUtils::kdeSupport())
-+ return GetProxyFromKDE( scheme, host, port, aResult );
++ return GetProxyFromKDE(scheme, host, port, aResult);
+
- if (!mGConf)
- return GetProxyFromEnvironment(scheme, host, port, aResult);
+ if (mGSettings) {
+ rv = GetProxyFromGSettings(scheme, host, port, aResult);
+ if (rv == NS_OK)
+ return rv;
+ }
+ if (mGConf)
+ return GetProxyFromGConf(scheme, host, port, aResult);
- return GetProxyFromGConf(scheme, host, port, aResult);
- }
-
- #define NS_UNIXSYSTEMPROXYSERVICE_CID /* 0fa3158c-d5a7-43de-9181-a285e74cf1d4 */\
- { 0x0fa3158c, 0xd5a7, 0x43de, \
-@@ -438,8 +444,34 @@ static const mozilla::Module::ContractID
+@@ -561,8 +567,34 @@ static const mozilla::Module::ContractID
static const mozilla::Module kUnixProxyModule = {
mozilla::Module::kVersion,
@@ -2186,10 +2187,10 @@
diff --git a/toolkit/xre/Makefile.in b/toolkit/xre/Makefile.in
--- a/toolkit/xre/Makefile.in
+++ b/toolkit/xre/Makefile.in
-@@ -95,17 +95,18 @@ else
+@@ -96,17 +96,18 @@ else
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
CMMSRCS = nsNativeAppSupportCocoa.mm
- EXPORTS = MacQuirks.h
+ EXPORTS += MacQuirks.h
else
ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
CPPSRCS += nsNativeAppSupportOS2.cpp
@@ -2672,7 +2673,7 @@
diff --git a/uriloader/exthandler/Makefile.in b/uriloader/exthandler/Makefile.in
--- a/uriloader/exthandler/Makefile.in
+++ b/uriloader/exthandler/Makefile.in
-@@ -88,18 +88,19 @@ LOCAL_INCLUDES = -I$(srcdir)
+@@ -92,18 +92,19 @@ LOCAL_INCLUDES = -I$(srcdir)
LOCAL_INCLUDES += -I$(topsrcdir)/dom/base \
-I$(topsrcdir)/dom/ipc \
-I$(topsrcdir)/content/base/src \
@@ -3324,27 +3325,27 @@
mFilters.AppendElement(filter);
mFilterNames.AppendElement(name);
-@@ -433,16 +437,19 @@ confirm_overwrite_file(GtkWidget *parent
- gtk_widget_destroy(dialog);
-
- return result;
+@@ -390,16 +394,19 @@ nsFilePicker::GetFiles(nsISimpleEnumerat
+ return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsFilePicker::Show(PRInt16 *aReturn)
{
-+ if( nsKDEUtils::kdeSupport())
-+ return kdeFileDialog( aReturn );
-+
NS_ENSURE_ARG_POINTER(aReturn);
++ if( nsKDEUtils::kdeSupport())
++ return kdeFileDialog(aReturn);
++
nsXPIDLCString title;
title.Adopt(ToNewUTF8String(mTitle));
GtkWindow *parent_widget = get_gtk_window_for_nsiwidget(mParentWidget);
GtkFileChooserAction action = GetGtkFileChooserAction(mMode);
-@@ -583,8 +590,234 @@ nsFilePicker::Show(PRInt16 *aReturn)
+ const gchar *accept_button = (action == GTK_FILE_CHOOSER_ACTION_SAVE)
+ ? GTK_STOCK_SAVE : GTK_STOCK_OPEN;
+@@ -538,8 +545,234 @@ nsFilePicker::Show(PRInt16 *aReturn)
*aReturn = nsIFilePicker::returnCancel;
break;
}
@@ -3603,10 +3604,10 @@
diff --git a/xpcom/components/Makefile.in b/xpcom/components/Makefile.in
--- a/xpcom/components/Makefile.in
+++ b/xpcom/components/Makefile.in
-@@ -94,10 +94,11 @@ FORCE_STATIC_LIB = 1
+@@ -92,10 +92,11 @@ LOCAL_INCLUDES = \
+ # we don't want the shared lib, but we want to force the creation of a static lib.
+ FORCE_STATIC_LIB = 1
- # Force use of PIC
- FORCE_USE_PIC = 1
include $(topsrcdir)/config/rules.mk
DEFINES += -D_IMPL_NS_COM
@@ -3636,7 +3637,7 @@
const char* directive;
int argc;
-@@ -434,16 +435,17 @@ ParseManifestCommon(NSLocationType aType
+@@ -429,16 +430,17 @@ ParseManifest(NSLocationType type, FileL
NS_NAMED_LITERAL_STRING(kPlatform, "platform");
NS_NAMED_LITERAL_STRING(kContentAccessible, "contentaccessible");
NS_NAMED_LITERAL_STRING(kApplication, "application");
@@ -3646,7 +3647,7 @@
NS_NAMED_LITERAL_STRING(kOsVersion, "osversion");
NS_NAMED_LITERAL_STRING(kABI, "abi");
+ NS_NAMED_LITERAL_STRING(kDesktop, "desktop");
- #if defined(ANDROID)
+ #if defined(MOZ_WIDGET_ANDROID)
NS_NAMED_LITERAL_STRING(kTablet, "tablet");
#endif
@@ -3654,7 +3655,7 @@
NS_NAMED_LITERAL_STRING(kXPCNativeWrappers, "xpcnativewrappers");
nsAutoString appID;
-@@ -481,41 +483,46 @@ ParseManifestCommon(NSLocationType aType
+@@ -476,41 +478,46 @@ ParseManifest(NSLocationType type, FileL
CopyUTF8toUTF16(s, abi);
abi.Insert(PRUnichar('_'), 0);
abi.Insert(osTarget, 0);
@@ -3686,7 +3687,7 @@
gtk_major_version,
gtk_minor_version);
+ desktop = nsKDEUtils::kdeSession() ? NS_LITERAL_STRING("kde") : NS_LITERAL_STRING("gnome");
- #elif defined(ANDROID)
+ #elif defined(MOZ_WIDGET_ANDROID)
bool isTablet = false;
if (mozilla::AndroidBridge::Bridge()) {
mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build$VERSION", "RELEASE", osVersion);
@@ -3701,11 +3702,11 @@
char *token;
char *newline = buf;
-@@ -597,24 +604,26 @@ ParseManifestCommon(NSLocationType aType
+@@ -592,24 +599,26 @@ ParseManifest(NSLocationType type, FileL
TriState stOsVersion = eUnspecified;
TriState stOs = eUnspecified;
TriState stABI = eUnspecified;
- #if defined(ANDROID)
+ #if defined(MOZ_WIDGET_ANDROID)
TriState stTablet = eUnspecified;
#endif
bool platform = false;
@@ -3725,10 +3726,10 @@
CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion, stGeckoVersion))
continue;
- #if defined(ANDROID)
+ #if defined(MOZ_WIDGET_ANDROID)
bool tablet = false;
if (CheckFlag(kTablet, wtoken, tablet)) {
-@@ -643,16 +652,17 @@ ParseManifestCommon(NSLocationType aType
+@@ -638,16 +647,17 @@ ParseManifest(NSLocationType type, FileL
}
if (!ok ||
@@ -3738,7 +3739,7 @@
stOs == eBad ||
stOsVersion == eBad ||
+ stDesktop == eBad ||
- #ifdef ANDROID
+ #ifdef MOZ_WIDGET_ANDROID
stTablet == eBad ||
#endif
stABI == eBad)
@@ -3749,7 +3750,7 @@
diff --git a/xpcom/io/Makefile.in b/xpcom/io/Makefile.in
--- a/xpcom/io/Makefile.in
+++ b/xpcom/io/Makefile.in
-@@ -190,17 +190,17 @@ include $(topsrcdir)/ipc/chromium/chromi
+@@ -188,17 +188,17 @@ include $(topsrcdir)/ipc/chromium/chromi
DEFINES += -D_IMPL_NS_COM
ifeq ($(OS_ARCH),Linux)