Browse Source

[COMM] Downloads Manager stuffs

custom-2020
Matt A. Tobin 3 years ago committed by Roy Tam
parent
commit
111519bd59
  1. 4
      communicator/components/downloads/content/downloadmanager.xul
  2. 40
      communicator/components/downloads/download-prefs.js
  3. 2
      communicator/components/downloads/jar.mn
  4. 2
      communicator/components/downloads/moz.build
  5. 8
      communicator/components/moz.build
  6. 35
      projects/navigator/app/defaults/pref/navigator-prefs.inc.js
  7. 4
      projects/navigator/configure.in
  8. 1
      projects/navigator/confvars.sh

4
communicator/components/downloads/content/downloadmanager.xul

@ -6,7 +6,11 @@
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/downloads/downloadmanager.css" type="text/css"?>
#ifdef BINOC_BOREALIS
<?xul-overlay href="chrome://communicator/content/tasksOverlay.xul"?>
#elif BINOC_INTERLINK
<?xul-overlay href="chrome://messenger/content/baseMenuOverlay.xul"?>
#endif
<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>

40
communicator/components/downloads/download-prefs.js

@ -0,0 +1,40 @@
/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
pref("browser.download.finished_download_sound", false);
pref("browser.download.finished_sound_url", "");
pref("browser.download.useDownloadDir", false);
pref("browser.download.folderList", 1);
pref("browser.download.manager.showAlertOnComplete", true);
pref("browser.download.manager.showAlertInterval", 2000);
pref("browser.download.manager.retention", 2);
pref("browser.download.manager.quitBehavior", 0);
pref("browser.download.manager.addToRecentDocs", true);
pref("browser.download.manager.scanWhenDone", true);
pref("browser.download.manager.resumeOnWakeDelay", 10000);
pref("browser.download.manager.flashCount", 2);
pref("browser.download.manager.showWhenStarting", true);
pref("browser.download.manager.focusWhenStarting", false);
pref("browser.download.manager.closeWhenDone", false);
pref("browser.download.progress.closeWhenDone", false);
pref("browser.download.show_plugins_in_list", true);
pref("browser.download.hide_plugins_without_extensions", true);
// Number of milliseconds to wait for the http headers (and thus
// the Content-Disposition filename) before giving up and falling back to
// picking a filename without that info in hand so that the user sees some
// feedback from their action.
pref("browser.download.saveLinkAsFilenameTimeout", 4000);
// 0 opens the download manager
// 1 opens a progress dialog
// 2 and other values, no download manager, no progress dialog.
pref("browser.download.manager.behavior", 0);
#ifdef XP_UNIX
// For the download dialog
pref("browser.download.progressDnldDialog.enable_launch_reveal_buttons", false);
#endif

2
communicator/components/downloads/jar.mn

@ -4,7 +4,7 @@
comm.jar:
content/communicator/downloads/downloadmanager.js (content/downloadmanager.js)
content/communicator/downloads/downloadmanager.xul (content/downloadmanager.xul)
* content/communicator/downloads/downloadmanager.xul (content/downloadmanager.xul)
content/communicator/downloads/DownloadProgressListener.js (content/DownloadProgressListener.js)
content/communicator/downloads/progressDialog.xul (content/progressDialog.xul)
content/communicator/downloads/progressDialog.js (content/progressDialog.js)

2
communicator/components/downloads/moz.build

@ -15,4 +15,6 @@ EXTRA_COMPONENTS += [
'src/nsSuiteDownloadManagerUI.js',
]
JS_PREFERENCE_PP_FILES += ['download-prefs.js']
JAR_MANIFESTS += ['jar.mn']

8
communicator/components/moz.build

@ -3,7 +3,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DIRS += [
'downloads',
'eula',
]
DIRS += ['eula']
if CONFIG['BINOC_COMM_DLMGR']:
DIRS += ['downloads']

