зеркало из https://github.com/mozilla/pjs.git
Bug 339720 show warning page before showing about:config
r=neil,KaiRo sr=jag
This commit is contained in:
Родитель
420e23451c
Коммит
7b5d39d4d6
|
@ -54,6 +54,8 @@ pref("general.useragent.contentlocale", "chrome://navigator-region/locale/region
|
|||
|
||||
pref("general.config.obscure_value", 13); // for MCD .cfg files
|
||||
|
||||
pref("general.warnOnAboutConfig", true);
|
||||
|
||||
// maximum number of dated backups to keep at any time
|
||||
pref("browser.bookmarks.max_backups", 5);
|
||||
|
||||
|
|
|
@ -0,0 +1,109 @@
|
|||
/* ***** 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 Mozilla Communicator client code, released
|
||||
* March 31, 1998.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998-2001
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Chip Clark (chipc@netscape.com)
|
||||
* Christopher Thomas (cst@yecc.com)
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of 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 ***** */
|
||||
|
||||
/* ===== config.css ==============================================
|
||||
== Styles for about:config
|
||||
======================================================================= */
|
||||
|
||||
@import url("chrome://global/skin/");
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
|
||||
/* ::::: warning screen ::::: */
|
||||
|
||||
#warningScreen
|
||||
{
|
||||
background: -moz-Dialog;
|
||||
}
|
||||
|
||||
#warningBox
|
||||
{
|
||||
background: white;
|
||||
border: 1px solid ThreeDShadow;
|
||||
-moz-border-radius: 10px;
|
||||
padding: 3em;
|
||||
-moz-padding-start: 30px;
|
||||
margin-left: 1em;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
#warningInnerBox
|
||||
{
|
||||
max-width: 50em;
|
||||
}
|
||||
|
||||
#warningTitle
|
||||
{
|
||||
margin: 0 0 .6em 0;
|
||||
font-size: 160%;
|
||||
border-bottom: 1px solid ThreeDLightShadow
|
||||
}
|
||||
|
||||
#warningText
|
||||
{
|
||||
font-size: 110%;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
#warningButton
|
||||
{
|
||||
margin-top: 0.6em;
|
||||
}
|
||||
|
||||
#showWarningNextTime
|
||||
{
|
||||
margin-top: 0.6em;
|
||||
}
|
||||
|
||||
#exclam
|
||||
{
|
||||
list-style-image: url("chrome://global/skin/icons/alert-exclam.gif");
|
||||
margin-right: 3em;
|
||||
}
|
||||
|
||||
/* ::::: tree rows ::::: */
|
||||
|
||||
treechildren::-moz-tree-cell-text(user)
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
treechildren::-moz-tree-cell-text(locked)
|
||||
{
|
||||
font-style: italic;
|
||||
}
|
|
@ -314,6 +314,7 @@ classic.jar:
|
|||
skin/classic/global/tree/twisty-clsd.gif (global/win/tree/twisty-clsd.gif)
|
||||
skin/classic/global/progressmeter/progressmeter-busy.gif (global/win/progressmeter/progressmeter-busy.gif)
|
||||
#endif
|
||||
skin/classic/global/config.css (global/config.css)
|
||||
skin/classic/global/netError.css (global/netError.css)
|
||||
skin/classic/global/plugins.css (/toolkit/empty-file)
|
||||
skin/classic/global/printing.css (global/printing.css)
|
||||
|
|
|
@ -157,6 +157,7 @@ modern.jar:
|
|||
skin/modern/global/button.css (global/button.css)
|
||||
skin/modern/global/checkbox.css (global/checkbox.css)
|
||||
skin/modern/global/colorpicker.css (global/colorpicker.css)
|
||||
skin/modern/global/config.css (global/config.css)
|
||||
skin/modern/global/console.css (global/console.css)
|
||||
skin/modern/global/dropmarker.css (global/dropmarker.css)
|
||||
skin/modern/global/filepicker.css (global/filepicker.css)
|
||||
|
|
|
@ -11,7 +11,6 @@ toolkit.jar:
|
|||
content/global/commonDialog.js (resources/content/commonDialog.js)
|
||||
content/global/strres.js (resources/content/strres.js)
|
||||
content/global/config.xul (resources/content/config.xul)
|
||||
content/global/config.css (resources/content/config.css)
|
||||
content/global/config.js (resources/content/config.js)
|
||||
content/global/mozilla.xhtml (resources/content/mozilla.xhtml)
|
||||
content/global/charsetOverlay.xul (resources/content/charsetOverlay.xul)
|
||||
|
|
|
@ -323,6 +323,17 @@ function onConfigLoad()
|
|||
gTypeStrs[nsIPrefBranch.PREF_INT] = gConfigBundle.getString("int");
|
||||
gTypeStrs[nsIPrefBranch.PREF_BOOL] = gConfigBundle.getString("bool");
|
||||
|
||||
var showWarning = gPrefBranch.getBoolPref("general.warnOnAboutConfig");
|
||||
|
||||
if (showWarning)
|
||||
document.getElementById("warningButton").focus();
|
||||
else
|
||||
ShowPrefs();
|
||||
}
|
||||
|
||||
// Unhide the warning message
|
||||
function ShowPrefs()
|
||||
{
|
||||
var prefCount = { value: 0 };
|
||||
var prefArray = gPrefBranch.getChildList("", prefCount);
|
||||
|
||||
|
@ -355,14 +366,20 @@ function onConfigLoad()
|
|||
|
||||
document.getElementById("configTree").view = view;
|
||||
|
||||
document.getElementById("configDeck").setAttribute("selectedIndex", 1);
|
||||
var showNextTime = document.getElementById("showWarningNextTime").checked;
|
||||
gPrefBranch.setBoolPref("general.warnOnAboutConfig", showNextTime);
|
||||
|
||||
document.getElementById("textbox").focus();
|
||||
}
|
||||
|
||||
function onConfigUnload()
|
||||
{
|
||||
if (document.getElementById("configDeck").getAttribute("selectedIndex") == 1) {
|
||||
gPrefBranch.removeObserver("", gPrefListener);
|
||||
document.getElementById("configTree").view = null;
|
||||
}
|
||||
}
|
||||
|
||||
function FilterPrefs()
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<?xml-stylesheet href="chrome://global/content/config.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/config.css" type="text/css"?>
|
||||
|
||||
<!-- ***** BEGIN LICENSE BLOCK *****
|
||||
Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
|
@ -75,7 +75,23 @@
|
|||
<key keycode="VK_ENTER" oncommand="ModifySelected();"/>
|
||||
<key keycode="VK_RETURN" oncommand="ModifySelected();"/>
|
||||
</keyset>
|
||||
|
||||
<deck id="configDeck" flex="1">
|
||||
<vbox id="warningScreen" flex="1" align="center">
|
||||
<spacer flex="1"/>
|
||||
<hbox id="warningBox" align="top">
|
||||
<image id="exclam" class="alert-icon"/>
|
||||
<vbox id="warningInnerBox" flex="1">
|
||||
<label id="warningTitle">&scaryWarningTitle.label;</label>
|
||||
<label id="warningText">&scaryWarningText.label;</label>
|
||||
<checkbox id="showWarningNextTime" label="&scaryWarningCheckbox.label;" checked="true"/>
|
||||
<hbox pack="center">
|
||||
<button id="warningButton" oncommand="ShowPrefs();" label="&scaryWarningButton.label;"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</hbox>
|
||||
<spacer flex="2"/>
|
||||
</vbox>
|
||||
<vbox flex="1">
|
||||
<hbox id="filterRow" align="center">
|
||||
<label value="&filterPrefs.label;" accesskey="&filterPrefs.accesskey;" control="textbox"/>
|
||||
<textbox id="textbox" flex="1" type="timed" timeout="500" oncommand="FilterPrefs();"/>
|
||||
|
@ -105,4 +121,6 @@
|
|||
|
||||
<treechildren id="configTreeBody" ondblclick="if (event.button == 0) ModifySelected();"/>
|
||||
</tree>
|
||||
</vbox>
|
||||
</deck>
|
||||
</window>
|
||||
|
|
|
@ -35,8 +35,16 @@
|
|||
|
||||
***** END LICENSE BLOCK ***** -->
|
||||
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
|
||||
%brandDTD;
|
||||
|
||||
<!ENTITY window.title "about:config">
|
||||
|
||||
<!ENTITY scaryWarningTitle.label "Be careful!">
|
||||
<!ENTITY scaryWarningText.label "This configuration page contains settings that keep &brandShortName; working properly. Modifying these settings may cause problems such as instability, data loss, broken features, or even security vulnerabilities.">
|
||||
<!ENTITY scaryWarningButton.label "I understand and wish to continue">
|
||||
<!ENTITY scaryWarningCheckbox.label "Show this warning next time">
|
||||
|
||||
<!ENTITY filterPrefs.label "Filter:">
|
||||
<!ENTITY filterPrefs.accesskey "I">
|
||||
<!ENTITY showAll.label "Show All">
|
||||
|
|
Загрузка…
Ссылка в новой задаче