Bug 252362: security warning preferences should be exposed in user interface, r=mconnor, ui-r=beltzner

This commit is contained in:
gavin%gavinsharp.com 2006-05-31 00:57:50 +00:00
Родитель 25bda794aa
Коммит 897daec48b
9 изменённых файлов: 208 добавлений и 9 удалений

Просмотреть файл

@ -213,7 +213,13 @@ var gAdvancedPane = {
showLanguages: function ()
{
document.documentElement.openSubDialog("chrome://browser/content/preferences/languages.xul",
"", null);
"", null);
},
showWarnings: function ()
{
document.documentElement.openSubDialog("chrome://browser/content/preferences/securityWarnings.xul",
"", null);
#ifdef MOZ_SAFE_BROWSING
},

Просмотреть файл

@ -119,7 +119,7 @@
#endif
</tabs>
<tabpanels flex="1">
<tabpanel orient="vertical">
<tabpanel orient="vertical"><!-- General -->
<groupbox align="start">
<caption label="&accessibility.label;"/>
<checkbox id="moveSystemCaret" label="&moveSystemCaret.label;"
@ -152,7 +152,7 @@
</hbox>
</groupbox>
</tabpanel>
<tabpanel orient="vertical" align="start">
<tabpanel orient="vertical" align="start"><!-- Update -->
<label control="autoUpdateGroup">&autoCheck.label;</label>
<vbox class="indent" id="autoUpdateGroup" xhtml2:role="wairole:groupbox">
<checkbox id="enableAppUpdate"
@ -194,7 +194,7 @@
oncommand="gAdvancedPane.showUpdates();"/>
</hbox>
</tabpanel>
<tabpanel orient="vertical">
<tabpanel orient="vertical"><!-- Security -->
<groupbox>
<caption label="&protocols.label;"/>
<grid>
@ -218,6 +218,18 @@
</rows>
</grid>
</groupbox>
<groupbox>
<caption label="&securityWarnings.label;"/>
<description control="showWarnings"
value="&securityWarnings.description;"/>
<separator class="thin"/>
<hbox>
<button id="showWarnings"
label="&securityWarningsButton.label;"
accesskey="&securityWarningsButton.accesskey;"
oncommand="gAdvancedPane.showWarnings();"/>
</hbox>
</groupbox>
<groupbox>
<caption label="&certificates.label;"/>
<description control="certselection">&certselect.description;</description>
@ -228,7 +240,7 @@
<radio label="&certselect.ask;" accesskey="&certselect.ask.accesskey;"
value="Ask Every Time"/>
</radiogroup>
<separator/>
#ifdef XP_MACOSX

Просмотреть файл

@ -30,6 +30,8 @@ browser.jar:
* content/browser/preferences/privacy.js
* content/browser/preferences/sanitize.xul
* content/browser/preferences/sanitize.js
* content/browser/preferences/securityWarnings.xul
* content/browser/preferences/securityWarnings.js
#ifdef MOZ_PLACES
* content/browser/preferences/selectBookmark.xul
* content/browser/preferences/selectBookmark.js

Просмотреть файл

@ -0,0 +1,44 @@
# -*- 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 Firefox Preferences System.
#
# The Initial Developer of the Original Code is
# Gavin Sharp.
# Portions created by the Initial Developer are Copyright (C) 2006
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Gavin Sharp <gavin@gavinsharp.com>
#
# 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 secWarningSyncTo(aEvent) {
var prefName = aEvent.target.getAttribute("preference") + ".show_once";
var prefOnce = document.getElementById(prefName);
prefOnce.value = false;
return undefined;
}

Просмотреть файл

@ -0,0 +1,115 @@
<?xml version="1.0"?>
# -*- 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 Firefox Preferences System.
#
# The Initial Developer of the Original Code is
# Gavin Sharp.
# Portions created by the Initial Developer are Copyright (C) 2006
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Gavin Sharp <gavin@gavinsharp.com>
#
# 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 *****
<!DOCTYPE prefwindow SYSTEM "chrome://browser/locale/preferences/securityWarnings.dtd">
<?xml-stylesheet href="chrome://global/skin/"?>
<prefwindow id="SecurityWarnings" type="child"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&securityWarnings.title;"
dlgbuttons="accept,cancel">
<prefpane id="SecurityWarningsPane">
<preferences>
<preference id="security.warn_entering_secure"
name="security.warn_entering_secure"
type="bool"/>
<preference id="security.warn_entering_secure.show_once"
name="security.warn_entering_secure.show_once"
type="bool"/>
<preference id="security.warn_entering_weak"
name="security.warn_entering_weak"
type="bool"/>
<preference id="security.warn_entering_weak.show_once"
name="security.warn_entering_weak.show_once"
type="bool"/>
<preference id="security.warn_leaving_secure"
name="security.warn_leaving_secure"
type="bool"/>
<preference id="security.warn_leaving_secure.show_once"
name="security.warn_leaving_secure.show_once"
type="bool"/>
<preference id="security.warn_submit_insecure"
name="security.warn_submit_insecure"
type="bool"/>
<preference id="security.warn_submit_insecure.show_once"
name="security.warn_submit_insecure.show_once"
type="bool"/>
<preference id="security.warn_viewing_mixed"
name="security.warn_viewing_mixed"
type="bool"/>
<preference id="security.warn_viewing_mixed.show_once"
name="security.warn_viewing_mixed.show_once"
type="bool"/>
</preferences>
<script type="application/x-javascript" src="chrome://browser/content/preferences/securityWarnings.js"/>
<description value="&security.warn_when;"/>
<vbox class="indent">
<checkbox id="warn_entering_secure"
onsynctopreference="secWarningSyncTo(event);"
label="&security.warn_entering_secure.label;"
accesskey="&security.warn_entering_secure.accesskey;"
preference="security.warn_entering_secure"/>
<checkbox id="warn_entering_weak"
onsynctopreference="secWarningSyncTo(event);"
label="&security.warn_entering_weak.label;"
accesskey="&security.warn_entering_weak.accesskey;"
preference="security.warn_entering_weak"/>
<checkbox id="warn_leaving_secure"
onsynctopreference="secWarningSyncTo(event);"
label="&security.warn_leaving_secure.label;"
accesskey="&security.warn_leaving_secure.accesskey;"
preference="security.warn_leaving_secure"/>
<checkbox id="warn_submit_insecure"
onsynctopreference="secWarningSyncTo(event);"
label="&security.warn_submit_insecure.label;"
accesskey="&security.warn_submit_insecure.accesskey;"
preference="security.warn_submit_insecure"/>
<checkbox id="warn_viewing_mixed"
onsynctopreference="secWarningSyncTo(event);"
label="&security.warn_viewing_mixed.label;"
accesskey="&security.warn_viewing_mixed.accesskey;"
preference="security.warn_viewing_mixed"/>
</vbox>
</prefpane>
</prefwindow>