35
projects/navigator/app/defaults/pref/navigator-prefs.inc.js

@ -36,30 +36,6 @@ pref("browser.send_pings", false);
pref("browser.chrome.site_icons", true);
pref("browser.chrome.favicons", true);
pref("browser.download.finished_download_sound", false);
pref("browser.download.finished_sound_url", "");
pref("browser.download.useDownloadDir", false);
pref("browser.download.folderList", 1);
pref("browser.download.manager.showAlertOnComplete", true);
pref("browser.download.manager.showAlertInterval", 2000);
pref("browser.download.manager.retention", 2);
pref("browser.download.manager.quitBehavior", 0);
pref("browser.download.manager.addToRecentDocs", true);
pref("browser.download.manager.scanWhenDone", true);
pref("browser.download.manager.resumeOnWakeDelay", 10000);
pref("browser.download.manager.flashCount", 2);
pref("browser.download.manager.showWhenStarting", true);
pref("browser.download.manager.focusWhenStarting", false);
pref("browser.download.manager.closeWhenDone", false);
pref("browser.download.progress.closeWhenDone", false);
// Number of milliseconds to wait for the http headers (and thus
// the Content-Disposition filename) before giving up and falling back to
// picking a filename without that info in hand so that the user sees some
// feedback from their action.
pref("browser.download.saveLinkAsFilenameTimeout", 4000);
// Output console.log/info/warn/error to the Error Console
pref("browser.dom.window.console.enabled", false);
@ -258,9 +234,6 @@ pref("browser.preferences.instantApply", true);
pref("browser.preferences.animateFadeIn", false);
pref("browser.download.show_plugins_in_list", true);
pref("browser.download.hide_plugins_without_extensions", true);
// initial web feed readers list - add enough entries for locales to add theirs
pref("browser.contentHandlers.types.0.title", "chrome://navigator-region/locale/region.properties");
pref("browser.contentHandlers.types.0.uri", "chrome://navigator-region/locale/region.properties");
@ -352,19 +325,11 @@ pref("browser.taskbar.previews.cachetime", 5);
pref("browser.throbber.url","chrome://navigator-region/locale/region.properties");
// 0 opens the download manager
// 1 opens a progress dialog
// 2 and other values, no download manager, no progress dialog.
pref("browser.download.manager.behavior", 0);
// Show XUL error pages instead of alerts for errors
pref("browser.xul.error_pages.enabled", true);
pref("browser.xul.error_pages.expert_bad_cert", false);
#ifdef XP_UNIX
// For the download dialog
pref("browser.download.progressDnldDialog.enable_launch_reveal_buttons", false);
// Mouse wheel action when over the tab bar:
// false The mouse wheel scrolls the whole tab bar like Firefox.
// true The mouse wheel advances the selected tab.

4
projects/navigator/configure.in

@ -8,8 +8,12 @@ dnl Things we need to carry from confvars.sh
AC_DEFINE(MOZ_SUITE)
AC_SUBST(MOZ_SUITE)
AC_DEFINE(BINOC_BOREALIS)
AC_SUBST(BINOC_BOREALIS)
AC_SUBST(BINOC_COMM_DLMGR)
AC_DEFINE(MOZ_SEPARATE_MANIFEST_FOR_THEME_OVERRIDES)
dnl Optional parts of the build.

1
projects/navigator/confvars.sh

@ -24,6 +24,7 @@ MOZ_APP_VERSION=`cat ${_topsrcdir}/$MOZ_BUILD_APP/config/version.txt`
MOZ_APP_ID={a3210b97-8e8a-4737-9aa0-aa0e607640b9}
MOZ_PROFILE_MIGRATOR=1
BINOC_COMM_DLMGR=1
MOZ_APP_STATIC_INI=1
MOZ_SEPARATE_MANIFEST_FOR_THEME_OVERRIDES=1
MOZ_WEBGL_CONFORMANT=1

Loading…
Cancel
Save