diff -r 7b356805729c -r 4c86470ed796 mozilla-kde.patch --- a/mozilla-kde.patch Wed Aug 11 12:17:17 2010 +0200 +++ b/mozilla-kde.patch Thu Aug 12 08:55:47 2010 +0200 @@ -1,405 +1,7 @@ -diff --git a/chrome/src/Makefile.in b/chrome/src/Makefile.in ---- a/chrome/src/Makefile.in -+++ b/chrome/src/Makefile.in -@@ -81,16 +81,17 @@ CPPSRCS = \ - - EXTRA_DSO_LDOPTS = \ - $(MOZ_UNICHARUTIL_LIBS) \ - $(MOZ_COMPONENT_LIBS) \ - $(NULL) - - ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT))) - EXTRA_DSO_LDOPTS += $(MOZ_GTK2_LIBS) -+LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre - endif - - ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT))) - EXTRA_DSO_LDOPTS += $(TK_LIBS) - endif - - include $(topsrcdir)/config/rules.mk - -diff --git a/chrome/src/nsChromeRegistry.cpp b/chrome/src/nsChromeRegistry.cpp ---- a/chrome/src/nsChromeRegistry.cpp -+++ b/chrome/src/nsChromeRegistry.cpp -@@ -109,16 +109,17 @@ - #include "nsIStyleSheet.h" - #include "nsISupportsArray.h" - #include "nsIVersionComparator.h" - #include "nsIWindowMediator.h" - #include "nsIXPConnect.h" - #include "nsIXULAppInfo.h" - #include "nsIXULRuntime.h" - #include "nsPresShellIterator.h" -+#include "nsKDEUtils.h" - - #define UILOCALE_CMD_LINE_ARG "UILocale" - - #define MATCH_OS_LOCALE_PREF "intl.locale.matchOS" - #define SELECTED_LOCALE_PREF "general.useragent.locale" - #define SELECTED_SKIN_PREF "general.skins.selectedSkin" - - static NS_DEFINE_CID(kCSSLoaderCID, NS_CSS_LOADER_CID); -@@ -1608,16 +1609,17 @@ nsChromeRegistry::ProcessManifestBuffer( - - NS_NAMED_LITERAL_STRING(kPlatform, "platform"); - NS_NAMED_LITERAL_STRING(kXPCNativeWrappers, "xpcnativewrappers"); - NS_NAMED_LITERAL_STRING(kContentAccessible, "contentaccessible"); - NS_NAMED_LITERAL_STRING(kApplication, "application"); - NS_NAMED_LITERAL_STRING(kAppVersion, "appversion"); - NS_NAMED_LITERAL_STRING(kOs, "os"); - NS_NAMED_LITERAL_STRING(kOsVersion, "osversion"); -+ NS_NAMED_LITERAL_STRING(kDesktop, "desktop"); - - nsCOMPtr io (do_GetIOService()); - if (!io) return NS_ERROR_FAILURE; - - nsCOMPtr ph; - rv = io->GetProtocolHandler("resource", getter_AddRefs(ph)); - NS_ENSURE_SUCCESS(rv, rv); - -@@ -1651,35 +1653,39 @@ nsChromeRegistry::ProcessManifestBuffer( - if (NS_SUCCEEDED(rv)) { - CopyUTF8toUTF16(s, osTarget); - ToLowerCase(osTarget); - } - } - } - - nsAutoString osVersion; -+ nsAutoString desktop; - #if defined(XP_WIN) - OSVERSIONINFO info = { sizeof(OSVERSIONINFO) }; - if (GetVersionEx(&info)) { - nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(), - info.dwMajorVersion, - info.dwMinorVersion); - } -+ desktop = NS_LITERAL_STRING("win"); - #elif defined(XP_MACOSX) - long majorVersion, minorVersion; - if ((Gestalt(gestaltSystemVersionMajor, &majorVersion) == noErr) && - (Gestalt(gestaltSystemVersionMinor, &minorVersion) == noErr)) { - nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(), - majorVersion, - minorVersion); - } -+ desktop = NS_LITERAL_STRING("macosx"); - #elif defined(MOZ_WIDGET_GTK2) - nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(), - gtk_major_version, - gtk_minor_version); -+ desktop = nsKDEUtils::kdeSession() ? NS_LITERAL_STRING("kde") : NS_LITERAL_STRING("gnome"); // TODO others? - #endif - - char *token; - char *newline = buf; - PRUint32 line = 0; - - // outer loop tokenizes by newline - while (nsnull != (token = nsCRT::strtok(newline, kNewlines, &newline))) { -@@ -1713,41 +1719,43 @@ nsChromeRegistry::ProcessManifestBuffer( - - PRBool platform = PR_FALSE; - PRBool xpcNativeWrappers = PR_TRUE; - PRBool contentAccessible = PR_FALSE; - TriState stAppVersion = eUnspecified; - TriState stApp = eUnspecified; - TriState stOsVersion = eUnspecified; - TriState stOs = eUnspecified; -+ TriState stDesktop = eUnspecified; - - PRBool badFlag = PR_FALSE; - - while (nsnull != (token = nsCRT::strtok(whitespace, kWhitespace, &whitespace)) && - !badFlag) { - NS_ConvertASCIItoUTF16 wtoken(token); - ToLowerCase(wtoken); - - if (CheckFlag(kPlatform, wtoken, platform) || - CheckFlag(kXPCNativeWrappers, wtoken, xpcNativeWrappers) || - CheckFlag(kContentAccessible, wtoken, contentAccessible) || - CheckStringFlag(kApplication, wtoken, appID, stApp) || - CheckStringFlag(kOs, wtoken, osTarget, stOs) || -+ CheckStringFlag(kDesktop, wtoken, desktop, stDesktop) || - CheckVersionFlag(kOsVersion, wtoken, osVersion, vc, stOsVersion) || - CheckVersionFlag(kAppVersion, wtoken, appVersion, vc, stAppVersion)) - continue; - - LogMessageWithContext(manifestURI, line, nsIScriptError::warningFlag, - "Warning: Unrecognized chrome registration modifier '%s'.", - token); - badFlag = PR_TRUE; - } - - if (badFlag || stApp == eBad || stAppVersion == eBad || -- stOs == eBad || stOsVersion == eBad) -+ stOs == eBad || stOsVersion == eBad || stDesktop == eBad) - continue; - - nsCOMPtr resolved; - rv = io->NewURI(nsDependentCString(uri), nsnull, manifestURI, - getter_AddRefs(resolved)); - if (NS_FAILED(rv)) - continue; - -@@ -1798,38 +1806,40 @@ nsChromeRegistry::ProcessManifestBuffer( - } - - EnsureLowerCase(package); - - TriState stAppVersion = eUnspecified; - TriState stApp = eUnspecified; - TriState stOs = eUnspecified; - TriState stOsVersion = eUnspecified; -+ TriState stDesktop = eUnspecified; - - PRBool badFlag = PR_FALSE; - - while (nsnull != (token = nsCRT::strtok(whitespace, kWhitespace, &whitespace)) && - !badFlag) { - NS_ConvertASCIItoUTF16 wtoken(token); - ToLowerCase(wtoken); - - if (CheckStringFlag(kApplication, wtoken, appID, stApp) || - CheckStringFlag(kOs, wtoken, osTarget, stOs) || -+ CheckStringFlag(kDesktop, wtoken, desktop, stDesktop) || - CheckVersionFlag(kOsVersion, wtoken, osVersion, vc, stOsVersion) || - CheckVersionFlag(kAppVersion, wtoken, appVersion, vc, stAppVersion)) - continue; - - LogMessageWithContext(manifestURI, line, nsIScriptError::warningFlag, - "Warning: Unrecognized chrome registration modifier '%s'.", - token); - badFlag = PR_TRUE; - } - - if (badFlag || stApp == eBad || stAppVersion == eBad || -- stOs == eBad || stOsVersion == eBad) -+ stOs == eBad || stOsVersion == eBad || stDesktop == eBad) - continue; - - nsCOMPtr resolved; - rv = io->NewURI(nsDependentCString(uri), nsnull, manifestURI, - getter_AddRefs(resolved)); - if (NS_FAILED(rv)) - continue; - -@@ -1860,38 +1870,40 @@ nsChromeRegistry::ProcessManifestBuffer( - } - - EnsureLowerCase(package); - - TriState stAppVersion = eUnspecified; - TriState stApp = eUnspecified; - TriState stOs = eUnspecified; - TriState stOsVersion = eUnspecified; -+ TriState stDesktop = eUnspecified; - - PRBool badFlag = PR_FALSE; - - while (nsnull != (token = nsCRT::strtok(whitespace, kWhitespace, &whitespace)) && - !badFlag) { - NS_ConvertASCIItoUTF16 wtoken(token); - ToLowerCase(wtoken); - - if (CheckStringFlag(kApplication, wtoken, appID, stApp) || - CheckStringFlag(kOs, wtoken, osTarget, stOs) || -+ CheckStringFlag(kDesktop, wtoken, desktop, stDesktop) || - CheckVersionFlag(kOsVersion, wtoken, osVersion, vc, stOsVersion) || - CheckVersionFlag(kAppVersion, wtoken, appVersion, vc, stAppVersion)) - continue; - - LogMessageWithContext(manifestURI, line, nsIScriptError::warningFlag, - "Warning: Unrecognized chrome registration modifier '%s'.", - token); - badFlag = PR_TRUE; - } - - if (badFlag || stApp == eBad || stAppVersion == eBad || -- stOs == eBad || stOsVersion == eBad) -+ stOs == eBad || stOsVersion == eBad || stDesktop == eBad) - continue; - - nsCOMPtr resolved; - rv = io->NewURI(nsDependentCString(uri), nsnull, manifestURI, - getter_AddRefs(resolved)); - if (NS_FAILED(rv)) - continue; - -@@ -1924,38 +1936,40 @@ nsChromeRegistry::ProcessManifestBuffer( - "Warning: malformed chrome overlay instruction."); - continue; - } - - TriState stAppVersion = eUnspecified; - TriState stApp = eUnspecified; - TriState stOs = eUnspecified; - TriState stOsVersion = eUnspecified; -+ TriState stDesktop = eUnspecified; - - PRBool badFlag = PR_FALSE; - - while (nsnull != (token = nsCRT::strtok(whitespace, kWhitespace, &whitespace)) && - !badFlag) { - NS_ConvertASCIItoUTF16 wtoken(token); - ToLowerCase(wtoken); - - if (CheckStringFlag(kApplication, wtoken, appID, stApp) || - CheckStringFlag(kOs, wtoken, osTarget, stOs) || -+ CheckStringFlag(kDesktop, wtoken, desktop, stDesktop) || - CheckVersionFlag(kOsVersion, wtoken, osVersion, vc, stOsVersion) || - CheckVersionFlag(kAppVersion, wtoken, appVersion, vc, stAppVersion)) - continue; - - LogMessageWithContext(manifestURI, line, nsIScriptError::warningFlag, - "Warning: Unrecognized chrome registration modifier '%s'.", - token); - badFlag = PR_TRUE; - } - - if (badFlag || stApp == eBad || stAppVersion == eBad || -- stOs == eBad || stOsVersion == eBad) -+ stOs == eBad || stOsVersion == eBad || stDesktop == eBad) - continue; - - nsCOMPtr baseuri, overlayuri; - rv = io->NewURI(nsDependentCString(base), nsnull, nsnull, - getter_AddRefs(baseuri)); - rv |= io->NewURI(nsDependentCString(overlay), nsnull, nsnull, - getter_AddRefs(overlayuri)); - if (NS_FAILED(rv)) { -@@ -1980,38 +1994,40 @@ nsChromeRegistry::ProcessManifestBuffer( - "Warning: malformed chrome style instruction."); - continue; - } - - TriState stAppVersion = eUnspecified; - TriState stApp = eUnspecified; - TriState stOs = eUnspecified; - TriState stOsVersion = eUnspecified; -+ TriState stDesktop = eUnspecified; - - PRBool badFlag = PR_FALSE; - - while (nsnull != (token = nsCRT::strtok(whitespace, kWhitespace, &whitespace)) && - !badFlag) { - NS_ConvertASCIItoUTF16 wtoken(token); - ToLowerCase(wtoken); - - if (CheckStringFlag(kApplication, wtoken, appID, stApp) || - CheckStringFlag(kOs, wtoken, osTarget, stOs) || -+ CheckStringFlag(kDesktop, wtoken, desktop, stDesktop) || - CheckVersionFlag(kOsVersion, wtoken, osVersion, vc, stOsVersion) || - CheckVersionFlag(kAppVersion, wtoken, appVersion, vc, stAppVersion)) - continue; - - LogMessageWithContext(manifestURI, line, nsIScriptError::warningFlag, - "Warning: Unrecognized chrome registration modifier '%s'.", - token); - badFlag = PR_TRUE; - } - - if (badFlag || stApp == eBad || stAppVersion == eBad || -- stOs == eBad || stOsVersion == eBad) -+ stOs == eBad || stOsVersion == eBad || stDesktop == eBad) - continue; - - nsCOMPtr baseuri, overlayuri; - rv = io->NewURI(nsDependentCString(base), nsnull, nsnull, - getter_AddRefs(baseuri)); - rv |= io->NewURI(nsDependentCString(overlay), nsnull, nsnull, - getter_AddRefs(overlayuri)); - if (NS_FAILED(rv)) -@@ -2040,38 +2056,40 @@ nsChromeRegistry::ProcessManifestBuffer( - "Warning: malformed chrome override instruction."); - continue; - } - - TriState stAppVersion = eUnspecified; - TriState stApp = eUnspecified; - TriState stOs = eUnspecified; - TriState stOsVersion = eUnspecified; -+ TriState stDesktop = eUnspecified; - - PRBool badFlag = PR_FALSE; - - while (nsnull != (token = nsCRT::strtok(whitespace, kWhitespace, &whitespace)) && - !badFlag) { - NS_ConvertASCIItoUTF16 wtoken(token); - ToLowerCase(wtoken); - - if (CheckStringFlag(kApplication, wtoken, appID, stApp) || - CheckStringFlag(kOs, wtoken, osTarget, stOs) || -+ CheckStringFlag(kDesktop, wtoken, desktop, stDesktop) || - CheckVersionFlag(kOsVersion, wtoken, osVersion, vc, stOsVersion) || - CheckVersionFlag(kAppVersion, wtoken, appVersion, vc, stAppVersion)) - continue; - - LogMessageWithContext(manifestURI, line, nsIScriptError::warningFlag, - "Warning: Unrecognized chrome registration modifier '%s'.", - token); - badFlag = PR_TRUE; - } - - if (badFlag || stApp == eBad || stAppVersion == eBad || -- stOs == eBad || stOsVersion == eBad) -+ stOs == eBad || stOsVersion == eBad || stDesktop == eBad) - continue; - - nsCOMPtr chromeuri, resolveduri; - rv = io->NewURI(nsDependentCString(chrome), nsnull, nsnull, - getter_AddRefs(chromeuri)); - rv |= io->NewURI(nsDependentCString(resolved), nsnull, manifestURI, - getter_AddRefs(resolveduri)); - if (NS_FAILED(rv)) -@@ -2102,38 +2120,40 @@ nsChromeRegistry::ProcessManifestBuffer( - } - - EnsureLowerCase(package); - - TriState stAppVersion = eUnspecified; - TriState stApp = eUnspecified; - TriState stOsVersion = eUnspecified; - TriState stOs = eUnspecified; -+ TriState stDesktop = eUnspecified; - - PRBool badFlag = PR_FALSE; - - while (nsnull != (token = nsCRT::strtok(whitespace, kWhitespace, &whitespace)) && - !badFlag) { - NS_ConvertASCIItoUTF16 wtoken(token); - ToLowerCase(wtoken); - - if (CheckStringFlag(kApplication, wtoken, appID, stApp) || - CheckStringFlag(kOs, wtoken, osTarget, stOs) || -+ CheckStringFlag(kDesktop, wtoken, desktop, stDesktop) || - CheckVersionFlag(kOsVersion, wtoken, osVersion, vc, stOsVersion) || - CheckVersionFlag(kAppVersion, wtoken, appVersion, vc, stAppVersion)) - continue; - - LogMessageWithContext(manifestURI, line, nsIScriptError::warningFlag, - "Warning: Unrecognized chrome registration modifier '%s'.", - token); - badFlag = PR_TRUE; - } - - if (badFlag || stApp == eBad || stAppVersion == eBad || -- stOs == eBad || stOsVersion == eBad) -+ stOs == eBad || stOsVersion == eBad || stDesktop == eBad) - continue; - - nsDependentCString host(package); - - PRBool exists; - rv = rph->HasSubstitution(host, &exists); - NS_ENSURE_SUCCESS(rv, rv); - if (exists) { diff --git a/modules/libpref/src/Makefile.in b/modules/libpref/src/Makefile.in --- a/modules/libpref/src/Makefile.in +++ b/modules/libpref/src/Makefile.in -@@ -97,8 +97,10 @@ GARBAGE += $(addprefix $(DIST)/bin/defa - +@@ -90,14 +90,16 @@ GREPREF_FILES = $(topsrcdir)/netwerk/bas # Optimizer bug with GCC 3.2.2 on OS/2 ifeq ($(OS_ARCH), OS2) nsPrefService.$(OBJ_SUFFIX): nsPrefService.cpp @@ -407,12 +9,19 @@ @$(MAKE_DEPS_AUTO_CXX) $(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS:-O2=-O1) $(_VPATH_SRCS) endif + ++LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre + -+LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre + + greprefs.js: $(GREPREF_FILES) + $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $^ > $@ + + libs:: greprefs.js + $(INSTALL) $^ $(DIST)/bin/ diff --git a/modules/libpref/src/nsPrefService.cpp b/modules/libpref/src/nsPrefService.cpp --- a/modules/libpref/src/nsPrefService.cpp +++ b/modules/libpref/src/nsPrefService.cpp -@@ -47,16 +47,17 @@ +@@ -51,16 +51,17 @@ #include "nsILocalFile.h" #include "nsIObserverService.h" #include "nsPrefBranch.h" @@ -430,55 +39,21 @@ #include "prefapi.h" #include "prefread.h" #include "prefapi_private_data.h" -@@ -610,17 +611,18 @@ pref_LoadPrefsInDir(nsIFile* aDir, char - rv = rv2; - } - } - } - - return rv; - } - --static nsresult pref_LoadPrefsInDirList(const char *listId) -+static nsresult pref_LoadPrefsInDirList(const char *listId, -+ char const *const *aSpecialFiles = NULL, PRUint32 aSpecialFilesCount = 0) - { - nsresult rv; - nsCOMPtr dirSvc(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv)); - if (NS_FAILED(rv)) return rv; - - nsCOMPtr dirList; - dirSvc->Get(listId, - NS_GET_IID(nsISimpleEnumerator), -@@ -629,17 +631,17 @@ static nsresult pref_LoadPrefsInDirList( - PRBool hasMore; - while (NS_SUCCEEDED(dirList->HasMoreElements(&hasMore)) && hasMore) { - nsCOMPtr elem; - dirList->GetNext(getter_AddRefs(elem)); - if (elem) { - nsCOMPtr dir = do_QueryInterface(elem); - if (dir) { - // Do we care if a file provided by this process fails to load? -- pref_LoadPrefsInDir(dir, nsnull, 0); -+ pref_LoadPrefsInDir(dir, aSpecialFiles, aSpecialFilesCount); - } - } - } - } - return NS_OK; - } - - //---------------------------------------------------------------------------------------- -@@ -680,29 +682,41 @@ static nsresult pref_InitInitialObjects( +@@ -718,28 +719,40 @@ static nsresult pref_InitDefaults() + /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */ + static const char* specialFiles[] = { + #if defined(XP_MAC) || defined(XP_MACOSX) + "macprefs.js" + #elif defined(XP_WIN) + "winpref.js" + #elif defined(XP_UNIX) + "unix.js" ++ , "" // placeholder for KDE (empty is otherwise harmless) #if defined(VMS) , "openvms.js" #elif defined(_AIX) , "aix.js" #endif - #if defined(MOZ_WIDGET_PHOTON) - , "photon.js" - #endif -+ , "" // placeholder for KDE (empty is otherwise harmless) #elif defined(XP_OS2) "os2pref.js" #elif defined(XP_BEOS) @@ -486,37 +61,30 @@ #endif }; -+ if( nsKDEUtils::kdeSession()) { // TODO what if some setup actually requires the helper? -+ for( int i = 0; -+ i < NS_ARRAY_LENGTH(specialFiles); -+ ++i ) { -+ if( *specialFiles[ i ] == '\0' ) { -+ specialFiles[ i ] = "kde.js"; -+ break; -+ } ++ if(nsKDEUtils::kdeSession()) { // TODO what if some setup actually requires the helper? ++ for( int i = 0; ++ i < NS_ARRAY_LENGTH(specialFiles); ++ ++i ) { ++ if( *specialFiles[ i ] == '\0' ) { ++ specialFiles[ i ] = "kde.js"; ++ break; + } ++ } + } -+ ++ rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles, NS_ARRAY_LENGTH(specialFiles)); if (NS_FAILED(rv)) { NS_WARNING("Error parsing application default preferences."); } -- rv = pref_LoadPrefsInDirList(NS_APP_PREFS_DEFAULTS_DIR_LIST); -+ rv = pref_LoadPrefsInDirList(NS_APP_PREFS_DEFAULTS_DIR_LIST, specialFiles, NS_ARRAY_LENGTH(specialFiles)); - NS_ENSURE_SUCCESS(rv, rv); + return NS_OK; + } - NS_CreateServicesFromCategory(NS_PREFSERVICE_APPDEFAULTS_TOPIC_ID, - nsnull, NS_PREFSERVICE_APPDEFAULTS_TOPIC_ID); - - nsCOMPtr observerService = - do_GetService("@mozilla.org/observer-service;1", &rv); - diff --git a/toolkit/components/downloads/src/Makefile.in b/toolkit/components/downloads/src/Makefile.in --- a/toolkit/components/downloads/src/Makefile.in +++ b/toolkit/components/downloads/src/Makefile.in -@@ -92,8 +92,9 @@ EXTRA_COMPONENTS = \ - nsDownloadManagerUI.js \ +@@ -71,8 +71,9 @@ EXTRA_COMPONENTS = \ + nsDownloadManagerUI.manifest \ $(NULL) endif @@ -528,7 +96,7 @@ diff --git a/toolkit/components/downloads/src/nsDownloadManager.cpp b/toolkit/components/downloads/src/nsDownloadManager.cpp --- a/toolkit/components/downloads/src/nsDownloadManager.cpp +++ b/toolkit/components/downloads/src/nsDownloadManager.cpp -@@ -71,16 +71,20 @@ +@@ -76,16 +76,20 @@ #if defined(XP_WIN) && !defined(WINCE) #include @@ -541,15 +109,15 @@ +#include "nsKDEUtils.h" +#endif + + #ifdef XP_MACOSX + #include + #endif + #define DOWNLOAD_MANAGER_BUNDLE "chrome://mozapps/locale/downloads/downloads.properties" #define DOWNLOAD_MANAGER_ALERT_ICON "chrome://mozapps/skin/downloads/downloadIcon.png" #define PREF_BDM_SHOWALERTONCOMPLETE "browser.download.manager.showAlertOnComplete" #define PREF_BDM_SHOWALERTINTERVAL "browser.download.manager.showAlertInterval" - #define PREF_BDM_RETENTION "browser.download.manager.retention" - #define PREF_BDM_QUITBEHAVIOR "browser.download.manager.quitBehavior" - #define PREF_BDM_ADDTORECENTDOCS "browser.download.manager.addToRecentDocs" - #define PREF_BDM_SCANWHENDONE "browser.download.manager.scanWhenDone" -@@ -2158,16 +2162,25 @@ nsDownload::SetState(DownloadState aStat +@@ -2193,16 +2197,25 @@ nsDownload::SetState(DownloadState aStat nsCOMPtr pref(do_GetService(NS_PREFSERVICE_CONTRACTID)); // Master pref to control this function. @@ -575,7 +143,7 @@ PRInt64 goat = PR_Now() - mStartTime; showTaskbarAlert = goat > alertIntervalUSec; -@@ -2193,16 +2206,17 @@ nsDownload::SetState(DownloadState aStat +@@ -2228,16 +2241,17 @@ nsDownload::SetState(DownloadState aStat // because if it is, they'll click open the download manager and // the items they downloaded will have been removed. alerts->ShowAlertNotification( @@ -586,17 +154,17 @@ } + } // end non-KDE block } - #if defined(XP_WIN) && !defined(WINCE) + nsCOMPtr fileURL = do_QueryInterface(mTarget); - nsCOMPtr file; - nsAutoString path; + if (fileURL) { + nsCOMPtr file; + if (NS_SUCCEEDED(fileURL->GetFile(getter_AddRefs(file))) && file ) { - if (fileURL && - NS_SUCCEEDED(fileURL->GetFile(getter_AddRefs(file))) && + #if (defined(XP_WIN) && !defined(WINCE)) || defined(XP_MACOSX) diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn --- a/toolkit/content/jar.mn +++ b/toolkit/content/jar.mn -@@ -44,29 +44,33 @@ toolkit.jar: +@@ -40,29 +40,33 @@ toolkit.jar: *+ content/global/viewZoomOverlay.js (viewZoomOverlay.js) *+ content/global/bindings/autocomplete.xml (widgets/autocomplete.xml) *+ content/global/bindings/browser.xml (widgets/browser.xml) @@ -634,7 +202,7 @@ new file mode 100644 --- /dev/null +++ b/toolkit/content/widgets/dialog-kde.xml -@@ -0,0 +1,445 @@ +@@ -0,0 +1,447 @@ + + + +#elif XP_UNIX + pack="end"> -+