mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
add some pref UI for automated update checking (none of this works yet)
This commit is contained in:
parent
01b7f44d9a
commit
026a59aa41
@ -26,7 +26,7 @@ VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = chrome
|
||||
DIRS = chrome extensions
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
35
browser/app/profile/extensions/Makefile.in
Normal file
35
browser/app/profile/extensions/Makefile.in
Normal file
@ -0,0 +1,35 @@
|
||||
#
|
||||
# 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 mozilla.org code.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
FILES := \
|
||||
extensions.rdf \
|
||||
$(NULL)
|
||||
|
||||
FILES := $(addprefix $(srcdir)/, $(FILES))
|
||||
|
||||
libs::
|
||||
$(INSTALL) $(FILES) $(DIST)/bin/defaults/profile/extensions
|
||||
|
||||
install::
|
||||
$(SYSINSTALL) $(IFLAGS1) $(FILES) $(DESTDIR)$(mozappdir)/defaults/profile/extensions
|
@ -51,6 +51,13 @@ pref("xpinstall.dialog.progress.type", "Download:Manager");
|
||||
// this application as an extension target, and by the SmartUpdate system to identify
|
||||
// this application to the Update server.
|
||||
pref("app.id", "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}");
|
||||
pref("app.version",
|
||||
#expand __APP_VERSION__
|
||||
);
|
||||
|
||||
pref("update.app.enabled", true);
|
||||
pref("update.extensions.enabled", true);
|
||||
pref("update.extensions.autoUpdate", false);
|
||||
|
||||
pref("keyword.enabled", true);
|
||||
pref("keyword.URL", "http://www.google.com/search?btnI=I%27m+Feeling+Lucky&ie=UTF-8&oe=UTF-8&q=");
|
||||
|
@ -115,7 +115,7 @@
|
||||
<!ENTITY downloads.tooltip "Display the progress of ongoing downloads">
|
||||
<!ENTITY downloads.accesskey "D">
|
||||
<!ENTITY downloads.commandkey "y">
|
||||
<!ENTITY extensions.label "Extensions">
|
||||
<!ENTITY extensions.label "Extensions - TESTING ONLY">
|
||||
<!ENTITY extensions.tooltip "Show and Manage installed Extensions">
|
||||
<!ENTITY extensions.accesskey "E">
|
||||
<!ENTITY themes.label "Themes">
|
||||
|
175
browser/components/prefwindow/content/pref-advanced.js
Normal file
175
browser/components/prefwindow/content/pref-advanced.js
Normal file
@ -0,0 +1,175 @@
|
||||
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
# 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 Initial Developer of the Original Code is .
|
||||
# Portions created by the Initial Developer are Copyright (C) 2004
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# 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 *****
|
||||
|
||||
var _elementIDs = ["moveSystemCaret", "hideTabBar",
|
||||
"loadInBackground", "useAutoScrolling",
|
||||
"useSmoothScrolling", "enableAutoImageResizing",
|
||||
"useSSL2", "useSSL3", "useTLS1", "useTypeAheadFind",
|
||||
"linksOnlyTypeAheadFind",
|
||||
#ifdef PROVISIONAL_SECURITY_UI
|
||||
"certSelection", "securityOCSPEnabled", "serviceURL", "signingCA",
|
||||
#endif
|
||||
"enableSoftwareInstall", "enableSmartUpdate",
|
||||
"enableExtensionUpdate", "enableAutoInstall"];
|
||||
|
||||
#ifdef PROVISIONAL_SECURITY_UI
|
||||
const nsIX509CertDB = Components.interfaces.nsIX509CertDB;
|
||||
const nsX509CertDB = "@mozilla.org/security/x509certdb;1";
|
||||
const nsIOCSPResponder = Components.interfaces.nsIOCSPResponder;
|
||||
const nsISupportsArray = Components.interfaces.nsISupportsArray;
|
||||
|
||||
var certdb;
|
||||
var ocspResponders;
|
||||
#endif
|
||||
function Startup() {
|
||||
updatePrefs();
|
||||
#ifdef PROVISIONAL_SECURITY_UI
|
||||
var ocspEntry;
|
||||
var i;
|
||||
|
||||
certdb = Components.classes[nsX509CertDB].getService(nsIX509CertDB);
|
||||
ocspResponders = certdb.getOCSPResponders();
|
||||
|
||||
var signersMenu = document.getElementById("signingCA");
|
||||
var signersURL = document.getElementById("serviceURL");
|
||||
for (i=0; i<ocspResponders.length; i++) {
|
||||
ocspEntry = ocspResponders.queryElementAt(i, nsIOCSPResponder);
|
||||
var menuItemNode = document.createElement("menuitem");
|
||||
menuItemNode.setAttribute("value", ocspEntry.responseSigner);
|
||||
menuItemNode.setAttribute("label", ocspEntry.responseSigner);
|
||||
signersMenu.firstChild.appendChild(menuItemNode);
|
||||
}
|
||||
|
||||
doSecurityEnabling();
|
||||
|
||||
// XXXben menulists suck, see explanation in pref-privacy.js
|
||||
// style resolution problem inside scrollable areas.
|
||||
var scb = document.getElementById("signingCABox");
|
||||
var sca = document.getElementById("signingCA");
|
||||
sca.removeAttribute("hidden");
|
||||
sca.parentNode.removeChild(sca);
|
||||
scb.appendChild(sca);
|
||||
#endif
|
||||
}
|
||||
|
||||
function updatePrefs() {
|
||||
var enabled = document.getElementById("useTypeAheadFind").checked;
|
||||
var linksOnly = document.getElementById("linksOnlyTypeAheadFind");
|
||||
linksOnly.disabled = !enabled;
|
||||
}
|
||||
|
||||
#ifdef PROVISIONAL_SECURITY_UI
|
||||
function doSecurityEnabling()
|
||||
{
|
||||
var signersMenu = document.getElementById("signingCA");
|
||||
var signersURL = document.getElementById("serviceURL");
|
||||
var radiogroup = document.getElementById("securityOCSPEnabled");
|
||||
|
||||
switch ( radiogroup.value ) {
|
||||
case "0":
|
||||
case "1":
|
||||
signersMenu.setAttribute("disabled", true);
|
||||
signersURL.setAttribute("disabled", true);
|
||||
break;
|
||||
case "2":
|
||||
default:
|
||||
signersMenu.removeAttribute("disabled");
|
||||
signersURL.removeAttribute("disabled");
|
||||
}
|
||||
}
|
||||
|
||||
function changeURL()
|
||||
{
|
||||
var signersMenu = document.getElementById("signingCA");
|
||||
var signersURL = document.getElementById("serviceURL");
|
||||
var CA = signersMenu.getAttribute("value");
|
||||
var i;
|
||||
var ocspEntry;
|
||||
|
||||
for (i=0; i < ocspResponders.length; i++) {
|
||||
ocspEntry = ocspResponders.queryElementAt(i, nsIOCSPResponder);
|
||||
if (CA == ocspEntry.responseSigner) {
|
||||
signersURL.setAttribute("value", ocspEntry.serviceURL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function openCrlManager()
|
||||
{
|
||||
window.open('chrome://pippki/content/crlManager.xul', "",
|
||||
'chrome,width=500,height=400,resizable=1');
|
||||
}
|
||||
|
||||
function openCertManager()
|
||||
{
|
||||
//check for an existing certManager window and focus it; it's not application modal
|
||||
const kWindowMediatorContractID = "@mozilla.org/appshell/window-mediator;1";
|
||||
const kWindowMediatorIID = Components.interfaces.nsIWindowMediator;
|
||||
const kWindowMediator = Components.classes[kWindowMediatorContractID].getService(kWindowMediatorIID);
|
||||
var lastCertManager = kWindowMediator.getMostRecentWindow("mozilla:certmanager");
|
||||
if (lastCertManager)
|
||||
lastCertManager.focus();
|
||||
else {
|
||||
window.open('chrome://pippki/content/certManager.xul', "",
|
||||
'chrome,height=400,centerscreen,resizable=yes,dialog=no');
|
||||
}
|
||||
}
|
||||
|
||||
function openDeviceManager()
|
||||
{
|
||||
//check for an existing deviceManger window and focus it; it's not application modal
|
||||
const kWindowMediatorContractID = "@mozilla.org/appshell/window-mediator;1";
|
||||
const kWindowMediatorIID = Components.interfaces.nsIWindowMediator;
|
||||
const kWindowMediator = Components.classes[kWindowMediatorContractID].getService(kWindowMediatorIID);
|
||||
var lastCertManager = kWindowMediator.getMostRecentWindow("mozilla:devicemanager");
|
||||
if (lastCertManager)
|
||||
lastCertManager.focus();
|
||||
else {
|
||||
window.open('chrome://pippki/content/device_manager.xul', "devmgr",
|
||||
'chrome,height=400,centerscreen,resizable=yes,dialog=no');
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
function checkForUpdates()
|
||||
{
|
||||
// XXXben - check for "all types" and the app itself here.
|
||||
var em = Components.classes["@mozilla.org/extension-manager;1"]
|
||||
.getService(Components.interfaces.nsIExtensionManager);
|
||||
openDialog("chrome://mozapps/content/extensions/update.xul",
|
||||
"", "chrome,modal", "extensions", em, null);
|
||||
}
|
||||
|
@ -17,146 +17,14 @@
|
||||
onload="parent.initPanel('chrome://browser/content/pref/pref-advanced.xul');"
|
||||
headertitle="&lHeader;">
|
||||
|
||||
<script type="application/x-javascript">
|
||||
<![CDATA[
|
||||
var _elementIDs = ["moveSystemCaret", "hideTabBar",
|
||||
"loadInBackground", "useAutoScrolling",
|
||||
"useSmoothScrolling", "enableAutoImageResizing",
|
||||
"useSSL2", "useSSL3", "useTLS1", "useTypeAheadFind",
|
||||
"linksOnlyTypeAheadFind"
|
||||
#ifdef PROVISIONAL_SECURITY_UI
|
||||
, "certSelection", "securityOCSPEnabled", "serviceURL", "signingCA"
|
||||
#endif
|
||||
];
|
||||
|
||||
#ifdef PROVISIONAL_SECURITY_UI
|
||||
const nsIX509CertDB = Components.interfaces.nsIX509CertDB;
|
||||
const nsX509CertDB = "@mozilla.org/security/x509certdb;1";
|
||||
const nsIOCSPResponder = Components.interfaces.nsIOCSPResponder;
|
||||
const nsISupportsArray = Components.interfaces.nsISupportsArray;
|
||||
|
||||
var certdb;
|
||||
var ocspResponders;
|
||||
#endif
|
||||
function Startup() {
|
||||
updatePrefs();
|
||||
#ifdef PROVISIONAL_SECURITY_UI
|
||||
var ocspEntry;
|
||||
var i;
|
||||
|
||||
certdb = Components.classes[nsX509CertDB].getService(nsIX509CertDB);
|
||||
ocspResponders = certdb.getOCSPResponders();
|
||||
|
||||
var signersMenu = document.getElementById("signingCA");
|
||||
var signersURL = document.getElementById("serviceURL");
|
||||
for (i=0; i<ocspResponders.length; i++) {
|
||||
ocspEntry = ocspResponders.queryElementAt(i, nsIOCSPResponder);
|
||||
var menuItemNode = document.createElement("menuitem");
|
||||
menuItemNode.setAttribute("value", ocspEntry.responseSigner);
|
||||
menuItemNode.setAttribute("label", ocspEntry.responseSigner);
|
||||
signersMenu.firstChild.appendChild(menuItemNode);
|
||||
}
|
||||
|
||||
doSecurityEnabling();
|
||||
|
||||
// XXXben menulists suck, see explanation in pref-privacy.js
|
||||
// style resolution problem inside scrollable areas.
|
||||
var scb = document.getElementById("signingCABox");
|
||||
var sca = document.getElementById("signingCA");
|
||||
sca.removeAttribute("hidden");
|
||||
sca.parentNode.removeChild(sca);
|
||||
scb.appendChild(sca);
|
||||
#endif
|
||||
}
|
||||
|
||||
function updatePrefs() {
|
||||
var enabled = document.getElementById("useTypeAheadFind").checked;
|
||||
var linksOnly = document.getElementById("linksOnlyTypeAheadFind");
|
||||
linksOnly.disabled = !enabled;
|
||||
}
|
||||
|
||||
#ifdef PROVISIONAL_SECURITY_UI
|
||||
function doSecurityEnabling()
|
||||
{
|
||||
var signersMenu = document.getElementById("signingCA");
|
||||
var signersURL = document.getElementById("serviceURL");
|
||||
var radiogroup = document.getElementById("securityOCSPEnabled");
|
||||
|
||||
switch ( radiogroup.value ) {
|
||||
case "0":
|
||||
case "1":
|
||||
signersMenu.setAttribute("disabled", true);
|
||||
signersURL.setAttribute("disabled", true);
|
||||
break;
|
||||
case "2":
|
||||
default:
|
||||
signersMenu.removeAttribute("disabled");
|
||||
signersURL.removeAttribute("disabled");
|
||||
}
|
||||
}
|
||||
|
||||
function changeURL()
|
||||
{
|
||||
var signersMenu = document.getElementById("signingCA");
|
||||
var signersURL = document.getElementById("serviceURL");
|
||||
var CA = signersMenu.getAttribute("value");
|
||||
var i;
|
||||
var ocspEntry;
|
||||
|
||||
for (i=0; i < ocspResponders.length; i++) {
|
||||
ocspEntry = ocspResponders.queryElementAt(i, nsIOCSPResponder);
|
||||
if (CA == ocspEntry.responseSigner) {
|
||||
signersURL.setAttribute("value", ocspEntry.serviceURL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function openCrlManager()
|
||||
{
|
||||
window.open('chrome://pippki/content/crlManager.xul', "",
|
||||
'chrome,width=500,height=400,resizable=1');
|
||||
}
|
||||
|
||||
function openCertManager()
|
||||
{
|
||||
//check for an existing certManager window and focus it; it's not application modal
|
||||
const kWindowMediatorContractID = "@mozilla.org/appshell/window-mediator;1";
|
||||
const kWindowMediatorIID = Components.interfaces.nsIWindowMediator;
|
||||
const kWindowMediator = Components.classes[kWindowMediatorContractID].getService(kWindowMediatorIID);
|
||||
var lastCertManager = kWindowMediator.getMostRecentWindow("mozilla:certmanager");
|
||||
if (lastCertManager)
|
||||
lastCertManager.focus();
|
||||
else {
|
||||
window.open('chrome://pippki/content/certManager.xul', "",
|
||||
'chrome,height=400,centerscreen,resizable=yes,dialog=no');
|
||||
}
|
||||
}
|
||||
|
||||
function openDeviceManager()
|
||||
{
|
||||
//check for an existing deviceManger window and focus it; it's not application modal
|
||||
const kWindowMediatorContractID = "@mozilla.org/appshell/window-mediator;1";
|
||||
const kWindowMediatorIID = Components.interfaces.nsIWindowMediator;
|
||||
const kWindowMediator = Components.classes[kWindowMediatorContractID].getService(kWindowMediatorIID);
|
||||
var lastCertManager = kWindowMediator.getMostRecentWindow("mozilla:devicemanager");
|
||||
if (lastCertManager)
|
||||
lastCertManager.focus();
|
||||
else {
|
||||
window.open('chrome://pippki/content/device_manager.xul', "devmgr",
|
||||
'chrome,height=400,centerscreen,resizable=yes,dialog=no');
|
||||
}
|
||||
}
|
||||
#endif
|
||||
]]>
|
||||
</script>
|
||||
<script type="application/x-javascript" src="chrome://browser/content/pref/pref-advanced.js"/>
|
||||
|
||||
<vbox class="listBox settingsBox" flex="1" style="overflow: auto;">
|
||||
<expander id="accessibility" label="&accessibility.label;" open="true" persist="open" clearhidden="true">
|
||||
<checkbox id="moveSystemCaret" label="&moveSystemCaret.label;"
|
||||
prefstring="accessibility.browsewithcaret"/>
|
||||
<checkbox id="useTypeAheadFind" label="&useTypeAheadFind.label;"
|
||||
prefstring="accessibility.typeaheadfind" oncommand="updatePrefs()"/>
|
||||
prefstring="accessibility.typeaheadfind" oncommand="updatePrefs()"/>
|
||||
<checkbox class="indent" id="linksOnlyTypeAheadFind" label="&linksOnlyTypeAheadFind.label;"
|
||||
prefstring="accessibility.typeaheadfind.linksonly"/>
|
||||
</expander>
|
||||
@ -174,6 +42,31 @@
|
||||
<checkbox id="enableAutoImageResizing" label="&enableAutoImageResizing.label;"
|
||||
prefstring="browser.enable_automatic_image_resizing"/>
|
||||
</expander>
|
||||
|
||||
<expander id="softwareupdate" label="&softwareupdate.label;"
|
||||
open="true" persist="open" clearhidden="true" align="left">
|
||||
<label>&softwareupdateinfo.label;</label>
|
||||
<vbox class="indent" align="left">
|
||||
<checkbox id="enableSmartUpdate"
|
||||
label="&enableSmartUpdate.label;" accesskey="&enableSmartUpdate.accesskey;"
|
||||
prefstring="update.app.enabled"/>
|
||||
<checkbox id="enableExtensionUpdate"
|
||||
label="&enableExtensionUpdate.label;" accesskey="&enableExtensionUpdate.accesskey;"
|
||||
prefstring="update.extensions.enabled"/>
|
||||
<checkbox id="enableAutoInstall" class="indent"
|
||||
label="&enableAutoInstall.label;" accesskey="&enableAutoInstall.accesskey;"
|
||||
prefstring="update.extensions.autoUpdate"/>
|
||||
<separator class="thin"/>
|
||||
<button label="&checkNow.label;" accesskey="&checkNow.accesskey;"
|
||||
oncommand="checkForUpdates();"/>
|
||||
</vbox>
|
||||
<separator class="thin"/>
|
||||
<!-- XXXben - this will move to "Web Features" once I reorg Options again -->
|
||||
<checkbox id="enableSoftwareInstall" label="&enableSoftwareUpdate.label;"
|
||||
accesskey="&enableSoftwareUpdate.accesskey;"
|
||||
prefstring="xpinstall.enabled"/>
|
||||
</expander>
|
||||
|
||||
<expander id="security" label="&security.label;" open="true" persist="open" clearhidden="true">
|
||||
<checkbox id="useSSL2" label="&useSSL2.label;"
|
||||
prefstring="security.enable_ssl2"/>
|
||||
@ -276,6 +169,5 @@
|
||||
|
||||
#endif
|
||||
</vbox>
|
||||
|
||||
</page>
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
browser.jar:
|
||||
* content/browser/pref/nsPrefWindow.js (content/nsPrefWindow.js)
|
||||
* content/browser/pref/pref.xul (content/pref.xul)
|
||||
* content/browser/pref/pref-advanced.js (content/pref-advanced.js)
|
||||
* content/browser/pref/pref-advanced.xul (content/pref-advanced.xul)
|
||||
* content/browser/pref/pref-advancedscripts.xul (content/pref-advancedscripts.xul)
|
||||
* content/browser/pref/pref-connection.js (content/pref-connection.js)
|
||||
|
@ -84,3 +84,19 @@
|
||||
<!ENTITY serviceURL.accesskey "S">
|
||||
<!ENTITY signingCA.label "Response Signer:">
|
||||
<!ENTITY signingCA.accesskey "R">
|
||||
|
||||
<!-- Software Update -->
|
||||
<!ENTITY browsing.label "Browsing">
|
||||
<!ENTITY softwareupdate.label "Software Update">
|
||||
<!ENTITY enableSoftwareUpdate.label "Allow web sites to install software">
|
||||
<!ENTITY enableSoftwareUpdate.accesskey "i">
|
||||
<!ENTITY softwareupdateinfo.label "Periodically check for updates to:">
|
||||
<!ENTITY enableSmartUpdate.label "&brandShortName;">
|
||||
<!ENTITY enableSmartUpdate.accesskey "F">
|
||||
<!ENTITY enableExtensionUpdate.label "My Extensions">
|
||||
<!ENTITY enableExtensionUpdate.accesskey "y">
|
||||
<!ENTITY enableAutoInstall.label "Automatically download and install updates to Extensions.">
|
||||
<!ENTITY enableAutoInstall.accesskey "d">
|
||||
<!ENTITY checkNow.label "Check Now">
|
||||
<!ENTITY checkNow.accesskey "N">
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user