131 rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles, ArrayLength(specialFiles)); |
131 rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles, ArrayLength(specialFiles)); |
132 if (NS_FAILED(rv)) |
132 if (NS_FAILED(rv)) |
133 NS_WARNING("Error parsing application default preferences."); |
133 NS_WARNING("Error parsing application default preferences."); |
134 |
134 |
135 // Load jar:$app/omni.jar!/defaults/preferences/*.js |
135 // Load jar:$app/omni.jar!/defaults/preferences/*.js |
136 nsZipArchive *appJarReader = mozilla::Omnijar::GetReader(mozilla::Omnijar::APP); |
136 nsRefPtr<nsZipArchive> appJarReader = mozilla::Omnijar::GetReader(mozilla::Omnijar::APP); |
137 if (appJarReader) { |
137 if (appJarReader) { |
138 rv = appJarReader->FindInit("defaults/preferences/*.js$", &findPtr); |
138 rv = appJarReader->FindInit("defaults/preferences/*.js$", &findPtr); |
139 diff --git a/toolkit/components/downloads/Makefile.in b/toolkit/components/downloads/Makefile.in |
139 diff --git a/toolkit/components/downloads/Makefile.in b/toolkit/components/downloads/Makefile.in |
140 --- a/toolkit/components/downloads/Makefile.in |
140 --- a/toolkit/components/downloads/Makefile.in |
141 +++ b/toolkit/components/downloads/Makefile.in |
141 +++ b/toolkit/components/downloads/Makefile.in |
2090 +# PrefWindow I (June 4, 1999) |
2090 +# PrefWindow I (June 4, 1999) |
2091 +# |
2091 +# |
2092 diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
2092 diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
2093 --- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
2093 --- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
2094 +++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
2094 +++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
2095 @@ -44,32 +44,35 @@ |
2095 @@ -45,16 +45,18 @@ |
2096 #include "nsIURI.h" |
|
2097 #include "nsReadableUtils.h" |
2096 #include "nsReadableUtils.h" |
2098 #include "nsArrayUtils.h" |
2097 #include "nsArrayUtils.h" |
2099 #include "prnetdb.h" |
2098 #include "prnetdb.h" |
2100 #include "prenv.h" |
2099 #include "prenv.h" |
2101 #include "nsPrintfCString.h" |
2100 #include "nsPrintfCString.h" |
2102 #include "nsNetUtil.h" |
2101 #include "nsNetUtil.h" |
2103 #include "nsISupportsPrimitives.h" |
2102 #include "nsISupportsPrimitives.h" |
|
2103 #include "nsIGSettingsService.h" |
2104 +#include "nsVoidArray.h" |
2104 +#include "nsVoidArray.h" |
2105 +#include "nsKDEUtils.h" |
2105 +#include "nsKDEUtils.h" |
2106 |
2106 |
2107 class nsUnixSystemProxySettings : public nsISystemProxySettings { |
2107 class nsUnixSystemProxySettings : public nsISystemProxySettings { |
2108 public: |
2108 public: |
2109 NS_DECL_ISUPPORTS |
2109 NS_DECL_ISUPPORTS |
2110 NS_DECL_NSISYSTEMPROXYSETTINGS |
2110 NS_DECL_NSISYSTEMPROXYSETTINGS |
2111 |
2111 |
2112 nsUnixSystemProxySettings() {} |
2112 nsUnixSystemProxySettings() {} |
2113 nsresult Init(); |
2113 nsresult Init(); |
2114 |
2114 @@ -64,16 +66,17 @@ private: |
2115 private: |
|
2116 ~nsUnixSystemProxySettings() {} |
|
2117 |
2115 |
2118 nsCOMPtr<nsIGConfService> mGConf; |
2116 nsCOMPtr<nsIGConfService> mGConf; |
|
2117 nsCOMPtr<nsIGSettingsService> mGSettings; |
2119 bool IsProxyMode(const char* aMode); |
2118 bool IsProxyMode(const char* aMode); |
2120 nsresult SetProxyResultFromGConf(const char* aKeyBase, const char* aType, nsACString& aResult); |
2119 nsresult SetProxyResultFromGConf(const char* aKeyBase, const char* aType, nsACString& aResult); |
2121 nsresult GetProxyFromGConf(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult); |
2120 nsresult GetProxyFromGConf(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult); |
|
2121 nsresult GetProxyFromGSettings(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult); |
|
2122 nsresult SetProxyResultFromGSettings(const char* aKeyBase, const char* aType, nsACString& aResult); |
2122 + nsresult GetProxyFromKDE(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult); |
2123 + nsresult GetProxyFromKDE(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult); |
2123 }; |
2124 }; |
2124 |
2125 |
2125 NS_IMPL_ISUPPORTS1(nsUnixSystemProxySettings, nsISystemProxySettings) |
2126 NS_IMPL_ISUPPORTS1(nsUnixSystemProxySettings, nsISystemProxySettings) |
2126 |
2127 |
2127 nsresult |
2128 nsresult |
2128 nsUnixSystemProxySettings::Init() |
2129 nsUnixSystemProxySettings::Init() |
2129 { |
2130 { |
2130 mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID); |
2131 // If this is a GNOME session, load gconf and try to use its preferences. |
2131 @@ -408,16 +411,19 @@ nsUnixSystemProxySettings::GetProxyForUR |
2132 @@ -526,16 +529,19 @@ nsUnixSystemProxySettings::GetProxyForUR |
2132 nsCAutoString host; |
2133 nsCAutoString host; |
2133 rv = aURI->GetHost(host); |
2134 rv = aURI->GetHost(host); |
2134 NS_ENSURE_SUCCESS(rv, rv); |
2135 NS_ENSURE_SUCCESS(rv, rv); |
2135 |
2136 |
2136 PRInt32 port; |
2137 PRInt32 port; |
2137 rv = aURI->GetPort(&port); |
2138 rv = aURI->GetPort(&port); |
2138 NS_ENSURE_SUCCESS(rv, rv); |
2139 NS_ENSURE_SUCCESS(rv, rv); |
2139 |
2140 |
2140 + if( nsKDEUtils::kdeSupport()) |
2141 + if( nsKDEUtils::kdeSupport()) |
2141 + return GetProxyFromKDE( scheme, host, port, aResult ); |
2142 + return GetProxyFromKDE(scheme, host, port, aResult); |
2142 + |
2143 + |
2143 if (!mGConf) |
2144 if (mGSettings) { |
2144 return GetProxyFromEnvironment(scheme, host, port, aResult); |
2145 rv = GetProxyFromGSettings(scheme, host, port, aResult); |
2145 |
2146 if (rv == NS_OK) |
2146 return GetProxyFromGConf(scheme, host, port, aResult); |
2147 return rv; |
2147 } |
2148 } |
2148 |
2149 if (mGConf) |
2149 #define NS_UNIXSYSTEMPROXYSERVICE_CID /* 0fa3158c-d5a7-43de-9181-a285e74cf1d4 */\ |
2150 return GetProxyFromGConf(scheme, host, port, aResult); |
2150 { 0x0fa3158c, 0xd5a7, 0x43de, \ |
2151 |
2151 @@ -438,8 +444,34 @@ static const mozilla::Module::ContractID |
2152 @@ -561,8 +567,34 @@ static const mozilla::Module::ContractID |
2152 |
2153 |
2153 static const mozilla::Module kUnixProxyModule = { |
2154 static const mozilla::Module kUnixProxyModule = { |
2154 mozilla::Module::kVersion, |
2155 mozilla::Module::kVersion, |
2155 kUnixProxyCIDs, |
2156 kUnixProxyCIDs, |
2156 kUnixProxyContracts |
2157 kUnixProxyContracts |
2184 +} |
2185 +} |
2185 + |
2186 + |
2186 diff --git a/toolkit/xre/Makefile.in b/toolkit/xre/Makefile.in |
2187 diff --git a/toolkit/xre/Makefile.in b/toolkit/xre/Makefile.in |
2187 --- a/toolkit/xre/Makefile.in |
2188 --- a/toolkit/xre/Makefile.in |
2188 +++ b/toolkit/xre/Makefile.in |
2189 +++ b/toolkit/xre/Makefile.in |
2189 @@ -95,17 +95,18 @@ else |
2190 @@ -96,17 +96,18 @@ else |
2190 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa) |
2191 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa) |
2191 CMMSRCS = nsNativeAppSupportCocoa.mm |
2192 CMMSRCS = nsNativeAppSupportCocoa.mm |
2192 EXPORTS = MacQuirks.h |
2193 EXPORTS += MacQuirks.h |
2193 else |
2194 else |
2194 ifeq ($(MOZ_WIDGET_TOOLKIT),os2) |
2195 ifeq ($(MOZ_WIDGET_TOOLKIT),os2) |
2195 CPPSRCS += nsNativeAppSupportOS2.cpp |
2196 CPPSRCS += nsNativeAppSupportOS2.cpp |
2196 else |
2197 else |
2197 ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2) |
2198 ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2) |
2670 + |
2671 + |
2671 +#endif // nsKDEUtils |
2672 +#endif // nsKDEUtils |
2672 diff --git a/uriloader/exthandler/Makefile.in b/uriloader/exthandler/Makefile.in |
2673 diff --git a/uriloader/exthandler/Makefile.in b/uriloader/exthandler/Makefile.in |
2673 --- a/uriloader/exthandler/Makefile.in |
2674 --- a/uriloader/exthandler/Makefile.in |
2674 +++ b/uriloader/exthandler/Makefile.in |
2675 +++ b/uriloader/exthandler/Makefile.in |
2675 @@ -88,18 +88,19 @@ LOCAL_INCLUDES = -I$(srcdir) |
2676 @@ -92,18 +92,19 @@ LOCAL_INCLUDES = -I$(srcdir) |
2676 LOCAL_INCLUDES += -I$(topsrcdir)/dom/base \ |
2677 LOCAL_INCLUDES += -I$(topsrcdir)/dom/base \ |
2677 -I$(topsrcdir)/dom/ipc \ |
2678 -I$(topsrcdir)/dom/ipc \ |
2678 -I$(topsrcdir)/content/base/src \ |
2679 -I$(topsrcdir)/content/base/src \ |
2679 -I$(topsrcdir)/content/events/src \ |
2680 -I$(topsrcdir)/content/events/src \ |
2680 -I$(topsrcdir)/netwerk/base/src \ |
2681 -I$(topsrcdir)/netwerk/base/src \ |
3322 CopyUTF16toUTF8(aFilter, filter); |
3323 CopyUTF16toUTF8(aFilter, filter); |
3323 CopyUTF16toUTF8(aTitle, name); |
3324 CopyUTF16toUTF8(aTitle, name); |
3324 |
3325 |
3325 mFilters.AppendElement(filter); |
3326 mFilters.AppendElement(filter); |
3326 mFilterNames.AppendElement(name); |
3327 mFilterNames.AppendElement(name); |
3327 @@ -433,16 +437,19 @@ confirm_overwrite_file(GtkWidget *parent |
3328 @@ -390,16 +394,19 @@ nsFilePicker::GetFiles(nsISimpleEnumerat |
3328 gtk_widget_destroy(dialog); |
3329 return NS_ERROR_FAILURE; |
3329 |
|
3330 return result; |
|
3331 } |
3330 } |
3332 |
3331 |
3333 NS_IMETHODIMP |
3332 NS_IMETHODIMP |
3334 nsFilePicker::Show(PRInt16 *aReturn) |
3333 nsFilePicker::Show(PRInt16 *aReturn) |
3335 { |
3334 { |
|
3335 NS_ENSURE_ARG_POINTER(aReturn); |
|
3336 |
3336 + if( nsKDEUtils::kdeSupport()) |
3337 + if( nsKDEUtils::kdeSupport()) |
3337 + return kdeFileDialog( aReturn ); |
3338 + return kdeFileDialog(aReturn); |
3338 + |
3339 + |
3339 NS_ENSURE_ARG_POINTER(aReturn); |
|
3340 |
|
3341 nsXPIDLCString title; |
3340 nsXPIDLCString title; |
3342 title.Adopt(ToNewUTF8String(mTitle)); |
3341 title.Adopt(ToNewUTF8String(mTitle)); |
3343 |
3342 |
3344 GtkWindow *parent_widget = get_gtk_window_for_nsiwidget(mParentWidget); |
3343 GtkWindow *parent_widget = get_gtk_window_for_nsiwidget(mParentWidget); |
3345 |
3344 |
3346 GtkFileChooserAction action = GetGtkFileChooserAction(mMode); |
3345 GtkFileChooserAction action = GetGtkFileChooserAction(mMode); |
3347 @@ -583,8 +590,234 @@ nsFilePicker::Show(PRInt16 *aReturn) |
3346 const gchar *accept_button = (action == GTK_FILE_CHOOSER_ACTION_SAVE) |
|
3347 ? GTK_STOCK_SAVE : GTK_STOCK_OPEN; |
|
3348 @@ -538,8 +545,234 @@ nsFilePicker::Show(PRInt16 *aReturn) |
3348 *aReturn = nsIFilePicker::returnCancel; |
3349 *aReturn = nsIFilePicker::returnCancel; |
3349 break; |
3350 break; |
3350 } |
3351 } |
3351 |
3352 |
3352 gtk_widget_destroy(file_chooser); |
3353 gtk_widget_destroy(file_chooser); |
3634 struct ManifestDirective |
3635 struct ManifestDirective |
3635 { |
3636 { |
3636 const char* directive; |
3637 const char* directive; |
3637 int argc; |
3638 int argc; |
3638 |
3639 |
3639 @@ -434,16 +435,17 @@ ParseManifestCommon(NSLocationType aType |
3640 @@ -429,16 +430,17 @@ ParseManifest(NSLocationType type, FileL |
3640 NS_NAMED_LITERAL_STRING(kPlatform, "platform"); |
3641 NS_NAMED_LITERAL_STRING(kPlatform, "platform"); |
3641 NS_NAMED_LITERAL_STRING(kContentAccessible, "contentaccessible"); |
3642 NS_NAMED_LITERAL_STRING(kContentAccessible, "contentaccessible"); |
3642 NS_NAMED_LITERAL_STRING(kApplication, "application"); |
3643 NS_NAMED_LITERAL_STRING(kApplication, "application"); |
3643 NS_NAMED_LITERAL_STRING(kAppVersion, "appversion"); |
3644 NS_NAMED_LITERAL_STRING(kAppVersion, "appversion"); |
3644 NS_NAMED_LITERAL_STRING(kGeckoVersion, "platformversion"); |
3645 NS_NAMED_LITERAL_STRING(kGeckoVersion, "platformversion"); |
3645 NS_NAMED_LITERAL_STRING(kOs, "os"); |
3646 NS_NAMED_LITERAL_STRING(kOs, "os"); |
3646 NS_NAMED_LITERAL_STRING(kOsVersion, "osversion"); |
3647 NS_NAMED_LITERAL_STRING(kOsVersion, "osversion"); |
3647 NS_NAMED_LITERAL_STRING(kABI, "abi"); |
3648 NS_NAMED_LITERAL_STRING(kABI, "abi"); |
3648 + NS_NAMED_LITERAL_STRING(kDesktop, "desktop"); |
3649 + NS_NAMED_LITERAL_STRING(kDesktop, "desktop"); |
3649 #if defined(ANDROID) |
3650 #if defined(MOZ_WIDGET_ANDROID) |
3650 NS_NAMED_LITERAL_STRING(kTablet, "tablet"); |
3651 NS_NAMED_LITERAL_STRING(kTablet, "tablet"); |
3651 #endif |
3652 #endif |
3652 |
3653 |
3653 // Obsolete |
3654 // Obsolete |
3654 NS_NAMED_LITERAL_STRING(kXPCNativeWrappers, "xpcnativewrappers"); |
3655 NS_NAMED_LITERAL_STRING(kXPCNativeWrappers, "xpcnativewrappers"); |
3655 |
3656 |
3656 nsAutoString appID; |
3657 nsAutoString appID; |
3657 @@ -481,41 +483,46 @@ ParseManifestCommon(NSLocationType aType |
3658 @@ -476,41 +478,46 @@ ParseManifest(NSLocationType type, FileL |
3658 CopyUTF8toUTF16(s, abi); |
3659 CopyUTF8toUTF16(s, abi); |
3659 abi.Insert(PRUnichar('_'), 0); |
3660 abi.Insert(PRUnichar('_'), 0); |
3660 abi.Insert(osTarget, 0); |
3661 abi.Insert(osTarget, 0); |
3661 } |
3662 } |
3662 } |
3663 } |
3699 // at the end. |
3700 // at the end. |
3700 nsTArray<CachedDirective> contracts; |
3701 nsTArray<CachedDirective> contracts; |
3701 |
3702 |
3702 char *token; |
3703 char *token; |
3703 char *newline = buf; |
3704 char *newline = buf; |
3704 @@ -597,24 +604,26 @@ ParseManifestCommon(NSLocationType aType |
3705 @@ -592,24 +599,26 @@ ParseManifest(NSLocationType type, FileL |
3705 TriState stOsVersion = eUnspecified; |
3706 TriState stOsVersion = eUnspecified; |
3706 TriState stOs = eUnspecified; |
3707 TriState stOs = eUnspecified; |
3707 TriState stABI = eUnspecified; |
3708 TriState stABI = eUnspecified; |
3708 #if defined(ANDROID) |
3709 #if defined(MOZ_WIDGET_ANDROID) |
3709 TriState stTablet = eUnspecified; |
3710 TriState stTablet = eUnspecified; |
3710 #endif |
3711 #endif |
3711 bool platform = false; |
3712 bool platform = false; |
3712 bool contentAccessible = false; |
3713 bool contentAccessible = false; |
3713 + TriState stDesktop = eUnspecified; |
3714 + TriState stDesktop = eUnspecified; |
3723 CheckVersionFlag(kOsVersion, wtoken, osVersion, stOsVersion) || |
3724 CheckVersionFlag(kOsVersion, wtoken, osVersion, stOsVersion) || |
3724 CheckVersionFlag(kAppVersion, wtoken, appVersion, stAppVersion) || |
3725 CheckVersionFlag(kAppVersion, wtoken, appVersion, stAppVersion) || |
3725 CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion, stGeckoVersion)) |
3726 CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion, stGeckoVersion)) |
3726 continue; |
3727 continue; |
3727 |
3728 |
3728 #if defined(ANDROID) |
3729 #if defined(MOZ_WIDGET_ANDROID) |
3729 bool tablet = false; |
3730 bool tablet = false; |
3730 if (CheckFlag(kTablet, wtoken, tablet)) { |
3731 if (CheckFlag(kTablet, wtoken, tablet)) { |
3731 @@ -643,16 +652,17 @@ ParseManifestCommon(NSLocationType aType |
3732 @@ -638,16 +647,17 @@ ParseManifest(NSLocationType type, FileL |
3732 } |
3733 } |
3733 |
3734 |
3734 if (!ok || |
3735 if (!ok || |
3735 stApp == eBad || |
3736 stApp == eBad || |
3736 stAppVersion == eBad || |
3737 stAppVersion == eBad || |
3737 stGeckoVersion == eBad || |
3738 stGeckoVersion == eBad || |
3738 stOs == eBad || |
3739 stOs == eBad || |
3739 stOsVersion == eBad || |
3740 stOsVersion == eBad || |
3740 + stDesktop == eBad || |
3741 + stDesktop == eBad || |
3741 #ifdef ANDROID |
3742 #ifdef MOZ_WIDGET_ANDROID |
3742 stTablet == eBad || |
3743 stTablet == eBad || |
3743 #endif |
3744 #endif |
3744 stABI == eBad) |
3745 stABI == eBad) |
3745 continue; |
3746 continue; |
3746 |
3747 |
3747 if (directive->regfunc) { |
3748 if (directive->regfunc) { |
3748 if (GeckoProcessType_Default != XRE_GetProcessType()) |
3749 if (GeckoProcessType_Default != XRE_GetProcessType()) |
3749 diff --git a/xpcom/io/Makefile.in b/xpcom/io/Makefile.in |
3750 diff --git a/xpcom/io/Makefile.in b/xpcom/io/Makefile.in |
3750 --- a/xpcom/io/Makefile.in |
3751 --- a/xpcom/io/Makefile.in |
3751 +++ b/xpcom/io/Makefile.in |
3752 +++ b/xpcom/io/Makefile.in |
3752 @@ -190,17 +190,17 @@ include $(topsrcdir)/ipc/chromium/chromi |
3753 @@ -188,17 +188,17 @@ include $(topsrcdir)/ipc/chromium/chromi |
3753 DEFINES += -D_IMPL_NS_COM |
3754 DEFINES += -D_IMPL_NS_COM |
3754 |
3755 |
3755 ifeq ($(OS_ARCH),Linux) |
3756 ifeq ($(OS_ARCH),Linux) |
3756 ifneq (,$(findstring lib64,$(libdir))) |
3757 ifneq (,$(findstring lib64,$(libdir))) |
3757 DEFINES += -DHAVE_USR_LIB64_DIR |
3758 DEFINES += -DHAVE_USR_LIB64_DIR |