From 4e27ff86c98bb7caec208d5cf56c40a53e687a55 Mon Sep 17 00:00:00 2001 From: "dtownsend%oxymoronical.com" Date: Mon, 28 Jan 2008 17:11:52 +0000 Subject: [PATCH] Bug 404024: Add AMO integration pane. r=robstrong git-svn-id: svn://10.0.0.236/trunk@244210 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/browser/app/profile/firefox.js | 9 + .../mozapps/extensions/content/eula.js | 43 ++ .../mozapps/extensions/content/eula.xul | 68 ++ .../mozapps/extensions/content/extensions.css | 77 +++ .../mozapps/extensions/content/extensions.js | 648 ++++++++++++++---- .../mozapps/extensions/content/extensions.xml | 342 +++++++++ .../mozapps/extensions/content/extensions.xul | 94 +-- mozilla/toolkit/mozapps/extensions/jar.mn | 3 +- .../mozapps/extensions/public/Makefile.in | 6 +- .../extensions/public/nsIAddonRepository.idl | 198 ++++++ .../mozapps/extensions/src/Makefile.in | 6 +- .../extensions/src/nsAddonRepository.js | 367 ++++++++++ .../extensions/src/nsExtensionManager.js.in | 4 +- .../mozapps/extensions/extensions.css | 132 ++++ .../pinstripe/mozapps/extensions/eula.css | 16 + .../mozapps/extensions/extensionIcons.png | Bin 0 -> 1375 bytes .../mozapps/extensions/extensions.css | 130 ++++ .../pinstripe/mozapps/extensions/ratings.png | Bin 0 -> 568 bytes .../mozapps/extensions/searchIcons.png | Bin 0 -> 1540 bytes .../toolkit/themes/pinstripe/mozapps/jar.mn | 4 + .../winstripe/mozapps/extensions/eula.css | 16 + .../mozapps/extensions/extensionIcons.png | Bin 0 -> 1375 bytes .../mozapps/extensions/extensions.css | 139 ++++ .../winstripe/mozapps/extensions/ratings.png | Bin 0 -> 568 bytes .../mozapps/extensions/searchIcons.png | Bin 0 -> 1540 bytes .../mozapps/extensions/viewButtons.png | Bin 23511 -> 24552 bytes .../toolkit/themes/winstripe/mozapps/jar.mn | 4 + 27 files changed, 2128 insertions(+), 178 deletions(-) create mode 100644 mozilla/toolkit/mozapps/extensions/content/eula.js create mode 100644 mozilla/toolkit/mozapps/extensions/content/eula.xul create mode 100644 mozilla/toolkit/mozapps/extensions/public/nsIAddonRepository.idl create mode 100644 mozilla/toolkit/mozapps/extensions/src/nsAddonRepository.js create mode 100644 mozilla/toolkit/themes/pinstripe/mozapps/extensions/eula.css create mode 100644 mozilla/toolkit/themes/pinstripe/mozapps/extensions/extensionIcons.png create mode 100644 mozilla/toolkit/themes/pinstripe/mozapps/extensions/ratings.png create mode 100644 mozilla/toolkit/themes/pinstripe/mozapps/extensions/searchIcons.png create mode 100644 mozilla/toolkit/themes/winstripe/mozapps/extensions/eula.css create mode 100644 mozilla/toolkit/themes/winstripe/mozapps/extensions/extensionIcons.png create mode 100644 mozilla/toolkit/themes/winstripe/mozapps/extensions/ratings.png create mode 100644 mozilla/toolkit/themes/winstripe/mozapps/extensions/searchIcons.png diff --git a/mozilla/browser/app/profile/firefox.js b/mozilla/browser/app/profile/firefox.js index 80576522063..400187b5439 100644 --- a/mozilla/browser/app/profile/firefox.js +++ b/mozilla/browser/app/profile/firefox.js @@ -68,6 +68,15 @@ pref("extensions.logging.enabled", false); // Hides the install button in the add-ons mgr pref("extensions.hideInstallButton", true); +// Preferences for the Get Add-ons pane +pref("extensions.getAddons.showPane", true); +pref("extensions.getAddons.browseAddons", "https://%LOCALE%.add-ons.mozilla.com/%LOCALE%/%APP%"); +pref("extensions.getAddons.maxResults", 5); +pref("extensions.getAddons.recommended.browseURL", "https://%LOCALE%.add-ons.mozilla.com/%LOCALE%/%APP%/recommended"); +pref("extensions.getAddons.recommended.url", "https://services.addons.mozilla.org/%LOCALE%/%APP%/api/list/featured/all/10"); +pref("extensions.getAddons.search.browseURL", "https://%LOCALE%.add-ons.mozilla.com/%LOCALE%/%APP%/search?q=%TERMS%"); +pref("extensions.getAddons.search.url", "https://services.addons.mozilla.org/%LOCALE%/%APP%/api/search/%TERMS%"); + // Blocklist preferences pref("extensions.blocklist.enabled", true); pref("extensions.blocklist.interval", 86400); diff --git a/mozilla/toolkit/mozapps/extensions/content/eula.js b/mozilla/toolkit/mozapps/extensions/content/eula.js new file mode 100644 index 00000000000..f665e9a0883 --- /dev/null +++ b/mozilla/toolkit/mozapps/extensions/content/eula.js @@ -0,0 +1,43 @@ +# -*- Mode: Java; 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 The Extension Manager. +# +# The Initial Developer of the Original Code is mozilla.org +# Portions created by the Initial Developer are Copyright (C) 2008 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# Dave Townsend +# +# 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 ***** + +function Startup() { + var bundle = document.getElementById("extensionsStrings"); + var label = document.createTextNode(bundle.getFormattedString("eulaHeader", [window.arguments[0].name])); + document.getElementById("heading").appendChild(label); + document.getElementById("eula").appendChild(document.createTextNode(window.arguments[0].text)); +} diff --git a/mozilla/toolkit/mozapps/extensions/content/eula.xul b/mozilla/toolkit/mozapps/extensions/content/eula.xul new file mode 100644 index 00000000000..163234b825d --- /dev/null +++ b/mozilla/toolkit/mozapps/extensions/content/eula.xul @@ -0,0 +1,68 @@ + + +# -*- Mode: Java; 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 The Extension Manager. +# +# The Initial Developer of the Original Code is mozilla.org +# Portions created by the Initial Developer are Copyright (C) 2008 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# Dave Townsend +# +# 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 ***** + + + + + +%brandDTD; + +%extensionsDTD; +]> + + + +