Просмотреть файл

@ -1,10 +1,11 @@
<!-- Note: due to bug 143065, the only remainaing accesskeys available to be
used in this file are: "j" and "q" -->
<!ENTITY generalTab.label "General">
<!ENTITY accessibility.label "Accessibility">
<!ENTITY moveSystemCaret.label "Allow text to be selected with the keyboard">
<!ENTITY moveSystemCaret.accesskey "b">
<!ENTITY useTypeAheadFind.label "Begin finding when you begin typing">
<!ENTITY useTypeAheadFind.accesskey "g">
<!ENTITY useTypeAheadFind.accesskey "p">
<!ENTITY browsing.label "Browsing">
<!ENTITY enableAutoImageResizing.label "Resize large images to fit in the browser window">
<!ENTITY enableAutoImageResizing.accesskey "z">
@ -54,6 +55,11 @@
<!ENTITY viewSecurityDevices.label "Security Devices">
<!ENTITY viewSecurityDevices.accesskey "y">
<!ENTITY securityWarnings.label "Warnings">
<!ENTITY securityWarnings.description "Choose which security warnings should be displayed while browsing.">
<!ENTITY securityWarningsButton.label "Configure Security Warnings">
<!ENTITY securityWarningsButton.accesskey "g">
<!ENTITY languages.caption "Languages">
<!ENTITY languagesInfo.label "Choose Languages web pages are displayed in.">
<!ENTITY showLanguages.label "Edit Languages...">

Просмотреть файл

@ -1,9 +1,9 @@
<!ENTITY prefWindow.titleWin "Options">
<!ENTITY prefWindow.titleGNOME "&brandShortName; Preferences">
<!ENTITY prefWindow.styleWin "width: 42em; height: 36em;">
<!ENTITY prefWindow.styleWin "width: 42em; height: 40em;">
<!ENTITY prefWindow.styleMac "width: 47em;">
<!ENTITY prefWindow.styleGNOME "width: 42em; height: 34.5em;">
<!ENTITY prefWindow.styleGNOME "width: 42em; height: 38.5em;">
<!ENTITY paneGeneral.title "General">
<!ENTITY panePrivacy.title "Privacy">

Просмотреть файл

@ -0,0 +1,13 @@
<!ENTITY securityWarnings.title "Security Warnings">
<!ENTITY security.warn_when "Show a warning dialog when:">
<!ENTITY security.warn_entering_secure.label "I am about to view an encrypted page.">
<!ENTITY security.warn_entering_secure.accesskey "v">
<!ENTITY security.warn_entering_weak.label "I am about to view a page that uses low-grade encryption.">
<!ENTITY security.warn_entering_weak.accesskey "g">
<!ENTITY security.warn_leaving_secure.label "I leave an encrypted page for one that isn't encrypted.">
<!ENTITY security.warn_leaving_secure.accesskey "l">
<!ENTITY security.warn_submit_insecure.label "I submit information that's not encrypted.">
<!ENTITY security.warn_submit_insecure.accesskey "s">
<!ENTITY security.warn_viewing_mixed.label "I'm about to view an encrypted page that contains some unencrypted information.">
<!ENTITY security.warn_viewing_mixed.accesskey "u">

Просмотреть файл

@ -67,6 +67,7 @@
locale/browser/preferences/preferences.properties (%chrome/browser/preferences/preferences.properties)
locale/browser/preferences/privacy.dtd (%chrome/browser/preferences/privacy.dtd)
locale/browser/preferences/sanitize.dtd (%chrome/browser/preferences/sanitize.dtd)
locale/browser/preferences/securityWarnings.dtd (%chrome/browser/preferences/securityWarnings.dtd)
locale/browser/preferences/tabs.dtd (%chrome/browser/preferences/tabs.dtd)
locale/browser/sidebar/sidebar.properties (%chrome/browser/sidebar/sidebar.properties)
% locale browser-region @AB_CD@ %locale/browser-region/