This commit is contained in:
ben%netscape.com 2000-04-25 02:17:38 +00:00
Родитель 5203eb31c3
Коммит 2b8ec2e0f4
43 изменённых файлов: 2593 добавлений и 2152 удалений

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

@ -1,4 +1,5 @@
pref-advanced.xul
pref-advanced-imageblocking.xul
pref-appearance.xul
pref-applications.xul
pref-charset.js
@ -10,7 +11,6 @@ pref-colors.xul
pref-themes.xul
pref-composer.js
pref-composer.xul
pref-cookies.xul
pref-debug.xul
pref-download.xul
pref-editing.xul
@ -20,6 +20,7 @@ pref-languages.xul
pref-navigator.js
pref-navigator.xul
pref-offline.xul
pref-policies.xul
pref-proxies.js
pref-proxies.xul
pref-proxy-manual.xul
@ -28,12 +29,10 @@ pref-search.js
pref-search.xul
pref-smart_browsing.xul
pref-smartupdate.xul
PrefsWindow.js
pref.js
nsPrefWindow.js
pref.xul
preftree.xul
pref-mousewheel.xul
pref-mousewheel.js
fontScalingOverlay.xul
pref-wallet.xul
prefutilities.js

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

@ -27,10 +27,10 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
EXPORT_RESOURCE_CONTENT = \
$(srcdir)/PrefsWindow.js \
$(srcdir)/pref.js \
$(srcdir)/nsPrefWindow.js \
$(srcdir)/pref.xul \
$(srcdir)/pref-advanced.xul \
$(srcdir)/pref-advanced-imageblocking.xul \
$(srcdir)/pref-appearance.xul \
$(srcdir)/pref-applications.xul \
$(srcdir)/pref-cache.xul \
@ -51,20 +51,19 @@ EXPORT_RESOURCE_CONTENT = \
$(srcdir)/pref-navigator.xul \
$(srcdir)/pref-navigator.js \
$(srcdir)/pref-offline.xul \
$(srcdir)/pref-policies.xul \
$(srcdir)/pref-proxies.js \
$(srcdir)/pref-proxies.xul \
$(srcdir)/pref-proxy-manual.xul \
$(srcdir)/pref-publish.xul \
$(srcdir)/pref-mousewheel.xul \
$(srcdir)/pref-mousewheel.js \
$(srcdir)/pref-cookies.xul \
$(srcdir)/pref-wallet.xul \
$(srcdir)/pref-search.js \
$(srcdir)/pref-search.xul \
$(srcdir)/pref-smart_browsing.xul \
$(srcdir)/pref-smartupdate.xul \
$(srcdir)/prefutilities.js \
$(srcdir)/fontScalingOverlay.xul \
$(srcdir)/preftree.xul \
$(NULL)

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

@ -25,6 +25,7 @@ include <$(DEPTH)\config\rules.mak>
install::
$(MAKE_INSTALL) pref-advanced.xul $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) pref-advanced-imageblocking.xul $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) pref-appearance.xul $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) pref-applications.xul $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) pref-cache.js $(DIST)\bin\chrome\communicator\content\pref
@ -36,7 +37,6 @@ install::
$(MAKE_INSTALL) pref-charset.xul $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) pref-composer.js $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) pref-composer.xul $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) pref-cookies.xul $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) pref-debug.xul $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) pref-download.xul $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) pref-editing.xul $(DIST)\bin\chrome\communicator\content\pref
@ -47,6 +47,7 @@ install::
$(MAKE_INSTALL) pref-navigator.xul $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) pref-offline.xul $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) pref-proxies.js $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) pref-policies.xul $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) pref-proxies.xul $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) pref-proxy-manual.xul $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) pref-publish.xul $(DIST)\bin\chrome\communicator\content\pref
@ -55,13 +56,11 @@ install::
$(MAKE_INSTALL) pref-smart_browsing.xul $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) pref-smartupdate.xul $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) pref-wallet.xul $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) PrefsWindow.js $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) pref.xul $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) pref.js $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) nsPrefWindow.js $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) preftree.xul $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) pref-mousewheel.xul $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) pref-mousewheel.js $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) fontScalingOverlay.xul $(DIST)\bin\chrome\communicator\content\pref
$(MAKE_INSTALL) prefutilities.js $(DIST)\bin\chrome\communicator\content\pref
clobber::

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

@ -0,0 +1,320 @@
/* -*- Mode: Java; tab-width: 4; c-basic-offset: 4; -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*
* Contributor(s):
* Ben "Count XULula" Goodger <ben@netscape.com>
*/
const _DEBUG = false;
/** PrefWindow IV
* =============
* This is a general page switcher and pref loader.
* =>> CHANGES MUST BE REVIEWED BY ben@netscape.com!! <<=
**/
function initPanel ( aPrefTag )
{
if( hPrefWindow )
hPrefWindow.onpageload( aPrefTag )
else
queuedTag = aPageTag;
}
window.doneLoading = false;
function nsPrefWindow( frame_id )
{
if ( !frame_id )
throw "Error: frame_id not supplied!";
this.contentFrame = frame_id
this.wsm = new nsWidgetStateManager( frame_id );
this.wsm.attributes = ["pref", "preftype", "prefstring", "prefattribute"];
this.pref = null;
this.cancelHandlers = [];
this.okHandlers = [];
// set up window
this.onload();
}
nsPrefWindow.prototype =
{
onload:
function ()
{
doSetOKCancel( this.onOK, this.onCancel );
try
{
this.pref = Components.classes["component://netscape/preferences"].getService();
if( this.pref )
{
this.pref = this.pref.QueryInterface( Components.interfaces.nsIPref );
}
}
catch(e)
{
dump("*** Failed to create prefs object\n");
return;
}
if( window.queuedTag )
{
this.onpageload( window.queuedTag );
}
if( window.arguments[1] )
this.closeBranches( window.arguments[1] );
},
onOK:
function ()
{
for( var i = 0; i < hPrefWindow.okHandlers.length; i++ )
{
hPrefWindow.okHandlers[i]();
}
var tag = document.getElementById( hPrefWindow.contentFrame ).getAttribute("tag");
if( tag == "" )
{
tag = document.getElementById( hPrefWindow.contentFrame ).getAttribute("src");
}
hPrefWindow.wsm.savePageData( tag );
hPrefWindow.savePrefs();
close();
},
onCancel:
function ()
{
for( var i = 0; i < hPrefWindow.cancelHandlers.length; i++ )
{
hPrefWindow.cancelHandlers[i]();
}
close();
},
registerOKCallbackFunc:
function ( aFunctionReference )
{
this.okHandlers[this.okHandlers.length] = aFunctionReference;
},
registerCancelCallbackFunc:
function ( aFunctionReference )
{
this.cancelHandlers[this.cancelHandlers.length] = aFunctionReference;
},
getPref:
function ( aPrefType, aPrefString, aDefaultFlag )
{
var pref = hPrefWindow.pref;
try
{
switch ( aPrefType )
{
case "bool":
return !aDefaultFlag ? pref.GetBoolPref( aPrefString ) : pref.GetDefaultBoolPref( aPrefString );
break;
case "int":
return !aDefaultFlag ? pref.GetIntPref( aPrefString ) : pref.GetDefaultIntPref( aPrefString );
break;
case "color":
case "string":
default:
return !aDefaultFlag ? pref.CopyUnicharPref( aPrefString ) : pref.CopyDefaultUnicharPref( aPrefString );
break;
}
}
catch (e)
{
if( _DEBUG )
{
dump("*** no default pref for " + aPrefType + " pref: " + aPrefString + "\n");
dump(e + "\n");
}
}
return "!/!ERROR_UNDEFINED_PREF!/!";
} ,
setPref:
function ( aPrefType, aPrefString, aValue )
{
try
{
switch ( aPrefType )
{
case "bool":
hPrefWindow.pref.SetBoolPref( aPrefString, aValue );
break;
case "int":
hPrefWindow.pref.SetIntPref( aPrefString, aValue );
break;
case "color":
case "string":
default:
hPrefWindow.pref.SetUnicharPref( aPrefString, aValue );
break;
}
}
catch (e)
{
dump(e + "\n");
}
},
savePrefs:
function ()
{
for( var pageTag in this.wsm.dataManager.pageData )
{
var pageData = this.wsm.dataManager.getPageData( pageTag );
for( var elementID in pageData )
{
var element = this.wsm.contentArea.document.getElementById( elementID );
var itemObject = pageData[elementID];
if ( itemObject.pref == "true" )
{
var value = itemObject[itemObject.prefattribute];
switch( itemObject.preftype )
{
case "bool":
if( value == "true" && typeof(value) == "string" )
value = true;
else if( value == "false" && typeof(value) == "string" )
value = false;
break;
case "int":
value = parseInt(value);
break;
case "color":
if( toString(value) == "" )
{
dump("*** ERROR CASE: illegal attempt to set an empty color pref. ignoring.\n");
break;
}
case "string":
default:
if( typeof(value) != "string" )
{
value = toString(value);
}
break;
}
if( value != this.getPref( itemObject.preftype, itemObject.prefstring ) )
{
this.setPref( itemObject.preftype, itemObject.prefstring, value );
}
}
}
}
this.pref.SavePrefFile();
},
switchPage:
function ()
{
var prefPanelTree = document.getElementById( "prefsTree" );
var selectedItem = prefPanelTree.selectedItems[0];
var oldURL = document.getElementById( this.contentFrame ).getAttribute("tag");
if( !oldURL )
{
oldURL = document.getElementById( this.contentFrame ).getAttribute("src");
}
this.wsm.savePageData( oldURL ); // save data from the current page.
var newURL = selectedItem.firstChild.firstChild.getAttribute("url");
var newTag = selectedItem.firstChild.firstChild.getAttribute("tag");
if( newURL != oldURL )
{
document.getElementById( this.contentFrame ).setAttribute( "src", newURL );
if( !newTag )
{
document.getElementById( this.contentFrame ).setAttribute( "tag", newTag );
}
}
},
onpageload:
function ( aPageTag )
{
if( !this.wsm.dataManager.pageData[aPageTag] )
{
var prefElements = window.frames[this.contentFrame].document.getElementsByAttribute( "pref", "true" );
this.wsm.dataManager.pageData[aPageTag] = [];
for( var i = 0; i < prefElements.length; i++ )
{
var prefstring = prefElements[i].getAttribute( "prefstring" );
var prefid = prefElements[i].getAttribute( "id" );
var preftype = prefElements[i].getAttribute( "preftype" );
var prefdefval = prefElements[i].getAttribute( "prefdefval" );
var prefattribute = prefElements[i].getAttribute( "prefattribute" );
var prefvalue;
switch( preftype )
{
case "bool":
prefvalue = this.getPref( preftype, prefstring );
break;
case "int":
prefvalue = this.getPref( preftype, prefstring );
break;
case "string":
case "color":
default:
prefvalue = this.getPref( preftype, prefstring );
break;
}
if( prefvalue == "!/!ERROR_UNDEFINED_PREF!/!" )
{
prefvalue = prefdefval;
}
var root = this.wsm.dataManager.getItemData( aPageTag, prefid );
root[prefattribute] = prefvalue;
}
}
this.wsm.setPageData( aPageTag ); // do not set extra elements, accept hard coded defaults
if( window.frames[ this.contentFrame ].Startup )
{
window.frames[ this.contentFrame ].Startup();
}
},
closeBranches:
function ( aComponentName )
{
dump("*** running closeBranches\n");
var panelChildren = document.getElementById( "panelChildren" );
var panelTree = document.getElementById( "prefsTree" );
for( var i = 0; i < panelChildren.childNodes.length; i++ )
{
var currentItem = panelChildren.childNodes[i];
if( currentItem.id != aComponentName )
currentItem.removeAttribute( "open" );
}
var openItem = document.getElementById( aComponentName );
panelTree.selectItem( openItem );
},
};

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

@ -0,0 +1,102 @@
<?xml version="1.0"?>
<!--
The contents of this file are subject to the Netscape 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/NPL/
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 Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s):
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/pref/pref.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
%brandDTD;
<!ENTITY % prefImageBlockingDTD SYSTEM "chrome://communicator/locale/pref/pref-advanced-imageblocking.dtd" >
%prefImageBlockingDTD;
]>
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
align="vertical" title="&window.title;"
onload="startup();">
<keyset id="keyset"/>
<script>
<![CDATA[
var imageBehaviour, imageWarning, imageBehaviourParent, imageWarningParent;
function startup()
{
doSetOKCancel( onOK );
imageBehaviour = document.getElementById("networkImageBehaviour");
imageWarning = document.getElementById("networkImageWarnAboutImages");
imageBehaviourParent = window.opener.document.getElementById("networkImageBehaviour");
imageWarningParent = window.opener.document.getElementById("networkImageWarnAboutImages");
imageBehaviour.data = parseInt( imageBehaviourParent.getAttribute("value") );
imageBehaviour.selectedItem = imageBehaviour.getElementsByAttribute( "data", imageBehaviour.data )[0];
imageWarning.checked = imageWarningParent.getAttribute("checked");
}
function onOK()
{
imageBehaviourParent.setAttribute( "value", ( imageBehaviour.data != "" ? parseInt( imageBehaviour.data ) : 0 ) );
imageWarningParent.setAttribute("checked", imageWarning.checked );
window.close();
}
function viewImages()
{
window.openDialog("chrome://wallet/content/CookieViewer.xul","","modal=yes,chrome,resizable=no", 2 );
}
]]>
</script>
<box autostretch="never" valign="top">
<image class="image-icon label"/>
<box orient="vertical">
<html class="header">&imageDetails;</html>
<radiogroup id="networkImageBehaviour" orient="vertical" autostretch="never">
<radio data="0" value="&accAllImagesRadio.label;" accesskey="&accAllImagesRadio.accesskey;"/>
<radio data="1" value="&accOrgImagesRadio.label;" accesskey="&accOrgImagesRadio.accesskey;"/>
<radio data="2" value="&disableImages.label;" accesskey="&disableImages.accesskey;"/>
</radiogroup>
<checkbox class="indent" id="networkImageWarnAboutImages" value="&warnAboutImages.label;" accesskey="&warnAboutImages.accesskey;"/>
<separator/>
<box autostretch="never">
<box style="max-width: 22em;">
<html style="max-width: 20em;">&viewImagesExplanation.label;</html>
</box>
<button class="dialog" value="&viewImages.label;" accesskey="&viewImages.accesskey;" oncommand="viewImages();"/>
</box>
<separator class="groove"/>
<box id="okCancelButtonsRight"/>
</box>
</box>
</window>

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

@ -19,70 +19,106 @@
Contributor(s):
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/pref/pref.css" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/pref.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-advanced.dtd" >
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
class="color-dialog"
align="vertical" title="&window.title;"
onload="if( parent.handle ) parent.handle.onpageload( 'pref-advanced' ); else parent.queuedTag = 'pref-advanced';">
onload="parent.initPanel('chrome://communicator/content/pref/pref-advanced.xul');">
<box type="smallheader" title="&lHeader;" description="&rHeader;"/>
<script language="JavaScript">
<![CDATA[
_elementIDs = ["advancedAlwaysLoadImages", "advancedJavaAllow", "javascriptAllowMailNews", "javascriptEnabled", "CSSAllow", "advancedMailFTP", "networkImageBehaviour", "networkImageWarnAboutImages", "networkCookieBehaviour", "networkWarnAboutCookies"];
]]>
</script>
<script>
<![CDATA[
function displayImageDialog()
{
window.openDialog("chrome://pref/content/pref-advanced-imageblocking.xul", "", "chrome,resizable=no");
}
<titledbox orient="vertical">
<html:div>
<html:input type="checkbox" id="advancedAlwaysLoadImages"
prefdefval="true"
pref="true" preftype="bool" prefstring="advanced.always_load_images"/>
<html:label for="advancedAlwaysLoadImages" accesskey="&autoLoadImgCheck.accesskey;" tabindex="0">
&autoLoadImgCheck.label;
</html:label>
</html:div>
<html:div >
<html:input type="checkbox" id="advancedJavaAllow"
prefdefval="true"
pref="true" preftype="bool" prefstring="security.enable_java"/>
<html:label for="advancedJavaAllow" accesskey="&enbJavaCheck.accesskey;" tabindex="0">
&enbJavaCheck.label;
</html:label>
</html:div>
<html:div >
<html:input type="checkbox" id="javascriptEnabled"
prefdefval="true"
pref="true" preftype="bool" prefstring="javascript.enabled"/>
<html:label for="javascriptEnabled" accesskey="&enbJsCheck.accesskey;" tabindex="0">
&enbJsCheck.label;
</html:label>
</html:div>
<html:div >
<html:input type="checkbox" id="javascriptAllowMailNews"
prefdefval="true"
pref="true" preftype="bool" prefstring="javascript.allow.mailnews" />
<html:label for="javascriptAllowMailNews" accesskey="&enbJsCheck.accesskeyforMailNews;" tabindex="0">
&enbJsCheck.labelforMailNNews;
</html:label>
</html:div>
<html:div >
<html:input type="checkbox" id="CSSAllow"
prefdefval="true"
pref="true" preftype="bool" prefstring="css.allow" />
<html:label for="CSSAllow" accesskey="&enbCssCheck.accesskey;" tabindex="0">
&enbCssCheck.label;
</html:label>
</html:div>
<html:div >
<html:input type="checkbox" id="advancedMailFTP"
prefdefval="true"
pref="true" preftype="bool" prefstring="advanced.mailftp"/>
<html:label for="advancedMailFTP" accesskey="&sendAddFtpCheck.accesskey;" tabindex="0">
&sendAddFtpCheck.label;
</html:label>
</html:div>
function updateImageFields( aInteger, aBoolean )
{
var imageBehaviourField = document.getElementById("networkImageBehaviour");
var imageBehaviourCheckbox = document.getElementById("networkImageWarnAboutImages");
imageBehaviourField.value = aInteger;
imageBehaviourCheckbox.checked = aBoolean;
}
function viewCookies()
{
window.openDialog("chrome://wallet/content/CookieViewer.xul","","modal=yes,chrome,resizable=no", 0);
}
]]>
</script>
<box class="box-smallheader" title="&lHeader;" description="&rHeader;"/>
<titledbox orient="vertical" id="advancedSettings">
<box autostretch="never">
<checkbox id="advancedAlwaysLoadImages" value="&autoLoadImgCheck.label;" accesskey="&autoLoadImgCheck.accesskey;"
pref="true" preftype="bool" prefstring="advanced.always_load_images"
prefattribute="checked"/>
<spring flex="1"/>
<button class="dialog" value="&imageBlocking.label;" accesskey="&imageBlocking.accesskey;"
oncommand="displayImageDialog();"/>
</box>
<checkbox id="advancedJavaAllow" value="&enbJavaCheck.label;" accesskey="&enbJavaCheck.accesskey;"
pref="true" preftype="bool" prefstring="security.enable_java"
prefattribute="checked"/>
<checkbox id="javascriptEnabled" value="&enbJsCheck.label;" accesskey="&enbJsCheck.accesskey;"
pref="true" preftype="bool" prefstring="javascript.enabled"
prefattribute="checked"/>
<!-- XXX remove when overlays.rdf for messenger works -->
<checkbox class="indent" id="javascriptAllowMailNews" position="4"
value="&enbJsCheckMailNews.label;" accesskey="&enbJsCheckMailNews.accesskey;"
pref="true" preftype="bool" prefstring="javascript.allow.mailnews"
prefattribute="checked"/>
<!-- XXX -->
<checkbox id="CSSAllow" value="&enbCssCheck.label;" accesskey="&enbCssCheck.accesskey;"
pref="true" preftype="bool" prefstring="css.allow"
prefattribute="checked"/>
<checkbox id="advancedMailFTP" value="&sendAddFtpCheck.label;" accesskey="&sendAddFtpCheck.accesskey;"
pref="true" preftype="bool" prefstring="advanced.mailftp"
prefattribute="checked"/>
</titledbox>
<!-- hidden elements to contain image blocking prefs -->
<broadcaster id="networkImageBehaviour" pref="true" preftype="int" prefstring="network.image.imageBehavior" prefattribute="value" wsm_attributes="value"/>
<broadcaster id="networkImageWarnAboutImages" pref="true" preftype="bool" prefstring="network.image.warnAboutImages" prefattribute="checked" wsm_attributes="checked"/>
<titledbox orient="vertical">
<title><text value="&cookies;"/></title>
<html>&cookieDetails;</html>
<radiogroup id="networkCookieBehaviour" orient="vertical" autostretch="never"
pref="true" preftype="int" prefstring="network.cookie.cookieBehavior"
prefattribute="data">
<radio data="0" value="&accAllCookiesRadio.label;" accesskey="&accAllCookiesRadio.accesskey;"/>
<radio data="1" value="&accOrgCookiesRadio.label;" accesskey="&accOrgCookiesRadio.accesskey;"/>
<radio data="2" value="&disableCookies.label;" accesskey="&disableCookies.accesskey;"/>
</radiogroup>
<checkbox class="indent" id="networkWarnAboutCookies" value="&warnAboutCookies.label;" accesskey="&warnAboutCookies.accesskey;"
pref="true" preftype="bool" prefstring="network.cookie.warnAboutCookies"
prefattribute="checked"/>
<box autostretch="never" halign="right">
<button class="dialog" value="&viewCookies.label;" accesskey="&viewCookies.accesskey;" oncommand="viewCookies();"/>
</box>
</titledbox>
</window>

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

@ -22,71 +22,63 @@
Contributor(s):
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/pref/pref.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-appearance.dtd" >
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
align="vertical"
onload="if( parent.handle ) parent.handle.onpageload( 'pref-appearance' ); else parent.queuedTag = 'pref-appearance';">
class="color-dialog"
orient="vertical"
onload="parent.initPanel('chrome://communicator/content/pref/pref-appearance.xul');">
<box type="smallheader" title="&lHeader;" description="&rHeader;"/>
<script language="JavaScript">
<![CDATA[
// the first elements in this array will be poked from chromeregistry loaded
// overlays once overlays.rdf works properly
_elementIDs = ["generalStartupBrowser", "generalStartupMail", "generalStartupEditor", "toolbarStyle"];
]]>
</script>
<box class="box-smallheader" title="&lHeader;" description="&rHeader;"/>
<titledbox orient="vertical" id="generalStartupPreferences">
<title><text value="&onStartLegend.label;"/></title>
<html:div>
<html:input type="checkbox" pref="true" preftype="bool"
prefstring="general.startup.browser" id="generalStartupBrowser"/>
<html:label for="generalStartupBrowser" accesskey="&navCheck.accesskey;" tabindex="0">
&navCheck.label;
</html:label>
</html:div>
<html:div>
<html:input type="checkbox" pref="true" preftype="bool"
prefstring="general.startup.mail" id="generalStartupMail"/>
<html:label for="generalStartupMail" accesskey="&mesCheck.accesskey;" tabindex="0">
&mesCheck.label;
</html:label>
</html:div>
<html:div>
<html:input type="checkbox" pref="true" preftype="bool"
prefstring="general.startup.editor" id="generalStartupEditor"/>
<html:label for="generalStartupEditor" accesskey="&compCheck.accesskey;" tabindex="0">
&compCheck.label;
</html:label>
</html:div>
</titledbox>
<titledbox id="generalStartupPreferences" orient="vertical" autostretch="never">
<title><text value="&onStartLegend.label;"/></title>
<!-- XXX remove when navigator overlays.rdf works -->
<checkbox id="generalStartupBrowser" wsm_persist="true"
value="&navCheck.label;" accesskey="&navCheck.accesskey;"
pref="true" preftype="bool" prefstring="general.startup.browser"
prefattribute="checked"/>
<!-- XXX -->
<!-- XXX remove when mailnews overlays.rdf works -->
<checkbox id="generalStartupMail" wsm_persist="true" position="2"
value="&mesCheck.label;" accesskey="&mesCheck.accesskey;"
pref="true" preftype="bool" prefstring="general.startup.mail"
prefattribute="checked"/>
<!-- XXX -->
<!-- XXX remove when editor overlays.rdf works -->
<checkbox id="generalStartupEditor" wsm_persist="true"
value="&compCheck.label;" accesskey="&compCheck.accesskey;"
pref="true" preftype="bool" prefstring="general.startup.editor"
prefattribute="checked"/>
<!-- XXX -->
</titledbox>
<!-- displaying none for beta -->
<titledbox id="toolbarStyleBox" orient="vertical">
<title><text value="&showToolsLegend.label;"/></title>
<radiogroup id="toolbarStyle" orient="vertical" autostretch="never"
pref="true" preftype="int" prefstring="browser.chrome.toolbar_style"
prefattribute="data" wsm_persist="true">
<radio group="toolbarStyle" data="2" value="&picsNtextRadio.label;" accesskey="&picsNtextRadio.accesskey;"/>
<radio group="toolbarStyle" data="0" value="&picsOnlyRadio.label;" accesskey="&picsOnlyRadio.accesskey;"/>
<radio group="toolbarStyle" data="1" value="&textonlyRadio.label;" accesskey="&textonlyRadio.accesskey;"/>
</radiogroup>
</titledbox>
<!-- displaying none for beta -->
<titledbox orient="vertical" style="display: none;">
<title><text value="&showToolsLegend.label;"/></title>
<html:div>
<html:input name="showtoolbar" type="radio" pref="true" preftype="int"
prefindex="2" prefstring="browser.chrome.toolbar_style"
id="browserChromeToolbarStyle2"/>
<html:label for="browserChromeToolbarStyle2" accesskey="&picsNtextRadio.accesskey;" tabindex="0">
&picsNtextRadio.label;
</html:label>
</html:div>
<html:div>
<html:input name="showtoolbar" type="radio" pref="true" preftype="int"
prefindex="0" prefstring="browser.chrome.toolbar_style"
id="browserChromeToolbarStyle0"/>
<html:label for="browserChromeToolbarStyle0" accesskey="&picsOnlyRadio.accesskey;" tabindex="0">
&picsOnlyRadio.label;
</html:label>
</html:div>
<html:div>
<html:input name="showtoolbar" type="radio" pref="true" preftype="int"
prefindex="1" prefstring="browser.chrome.toolbar_style"
id="browserChromeToolbarStyle1"/>
<html:label for="browserChromeToolbarStyle1" accesskey="&textonlyRadio.accesskey;" tabindex="0">
&textonlyRadio.label;
</html:label>
</html:div>
</titledbox>
<spring flex="1"/>
</window>

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

@ -21,7 +21,7 @@
Contributor(s):
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/pref/pref.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
@ -29,9 +29,9 @@
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
class="color-dialog"
title="&window.title;" align="vertical"
onload="if( parent.handle ) parent.handle.onpageload( 'pref-applications' ); else parent.queuedTag = 'pref-applications';">
onload="parent.initPanel('chrome://communicator/content/pref/pref-applications.xul');">
<!-- NOTE to owner of this panel
- this panel is quite complex. It will probably require a getfields
@ -41,15 +41,11 @@
from the list as appropriate to pass to the Data Manager
-->
<box type="smallheader" title="&lHeader;" description="&rHeader;"/>
<box class="box-smallheader" title="&lHeader;" description="&rHeader;"/>
<html:fieldset flex="100%" style="width: 100%">
<html:legend align="left">&descript;</html:legend>
<box align="horizontal"
class="hspace-both vspace"
flex="100%"
style="width: 93%; height: 100%;">
<tree id="appTree" class="inset" flex="100%" style="height: 55%;">
<titledbox>
<title><text value="&descript;"/></title>
<tree id="appTree" class="inset" flex="1">
<treecol/>
<treechildren>
<treeitem>
@ -59,21 +55,18 @@
</treeitem>
</treechildren>
</tree>
<spring flex="5%"/>
<box align="vertical">
<titledbutton class="dialog push" id="newTypeButton" value="&newTypeButton.label;" />
<titledbutton class="dialog push" id="editButton" value="&editButton.label;" />
<titledbutton class="dialog push" id="removeButton" value="&removeButton.label;" />
<spring flex="100%"/>
<box orient="vertical" halign="top">
<button class="dialog push" id="newTypeButton" value="&newTypeButton.label;" accesskey="&newTypeButton.accesskey;" />
<button class="dialog push" id="editButton" value="&editButton.label;" accesskey="&editButton.accesskey;" />
<button class="dialog push" id="removeButton" value="&removeButton.label;" accesskey="&removeButton.accesskey;" />
</box>
</box>
</html:fieldset>
</titledbox>
<html:fieldset class="vspace">
<html:legend align="left">&file;</html:legend>
<html:div class="hspace-both">&exten;</html:div>
<html:div class="hspace-both">&mimeType;</html:div>
<html:div class="hspace-both">&handle;</html:div>
</html:fieldset>
<titledbox orient="vertical">
<title><text value="&file;"/></title>
<text class="label" value="&exten;"/>
<text class="label" value="&mimeType;"/>
<text class="label" value="&handle;"/>
</titledbox>
</window>

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

@ -20,144 +20,82 @@
Contributor(s):
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/pref/pref.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-cache.dtd" >
<window debug="false" xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
align="vertical" title="&title.label;"
onload="if( parent.handle ) parent.handle.onpageload( 'pref-cache' ); else parent.queuedTag = 'pref-cache';">
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="color-dialog"
orient="vertical" title="&title.label;"
onload="parent.initPanel('chrome://communicator/content/pref/pref-cache.xul');">
<html:script language="javascript" src="chrome://global/content/strres.js" />
<html:script language="javascript" src="chrome://communicator/content/pref/prefutilities.js"/>
<html:script language="javascript" src="chrome://communicator/content/pref/pref-cache.js"/>
<box type="smallheader" title="&lHeader;" description="&rHeader;"/>
<titledbox orient="vertical">
<box orient="vertical" flex="1" >
<html:div>&cachePara;</html:div>
<box orient="horizontal" flex="1" autostretch="never" valign="middle" class="vertical-gap">
<text value="&memCache;" style="width: 120px" align="right"/>
<box orient="vertical">
<html:input style="margin-left: 5px; margin-right: 5px" name="disk" type="text" size="5" id="browserCacheMemoryCacheSize"
pref="true" preftype="int" prefstring="browser.cache.memory_cache_size"/>
</box>
<text value="&kbyes;"/>
<box orient="horizontal" align="right" flex="1" autostretch="never">
<titledbutton class="dialog push" name="clearm" value="&clearMemcacheButton.label;" />
</box>
</box>
<box orient="horizontal" flex="1" autostretch="never" valign="middle">
<text value="&diskCache;" style="width: 120px" align="right"/>
<box orient="vertical">
<html:input style="margin-left: 5px; margin-right: 5px" name="disk" type="text" size="5" id="browserCacheDiskCacheSize"
pref="true" preftype="int" prefstring="browser.cache.disk_cache_size" />
</box>
<text value="&kbyes;"/>
<box orient="horizontal" align="right" flex="1" autostretch="never">
<titledbutton class="dialog push" name="cleard" value="&clearDiskcacheButton.label;" />
</box>
</box>
<box orient="horizontal" flex="1" autostretch="never" valign="middle">
<text value="&diskCacheFolder;" style="width: 120px" align="right"/>
<box orient="vertical" flex="1">
<html:input style="margin-left: 5px; margin-right: 5px" name="disk" type="text" id="browserCacheDirectory"
pref="true" preftype="string" prefstring="browser.cache.directory"/>
</box>
</box>
<box orient="horizontal">
<spring flex="1"/>
<titledbutton class="dialog push" value="&chooseFolder;" align="left" onclick="prefCacheSelectFolder()"/>
</box>
<!-- old version
<spring style="height: 15px;"/>
<box orient="horizontal" flex="100%">
<box orient="vertical">
<box orient="horizontal">
<spring flex="100%"/>
<html:div class="spreadlabel" style="padding-top: 2px; padding-bottom: 9px;">&memCache;</html:div>
</box>
<box orient="horizontal">
<spring flex="100%"/>
<html:div class="spreadlabel" style="padding-top: 2px; padding-bottom: 9px;">&diskCache;</html:div>
</box>
<box orient="horizontal">
<spring flex="100%"/>
<html:div class="spreadlabel" style="padding-top: 2px; padding-bottom: 9px;">&diskCacheFolder;</html:div>
</box>
</box>
<box orient="vertical" flex="100%">
<box orient="horizontal">
<html:div>
<html:input name="disk" type="text" size="5" id="browserCacheMemoryCacheSize"
pref="true" preftype="int" prefstring="browser.cache.memory_cache_size"/>
</html:div>
<html:div>&kbyes;</html:div>
<spring flex="100%"/>
<titledbutton class="dialog push" name="clearm" value="&clearMemcacheButton.label;" onclick="prefClearMemCache()" />
</box>
<box orient="horizontal">
<html:div>
<html:input name="disk" type="text" size="5" id="browserCacheDiskCacheSize"
pref="true" preftype="int" prefstring="browser.cache.disk_cache_size" />
</html:div>
<html:div>&kbyes;</html:div>
<spring flex="100%"/>
<titledbutton class="dialog push" name="cleard" value="&clearDiskcacheButton.label;" onclick ="prefClearDiskCache()" />
</box>
<box orient="vertical" flex="100%">
<box orient="horizontal" style="padding-right: 3px;">
<html:input name="disk" type="text" id="browserCacheDirectory"
pref="true" preftype="string" prefstring="browser.cache.directory" flex="100%"/>
</box>
</box>
<box orient="horizontal">
<spring flex="1"/>
<titledbutton class="dialog push" value="&chooseFolder;" align="left" onclick="prefCacheSelectFolder()"/>
</box>
</box>
</box-->
</box>
</titledbox>
<script language="JavaScript">
<![CDATA[
_elementIDs = ["browserCacheMemoryCache", "browserCacheDiskCache", "browserCacheDirectory", "browserCacheCheckDocFrequency"];
]]>
</script>
<titledbox orient="vertical">
<text value="&docCache;" align="left"/>
<script language="javascript" src="chrome://global/content/strres.js"></script>
<script language="javascript" src="chrome://communicator/content/pref/prefutilities.js"></script>
<script language="javascript" src="chrome://communicator/content/pref/pref-cache.js"></script>
<box orient="vertical">
<html:div class="vertical-gap">
<html:input name="cacheDocFreq" type="radio" id="browserCacheCheckDocFrequency0"
pref="true" preftype="int" prefindex="0" prefstring="browser.cache.check_doc_frequency"/>
<html:label for="browserCacheCheckDocFrequency0" accesskey="&oncePsessionRadio.accesskey;" tabindex="0">
&oncePsessionRadio.label;
</html:label>
</html:div>
<html:div >
<html:input name="cacheDocFreq" type="radio" id="browserCacheCheckDocFrequency1"
pref="true" preftype="int" prefindex="1" prefstring="browser.cache.check_doc_frequency"/>
<html:label for="browserCacheCheckDocFrequency1" accesskey="&everyTimeRadio.accesskey;" tabindex="0">
&everyTimeRadio.label;
</html:label>
</html:div>
<html:div >
<html:input name="cacheDocFreq" type="radio" id="browserCacheCheckDocFrequency2"
pref="true" preftype="int" prefindex="2" prefstring="browser.cache.check_doc_frequency"/>
<html:label for="browserCacheCheckDocFrequency2" accesskey="&neverRadio.accesskey;" tabindex="0">
&neverRadio.label;
</html:label>
</html:div>
</box>
</titledbox>
<box class="box-smallheader" title="&lHeader;" description="&rHeader;"/>
<titledbox orient="vertical">
<html>&cachePara;</html>
<separator/>
<grid>
<columns>
<column/>
<column flex="1"/>
<column/>
</columns>
<rows>
<row>
<text class="label" value="&memCache.label;" accesskey="&memCache.accesskey;" for="browserCacheMemoryCache"/>
<box autostretch="never">
<textfield id="browserCacheMemoryCache" size="5" pref="true" preftype="int"
prefstring="browser.cache.memory_cache_size" prefattribute="value"/>
<text class="label" value="&kbyes;"/>
</box>
<button class="dialog" value="&clearMemCache.label;" accesskey="&clearMemCache.accesskey;"/>
</row>
<row>
<text class="label" value="&diskCache.label;" accesskey="&diskCache.accesskey;" for="browserCacheDiskCache"/>
<box autostretch="never">
<textfield id="browserCacheDiskCache" size="5" pref="true" preftype="int"
prefstring="browser.cache.disk_cache_size" prefattribute="value"/>
<text class="label" value="&kbyes;"/>
</box>
<button class="dialog" value="&clearDiskCache.label;" accesskey="&clearDiskCache.accesskey;"/>
</row>
<row>
<text class="label" value="&diskCacheFolder.label;" accesskey="&diskCacheFolder.accesskey;" for="browserCacheDirectory"/>
<textfield id="browserCacheDirectory" flex="1" pref="true" preftype="string"
prefstring="browser.cache.directory" prefattribute="value"/>
<button class="dialog" value="&chooseFolder.label;" accesskey="&chooseFolder.accesskey;"
oncommand="prefCacheSelectFolder();"/>
</row>
</rows>
</grid>
<separator/>
<html>&docCache;</html>
<radiogroup id="browserCacheCheckDocFrequency" orient="vertical" autostretch="never"
pref="true" preftype="int" prefstring="browser.cache.check_doc_frequency"
prefattribute="data">
<radio data="0" value="&oncePsessionRadio.label;" accesskey="&oncePsessionRadio.accesskey;"/>
<radio data="1" value="&everyTimeRadio.label;" accesskey="&everyTimeRadio.accesskey;"/>
<radio data="2" value="&neverRadio.label;" accesskey="&neverRadio.accesskey;"/>
</radiogroup>
</titledbox>
</window>

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

@ -30,7 +30,7 @@
}
}
function InitColors()
function Startup()
{
getColorFromWellAndSetValue("foregroundtextmenu");
getColorFromWellAndSetValue("backgroundmenu");

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

@ -21,118 +21,105 @@
Contributor(s):
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/pref/pref.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-colors.dtd" >
<window debug="false" xmlns:html="http://www.w3.org/TR/REC-html40"
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
title="&window.title;" align="vertical"
onload="if( parent.handle ) parent.handle.onpageload( 'pref-colors' ); else parent.queuedTag = 'pref-colors'; InitColors();">
class="color-dialog"
title="&window.title;"
orient="vertical"
onload="parent.initPanel('chrome://communicator/content/pref/pref-colors.xul');">
<html:script language="JavaScript" src="chrome://communicator/content/pref/pref-colors.js"/>
<script language="JavaScript">
<![CDATA[
_elementIDs = ["foregroundText", "background", "browserUseWindowsColors", "unvisitedLinks", "visitedLinks", "browserUnderlineAnchors", "browserUseDocumentColors"];
]]>
</script>
<script language="JavaScript" src="chrome://communicator/content/pref/pref-colors.js"></script>
<box type="smallheader" title="&lHeader;" description="&rHeader;"/>
<box class="box-smallheader" title="&lHeader;" description="&rHeader;"/>
<box align="horizontal">
<!-- back and foreground colors -->
<titledbox orient="vertical" flex="1">
<title><html:div> &color;</html:div></title>
<box>
<html:label>&text;</html:label>
<spring flex="1"/>
<menu id="foregroundtextmenu" allowevents="true" class="colorpicker">
<html:div id="browserForegroundColorDiv" style="width:30px; background-color:white"/>
<titledbutton class="popup" align="right"/>
<menupopup id="foregroundMenuPopup">
<colorpicker allowevents="true" id="foregroundColorpicker" palettename="standard" onclick="setColorWell(this.parentNode.parentNode, 'foregroundtext', false);"/>
</menupopup>
</menu>
<html:input type="hidden" id="foregroundText"
pref="true" preftype="color" prefstring="browser.foreground_color"/>
</box>
<box>
<html:label>&background;</html:label>
<spring flex="1"/>
<menu id="backgroundmenu" allowevents="true" class="colorpicker">
<html:div id="browserBackgroundColorDiv" style="width:30px; background-color:white"/>
<spring flex="1"/>
<titledbutton class="popup" align="right"/>
<menupopup id="backgroundMenuPopup">
<colorpicker allowevents="true" id="backgroundColorpicker" palettename="standard" onclick="setColorWell(this.parentNode.parentNode, 'background', false);"/>
</menupopup>
</menu>
<html:input type="hidden" id="background"
pref="true" preftype="color" prefstring="browser.background_color"/>
</box>
<html:div class="vspace hspace-both">
<html:input type="checkbox" id="browserWFEUseWindowsColors"
pref="true" preftype="bool" prefstring="browser.wfe.use_windows_colors"/>
<html:label for="browserWFEUseWindowsColors" accesskey="&useWinColorsCheck.accesskey;" tabindex="0">
&useWinColorsCheck.label;
</html:label>
</html:div>
</titledbox>
<!-- links -->
<titledbox flex="1" orient="vertical">
<title><text value="&links;"/></title>
<box class="hspace-both">
<html:label>&unvisit;</html:label>
<spring flex="1"/>
<menu id="unvisitedlinkmenu" allowevents="true" class="colorpicker">
<html:div id="browserUnvisitedLinksColorDiv" style="width:30px; background-color:white"/>
<spring flex="1"/>
<titledbutton class="popup" align="right" flex="1"/>
<menupopup id="unvisitedLinksMenuPopup">
<colorpicker allowevents="true" id="unvisitedLinksColorpicker" palettename="standard" onclick="setColorWell(this.parentNode.parentNode, 'background', false);"/>
</menupopup>
</menu>
<html:input type="hidden" id="unvisitedLinks"
pref="true" preftype="string" prefstring="browser.anchor_color"/>
</box>
<box class="hspace-both">
<html:label>&visit;</html:label>
<spring flex="1"/>
<menu id="visitedlinkmenu" allowevents="true" class="colorpicker">
<html:div id="browserVisitedLinksColorDiv" style="width:30px; background-color:white"/>
<spring flex="1"/>
<titledbutton class="popup" align="right"/>
<menupopup id="visitedLinksMenuPopup">
<colorpicker allowevents="true" id="visitedLinksColorpicker" palettename="standard" onclick="setColorWell(this.parentNode.parentNode, 'background', false);"/>
</menupopup>
</menu>
<html:input type="hidden" id="visitedLinks"
pref="true" preftype="string" prefstring="browser.visited_color"/>
</box>
<html:div class="vspace hspace-both">
<html:input type="checkbox" id="browserUnderlineAnchors" pref="true"
preftype="bool" prefstring="browser.underline_anchors"/>
<html:label for="browserUnderlineAnchors" accesskey="&underLinksCheck.accesskey;" tabindex="0">
&underLinksCheck.label;
</html:label>
</html:div>
</titledbox>
</box>
<titledbox orient="vertical">
<title><text value="&someProvColors;"/></title>
<html:div>
<html:input type="radio" id="browserUseDocumentColors0" name="browserUseDocumentColors"
pref="true" preftype="bool" prefindex="true" prefstring="browser.use_document_colors"/>
<html:label for="browserUseDocumentColors0" accesskey="&alwaysUseDocColors.accesskey;" tabindex="0">
&alwaysUseDocColors.label;
</html:label>
</html:div>
<html:div>
<html:input type="radio" id="browserUseDocumentColors1" name="browserUseDocumentColors"
pref="true" preftype="bool" prefindex="false" prefstring="browser.use_document_colors"/>
<html:label for="browserUseDocumentColors1" accesskey="&ignoreDocColors.label;" tabindex="0">
&ignoreDocColors.label;
</html:label>
</html:div>
<box>
<titledbox orient="vertical" flex="1">
<title><text value="&color;"/></title>
<box>
<text class="label" value="&textColor.label;" accesskey="&textColor.accesskey;" for="foregroundtextmenu"/>
<spring flex="1"/>
<menu id="foregroundtextmenu" allowevents="true" class="colorpicker">
<html:div id="browserForegroundColorDiv" style="width:30px; background-color:white"/>
<titledbutton class="popup" align="right"/>
<menupopup id="foregroundMenuPopup">
<colorpicker allowevents="true" id="foregroundColorpicker" palettename="standard" onclick="setColorWell(this.parentNode.parentNode, 'foregroundtext', false);"/>
</menupopup>
</menu>
<textfield collapsed="true" id="foregroundText" pref="true" preftype="color"
prefstring="browser.foreground_color" prefattribute="value"/>
</box>
<box>
<text class="label" value="&backgroundColor.label;" accesskey="&backgroundColor.label;" for="backgroundmenu"/>
<spring flex="1"/>
<menu id="backgroundmenu" allowevents="true" class="colorpicker">
<html:div id="browserBackgroundColorDiv" style="width:30px; background-color:white"/>
<titledbutton class="popup" align="right"/>
<menupopup id="backgroundMenuPopup">
<colorpicker allowevents="true" id="backgroundColorpicker" palettename="standard" onclick="setColorWell(this.parentNode.parentNode, 'background', false);"/>
</menupopup>
</menu>
<textfield collapsed="true" id="background" pref="true" preftype="color"
prefstring="browser.background_color" prefattribute="value"/>
</box>
<checkbox id="browserUseWindowsColors" value="&useWindowsColors.label;" accesskey="&useWindowsColors.accesskey;"
pref="true" preftype="bool" prefstring="browser.wfe.use_windows_colors" prefattribute="checked"/>
</titledbox>
<titledbox orient="vertical" flex="1">
<title><text value="&links;"/></title>
<box>
<text class="label" value="&linkColor.label;" accesskey="&linkColor.accesskey;" for="unvisitedlinkmenu"/>
<spring flex="1"/>
<menu id="unvisitedlinkmenu" allowevents="true" class="colorpicker">
<html:div id="browserUnvisitedLinksColorDiv" style="width:30px; background-color:white"/>
<titledbutton class="popup" align="right" flex="1"/>
<menupopup id="unvisitedLinksMenuPopup">
<colorpicker allowevents="true" id="unvisitedLinksColorpicker" palettename="standard" onclick="setColorWell(this.parentNode.parentNode, 'background', false);"/>
</menupopup>
</menu>
<textfield collapsed="true" id="unvisitedLinks" pref="true" preftype="string"
prefstring="browser.anchor_color" prefattribute="value"/>
</box>
<box>
<text class="label" value="&visitedLinkColor.label;" accesskey="&visitedLinkColor.accesskey;" for="visitedlinkmenu"/>
<spring flex="1"/>
<menu id="visitedlinkmenu" allowevents="true" class="colorpicker">
<html:div id="browserVisitedLinksColorDiv" style="width:30px; background-color:white"/>
<titledbutton class="popup" align="right"/>
<menupopup id="visitedLinksMenuPopup">
<colorpicker allowevents="true" id="visitedLinksColorpicker" palettename="standard" onclick="setColorWell(this.parentNode.parentNode, 'background', false);"/>
</menupopup>
</menu>
<textfield collapsed="true" id="visitedLinks" pref="true" preftype="string"
prefstring="browser.visited_color" prefattribute="value"/>
</box>
<checkbox id="browserUnderlineAnchors" value="&underlineLinks.label;" accesskey="&underlineLinks.accesskey;"
pref="true" preftype="bool" prefstring="browser.underline_anchors" prefattribute="checked"/>
</titledbox>
</box>
<titledbox orient="vertical">
<html>&someProvColors;</html>
<radiogroup id="browserUseDocumentColors" orient="vertical" autostretch="never"
pref="true" preftype="bool" prefstring="browser.use_document_colors"
prefattribute="data">
<radio data="true" value="&alwaysUseDocumentColors.label;" accesskey="&alwaysUseDocumentColors.accesskey;"/>
<radio data="false" value="&useMyColors.label;" accesskey="&useMyColors.label;"/>
</radiogroup>
</titledbox>
</window>

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

@ -1,54 +1,112 @@
function setColorWell(menu,otherId,setbackground)
function setColorWell(menu,otherId,setbackground)
{
// Find the colorWell and colorPicker in the hierarchy.
var colorWell = menu.firstChild;
var colorPicker = menu.firstChild.nextSibling.nextSibling.firstChild;
var colorRef = menu.nextSibling; // colour value is held here
// Extract color from colorPicker and assign to colorWell.
var color = colorPicker.getAttribute('color');
// set colour values in the display
setColorFromPicker(colorWell,color,otherId,setbackground);
// set the colour value internally for use in prefwindow
dump("*** setting value of internal field to : " + color + "\n");
colorRef.setAttribute( "value", color );
// Find the colorWell and colorPicker in the hierarchy.
var colorWell = menu.firstChild;
var colorPicker = menu.firstChild.nextSibling.nextSibling.firstChild;
var colorRef = menu.nextSibling; // colour value is held here
// Extract color from colorPicker and assign to colorWell.
var color = colorPicker.getAttribute('color');
// set colour values in the display
setColorFromPicker(colorWell,color,otherId,setbackground);
// set the colour value internally for use in prefwindow
colorRef.setAttribute( "value", color );
}
function getColorFromWellAndSetValue(menuid,otherId,setbackground)
function getColorFromWellAndSetValue(menuid,otherId,setbackground)
{
var menu = document.getElementById(menuid); // picker container
var menu = document.getElementById( menuid ); // picker container
var colorWell = menu.firstChild; // display for picker colour
var colorRef = menu.nextSibling; // prefs JS sets this.
colorWell.style.backgroundColor = colorRef.value; // set the well from prefs.
colorWell.style.backgroundColor = colorRef.getAttribute("value"); // set the well from prefs.
var color = colorWell.style.backgroundColor;
setColorFromPicker(null,color,otherId,setbackground);
}
function setColorFromPicker(colorWell,color,otherId,setbackground)
function setColorFromPicker(colorWell,color,otherId,setbackground)
{
if (colorWell) {
if (colorWell)
colorWell.style.backgroundColor = color;
}
if (otherId) {
otherElement=document.getElementById(otherId);
if (setbackground) {
var basestyle = otherElement.getAttribute('basestyle');
var newstyle = basestyle + "background-color:" + color + ";";
otherElement.setAttribute('style',newstyle);
}
else {
otherElement.style.color = color;
}
}
if (otherId)
{
otherElement = document.getElementById( otherId );
if (setbackground)
{
var basestyle = otherElement.getAttribute('basestyle');
otherElement.setAttribute("style", basestyle + "background-color: " + color + ";");
}
else
otherElement.setAttribute("style", "color: " + color + ";" );
}
}
function InitColors()
function Startup()
{
getColorFromWellAndSetValue('normaltextmenu','normaltext',false);
getColorFromWellAndSetValue('linktextmenu','linktext',false);
getColorFromWellAndSetValue('activelinktextmenu','activelinktext',false);
getColorFromWellAndSetValue('followedlinktextmenu','followedlinktext',false);
getColorFromWellAndSetValue('colorpreviewmenu','colorpreview',true);
getColorFromWellAndSetValue("textMenu", "normaltext", false);
getColorFromWellAndSetValue("linkMenu", "linktext", false);
getColorFromWellAndSetValue("aLinkMenu", "activelinktext", false);
getColorFromWellAndSetValue("fLinkMenu", "followedlinktext", false);
getColorFromWellAndSetValue("backgroundMenu", "backgroundcolor", true);
if( document.getElementById( "useCustomColors" ).data == 0 )
useNavigatorColors();
return true;
}
function useNavigatorColors()
{
// use colors from navigator
var prefstrings = ["browser.foreground_color", "browser.anchor_color", "browser.visited_color", "browser.background_color"];
var dataEls = ["text", "link", "fLink", "background"];
for( var i = 0; i < dataEls.length; i++ )
{
var element = document.getElementById( ( dataEls[i] + "Data" ) );
var navigatorValue = parent.hPrefWindow.getPref( "color", prefstrings[i] );
element.setAttribute( "value", navigatorValue );
element = document.getElementById( ( dataEls[i] + "Label" ) );
element.setAttribute( "disabled", "true" );
element = document.getElementById( ( dataEls[i] + "Menu" ) );
element.setAttribute( "disabled", "true" );
}
document.getElementById( "aLinkLabel" ).setAttribute( "disabled", "true" );
document.getElementById( "aLinkMenu" ).setAttribute( "disabled", "true" );
document.getElementById( "useDefaults" ).setAttribute( "disabled", "true" );
getColorFromWellAndSetValue("textMenu", "normaltext", false);
getColorFromWellAndSetValue("linkMenu", "linktext", false);
getColorFromWellAndSetValue("aLinkMenu", "activelinktext", false);
getColorFromWellAndSetValue("fLinkMenu", "followedlinktext", false);
getColorFromWellAndSetValue("backgroundMenu", "backgroundcolor", true);
}
function useCustomColors()
{
var dataEls = ["text", "link", "fLink", "background"];
for( var i = 0; i < dataEls.length; i++ )
{
var element = document.getElementById( ( dataEls[i] + "Data" ) );
element = document.getElementById( ( dataEls[i] + "Label" ) );
element.removeAttribute( "disabled" );
element = document.getElementById( ( dataEls[i] + "Menu" ) );
element.removeAttribute( "disabled" );
}
document.getElementById( "aLinkLabel" ).removeAttribute( "disabled" );
document.getElementById( "aLinkMenu" ).removeAttribute( "disabled" );
document.getElementById( "useDefaults" ).removeAttribute( "disabled" );
}
function useDefaultColors()
{
// use default colors from editor.js
var elIds = ["textData", "linkData", "aLinkData", "fLinkData", "backgroundData"];
for( var i = 0; i < elIds.length; i++ )
{
var element = document.getElementById( elIds[i] );
var defPref = parent.hPrefWindow.getPref( element.getAttribute( "preftype" ), element.getAttribute( "prefstring" ), true );
element.setAttribute( "value", defPref );
}
Startup();
}

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

@ -21,186 +21,89 @@
Contributor(s):
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/pref/pref.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-composer.dtd" >
<window debug="false"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
align="vertical" title="&title.label;"
onload="if( parent.handle ) parent.handle.onpageload( 'pref-composer' ); else parent.queuedTag = 'pref-composer'">
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="color-dialog"
orient="vertical"
onload="parent.initPanel('chrome://communicator/content/pref/pref-composer.xul');">
<script language="JavaScript">
<![CDATA[
_elementIDs = ["maintainTableStructure", "tableDeleteKey"];
]]>
</script>
<box class="box-smallheader" title="&lHeader;" description="&rHeader;"/>
<box type="smallheader" title="&lHeader;" description="&rHeader2;"/>
<!-- Take out Auto-Save; not supported at this time
<titledbox orient="vertical">
<box align="horizontal" valign="middle">
<checkbox
pref = "true"
preftype = "int"
prefindex = "0"
prefstring = "editor.auto_save"
value="&AutoSaveCheck.label;"
name="autosave"
/>
<textfield
name="time"
type="text"
size="3"
value="5"
pref="true"
preftype="int"
prefindex="5"
prefstring="editor.auto_save_delay"
/>
<text value="&minText;" />
</box>
</titledbox>
-->
<!-- External Editors are not supported at this time
<titledbox orient="vertical">
<title><text value="&exterLegend.label;"/></title>
<box>
<checkbox
name = "htmlSourceEditorCheckbox"
value = "&htmlSource;"
pref = "true"
preftype = "int"
prefindex = "0"
prefstring = "editor.use_html_editor"
/>
<textfield
name = "&chooseButton.label;"
pref = "true"
preftype = "string"
prefstring = "editor.html_editor"
/>
<button
class = "dialog"
name = ""
value = "&chooseButton.label;"
/>
</box>
<box>
<checkbox
name = "htmlImageEditorCheckbox"
value = "&imageeditor.label;"
pref = "true"
preftype = "int"
prefindex = "0"
prefstring ="editor.use_image_editor"
/>
<textfield
name="chooseButton.label"
pref = "true"
preftype = "string"
prefstring = "editor.image_editor"
/>
<button class="dialog" value="&chooseButton.label;" />
</box>
</titledbox>
-->
<titledbox orient="vertical">
<title><text value="Table Editing"/></title>
<box>
<checkbox
name = "maintainTable"
value = "&maintainTableStructure.label;"
pref = "true"
preftype = "int"
prefindex = "0"
prefstring ="editor.maintain_table_structure"
/>
</box>
<box valign="middle">
<text value="Pressing [delete] key should " />
<radiogroup orient="vertical">
pref = "true"
preftype = "int"
prefindex = "0"
prefstring ="editor.table_delete_key"
>
<radio value = "delete cell (content and structure)" />
<radio value = "delete only cell content" />
<titledbox orient="vertical" autostretch="never">
<title><text value="&tableEditing.label;"/></title>
<checkbox id="maintainTableStructure" value="&maintainTableStructure.label;" accesskey="&maintainStructure.accesskey;"
pref="true" preftype="bool" prefstring="editor.maintain_table_structure"
prefattribute="checked"/>
<separator/>
<box autostretch="never" valign="top">
<text class="label" value="&pressingTheDeleteKey.label;" for="tableDeleteKey" />
<radiogroup id="tableDeleteKey" orient="vertical" autostretch="never"
pref="true" preftype="int" prefstring="editor.table_delete_key"
prefattribute="data">
<radio data="0" value="&deleteCell.label;" accesskey="&deleteCell.accesskey;"/>
<radio data="1" value="&deleteContent.label;" accesskey="&deleteContent.accesskey;" />
</radiogroup>
</box>
</titledbox>
<!--
<html:div >
&returnkey.label;
</html:div>
<html:div class="vertical-gap">
<radio name="returnkey" type="" id="returnkey0"
pref="true" preftype="int" prefindex="0" prefstring="editor.returnkey_mapping"/>
<html:label for="returnkey0" accesskey="" tabindex="0">
&returnkeyradio0.label;
</html:label>
</html:div>
<html:div >
<radio name="returnkey" id="returnkey1"
pref="true" preftype="int" prefindex="1" prefstring="editor.returnkey_mapping"/>
<html:label for="returnkey1" accesskey="" tabindex="0">
&returnkeyradio1.label;
</html:label>
</html:div>
<html:div >
<radio name="returnkey" id="returnkey2"
pref="true" preftype="int" prefindex="2" prefstring="editor.returnkey_mapping"/>
<html:label for="returnkey2" accesskey="" tabindex="0">
&returnkeyradio2.label;
</html:label>
</html:div>
<html:div >
<radio name="returnkey" id="returnkey3"
pref="true" preftype="int" prefindex="3" prefstring="editor.returnkey_mapping"/>
<html:label for="returnkey3" accesskey="" tabindex="0">
&returnkeyradio3.label;
</html:label>
</html:div>
<spring style="height: 10px;"/>
</titledbox>
<html:div >
&enterkey.label;
</html:div>
<html:div class="vertical-gap">
<radio name="enterkey" id="enterkey0"
pref="true" preftype="int" prefindex="0" prefstring="editor.enterkey_mapping"/>
<html:label for="enterkey0" accesskey="" tabindex="0">
&returnkeyradio0.label;
</html:label>
</html:div>
<html:div >
<radio name="enterkey" id="enterkey1"
pref="true" preftype="int" prefindex="1" prefstring="editor.enterkey_mapping"/>
<html:label for="enterkey1" accesskey="" tabindex="0">
&returnkeyradio1.label;
</html:label>
</html:div>
<html:div >
<radio name="enterkey" id="enterkey2"
pref="true" preftype="int" prefindex="2" prefstring="editor.enterkey_mapping"/>
<html:label for="enterkey2" accesskey="" tabindex="0">
&returnkeyradio2.label;
</html:label>
</html:div>
<html:div >
<radio name="enterkey" id="enterkey3"
pref="true" preftype="int" prefindex="3" prefstring="editor.enterkey_mapping"/>
<html:label for="enterkey3" accesskey="" tabindex="0">
&returnkeyradio3.label;
</html:label>
</html:div>
<!-- Take out Auto-Save; not supported at this time
<titledbox orient="vertical">
<html:div>
<html:input name="autosave" type="checkbox" id="pref:0:int:editor.auto_save" />
<html:label for="pref:0:int:editor.auto_save" accesskey="a" tabindex="0">
&AutoSaveCheck.label;
</html:label>
<html:input name="time" type="text" size="3" value="5" id="pref:5:int:editor.auto_save_delay" />
<html:label for="pref:5:int:editor.auto_save_delay">
&minText;
</html:label>
</html:div>
</titledbox>
-->
<!-- External Editors are not supported at this time
<titledbox orient="vertical">
<title><text value="&exterLegend.label;"/></title>
<html:input name="htmlSourceEditorCheckbox" type="checkbox" id="pref:0:int:editor.use_html_editor" />
<html:div>
&htmlSource;
</html:div>
<html:div>
<html:input name="&chooseButton.label;" type="text" id="pref:string:editor.html_editor" />
<titledbutton class="dialog push" name="" value="&chooseButton.label;" />
</html:div>
<html:input name="htmlImageEditorCheckbox" type="checkbox" id="pref:0:int:editor.use_image_editor" />
<html:div>
&img;
</html:div>
<html:div>
<html:input name="chooseButton.label" type="text" id="pref:string:editor.image_editor" />
<titledbutton class="dialog push" name="" value="&chooseButton.label;" />
</html:div>
</titledbox>
-->
</window>

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

@ -19,137 +19,37 @@
Contributor(s):
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/pref/pref.css" type="text/css"?>
<?xml-stylesheet href="chrome://pref/skin/" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-cookies.dtd" >
<!DOCTYPE window SYSTEM "chrome://pref/locale/pref-cookies.dtd" >
<window debug="false" xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog" id="cookieWindow"
align="vertical" title="&window.title;" titleWithImages="&window.titleWithImages;"
class="dialog"
align="vertical" title="&window.title;"
onload="if( parent.handle ) parent.handle.onpageload( 'pref-cookies' ); else parent.queuedTag = 'pref-cookies';">
<html:script language="JavaScript">
function viewCookies()
{
pref = Components.classes['component://netscape/preferences'];
pref = pref.getService();
pref = pref.QueryInterface(Components.interfaces.nsIPref);
pref.SetBoolPref("cookieviewer.cookieTab", true);
window.openDialog("chrome://communicator/content/wallet/CookieViewer.xul","","modal=yes,chrome,resizable=no");
}
function viewImages()
{
pref = Components.classes['component://netscape/preferences'];
pref = pref.getService();
pref = pref.QueryInterface(Components.interfaces.nsIPref);
pref.SetBoolPref("cookieviewer.cookieTab", false);
window.openDialog("chrome://communicator/content/wallet/CookieViewer.xul","","modal=yes,chrome,resizable=no");
}
</html:script>
<box id="cookieHeader" type="smallheader"
title="&lHeader;" titleWithImages="&lHeaderWithImages;"
description="&rHeader;" descriptionWithImages="&rHeaderWithImages;"/>
<box class="box-smallheader" title="&lHeader;" description="&rHeader;"/>
<titledbox orient="vertical">
<title><text value="&cookies;"/></title>
<html:div>&cookieDetails;</html:div>
<spring class="vgap"/>
<html:div>
<html:input name="cookies" type="radio" id="networkCookieBehaviour0"
pref="true" preftype="int" prefindex="0" prefstring="network.cookie.cookieBehavior"/>
<html:label for="networkCookieBehaviour0" accesskey="&accAllCookiesRadio.accesskey;" tabindex="0">
<html>&cookieDetails;</html>
<html:div>&accAllCookiesRadio.label;</html:div>
</html:label>
</html:div>
<html:div>
<html:input type="radio" name="cookies" id="networkCookieBehaviour1"
pref="true" preftype="int" prefindex="1" prefstring="network.cookie.cookieBehavior"/>
<html:label for="networkCookieBehaviour1" accesskey="&accpOrgCookiesRadio.accesskey;" tabindex="0">
<html:div>&accpOrgCookiesRadio.label;</html:div>
</html:label>
</html:div>
<html:div>
<html:input type="radio" name="cookies" id="networkCookieBehaviour2"
pref="true" preftype="int" prefindex="2" prefstring="network.cookie.cookieBehavior"/>
<html:label for="networkCookieBehaviour2" accesskey="&disCookRadio.accesskey;" tabindex="0">
<html:div>&disCookRadio.label;</html:div>
</html:label>
</html:div>
<html:div class="indent-second-label">
<html:input type="checkbox" id="networkCookieWarnAboutCookies"
pref="true" preftype="bool" prefstring="network.cookie.warnAboutCookies"/>
<html:label for="networkCookieWarnAboutCookies" accesskey="&warnCookCheck.accesskey;" tabindex="0">
<html:div>&warnCookCheck.label;</html:div>
</html:label>
</html:div>
<box align="horizontal" flex="1">
<spring flex="1"/>
<titledbutton value="&viewCookies.label;" class="dialog push" onclick="viewCookies();"/>
</box>
</titledbox>
<titledbox orient="vertical" id="imagesArea" style="display:none">
<title><text value="&images;"/></title>
<html:div>&imageDetails;</html:div>
<spring class="vgap"/>
<html:div>
<html:input name="images" type="radio" id="networkImageBehaviour0"
pref="true" preftype="int" prefindex="0" prefstring="network.image.imageBehavior"/>
<html:label for="networkImageBehaviour0" accesskey="&accAllImagesRadio.accesskey;" tabindex="0">
<html:div>&accAllImagesRadio.label;</html:div>
</html:label>
</html:div>
<html:div>
<html:input type="radio" name="images" id="networkImageBehaviour1"
pref="true" preftype="int" prefindex="1" prefstring="network.image.imageBehavior"/>
<html:label for="networkImageBehaviour1" accesskey="&accpOrgImagesRadio.accesskey;" tabindex="0">
<html:div>&accpOrgImagesRadio.label;</html:div>
</html:label>
</html:div>
<html:div>
<html:input type="radio" name="images" id="networkImageBehaviour2"
pref="true" preftype="int" prefindex="2" prefstring="network.image.imageBehavior"/>
<html:label for="networkImageBehaviour2" accesskey="&disImagesRadio.accesskey;" tabindex="0">
<html:div>&disImagesRadio.label;</html:div>
</html:label>
</html:div>
<html:div class="indent-second-label">
<html:input type="checkbox" id="networkImageWarnAboutImages"
pref="true" preftype="bool" prefstring="network.image.warnAboutImages"/>
<html:label for="networkImageWarnAboutImages" accesskey="&warnImagesCheck.accesskey;" tabindex="0">
<html:div>&warnImagesCheck.label;</html:div>
</html:label>
</html:div>
<box align="horizontal" flex="1">
<spring flex="1"/>
<titledbutton value="&viewImages.label;" class="dialog push" onclick="viewImages();"/>
</box>
</titledbox>
<radiogroup id="networkCookieBehaviour" orient="vertical" autostretch="never"
pref="true" preftype="int" prefstring="network.cookie.cookieBehavior"
prefattribute="data">
<radio data="0" value="&accAllCookiesRadio.label;" accesskey="&accAllCookiesRadio.accesskey;"/>
<radio data="1" value="&accOrgCookiesRadio.label;" accesskey="&accOrgCookiesRadio.accesskey;"/>
<radio data="2" value="&disableCookies.label;" accesskey="&disableCookies.accesskey;"/>
</radiogroup>
<checkbox id="networkWarnAboutCookies" value="&warnAboutCookies.label;" accesskey="&warnAboutCookies.accesskey;"
pref="true" preftype="bool" prefstring="network.cookie.warnAboutCookies"
prefattribute="checked"/>
<box autostretch="never" halign="right">
<button class="dialog" value="&viewCookies.label;" accesskey="&viewCookies.accesskey;" oncommand="viewCookies();"/>
</box>
</titledbox>
</window>

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

@ -20,7 +20,6 @@
Contributor(s):
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/pref/pref.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
@ -28,144 +27,88 @@
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-debug.dtd" >
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
align="vertical" title="&window.title;"
onload="if( parent.handle ) parent.handle.onpageload( 'pref-debug' ); else parent.queuedTag = 'pref-debug';">
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="color-dialog"
orient="vertical"
onload="parent.initPanel('chrome://communicator/content/pref/pref-debug.xul');">
<box type="smallheader" title="&lHeader;" description="&rHeader;"/>
<script language="JavaScript">
<![CDATA[
_elementIDs = ["nglayoutWidgetGFXScrollbars", "viewUseViewManager2", "nglayoutDebugWindow",
"debugXULBoxes", "nglayoutDebugPaintFlashing", "nglayoutDebugPaintDumping",
"nglayoutDebugInvalidateDumping", "nglayoutDebugEventDumping", "nglayoutDebugMotionEventDumping",
"nglayoutDebugCrossingEventDumping", "nglayoutDebugDisableXULCache", "browserEnableCache",
"browserEnableDiskCache", "nglayoutDebugEnableXPCOMRefcntLog", "showAboutAsStupidModalWindow"];
]]>
</script>
<box class="box-smallheader" title="&lHeader;" description="&rHeader;"/>
<!-- Temporary hack to turn on gfx-rendered widgets -->
<titledbox orient="vertical">
<title><text value="&widgetRendering.label;"/></title>
<!-- nothing on this page has accesskeys because this is a temporary debug
panel and you can damn well click the widgets! -->
<html:div>
<html:input type="checkbox" id="nglayoutWidgetGFXScrollbars"
pref="true" preftype="bool" prefstring="nglayout.widget.gfxscrollbars"/>
<html:label for="nglayoutGFXScrollbars" accesskey="n" tabindex="0">
&gfxScrollbars.label;
</html:label>
</html:div>
<box>
<titledbox orient="vertical" autostretch="never" flex="1">
<title><text value="&widgetRendering.label;"/></title>
<html:div>
<html:input type="checkbox" id="viewUseViewManager2"
pref="true" preftype="bool" prefstring="nglayout.view.useViewManager2"/>
<html:label for="viewUseViewManager2" accesskey="n" tabindex="0">
&useViewManager2.label;
</html:label>
</html:div>
<checkbox id="nglayoutWidgetGFXScrollbars" value="&gfxScrollbars.label;"
pref="true" preftype="bool" prefstring="nglayout.widget.gfxscrollbars"
prefattribute="checked"/>
<checkbox id="viewUseViewManager2" value="&useViewManager2.label;"
pref="true" preftype="bool" prefstring="nglayout.view.useViewManager2"
prefattribute="checked"/>
<checkbox id="nglayoutDebugWindow" value="&debugWindow.label;"
pref="true" preftype="bool" prefstring="nglayout.widget.debugWindow"
prefattribute="checked"/>
<checkbox id="debugXULBoxes" value="&debugXULBox.label;"
pref="true" preftype="bool" prefstring="xul.debug.box"
prefattribute="checked"/>
</titledbox>
<titledbox orient="vertical" autostretch="never" flex="1">
<title><text value="&debugMiscellaneous.label;"/></title>
<html:div>
<html:input type="checkbox" id="nglayoutDebugWindow"
pref="true" preftype="bool" prefstring="nglayout.widget.debugWindow"/>
<html:label for="nglayoutDebugWindow" accesskey="n" tabindex="0">
&debugWindow.label;
</html:label>
</html:div>
<checkbox id="nglayoutDebugDisableXULCache" value="&debugDisableXULCache.label;"
pref="true" preftype="bool" prefstring="nglayout.debug.disable_xul_cache"
prefattribute="checked"/>
<checkbox id="browserEnableCache" value="&debugEnableMemCache.label;"
pref="true" preftype="bool" prefstring="browser.enable.cache"
prefattribute="checked"/>
<checkbox id="browserEnableDiskCache" value="&debugEnableDiskCache.label;"
pref="true" preftype="bool" prefstring="browser.cache.disk.enable"
prefattribute="checked"/>
<checkbox id="nglayoutDebugEnableXPCOMRefcntLog" value="&debugEnableXPCOMRefcntLog.label;"
pref="true" preftype="bool" prefstring="nglayout.debug.enable_xpcom_refcnt_log"
prefattribute="checked"/>
<checkbox id="showAboutAsStupidModalWindow" value="&debugShowAboutAsStupidModalWindow.label;"
pref="true" preftype="bool" prefstring="browser.show_about_as_stupid_modal_window"
prefattribute="checked"/>
</titledbox>
</box>
<html:div>
<html:input type="checkbox" id="debugXULBoxes"
pref="true" preftype="bool" prefstring="xul.debug.box"/>
<html:label for="debugXULBoxes" accesskey="n" tabindex="0">
&debugXULBox.label;
</html:label>
</html:div>
</titledbox>
<!-- Event Debugging -->
<titledbox orient="vertical">
<title><text value="&debugEventDebugging.label;"/></title>
<html:div>
<html:input type="checkbox" id="nglayoutDebugPaintFlashing"
pref="true" preftype="bool" prefstring="nglayout.debug.paint_flashing"/>
<html:label for="nglayoutDebugPaintFlashing" accesskey="n" tabindex="0">
&debugPaintFlashing.label;
</html:label>
</html:div>
<titledbox orient="vertical" autostretch="never">
<title><text value="&debugEventDebugging.label;"/></title>
<html:div>
<html:input type="checkbox" id="nglayoutDebugPaintDumping"
pref="true" preftype="bool" prefstring="nglayout.debug.paint_dumping"/>
<html:label for="nglayoutDebugPaintDumping" accesskey="n" tabindex="0">
&debugPaintDumping.label;
</html:label>
</html:div>
<html:div>
<html:input type="checkbox" id="nglayoutDebugInvalidateDumping"
pref="true" preftype="bool" prefstring="nglayout.debug.invalidate_dumping"/>
<html:label for="nglayoutDebugInvaliateDumping" accesskey="n" tabindex="0">
&debugInvalidateDumping.label;
</html:label>
</html:div>
<html:div>
<html:input type="checkbox" id="nglayoutDebugEventDumping"
pref="true" preftype="bool" prefstring="nglayout.debug.invalidate_dumping"/>
<html:label for="nglayoutDebugEventDumping" accesskey="n" tabindex="0">
&debugEventDumping.label;
</html:label>
</html:div>
<html:div>
<html:input type="checkbox" id="nglayoutDebugMotionEventDumping"
pref="true" preftype="bool" prefstring="nglayout.debug.motion_event_dumping"/>
<html:label for="nglayoutDebugMotionEventDumping" accesskey="n" tabindex="0">
&debugMotionEventDumping.label;
</html:label>
</html:div>
<html:div>
<html:input type="checkbox" id="nglayoutDebugCrossingEventDumping"
pref="true" preftype="bool" prefstring="nglayout.debug.motion_event_dumping"/>
<html:label for="nglayoutDebugCrossingEventDumping" accesskey="n" tabindex="0">
&debugCrossingEventDumping.label;
</html:label>
</html:div>
</titledbox>
<titledbox orient="vertical">
<title><text value="&debugMiscellaneous.label;"/></title>
<html:div>
<html:input type="checkbox" id="nglayoutDebugDisableXULCache"
pref="true" preftype="bool" prefstring="nglayout.debug.disable_xul_cache"/>
<html:label for="nglayoutDebugDisableXULCache" accesskey="n" tabindex="0">
&debugDisableXULCache.label;
</html:label>
</html:div>
<html:div>
<html:input type="checkbox" id="browserEnableCache"
pref="true" preftype="bool" prefstring="browser.cache.enable"/>
<html:label for="browserEnableCache" accesskey="n" tabindex="0">
&debugEnableMemCache.label;
</html:label>
<html:input type="checkbox" id="browserEnableDiskCache"
pref="true" preftype="bool" prefstring="browser.cache.disk.enable"/>
<html:label for="browserEnableDiskCache" accesskey="n" tabindex="0">
&debugEnableDiskCache.label;
</html:label>
</html:div>
<html:div>
<html:input type="checkbox" id="nglayoutDebugEnableXPCOMRefcntLog"
pref="true" preftype="bool" prefstring="nglayout.debug.enable_xpcom_refcnt_log"/>
<html:label for="nglayoutDebugEnableXPCOMRefcntLog" accesskey="n" tabindex="0">
&debugEnableXPCOMRefcntLog.label;
</html:label>
</html:div>
<html:div>
<html:input type="checkbox" id="showAboutAsStupidModalWindow"
pref="true" preftype="bool" prefstring="browser.show_about_as_stupid_modal_window"/>
<html:label for="showAboutAsStupidModalWindow" accesskey="n" tabindex="0">
&debugShowAboutAsStupidModalWindow.label;
</html:label>
</html:div>
</titledbox>
<checkbox id="nglayoutDebugPaintFlashing" value="&debugPaintFlashing.label;"
pref="true" preftype="bool" prefstring="nglayout.debug.paint_flashing"
prefattribute="checked"/>
<checkbox id="nglayoutDebugPaintDumping" value="&debugPaintDumping.label;"
pref="true" preftype="bool" prefstring="nglayout.debug.paint_dumping"
prefattribute="checked"/>
<checkbox id="nglayoutDebugInvalidateDumping" value="&debugInvalidateDumping.label;"
pref="true" preftype="bool" prefstring="nglayout.debug.invalidate_dumping"
prefattribute="checked"/>
<checkbox id="nglayoutDebugEventDumping" value="&debugEventDumping.label;"
pref="true" preftype="bool" prefstring="nglayout.debug.invalidate_dumping"
prefattribute="checked"/>
<checkbox id="nglayoutDebugMotionEventDumping" value="&debugMotionEventDumping.label;"
pref="true" preftype="bool" prefstring="nglayout.debug.motion_event_dumping"
prefattribute="checked"/>
<checkbox id="nglayoutDebugCrossingEventDumping" value="&debugCrossingEventDumping.label;"
pref="true" preftype="bool" prefstring="nglayout.debug.motion_event_dumping"
prefattribute="checked"/>
</titledbox>
</window>

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

@ -21,11 +21,10 @@
Contributor(s):
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/pref/pref.css" type="text/css"?>
<?xml-stylesheet href="chrome://pref/skin/" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-download.dtd" >
<!DOCTYPE window SYSTEM "chrome://pref/locale/pref-download.dtd" >
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
@ -68,7 +67,7 @@
}
</html:script>
<box type="smallheader" title="&lHeader;" description="&rHeader;"/>
<box class="box-smallheader" title="&lHeader;" description="&rHeader;"/>
<html:fieldset>
<html:legend align="left">&newmes;</html:legend>

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

@ -21,150 +21,142 @@
Contributor(s):
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/pref/pref.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-composer.dtd" >
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-editing.dtd">
<window debug="false" xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
align="vertical" title="&title2.label;"
onload="if( parent.handle ) parent.handle.onpageload( 'pref-editing' ); else parent.queuedTag = 'pref-editing'; InitColors();">
<script language="JavaScript" src="chrome://communicator/content/pref/pref-composer.js"/>
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="color-dialog"
orient="vertical"
onload="parent.initPanel('chrome://communicator/content/pref/pref-editing.xul');">
<box type="smallheader" title="&lHeader;" description="&rHeader;"/>
<script lanugage="JavaScript">
<![CDATA[
_elementIDs = ["editorAuthor", "textData", "linkData", "aLinkData", "fLinkData", "backgroundData", "useCustomColors", "backroundImageField"];
]]>
</script>
<titledbox orient="vertical">
<title><text value="&authorName;"/></title>
<box autostretch="never" valign="middle">
<textfield class="indent" name="author" id="editorAuthor"
pref="true" preftype="string" prefstring="editor.author" flex="1"/>
</box>
<script language="JavaScript" src="chrome://communicator/content/pref/pref-composer.js"></script>
<script language="JavaScript" src="chrome://global/content/strres.js"></script>
<script language="JavaScript" src="chrome://communicator/content/pref/prefutilities.js"></script>
<box class="box-smallheader" title="&lHeader;" description="&rHeader;"/>
<titledbox orient="vertical">
<title><text value="&authorName.label;"/></title>
<textfield id="editorAuthor" flex="1"
pref="true" preftype="string" prefstring="editor.author"
prefattribute="value"/>
</titledbox>
<titledbox orient="vertical">
<title><text value="&pageColorHeader;"/></title>
<box align="horizontal">
<box align="vertical" flex="0">
<box align="vertical">
<radiogroup orient="vertical">
<radio
value = "Use Navigator (Don't Specify)"
id = "defaultcolorRadio"
pref="true" preftype="int" prefindex="0" prefstring="editor.use_custom_default_colors"
/>
<radio
value = "Custom Colors"
id = "customcolorRadio"
pref="true" preftype="int" prefindex="1" prefstring="editor.use_custom_default_colors"
/>
</radiogroup>
</box>
<titledbox orient="vertical">
<title><text value="&pageColorHeader;"/></title>
<spring flex="100%"/>
<box flex="100%">
<text value = "&NormalText.label;" />
<spring flex="100%"/>
<menu id="normaltextmenu" allowevents="true" class="colorpicker">
<box id="pref:#000000:color:editor.text_color" style="width:30px; background-color:white"/>
<titledbutton class="popup" align="right" flex="100%"/>
<menupopup id="normalMenuPopup">
<colorpicker allowevents="true" id="normalColorpicker" palettename="standard" onclick="setColorWell(this.parentNode.parentNode, 'normaltext', false);"/>
</menupopup>
</menu>
<textfield type="hidden" id="normalText"
pref="true" preftype="color" prefstring="editor.text_color"/>
</box>
<box>
<text value="&LinkText.label;" />
<spring flex="100%"/>
<menu id="linktextmenu" class="colorpicker">
<box id="pref:#000000:color:editor.link_color" style="width:30px; background-color:white"/>
<titledbutton class="popup" align="right" flex="100%"/>
<menupopup>
<colorpicker palettename="standard" onclick="setColorWell(this.parentNode.parentNode,'linktext',false);"/>
</menupopup>
</menu>
<textfield type="hidden" id="linkText"
pref="true" preftype="color" prefstring="editor.link_color"/>
</box>
<box>
<text value="&ActiveLinkText.label;" />
<spring flex="100%"/>
<menu id="activelinktextmenu" class="colorpicker">
<box id="pref:#000000:color:editor.active_link_color" style="width:30px; background-color:white"/>
<titledbutton class="popup" align="right" flex="100%"/>
<menupopup>
<colorpicker palettename="standard" onclick="setColorWell(this.parentNode.parentNode,'activelinktext',false);"/>
</menupopup>
</menu>
<textfield type="hidden" id="activeLinkText"
pref="true" preftype="color" prefstring="editor.active_link_color"/>
</box>
<box>
<text value="&FollowedLinkText.label;" />
<spring flex="100%"/>
<menu id="followedlinktextmenu" class="colorpicker">
<box id="pref:#000000:color:editor.followed_link_color" style="width:30px; background-color:white"/>
<titledbutton class="popup" align="right" flex="100%"/>
<menupopup>
<colorpicker palettename="standard" onclick="setColorWell(this.parentNode.parentNode,'followedlinktext',false);"/>
</menupopup>
</menu>
<textfield type="hidden" id="followedLinkText"
pref="true" preftype="color" prefstring="editor.followed_link_color"/>
</box>
<box>
<text value="&BackgroundColor.label;" />
<spring flex="100%"/>
<menu id="colorpreviewmenu" class="colorpicker">
<box id="pref:#000000:color:editor.background_color" style="width:30px; background-color:white"/>
<titledbutton class="popup" align="right" flex="100%"/>
<menupopup>
<colorpicker palettename="standard" onclick="setColorWell(this.parentNode.parentNode,'colorpreview',true);"/>
</menupopup>
</menu>
<textfield type="hidden" id="backgroundColor"
pref="true" preftype="color" prefstring="editor.background_color"/>
</box>
</box>
<spring style="width: 7px;"/>
<box align="vertical" flex="100%" id="colorpreview" basestyle="min-height:50px; width: 100%; border: 1px inset #CCCCCC; padding: 5px; " style="min-height:50px; width: 100%; border: 1px inset #CCCCCC; padding: 5px; ">
<text value="&NormalText.label;" id="normaltext" />
<spring style="height: 7px;"/>
<text value="&LinkText.label;" id="linktext" />
<spring style="height: 7px;"/>
<text value="&ActiveLinkText.label;" id="activelinktext" />
<spring style="height: 7px;"/>
<text value="&FollowedLinkText.label;" id="followedlinktext" />
</box>
</box>
<spring/>
</titledbox>
<spring/>
<titledbox>
<title><text value="Default Background Image"/></title>
<box>
<checkbox pref="true" preftype="int" prefindex="0" prefstring="editor.author" flex="1"/>
<spring />
<box>
<textfield id="BackgroundImageInput" flex="1"/>
<spring flex="100%"/>
<button class="dialog" value="Choose Image" id="ImageButton" oncommand="ChooseImage()"/>
<box orient="vertical">
<radiogroup id="useCustomColors" orient="vertical" autostretch="never"
pref="true" preftype="int" prefstring="editor.use_custom_default_colors"
prefattribute="data">
<radio data="0" value="&useNavigator.label;" accesskey="&useNavigator.accesskey;" oncommand="useNavigatorColors();"/>
<radio data="1" value="&useCustomColors.label;" accesskey="&useCustomColors.accesskey;" oncommand="useCustomColors()"/>
</radiogroup>
<grid class="indent">
<columns>
<column flex="1"/>
<column/>
</columns>
<rows>
<row>
<text class="label" id="textLabel" value="&NormalText.label;" accesskey="&NormalText.accesskey;" for="textMenu"/>
<menu id="textMenu" allowevents="true" class="colorpicker">
<html:div id="textDiv" style="width:30px; background-color:white"/>
<titledbutton class="popup" align="right"/>
<menupopup id="textPopup">
<colorpicker allowevents="true" id="textPicker" palettename="standard" onclick="setColorWell(this.parentNode.parentNode, 'normaltext', false);"/>
</menupopup>
</menu>
<data id="textData" pref="true" preftype="color" prefstring="editor.text_color" prefattribute="value" wsm_attributes="value"/>
</row>
<row>
<text class="label" id="linkLabel" value="&LinkText.label;" accesskey="&LinkText.accesskey;" for="linkMenu"/>
<menu id="linkMenu" allowevents="true" class="colorpicker">
<html:div id="linkDiv" style="width:30px; background-color:white"/>
<titledbutton class="popup" align="right"/>
<menupopup id="linkPopup">
<colorpicker allowevents="true" id="linkPicker" palettename="standard" onclick="setColorWell(this.parentNode.parentNode, 'linktext', false);"/>
</menupopup>
</menu>
<data id="linkData" pref="true" preftype="color" prefstring="editor.link_color" prefattribute="value" wsm_attributes="value"/>
</row>
<row>
<text class="label" id="aLinkLabel" value="&ActiveLinkText.label;" accesskey="&ActiveLinkText.accesskey;" for="aLinkMenu"/>
<menu id="aLinkMenu" allowevents="true" class="colorpicker">
<html:div id="aLinkDiv" style="width:30px; background-color:white"/>
<titledbutton class="popup" align="right"/>
<menupopup id="aLinkPopup">
<colorpicker allowevents="true" id="aLinkPicker" palettename="standard" onclick="setColorWell(this.parentNode.parentNode, 'activelinktext', false);"/>
</menupopup>
</menu>
<data id="aLinkData" pref="true" preftype="color" prefstring="editor.active_link_color" prefattribute="value" wsm_attributes="value"/>
</row>
<row>
<text class="label" id="fLinkLabel" value="&FollowedLinkText.label;" accesskey="&FollowedLinkText.accesskey;" for="fLinkMenu"/>
<menu id="fLinkMenu" allowevents="true" class="colorpicker">
<html:div id="fLinkDiv" style="width:30px; background-color:white"/>
<titledbutton class="popup" align="right"/>
<menupopup id="fLinkPopup">
<colorpicker allowevents="true" id="fLinkPicker" palettename="standard" onclick="setColorWell(this.parentNode.parentNode, 'followedlinktext', false);"/>
</menupopup>
</menu>
<data id="fLinkData" pref="true" preftype="color" prefstring="editor.followed_link_color" prefattribute="value" wsm_attributes="value"/>
</row>
<row>
<text class="label" id="backgroundLabel" value="&BackgroundColor.label;" accesskey="&BackgroundColor.accesskey;" for="backgroundMenu"/>
<menu id="backgroundMenu" allowevents="true" class="colorpicker">
<html:div id="backgroundDiv" style="width:30px; background-color:white"/>
<titledbutton class="popup" align="right"/>
<menupopup id="backgroundPopup">
<colorpicker allowevents="true" id="backgroundPicker" palettename="standard" onclick="setColorWell(this.parentNode.parentNode, 'backgroundcolor', true);"/>
</menupopup>
</menu>
<data id="backgroundData" pref="true" preftype="color" prefstring="editor.background_color" prefattribute="value" wsm_attributes="value"/>
</row>
</rows>
</grid>
</box>
<separator orient="vertical"/>
<box orient="vertical" flex="1">
<box class="inset" id="backgroundcolor" orient="vertical" flex="1">
<text class="label" id="normaltext" value="&NormalText.label;"/>
<text class="label" id="linktext" value="&LinkText.label;"/>
<text class="label" id="activelinktext" value="&ActiveLinkText.label;"/>
<text class="label" id="followedlinktext" value="&FollowedLinkText.label;"/>
</box>
<button id="useDefaults" class="dialog" value="&UseDefaults.label;" accesskey="&UseDefaults.accesskey;" oncommand="useDefaultColors();"/>
</box>
</box>
<separator class="thin"/>
<!-- a good idea here might be to load this image into the bg of the preview
area if it is available (locally, or network connection is open) -->
<text class="label" value="&defaultBackgroundImage.label;" accesskey="&defaultBackgroundImage.accesskey;"/>
<box autostretch="never">
<textfield id="backroundImageField" flex="1" pref="true" preftype="string"
prefstring="editor.default_background_image" prefattribute="value"/>
<button class="dialog" value="&chooseFile.label;" accesskey="&chooseFile.accesskey;" oncommand="prefNavSelectFile('backroundImageField','choosefile',true);"/>
</box>
<spring/>
</titledbox>
</titledbox>
</window>

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

@ -1,205 +1,300 @@
enumerator = "component://netscape/gfx/fontenumerator";
enumerator = Components.classes[enumerator].createInstance();
enumerator = enumerator.QueryInterface(Components.interfaces.nsIFontEnumerator);
fontCount = {value: 0 }
fonts = enumerator.EnumerateAllFonts(fontCount);
try
{
var enumerator = Components.classes["component://netscape/gfx/fontenumerator"].createInstance();
if( enumerator )
enumerator = enumerator.QueryInterface(Components.interfaces.nsIFontEnumerator);
var fontCount = { value: 0 }
fonts = enumerator.EnumerateAllFonts(fontCount);
generics = [
"serif",
"sans-serif",
"cursive",
"fantasy",
"monospace"
];
selects = [
"serif",
"sans-serif",
// "cursive",
// "fantasy",
"monospace"
];
function startUp()
{
selectLangs = document.getElementById("selectLangs");
selectLangs.value = "x-western";
selectLang();
}
function get() {
dump('\n pref: ' + document.getElementById('serif').getAttribute('pref') + '\n');
dump('\n pref: ' + document.getElementById('serif').getAttribute('preftype') + '\n');
dump('\n element: ' + document.getElementById('serif').getAttribute('prefstring') + '\n');
dump('***');
dump('\n Size pref: ' + document.getElementById('size').getAttribute('pref') + '\n');
dump('\n Size pref: ' + document.getElementById('size').getAttribute('preftype') + '\n');
dump('\n Size element: ' + document.getElementById('size').getAttribute('prefstring') + '\n');
dump('\n Value element: ' + document.getElementById('size').value + '\n');
var pref = Components.classes["component://netscape/preferences"].getService( Components.interfaces.nsIPref );
}
catch(e)
{
}
var fontTypes = ["serif","sans-serif", /*"cursive", "fantasy",*/"monospace"];
var variableSize, fixedSize, languageList;
var languageData = [];
var currentLanguage;
// manual data retrieval function for PrefWindow
function GetFields()
{
var dataObject = [];
// store data for language independent widgets
var lists = ["selectLangs", "defaultFont"];
for( var i = 0; i < lists.length; i++ )
{
if( !dataObject.dataEls )
dataObject.dataEls = [];
dataObject.dataEls[ lists[i] ] = [];
dataObject.dataEls[ lists[i] ].data = document.getElementById( lists[i] ).data;
}
dataObject.defaultFont = document.getElementById( "defaultFont" ).data;
dataObject.fontDPI = document.getElementById( "browserScreenResolution" ).value;
dataObject.useDocFonts = document.getElementById( "browserUseDocumentFonts" ).checked ? 0 : 1;
// save current state for language dependent fields and store
saveState();
dataObject.languageData = languageData;
return dataObject;
}
// manual data setting function for PrefWindow
function SetFields( aDataObject )
{
languageData = aDataObject.languageData ? aDataObject.languageData : languageData ;
currentLanguage = aDataObject.currentLanguage ? aDataObject.currentLanguage : null ;
var lists = ["selectLangs", "defaultFont"];
for( var i = 0; i < lists.length; i++ )
{
var element = document.getElementById( lists[i] );
if( aDataObject.dataEls )
{
element.data = aDataObject.dataEls[ lists[i] ].data;
element.selectedItem = element.getElementsByAttribute( "data", aDataObject.dataEls[ lists[i] ].data )[0];
}
else
{
var prefstring = element.getAttribute( "prefstring" );
var preftype = element.getAttribute( "preftype" );
if( prefstring && preftype )
{
var prefvalue = parent.hPrefWindow.getPref( preftype, prefstring );
element.data = prefvalue;
element.selectedItem = element.getElementsByAttribute( "data", prefvalue )[0];
}
}
}
var resolutionField = document.getElementById( "browserScreenResolution" );
if( aDataObject.fontDPI != undefined )
resolutionField.value = aDataObject.fontDPI;
else
{
var prefvalue = parent.hPrefWindow.getPref( resolutionField.getAttribute("preftype"), resolutionField.getAttribute("prefstring") );
if( prefvalue != "!/!ERROR_UNDEFINED_PREF!/!" )
resolutionField.value = prefvalue;
}
var useDocFontsCheckbox = document.getElementById( "browserUseDocumentFonts" );
if( aDataObject.useDocFonts != undefined )
useDocFontsCheckbox.checked = aDataObject.useDocFonts ? false : true;
else
{
var prefvalue = parent.hPrefWindow.getPref( useDocFontsCheckbox.getAttribute("preftype"), useDocFontsCheckbox.getAttribute("prefstring") );
if( prefvalue != "!/!ERROR_UNDEFINED_PREF!/!" )
useDocFontsCheckbox.checked = prefvalue ? false : true ;
}
}
//Clears select list
function ClearList(list)
{
if (list) {
dump(list.length + " \n");
list.selectedIndex = -1;
for( j=list.length-1; j >= 0; j--) {
dump(list + " \n");
list.remove(j);
}
}
}
function Startup()
{
variableSize = document.getElementById( "sizeVar" );
fixedSize = document.getElementById( "sizeMono" );
languageList = document.getElementById( "selectLangs" );
// register our ok callback function
parent.hPrefWindow.registerOKCallbackFunc( saveFontPrefs );
// eventually we should detect the default language and select it by default
selectLanguage();
}
function listElement( aListID )
{
this.listElement = document.getElementById( aListID );
}
listElement.prototype =
{
clearList:
function ()
{
// remove the menupopup node child of the menulist.
this.listElement.removeChild( this.listElement.firstChild );
},
function AppendStringToListByID(list, stringID)
{
AppendStringToList(list, editorShell.GetString(stringID));
}
function AppendStringToList(list, string)
{
// THIS DOESN'T WORK! Result is a XULElement -- namespace problem
// optionNode1 = document.createElement("option");
// This works - Thanks to Vidur! Params = name, value
optionNode = new Option(string, string);
if (optionNode) {
list.add(optionNode, null);
} else {
dump("Failed to create OPTION node. String content="+string+"\n");
}
}
function selectLang()
{
//get pref services
var pref = null;
try
{
pref = Components.classes["component://netscape/preferences"];
if (pref) pref = pref.getService();
if (pref) pref = pref.QueryInterface(Components.interfaces.nsIPref);
}
catch(ex)
{
dump("failed to get prefs service!\n");
pref = null;
}
//Getting variables needed
lang = document.getElementById("selectLangs").value;
dump("LangGroup selected: " +lang +" \n");
//set prefstring of size
var fontVarPref = 'font.size.variable.' + lang;
var fontfixPref = 'font.size.fixed.' + lang;
var sizeVar = document.getElementById('size');
var sizeFix = document.getElementById('sizeFixed');
sizeVar.setAttribute('prefstring', fontVarPref);
sizeFix.setAttribute('prefstring', fontfixPref);
//Get size from the preferences
var fixedFont = null;
try
{
if (pref)
{
var fontVarInt = pref.GetIntPref(fontVarPref);
var fontfixInt = pref.GetIntPref(fontfixPref);
}
}
catch(ex)
{
//Default to 16 and 13 if no size is in the pref
fixedFont = null;
fontVarInt = "16"
fontfixInt = "13"
}
dump(fixedFont + "\n");
var faceList = new String();
var combinedFonts = new Array();
for (i = 0; i < generics.length; i++) {
fonts = enumerator.EnumerateFonts(lang, generics[i], fontCount);
for (j = 0; j < fonts.length; j++) {
if (faceList.indexOf(fonts[j]+',') == -1) {
faceList += fonts[j]+',';
appendString:
function ( aString )
{
var menuItemNode = document.createElement( "menuitem" );
if( menuItemNode )
{
menuItemNode.setAttribute( "value", aString );
this.listElement.firstChild.appendChild( menuItemNode );
}
} //for fonts
} //for generics
},
//strip trailing delimiter
if (faceList.length > 0) faceList = faceList.substring(0,faceList.length-1);
dump('faceList: ' + faceList + '\n');
combinedFonts = faceList.split(',');
//sort serif and sans serif fonts
combinedFonts.sort();
dump('Combined fonts: \n');
for (i = 0; i < combinedFonts.length; i++) {
dump(combinedFonts[i] + '\n');
}
for (i = 0; i < selects.length; i++) {
var fontList = selects[i];
var select = document.getElementById(fontList);
//Clear the select list
ClearList(select);
//create name of font prefstring
var fontPrefstring = 'font.name.' + fontList + '.' + lang;
select.setAttribute('prefstring', fontPrefstring);
for (j = 0; j < combinedFonts.length; j++) {
AppendStringToList(select, combinedFonts[j]);
appendStrings:
function ( aDataObject )
{
var popupNode = document.createElement( "menupopup" );
faces = aDataObject.toString().split(",");
faces.sort();
for( var i = 0; i < faces.length; i++ )
{
var itemNode = document.createElement( "menuitem" );
itemNode.setAttribute( "data", faces[i] );
itemNode.setAttribute( "value", faces[i] );
popupNode.appendChild( itemNode );
}
this.listElement.appendChild( popupNode );
}
};
try
{
if (pref)
{
var selectVal = pref.CopyUnicharPref(fontPrefstring);
}
}
function saveFontPrefs()
{
// if saveState function is available, assume can call it.
// why is this extra qualification required?!!!!
if( top.hPrefWindow.wsm.contentArea.saveState )
{
saveState();
parent.hPrefWindow.wsm.dataManager.pageData["chrome://pref/content/pref-fonts.xul"] = GetFields();
}
// saving font prefs
var dataObject = parent.hPrefWindow.wsm.dataManager.pageData["chrome://pref/content/pref-fonts.xul"];
var pref = parent.hPrefWindow.pref;
for( var language in dataObject.languageData )
{
for( var type in dataObject.languageData[language].types )
{
var fontPrefString = "font.name." + type + "." + language;
var currValue = "";
try
{
currValue = pref.CopyUnicharPref( fontPrefString );
}
catch(e)
{
}
if( currValue != dataObject.languageData[language].types[type] )
{
pref.SetUnicharPref( fontPrefString, dataObject.languageData[language].types[type] );
}
}
var variableSizePref = "font.size.variable." + language;
var fixedSizePref = "font.size.fixed." + language;
var currVariableSize = 12, currFixedSize = 12;
try
{
currVariableSize = pref.GetIntPref( variableSizePref );
currFixedSize = pref.GetIntPref( fixedSizePref );
}
catch(e)
{
}
if( currVariableSize != dataObject.languageData[language].variableSize )
pref.SetIntPref( variableSizePref, dataObject.languageData[language].variableSize );
if( currFixedSize != dataObject.languageData[language].fixedSize )
pref.SetIntPref( fixedSizePref, dataObject.languageData[language].fixedSize );
}
catch(ex)
{
selectVal = '';
}
// font scaling
var fontDPI = parseInt( dataObject.fontDPI );
var documentFonts = dataObject.useDocFonts;
var defaultFont = dataObject.defaultFont;
try
{
var currDPI = pref.GetIntPref( "browser.screen_resolution" );
var currFonts = pref.GetIntPref( "browser.use_document_fonts" );
var currDefault = pref.CopyUnicharPref( "font.default" );
}
catch(e)
{
}
if( currDPI != fontDPI )
pref.SetIntPref( "browser.screen_resolution", fontDPI );
if( currFonts != documentFonts )
pref.SetIntPref( "browser.use_document_fonts", documentFonts );
if( currDefault != defaultFont )
{
dump("*** defaultFont = " + defaultFont + "\n");
pref.SetUnicharPref( "font.default", defaultFont );
}
}
function saveState()
{
for( var i = 0; i < fontTypes.length; i++ )
{
// preliminary initialisation
if( currentLanguage && !languageData[currentLanguage] )
languageData[currentLanguage] = [];
if( currentLanguage && !languageData[currentLanguage].types )
languageData[currentLanguage].types = [];
// save data for the previous language
if( currentLanguage && languageData[currentLanguage] &&
languageData[currentLanguage].types )
languageData[currentLanguage].types[fontTypes[i]] = document.getElementById( fontTypes[i] ).data;
}
if( currentLanguage && languageData[currentLanguage] &&
languageData[currentLanguage].types )
{
languageData[currentLanguage].variableSize = parseInt( variableSize.data );
languageData[currentLanguage].fixedSize = parseInt( fixedSize.data );
}
}
function selectLanguage()
{
// save current state
saveState();
if( !currentLanguage )
currentLanguage = languageList.data;
for( var i = 0; i < fontTypes.length; i++ )
{
// build and populate the font list for the newly chosen font type
var selectElement = new listElement( fontTypes[i] );
selectElement.clearList();
selectElement.appendStrings( enumerator.EnumerateFonts( languageList.data, fontTypes[i], fontCount ) );
if( languageData[languageList.data] )
{
// data exists for this language, pre-select items based on this information
var selectedItem = selectElement.listElement.getElementsByAttribute( "data", languageData[languageList.data].types[fontTypes[i]] )[0];
selectElement.listElement.selectedItem = selectedItem;
variableSize.selectedItem = variableSize.getElementsByAttribute( "data", languageData[languageList.data].variableSize )[0];
fixedSize.selectedItem = fixedSize.getElementsByAttribute( "data", languageData[languageList.data].fixedSize )[0];
}
else
{
try
{
var fontPrefString = "font.name." + fontTypes[i] + "." + languageList.data;
var selectVal = parent.hPrefWindow.pref.CopyUnicharPref( fontPrefString );
var selectedItem = selectElement.listElement.getElementsByAttribute( "data", selectVal )[0];
selectElement.listElement.data = selectVal;
selectElement.listElement.selectedItem = selectedItem;
var variableSizePref = "font.size.variable." + languageList.data;
var fixedSizePref = "font.size.fixed." + languageList.data;
var sizeVarVal = parent.hPrefWindow.pref.GetIntPref( variableSizePref );
var sizeFixedVal = parent.hPrefWindow.pref.GetIntPref( fixedSizePref );
variableSize.data = sizeVarVal;
variableSize.selectedItem = variableSize.getElementsByAttribute( "data", sizeVarVal )[0];
fixedSize.data = sizeFixedVal;
fixedSize.selectedItem = fixedSize.getElementsByAttribute( "data", sizeFixedVal )[0];
}
catch(e)
{
// if we don't find an existing pref, it's no big deal.
}
}
}
currentLanguage = languageList.data;
}
//select the value of the string
select.value = selectVal;
dump('fontPrefstring:' + fontPrefstring + "\n");
dump('selectVal:' + selectVal + "\n");
dump('select:' + select.getAttribute('prefstring') + "\n");
} //for select
//set the value of the sizes
sizeVar.value = fontVarInt;
sizeFix.value = fontfixInt;
}

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

@ -22,158 +22,175 @@
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/pref/pref.css" type="text/css"?>
<?xul-overlay href="chrome://communicator/content/pref/fontScalingOverlay.xul"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-fonts.dtd" >
<window debug="false" id="fontPanel"
<window id="fontPanel"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
title="&window.title;" orient="vertical"
onload="if( parent.handle ) parent.handle.onpageload( 'pref-fonts' ); else parent.queuedTag = 'pref-fonts';startUp()">
class="color-dialog"
title="&window.title;"
orient="vertical"
onload="parent.initPanel('chrome://communicator/content/pref/pref-fonts.xul');">
<script language="javascript" src="chrome://communicator/content/pref/pref-fonts.js"></script>
<html:script language="javascript" src="pref-fonts.js"/>
<box type="smallheader" title="&lHeader;" description="&rHeader;"/>
<box class="box-smallheader" title="&lHeader;" description="&rHeader;"/>
<titledbox orient="vertical">
<title><html:div>&displayFonts;</html:div></title>
<html:div style="width: 50px; height: 50px">
<html:table>
<html:tr valign="baseline">
<html:td>&fontsFor.select;</html:td>
<html:td>
<html:select class="Font" id="selectLangs" onchange = "selectLang();" width = "10">
<html:option value="x-western">&font.langGroup.latin1;</html:option>
<html:option value="x-central-euro">&font.langGroup.latin2;</html:option>
<html:option value="ja">&font.langGroup.japanese;</html:option>
<html:option value="zh-TW">&font.langGroup.trad-chinese;</html:option>
<html:option value="zh-CN">&font.langGroup.simpl-chinese;</html:option>
<html:option value="ko">&font.langGroup.korean;</html:option>
<html:option value="x-cyrillic">&font.langGroup.cyrillic;</html:option>
<html:option value="x-baltic">&font.langGroup.baltic;</html:option>
<html:option value="el">&font.langGroup.el;</html:option>
<html:option value="tr">&font.langGroup.turkish;</html:option>
<html:option value="x-unicode">&font.langGroup.unicode;</html:option>
<html:option value="x-user-def">&font.langGroup.user-def;</html:option>
<html:option value="th">&font.langGroup.thai;</html:option>
<html:option value="he">&font.langGroup.hebrew;</html:option>
<html:option value="ar">&font.langGroup.arabic;</html:option>
</html:select>
</html:td>
</html:tr>
<html:tr>
<html:td>&serif.select;</html:td>
<html:td>
<html:select class="Font" id="serif" pref="true" preftype="string" prefstring="">
</html:select>
</html:td>
<html:td>&varFont.select;</html:td>
<html:td>
<html:select class="FontSize" id="size" pref="true" preftype="int">
<html:option value="12" >12</html:option>
<html:option value="13" >13</html:option>
<html:option value="14" >14</html:option>
<html:option value="15" >15</html:option>
<html:option value="16" >16</html:option>
<html:option value="18" >18</html:option>
<html:option value="20" >20</html:option>
<html:option value="24" >24</html:option>
</html:select>
</html:td>
</html:tr>
<html:tr>
<html:td>&sans-serif.select;</html:td>
<html:td>
<html:select class="Font" id="sans-serif" pref="true" preftype="string" prefstring="">
</html:select>
</html:td>
</html:tr>
<titledbox orient="vertical">
<title><text value="&displayFonts;"/></title>
<!-- <html:tr>
<html:td>&cursive.select;</html:td>
<html:td>
<html:select id="cursive" pref="true" preftype="string" prefstring="">
</html:select>
</html:td>
</html:tr>
<box autostretch="never">
<text class="label" value="&language.label;" accesskey="&language.accesskey;" for="selectLangs"/>
<menulist id="selectLangs" oncommand="selectLanguage();">
<menupopup>
<menuitem data="x-western" value="&font.langGroup.latin1;"/>
<menuitem data="x-central-euro" value="&font.langGroup.latin2;"/>
<menuitem data="ja" value="&font.langGroup.japanese;"/>
<menuitem data="zh-TW" value="&font.langGroup.trad-chinese;"/>
<menuitem data="zh-CN" value="&font.langGroup.simpl-chinese;"/>
<menuitem data="ko" value="&font.langGroup.korean;"/>
<menuitem data="x-cyrillic" value="&font.langGroup.cyrillic;"/>
<menuitem data="x-baltic" value="&font.langGroup.baltic;"/>
<menuitem data="el" value="&font.langGroup.el;"/>
<menuitem data="tr" value="&font.langGroup.turkish;"/>
<menuitem data="x-unicode" value="&font.langGroup.unicode;"/>
<menuitem data="x-user-def" value="&font.langGroup.user-def;"/>
<menuitem data="th" value="&font.langGroup.thai;"/>
<menuitem data="he" value="&font.langGroup.hebrew;"/>
<menuitem data="ar" value="&font.langGroup.arabic;"/>
</menupopup>
</menulist>
<spring flex="1"/>
</box>
<html:tr>
<html:td>&fantasy.select;</html:td>
<html:td>
<html:select id="fantasy" pref="true" preftype="string" prefstring="">
</html:select>
</html:td>
<separator/>
<text class="label" value="&variableFonts.label;"/>
</html:tr> -->
<separator class="thin"/>
<grid class="indent">
<columns>
<column/>
<column flex="1"/>
<column/>
<column/>
</columns>
<rows>
<row>
<text class="label" value="&serif.label;" accesskey="&serif.accesskey;" for="serif"/>
<menulist id="serif">
<menupopup/>
</menulist>
<text class="label" value="&size.label;" accesskey="&sizeVar.accesskey;" for="sizeVar"/>
<menulist id="sizeVar">
<menupopup>
<menuitem data="12" value="12"/>
<menuitem data="13" value="13"/>
<menuitem data="14" value="14"/>
<menuitem data="15" value="15"/>
<menuitem data="16" value="16"/>
<menuitem data="18" value="18"/>
<menuitem data="20" value="20"/>
<menuitem data="24" value="24"/>
</menupopup>
</menulist>
</row>
<row>
<text class="label" value="&sans-serif.label;" accesskey="&sans-serif.accesskey;" for="sans-serif"/>
<menulist id="sans-serif">
<menupopup/>
</menulist>
<spring/>
<spring/>
</row>
<!--
<row>
<text class="label" value="&cursive.label;" accesskey="&cursive.accesskey;" for="cursive"/>
<menulist id="cursive">
<menupopup/>
</menulist>
<spring/>
<spring/>
</row>
<row>
<text class="label" value="&fantasy.label;" accesskey="&fantasy.accesskey;" for="fantasy"/>
<menulist id="fantasy">
<menupopup/>
</menulist>
<spring/>
<spring/>
</row>
-->
</rows>
</grid>
<separator/>
<box autostretch="never" class="indent">
<text class="label" value="&default.type.label;"/>
<radiogroup id="defaultFont" autostretch="never" preftype="string" prefstring="font.default">
<radio data="serif" value="&useDefaultFontSerif.label;" accesskey="&useDefaultFontSerif.accesskey;"/>
<radio data="sans-serif" value="&useDefaultFontSansSerif.label;" accesskey="&useDefaultFontSansSerif.accesskey;"/>
</radiogroup>
</box>
<separator/>
<text class="label" value="&fixedFonts.label;"/>
<separator class="thin"/>
<grid class="indent">
<columns>
<column/>
<column flex="1"/>
<column/>
<column/>
</columns>
<rows>
<row>
<text class="label" value="&monospace.label;" accesskey="&monospace.accesskey;" for="monospace"/>
<menulist id="monospace">
<menupopup/>
</menulist>
<text class="label" value="&size.label;" accesskey="&sizeMono.accesskey;" for="sizeMono"/>
<menulist id="sizeMono">
<menupopup>
<menuitem data="12" value="12"/>
<menuitem data="13" value="13"/>
<menuitem data="14" value="14"/>
<menuitem data="15" value="15"/>
<menuitem data="16" value="16"/>
<menuitem data="18" value="18"/>
<menuitem data="20" value="20"/>
<menuitem data="24" value="24"/>
</menupopup>
</menulist>
</row>
</rows>
</grid>
<separator/>
<!-- note that this removes the ability to select dynamic fonts -->
<checkbox id="browserUseDocumentFonts"
value="&useDocumentFonts.label;" accesskey="&useDocumentFonts.accesskey;"
preftype="int" prefstring="browser.use_document_fonts"/>
</titledbox>
<titledbox orient="vertical">
<title><text value="&fontScaling;"/></title>
<html>&fontScalingIntro;</html>
<box autostretch="never">
<text class="label" value="&resolution.label;" accesskey="&resolution.accesskey;" for="browserScreenResolution"/>
<textfield id="browserScreenResolution" size="4" maxlength="3" value="&defaultScaling;" preftype="int" prefstring="browser.screen_resolution"/>
<text class="label" value="&fontScalingExample;"/>
</box>
</titledbox>
<html:tr>
<html:td>&monospace.select;</html:td>
<html:td>
<html:select class="Font" id="monospace" pref="true" preftype="string" prefstring="">
</html:select>
</html:td>
<html:td>&fixedFont.Select;</html:td>
<html:td>
<html:select class="FontSize" id="sizeFixed" pref="true" preftype="int">
<html:option value="12" >12</html:option>
<html:option value="13" >13</html:option>
<html:option value="14" >14</html:option>
<html:option value="15" >15</html:option>
<html:option value="16" >16</html:option>
<html:option value="18" >18</html:option>
<html:option value="20" >20</html:option>
<html:option value="24" >24</html:option>
</html:select>
</html:td>
</html:tr>
<html:tr>
<html:td>
<box align="vertical" flex="1">
<html:div class="vertical-gap">
</html:div>
</box>
</html:td>
</html:tr>
<html:tr>
<html:td>
<html:label>&default.type.label;</html:label>
</html:td>
<html:td>
<html:input name="DefaultFontRadio" type="radio" id="DefaultFontSerif" pref="true" prefindex="serif" preftype="string" prefstring="font.default"/>
<html:label for="DefaultFontSerif" accesskey="t" tabindex="0">
&useDefaultFontSerif;
</html:label>
<html:input name="DefaultFontRadio" type="radio" id="DefaultFontSansSerif" pref="true" prefindex="sans-serif" preftype="string" prefstring="font.default"/>
<html:label for="DefaultFontSansSerif" accesskey="t" tabindex="0">
&useDefaultFontSansSerif;
</html:label>
</html:td>
</html:tr>
</html:table>
</html:div>
</titledbox>
<!-- fonts with webpages -->
<titledbox orient="vertical">
<title><text value="&header2;"/></title>
<html:div>
<html:input name="fonts" type="radio" id="browserUseDocumentFonts1"
pref="true" preftype="int" prefindex="1" prefstring="browser.use_document_fonts"/>
<html:label for="browserUseDocumentFonts1" accesskey="t" tabindex="0">
&useDocFontNonDynamic;
</html:label>
</html:div>
<html:div>
<html:input name="fonts" type="radio" id="browserUseDocumentFonts0"
pref="true" preftype="int" prefindex="0" prefstring="browser.use_document_fonts"/>
<html:label for="browserUseDocumentFonts0" accesskey="t" tabindex="0">
&useDefaultFont;
</html:label>
</html:div>
</titledbox>
</window>

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

@ -20,7 +20,6 @@
Contributor(s):
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/pref/pref.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
@ -28,18 +27,20 @@
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-languages.dtd" >
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
class="color-dialog"
align="vertical" title="window.title"
onload="if( parent.handle ) parent.handle.onpageload( 'pref-languages' ); else parent.queuedTag = 'pref-languages';">
onload="parent.initPanel('chrome://communicator/content/pref/pref-languages.xul');">
<box type="smallheader" title="&lHeader;" description="&rHeader;"/>
<box class="box-smallheader" title="&lHeader;" description="&rHeader;"/>
<html:fieldset flex="100%">
<html:div class="hspace-both">&prefLangDecript;</html:div>
<spring style="height: 10px;"/>
<box align="horizontal" class="hspace-both" flex="100%" style="width: 93%; height: 100%;">
<box align="horizontal" flex="100%">
<tree id="langTree" class="inset" flex="100%" style="width: 100%; height: 50%">
<titledbox orient="vertical">
<html>&prefLangDecript;</html>
<separator/>
<box>
<box orient="vertical" flex="1">
<tree id="langTree" class="inset" flex="1">
<treecol style="width: 10%"/>
<treecol />
<treehead>
@ -57,25 +58,23 @@
</treeitem>
</treechildren>
</tree>
<!-- XXX hard coding language value for now until tree is hooked up -->
<html:input type="hidden" id="intlAcceptLanguages"
value="&engOption.label;"
pref="true" preftype="string" prefstring="intl.accept_languages"/>
<box>
<button class="dialog push" value="&addButton.label;" accesskey="&addButton.accesskey;"/>
<button class="dialog push" value="&deleteButton.label;" accesskey="&deleteButton.accesskey;"/>
</box>
</box>
<spring flex="3%"/>
<box align="vertical">
<spring flex="100%"/>
<html:div><titledbutton id="up" class="dialog push up" /></html:div>
<html:div><titledbutton id="down" class="dialog push down" /></html:div>
<spring flex="100%"/>
</box>
<spring flex="3%"/>
<box align="vertical">
<titledbutton class="dialog push" value="&addButton.label;"/>
<titledbutton class="dialog push" value="&deleteButton.label;"/>
</box>
</box>
</html:fieldset>
<spring flex="75%"/>
<!-- XXX hard coding language value for now until tree is hooked up -->
<broadcaster id="intlAcceptLanguages" value="&engOption.label;" pref="true"
preftype="string" prefstring="intl.accept_languages" prefattribute="value"/>
<box orient="vertical" valign="middle">
<button id="up" class="dialog push" value="&moveUp.label;" accesskey="&moveUp.accesskey;"/>
<button id="down" class="dialog push" value="&moveDown.label;" accesskey="&moveDown.accesskey;"/>
</box>
</box>
</titledbox>
</window>

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

@ -1,28 +0,0 @@
function switchPage( aElement )
{
var index = aElement.options[ aElement.selectedIndex ].value;
var deck = document.getElementById( "modifierDeck" );
dump("*** switch to deck page: " + index + "\n");
deck.setAttribute( "index", index );
}
function doEnableElement( aEventTarget, aElementID )
{
var aElement = document.getElementById( aElementID );
if( aEventTarget.checked == true )
aElement.setAttribute( "disabled", "true" );
else
aElement.removeAttribute( "disabled" );
}
function Startup()
{
var fields = ["mousewheelWithNoKeyNumlines", "mousewheelWithAltKeyNumlines", "mousewheelWithCtrlKeyNumlines", "mousewheelWithShiftKeyNumlines"];
var checkboxes = ["mousewheelWithNoKeySysNumlines", "mousewheelWithAltKeySysNumlines", "mousewheelWithCtrlKeySysNumlines", "mousewheelWithShiftKeySysNumlines"];
for( var i = 0; i < checkboxes.length; i++ )
{
var currEl = document.getElementById( checkboxes[i] );
doEnableElement( currEl, fields[i] );
}
}

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

@ -37,178 +37,139 @@
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
onload="if (parent.handle) parent.handle.onpageload('pref-mousewheel'); else parent.queuedTag='pref-mousewheel';"
align="vertical" title="&title.label;"
>
class="color-dialog"
onload="parent.initPanel('chrome://communicator/content/pref/pref-mousewheel.xul');"
orient="vertical">
<html:script language="JavaScript" src="chrome://communicator/content/pref/pref-mousewheel.js"/>
<box type="smallheader" title="&title.label;" description="&info.label;"/>
<titledbox orient="vertical">
<box orient="horizontal">
<text value="&mouseWheelPanel.label;"/>
<html:select class="indent" id="mouseWheelMode" onchange="switchPage( this );">
<html:option value="0">&usingJustTheWheel.label;</html:option>
<html:option value="1">&usingWheelAndAlt.label;</html:option>
<html:option value="2">&usingWheelAndCtrl.label;</html:option>
<html:option value="3">&usingWheelAndShft.label;</html:option>
</html:select>
<spring flex="1"/>
</box>
<script language="JavaScript">
<![CDATA[
<html:div class="separator" align="horizontal"/>
<deck id="modifierDeck" flex="1">
<!-- no key modifiers -->
<box id="nokey" align="vertical">
<!-- scroll -->
<box orient="horizontal" flex="1" >
<html:div>
<html:input type="radio" name="actionRadioNoKey" id="mousewheelWithNoKeyAction0" pref="true" preftype="int" prefindex="0" prefstring="mousewheel.withnokey.action"/>
<html:label for="mousewheelWithNoKeyAction0">&scroll.label;</html:label>
</html:div>
<spring flex="1"/>
<box orient="vertical">
<box orient="horizontal">
<html:input type="text" id="mousewheelWithNoKeyNumlines" size="3" pref="true" preftype="int" prefstring="mousewheel.withnokey.numlines"/>
<html:label>&scrollLines.label;</html:label>
</box>
<html:div>
<html:input type="checkbox" id="mousewheelWithNoKeySysNumlines" pref="true" preftype="bool" prefstring="mousewheel.withnokey.sysnumlines"
onclick="doEnableElement( this, 'mousewheelWithNoKeyNumlines' );"/>
<html:label for="systemDefault">&useSystemDefault.label;</html:label>
</html:div>
</box>
<spring flex="1"/>
</box>
<!-- page up/page dn-->
<html:div>
<html:input type="radio" name="actionRadioNoKey" id="mousewheelWithNoKeyAction1" pref="true" preftype="int" prefindex="1" prefstring="mousewheel.withnokey.action"/>
<html:label for="mousewheelWithNoKeyAction1">&scrollPgUpPgDn.label;</html:label>
</html:div>
function switchPage( aElement )
{
var deck = document.getElementById( "modifierDeck" );
deck.setAttribute( "index", aElement.selectedItem.data );
}
function doEnableElement( aEventTarget, aElementID )
{
var aElement = document.getElementById( aElementID );
if( aEventTarget.checked == true )
aElement.setAttribute( "disabled", "true" );
else
aElement.removeAttribute( "disabled" );
}
function Startup()
{
var fields = ["mousewheelWithNoKeyNumlines", "mousewheelWithAltKeyNumlines", "mousewheelWithCtrlKeyNumlines", "mousewheelWithShiftKeyNumlines"];
var checkboxes = ["mousewheelWithNoKeySysNumlines", "mousewheelWithAltKeySysNumlines", "mousewheelWithCtrlKeySysNumlines", "mousewheelWithShiftKeySysNumlines"];
for( var i = 0; i < checkboxes.length; i++ )
{
var currEl = document.getElementById( checkboxes[i] );
doEnableElement( currEl, fields[i] );
}
}
]]>
</script>
<box class="box-smallheader" title="&title.label;" description="&info.label;"/>
<spring flex="1"/>
<!-- history back/fwd-->
<html:div>
<html:input type="radio" name="actionRadioNoKey" id="mousewheelWithNoKeyAction2" pref="true" preftype="int" prefindex="2" prefstring="mousewheel.withnokey.action"/>
<html:label for="mousewheelWithNoKeyAction2">&history.label;</html:label>
</html:div>
<titledbox orient="vertical">
<box>
<text class="label" value="&mouseWheelPanel.label;" accesskey="&mouseWheelPanel.accesskey;" for="mouseWheelMode"/>
<menulist id="mouseWheelMode" oncommand="switchPage(this);">
<menupopup>
<menuitem data="0" value="&usingJustTheWheel.label;"/>
<menuitem data="1" value="&usingWheelAndAlt.label;"/>
<menuitem data="2" value="&usingWheelAndCtrl.label;"/>
<menuitem data="3" value="&usingWheelAndShft.label;"/>
</menupopup>
</menulist>
</box>
<separator class="groove"/>
<!-- alt modifiers -->
<box id="alt" align="vertical">
<!-- scroll -->
<box orient="horizontal" flex="1" >
<html:div>
<html:input type="radio" name="actionRadioAltKey" id="mousewheelWithAltKeyAction0" pref="true" preftype="int" prefindex="0" prefstring="mousewheel.withaltkey.action"/>
<html:label for="mousewheelWithAltKeyAction0">&scroll.label;</html:label>
</html:div>
<spring flex="1"/>
<box orient="vertical">
<box orient="horizontal">
<html:input type="text" id="mousewheelWithAltKeyNumlines" size="3" pref="true" preftype="int" prefstring="mousewheel.withaltkey.numlines"/>
<html:label>&scrollLines.label;</html:label>
<deck id="modifierDeck" flex="1">
<!-- no key modifiers -->
<radiogroup id="mousewheelWithNoKeyAction" orient="vertical" autostretch="never"
pref="true" preftype="int" prefstring="mousewheel.withnokey.action"
prefattribute="data">
<box autostretch="never" valign="top">
<radio data="0" value="&scroll.label;" accesskey="&scroll.accesskey;"/>
<box orient="vertical" autostretch="never">
<textfield id="mousewheelWithNoKeyNumlines" size="3"
pref="true" preftype="int" prefstring="mousewheel.withnokey.numlines"
prefattribute="value"/>
<checkbox id="mousewheelWithNoKeySysNumlines" value="&useSystemDefault.label;" accesskey="&useSystemDefault.accesskey;"
pref="true" preftype="bool" prefstring="mousewheel.withnokey.sysnumlines"
prefattribute="checked"/>
</box>
<html:div>
<html:input type="checkbox" id="mousewheelWithAltKeySysNumlines" pref="true" preftype="bool" prefstring="mousewheel.withaltkey.sysnumlines"
onclick="doEnableElement( this, 'mousewheelWithAltKeyNumlines' );"/>
<html:label for="systemDefault">&useSystemDefault.label;</html:label>
</html:div>
</box>
<spring flex="1"/>
</box>
<!-- page up/page dn-->
<html:div>
<html:input type="radio" name="actionRadioAltKey" id="mousewheelWithAltKeyAction1" pref="true" preftype="int" prefindex="1" prefstring="mousewheel.withaltkey.action"/>
<html:label for="mousewheelWithAltKeyAction1">&scrollPgUpPgDn.label;</html:label>
</html:div>
<spring flex="1"/>
<!-- history back/fwd-->
<html:div>
<html:input type="radio" name="actionRadioAltKey" id="mousewheelWithAltKeyAction2" pref="true" preftype="int" prefindex="2" prefstring="mousewheel.withaltkey.action"/>
<html:label for="mousewheelWithAltKeyAction2">&history.label;</html:label>
</html:div>
</box>
<!-- ctrl modifiers -->
<box id="ctrl" align="vertical">
<!-- scroll -->
<box orient="horizontal" flex="1" >
<html:div>
<html:input type="radio" name="actionRadioCtrlKey" id="mousewheelWithCtrlKeyAction0" pref="true" preftype="int" prefindex="0" prefstring="mousewheel.withcontrolkey.action"/>
<html:label for="mousewheelWithCtrlKeyAction0">&scroll.label;</html:label>
</html:div>
<spring flex="1"/>
<box orient="vertical">
<box orient="horizontal">
<html:input type="text" id="mousewheelWithCtrlKeyNumlines" size="3" pref="true" preftype="int" prefstring="mousewheel.withcontrolkey.numlines"/>
<html:label>&scrollLines.label;</html:label>
</box>
<html:div>
<html:input type="checkbox" id="mousewheelWithCtrlKeySysNumlines" pref="true" preftype="bool" prefstring="mousewheel.withcontrolkey.sysnumlines"
onclick="doEnableElement( this, 'mousewheelWithCtrlKeyNumlines' );"/>
<html:label for="systemDefault">&useSystemDefault.label;</html:label>
</html:div>
</box>
<spring flex="1"/>
</box>
<!-- page up/page dn-->
<html:div>
<html:input type="radio" name="actionRadioCtrlKey" id="mousewheelWithCtrlKeyAction1" pref="true" preftype="int" prefindex="1" prefstring="mousewheel.withcontrolkey.action"/>
<html:label for="mousewheelWithCtrlKeyAction1">&scrollPgUpPgDn.label;</html:label>
</html:div>
<spring flex="1"/>
<!-- history back/fwd-->
<html:div>
<html:input type="radio" name="actionRadioCtrlKey" id="mousewheelWithCtrlKeyAction2" pref="true" preftype="int" prefindex="2" prefstring="mousewheel.withcontrolkey.action"/>
<html:label for="mousewheelWithCtrlKeyAction2">&history.label;</html:label>
</html:div>
</box>
<!-- shift modifiers -->
<box id="shift" align="vertical">
<!-- scroll -->
<box orient="horizontal" flex="1" >
<html:div>
<html:input type="radio" name="actionRadioShiftKey" id="mousewheelWithShiftKeyAction0" pref="true" preftype="int" prefindex="0" prefstring="mousewheel.withshiftkey.action"/>
<html:label for="mousewheelWithShiftKeyAction0">&scroll.label;</html:label>
</html:div>
<spring flex="1"/>
<box orient="vertical">
<box orient="horizontal">
<html:input type="text" id="mousewheelWithShiftKeyNumlines" size="3" pref="true" preftype="int" prefstring="mousewheel.withshiftkey.numlines"/>
<html:label>&scrollLines.label;</html:label>
</box>
<html:div>
<html:input type="checkbox" id="mousewheelWithShiftKeySysNumlines" pref="true" preftype="bool" prefstring="mousewheel.withshiftkey.sysnumlines"
onclick="doEnableElement( this, 'mousewheelWithShiftKeyNumlines' );"/>
<html:label for="systemDefault">&useSystemDefault.label;</html:label>
</html:div>
</box>
<spring flex="1"/>
</box>
<!-- page up/page dn-->
<html:div>
<html:input type="radio" name="actionRadioShiftKey" id="mousewheelWithShiftKeyAction1" pref="true" preftype="int" prefindex="1" prefstring="mousewheel.withshiftkey.action"/>
<html:label for="mousewheelWithShiftKeyAction1">&scrollPgUpPgDn.label;</html:label>
</html:div>
<spring flex="1"/>
<!-- history back/fwd-->
<html:div>
<html:input type="radio" name="actionRadioShiftKey" id="mousewheelWithShiftKeyAction2" pref="true" preftype="int" prefindex="2" prefstring="mousewheel.withshiftkey.action"/>
<html:label for="mousewheelWithShiftKeyAction2">&history.label;</html:label>
</html:div>
<radio data="1" value="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
<radio data="2" value="&history.label;" accesskey="&history.accesskey;"/>
</radiogroup>
</box>
</deck>
</titledbox>
<!-- alt modifiers -->
<radiogroup id="mousewheelWithAltKeyAction" orient="vertical" autostretch="never"
pref="true" preftype="int" prefstring="mousewheel.withaltkey.action"
prefattribute="data">
<box autostretch="never" valign="top">
<radio data="0" value="&scroll.label;" accesskey="&scroll.accesskey;"/>
<box orient="vertical" autostretch="never">
<textfield id="mousewheelWithAltKeyNumlines" size="3"
pref="true" preftype="int" prefstring="mousewheel.withaltkey.numlines"
prefattribute="value"/>
<checkbox id="mousewheelWithAltKeySysNumlines" value="&useSystemDefault.label;" accesskey="&useSystemDefault.accesskey;"
pref="true" preftype="bool" prefstring="mousewheel.withaltkey.sysnumlines"
prefattribute="checked"/>
</box>
</box>
<radio data="1" value="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
<radio data="2" value="&history.label;" accesskey="&history.accesskey;"/>
</radiogroup>
<!-- ctrl modifiers -->
<radiogroup id="mousewheelWithCtrlKeyAction" orient="vertical" autostretch="never"
pref="true" preftype="int" prefstring="mousewheel.withcontrolkey.action"
prefattribute="data">
<box autostretch="never" valign="top">
<radio data="0" value="&scroll.label;" accesskey="&scroll.accesskey;"/>
<box orient="vertical" autostretch="never">
<textfield id="mousewheelWithCtrlKeyNumlines" size="3"
pref="true" preftype="int" prefstring="mousewheel.withcontrolkey.numlines"
prefattribute="value"/>
<checkbox id="mousewheelWithCtrlKeySysNumlines" value="&useSystemDefault.label;" accesskey="&useSystemDefault.accesskey;"
pref="true" preftype="bool" prefstring="mousewheel.withcontrolkey.sysnumlines"
prefattribute="checked"/>
</box>
</box>
<radio data="1" value="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
<radio data="2" value="&history.label;" accesskey="&history.accesskey;"/>
</radiogroup>
<!-- shift modifiers -->
<radiogroup id="mousewheelWithShiftKeyAction" orient="vertical" autostretch="never"
pref="true" preftype="int" prefstring="mousewheel.withshiftkey.action"
prefattribute="data">
<box autostretch="never" valign="top">
<radio data="0" value="&scroll.label;" accesskey="&scroll.accesskey;"/>
<box orient="vertical" autostretch="never">
<textfield id="mousewheelWithShiftKeyNumlines" size="3"
pref="true" preftype="int" prefstring="mousewheel.withshiftkey.numlines"
prefattribute="value"/>
<checkbox id="mousewheelWithShiftKeySysNumlines" value="&useSystemDefault.label;" accesskey="&useSystemDefault.accesskey;"
pref="true" preftype="bool" prefstring="mousewheel.withshiftkey.sysnumlines"
prefattribute="checked"/>
</box>
</box>
<radio data="1" value="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
<radio data="2" value="&history.label;" accesskey="&history.accesskey;"/>
</radiogroup>
</deck>
</titledbox>
</window>

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

@ -1,2 +1,19 @@
function viewSignons()
{
window.openDialog("chrome://wallet/content/SignonViewer.xul","","modal=yes,chrome,resizable=no");
}
function viewWallet()
{
window.openDialog("chrome://wallet/content/WalletEditor.xul","","modal=yes,chrome,resizable=no");
}
function changePasswords()
{
wallet = Components.classes['component://netscape/wallet'];
wallet = wallet.getService();
wallet = wallet.QueryInterface(Components.interfaces.nsIWalletService);
wallet.WALLET_ChangePassword();
}

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

@ -29,82 +29,78 @@
<window debug="false" xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
class="color-dialog"
orient="vertical" title="&title.label;"
onload="if( parent.handle ) parent.handle.onpageload( 'pref-navigator' ); else parent.queuedTag = 'pref-navigator';">
onload="parent.initPanel('chrome://communicator/content/pref/pref-navigator.xul');">
<html:script language="javascript" src="chrome://global/content/strres.js" />
<html:script language="javascript" src="chrome://communicator/content/pref/prefutilities.js"/>
<html:script language="javascript" src="chrome://communicator/content/pref/pref-navigator.js"/>
<box type="smallheader" title="&lHeader;" description="&rHeader;"/>
<script language="javascript" src="chrome://global/content/strres.js"></script>
<script language="javascript" src="chrome://communicator/content/pref/prefutilities.js"></script>
<script language="JavaScript">
<![CDATA[
_elementIDs = ["startupPage", "browserStartupHomepage", "histDay"];
]]>
</script>
<box class="box-smallheader" title="&lHeader;" description="&rHeader;"/>
<!-- navigator starts with -->
<titledbox orient="vertical">
<titledbox>
<title><text value="&navRadio;"/></title>
<html:div>
<html:input name="starts" type="radio" id="browserStartupPage0"
pref="true" preftype="int" prefindex="0" prefstring="browser.startup.page"/>
<html:label for="browserStartupPage0" accesskey="" tabindex="0">
&blankRadio;
</html:label>
</html:div>
<html:div>
<html:input name="starts" type="radio" id="browserStartupPage1"
pref="true" preftype="int" prefindex="1" prefstring="browser.startup.page"/>
<html:label for="browserStartupPage1" accesskey="" tabindex="0">
&header2.label;
</html:label>
</html:div>
<html:div>
<html:input name="starts" type="radio" id="browserStartupPage2"
pref="true" preftype="int" prefindex="2" prefstring="browser.startup.page"/>
<html:label for="browserStartupPage2" accesskey="" tabindex="0">
&lastPageRadio;
</html:label>
</html:div>
</titledbox>
<radiogroup id="startupPage" autostretch="never" orient="vertical"
pref="true" preftype="int" prefstring="browser.startup.page"
prefattribute="data" wsm_persist="true">
<radio group="startupPage" data="0" value="&blankPageRadio.label;" accesskey="&blankPageRadio.accesskey;"/>
<radio group="startupPage" data="1" value="&homePageRadio.label;" accesskey="&homePageRadio.accesskey;"/>
<radio group="startupPage" data="2" value="&lastPageRadio.label;" accesskey="&lastPageRadio.accesskey;"/>
</radiogroup>
</titledbox>
<!-- homepage specification -->
<titledbox orient="vertical">
<title><text value="&header2.label;"/></title>
<box orient="vertical" flex="1">
<html:div>&clickRadio;</html:div>
<html:div>
<html:label for="browserStartupHomepage" style="padding-left: 1px;">&location;</html:label>
<html:input size="50" name="homepage" type="text" id="browserStartupHomepage"
pref="true" preftype="string" prefstring="browser.startup.homepage" />
</html:div>
<box orient="horizontal">
<spring flex="1"/>
<titledbutton class="dialog push" name="starts" type="button" value="&useCurrent;" onclick="setHomePageToCurrentPage('browserStartupHomepage');" />
<titledbutton class="dialog push" name="browse" type="button" value="&browseFile;" onclick="prefNavSelectFile('browserStartupHomepage', 'choosehomepage', false);"/>
</box>
</box>
</titledbox>
<!-- commenting out for beta -->
<titledbox orient="vertical" style="display: none;">
<title><text value="&header3.label;"/></title>
<box orient="vertical" flex="1">
<html:div>&historyPages;</html:div>
<box orient="horizontal" autostretch="never" style="vertical-align: middle">
<html:label for="histDay" style="padding: 0px;">&pagesHis;</html:label>
<html:input type="text" value="&histDay;" id="histDay" style="margin-left: 2px; margin-right: 5px;"
pref="true" preftype="string" prefstring="browser.history_expire_days" size="3"/>
<html:div>&daysRadio;</html:div>
<spring flex="1"/>
<titledbutton class="dialog push" name="Clearit" value="&clearHis;" />
</box>
<!-- homepage specification -->
<titledbox orient="vertical">
<title><text value="&header2.label;"/></title>
<html>&homePageIntro.label;</html>
<box autostretch="never">
<text class="label" value="&location.label;" accesskey="&location.accesskey;" for="browserStartupHomepage"/>
<textfield id="browserStartupHomepage" flex="1" wsm_persist="true"
pref="true" preftype="string" prefstring="browser.startup.homepage"
prefattribute="value"/> <!-- we may wish to change this to data
when we support fancy formatted local filenames -->
</box>
<box autostretch="never" halign="right">
<button class="dialog" value="&useCurrent.label;" accesskey="&useCurrent.accesskey;"
oncommand="setHomePageToCurrentPage('browserStartupHomepage');"/>
<button class="dialog" value="&browseFile.label;" accesskey="&browseFile.accesskey;"
oncommand="prefNavSelectFile('browserStartupHomepage', 'choosehomepage', false );"/>
</box>
</titledbox>
<!-- history -->
<titledbox orient="vertical">
<title><text value="&header3.label;"/></title>
<html>&historyPages.label;</html>
<box autostretch="never">
<text class="label" value="&pageHis.label;" accesskey="&pageHis.accesskey;" for="histDay"/>
<textfield id="histDay" size="3" wsm_persist="true"
pref="true" preftype="int" prefstring="browser.history_expire_days"
prefattribute="value"/>
<text class="label" value="&days.label;"/>
<spring flex="1"/>
<button class="dialog" value="&clearHistory.label;" accesskey="&clearHistory.accesskey;"/>
</box>
</titledbox>
<!-- no honey, I haven't been viewing porn, honest! -->
<titledbox orient="vertical">
<title><text value="&locationBarHistory.label;"/></title>
<box autostretch="never">
<html flex="1">&clearLocationBar.label;</html>
<box autostretch="never" halign="right">
<button class="dialog" value="&clearLocationBarButton.label;" accesskey="&clearLocationBarButton.accesskey;"/>
</box>
</titledbox>
<!-- commenting out for beta -->
<titledbox orient="vertical" style="display: none;">
<title><html:div>&header4.label;</html:div></title>
<box orient="horizontal" flex="1" autostretch="never" style="vertical-align: middle">
<html:label style="padding: 0px;">&clearBar;</html:label>
<spring flex="1"/>
<titledbutton class="dialog push" name="starts" type="button" value="&clearLoc;" />
</box>
</titledbox>
</box>
</titledbox>
</window>

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

@ -21,12 +21,10 @@
Contributor(s):
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/pref/pref.css" type="text/css"?>
<?xml-stylesheet href="chrome://pref/skin/" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-offline.dtd" >
<!DOCTYPE window SYSTEM "chrome://pref/locale/pref-offline.dtd" >
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
@ -34,7 +32,7 @@
align="vertical"
onload="if( parent.handle ) parent.handle.onpageload( 'pref-offline' ); else parent.queuedTag = 'pref-offline';">
<box type="smallheader" title="&lHeader;" description="&rHeader;"/>
<box class="box-smallheader" title="&lHeader;" description="&rHeader;"/>
<html:fieldset>
<html:div class="hspace-both">&descipt1;</html:div>

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

@ -0,0 +1,85 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/pref/pref.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-policies.dtd">
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="color-dialog"
onload="parent.initPanel('chrome://communicator/content/pref/pref-policies.xul');"
orient="vertical">
<script language="javascript">
<![CDATA[
]]>
</script>
<box class="box-smallheader" title="&lHeader;" description="&rHeader;"/>
<titledbox orient="vertical">
<html>&zoneIntro.label;</html>
<text class="label" value="&policies.label;"/>
<box>
<tree id="zones" class="inset" flex="1">
<treecol/>
<treechildren id="zoneChildren">
<treeitem open="true">
<treerow>
<treecell value="&default.label;"/>
</treerow>
<treechildren id="defaultChildren">
<treeitem>
<treerow>
<treecell indent="true" value="&allWebsites.label;"/>
</treerow>
</treeitem>
</treechildren>
</treeitem>
<treeitem open="true">
<treerow>
<treecell value="&trusted.label;"/>
</treerow>
<treechildren id="trustedChildren"/>
</treeitem>
<treeitem open="true">
<treerow>
<treecell value="&annoyances.label;"/>
</treerow>
</treeitem>
<treeitem open="true">
<treerow>
<treecell value="&restricted.label;"/>
</treerow>
</treeitem>
</treechildren>
</tree>
<box orient="vertical">
<button class="dialog" value="&addSite.label;" accesskey="&addSite.accesskey;"
oncommand="addSite();"/>
<spring flex="1"/>
</box>
</box>
<text class="label header" value="&description.label;"/>
<box class="indent">
<html id="description"></html>
</box>
<box autostretch="never">
<button class="dialog" value="&settings.label;" accesskey="&settings.accesskey;"
oncommand="settings();"/>
</box>
</titledbox>
</window>

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

@ -1,7 +1,7 @@
function showManualProxyConfig()
{
var manualRow = document.getElementById("manual-proxy");
bundle = srGetStrBundle("chrome://communicator/locale/pref/prefutilities.properties");
bundle = srGetStrBundle("chrome://pref/locale/prefutilities.properties");
var viewHideButton = document.getElementById("viewhideManual");
if( manualRow.style.display == "none" ) {
viewHideButton.value = bundle.GetStringFromName("hiderow");
@ -33,26 +33,27 @@ function DoEnabling()
var auto = [autoURL, autoReload];
// radio buttons
var radio0 = document.getElementById("networkProxyType0");
var radio1 = document.getElementById("networkProxyType1");
var radio2 = document.getElementById("networkProxyType2");
if( radio0.checked ) {
for( var i = 0; i < manual.length; i++ )
manual[i].setAttribute( "disabled", "true" );
for( var i = 0; i < auto.length; i++ )
auto[i].setAttribute( "disabled", "true" );
var radiogroup = document.getElementById("networkProxyType");
switch ( radiogroup.data ) {
case "0":
for( var i = 0; i < manual.length; i++ )
manual[i].setAttribute( "disabled", "true" );
for( var i = 0; i < auto.length; i++ )
auto[i].setAttribute( "disabled", "true" );
break;
case "1":
for( var i = 0; i < auto.length; i++ )
auto[i].setAttribute( "disabled", "true" );
for( var i = 0; i < manual.length; i++ )
manual[i].removeAttribute( "disabled" );
break;
case "2":
default:
for( var i = 0; i < manual.length; i++ )
manual[i].setAttribute( "disabled", "true" );
for( var i = 0; i < auto.length; i++ )
auto[i].removeAttribute( "disabled" );
break;
}
else if ( radio1.checked ) {
for( var i = 0; i < auto.length; i++ )
auto[i].setAttribute( "disabled", "true" );
for( var i = 0; i < manual.length; i++ )
manual[i].removeAttribute( "disabled" );
}
else if ( radio2.checked ) {
for( var i = 0; i < manual.length; i++ )
manual[i].setAttribute( "disabled", "true" );
for( var i = 0; i < auto.length; i++ )
auto[i].removeAttribute( "disabled" );
}
}
}

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

@ -20,7 +20,6 @@
Contributor(s):
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/pref/pref.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
@ -28,131 +27,74 @@
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-proxies.dtd" >
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog" title="Sample Prefs Panel"
align="vertical"
onload="if( parent.handle ) parent.handle.onpageload( 'pref-proxies' ); else parent.queuedTag = 'pref-proxies';">
class="color-dialog"
orient="vertical"
onload="parent.initPanel('chrome://communicator/content/pref/pref-proxies.xul');">
<html:script language="javascript" src="chrome://global/content/strres.js" />
<html:script language="javascript" src="chrome://communicator/content/pref/prefutilities.js"/>
<html:script language="JavaScript" src="chrome://communicator/content/pref/pref-proxies.js"/>
<script language="JavaScript">
<![CDATA[
_elementIDs = ["networkProxyType", "networkProxyFTP", "networkProxyFTP_Port", "networkProxyHTTP", "networkProxyHTTP_Port", "networkProxyNone", "networkProxyAutoconfigURL"];
]]>
</script>
<script language="javascript" src="chrome://global/content/strres.js"></script>
<script language="javascript" src="chrome://communicator/content/pref/prefutilities.js"></script>
<script language="JavaScript" src="chrome://communicator/content/pref/pref-proxies.js"></script>
<box type="smallheader" title="&lHeader;" description="&rHeader;"/>
<box class="box-smallheader" title="&lHeader;" description="&rHeader;"/>
<box align="vertical" style="width: 100%;">
<titledbox orient="vertical">
<html:div>&networkHeader.label;</html:div>
<spring class="vgap"/>
<box>
<html:div>
<html:input name="directManualOrAuto" type="radio" id="networkProxyType0"
onclick="DoEnabling();"
pref="true" preftype="int" prefindex="0" prefstring="network.proxy.type"/>
<html:label for="networkProxyType0" accesskey="d" tabindex="0">
&directTypeRadio.label;
</html:label>
</html:div>
<titledbox orient="vertical">
<html>&networkHeader.label;</html>
<radiogroup id="networkProxyType" orient="vertical"
pref="true" preftype="int" prefstring="network.proxy.type"
prefattribute="data">
<radio data="0" value="&directTypeRadio.label;" accesskey="&directTypeRadio.accesskey;" oncommand="DoEnabling();"/>
<radio data="1" value="&manualTypeRadio.label;" accesskey="&manualTypeRadio.accesskey;" oncommand="DoEnabling();"/>
<grid class="indent" flex="1">
<columns>
<column/>
<column flex="1"/>
</columns>
<rows>
<row>
<text class="label" value="&ftp.label;" accesskey="&ftp.accesskey;" for="networkProxyFTP"/>
<box autostretch="never">
<textfield id="networkProxyFTP" pref="true" preftype="string" prefstring="network.proxy.ftp"
prefattribute="value" flex="1"/>
<text class="label" value="&port.label;" accesskey="&FTPport.accesskey;" for="networkProxyFTP_Port"/>
<textfield id="networkProxyFTP_Port" pref="true" preftype="string" prefstring="network.proxy.ftp_port"
prefattribute="value" size="5"/>
</box>
</row>
<row>
<text class="label" value="&http.label;" accesskey="&http.accesskey;" for="networkProxyHTTP"/>
<box autostretch="never">
<textfield id="networkProxyHTTP" pref="true" preftype="string" prefstring="network.proxy.http"
prefattribute="value" flex="1"/>
<text class="label" value="&port.label;" accesskey="&HTTPport.accesskey;" for="networkProxyHTTP_Port"/>
<textfield id="networkProxyHTTP_Port" pref="true" preftype="string" prefstring="network.proxy.http_port"
prefattribute="value" size="5"/>
</box>
</row>
<row>
<text class="label" value="&noproxy.label;" accesskey="&noproxy.accesskey;" for="networkProxyNone"/>
<textfield id="networkProxyNone" pref="true" preftype="string" prefstring="network.proxy.no_proxies_on"
prefattribute="value"/>
</row>
</rows>
</grid>
<radio data="2" value="&autoTypeRadio.label;" accesskey="&autoTypeRadio.accesskey;" oncommand="DoEnabling();"/>
<box class="indent" flex="1">
<textfield id="networkProxyAutoconfigURL" flex="1"
pref="true" preftype="string" prefstring="network.proxy.autoconfig_url"
prefattribute="value"/>
<button id="autoReload" class="dialog" value="&reload.label;" accesskey="&reload.accesskey;"/>
</box>
<box align="horizontal" flex="1">
<html:div>
<html:input name="directManualOrAuto" type="radio" id="networkProxyType1"
onclick="DoEnabling();"
pref="true" preftype="int" prefindex="1" prefstring="network.proxy.type"/>
<html:label for="networkProxyType1" accesskey="m" tabindex="0">
&manualTypeRadio.label;
</html:label>
</html:div>
</radiogroup>
<spring flex="1"/>
<!--<titledbutton id="viewhideManual" class="dialog push" value="&view.label;" onclick="showManualProxyConfig();"/>-->
</box>
<html:div align="horizontal" id="manual-proxy" style="width: 100px; height: 100px; padding-left: 21px">
<html:table>
<html:tr>
<html:td>&ftp.label;</html:td>
<html:td>
<html:input name="ftpproxy" type="text" id="networkProxyFTP"
pref="true" preftype="string" prefstring="network.proxy.ftp" size="20"/>
</html:td>
<html:td>&port.label;</html:td>
<html:td>
<html:input name="ftpproxyport" type="text" id="networkProxyFTP_Port"
pref="true" preftype="int" prefstring="network.proxy.ftp_port" size="5"/>
</html:td>
</html:tr>
<html:tr>
<html:td>&http.label;</html:td>
<html:td>
<html:input name="httpproxy" type="text" id="networkProxyHTTP"
pref="true" preftype="string" prefstring="network.proxy.http" size="20"/>
</html:td>
<html:td>&port.label;</html:td>
<html:td>
<html:input name="httpproxyport" type="text" id="networkProxyHTTP_Port"
pref="true" preftype="int" prefstring="network.proxy.http_port" size="5"/>
</html:td>
</html:tr>
<html:tr>
<html:td>&noproxy.label;</html:td>
<html:td>
<html:input name="noproxy" type="text" id="networkProxyNone"
pref="true" preftype="string" prefstring="network.proxy.no_proxies_on" size="20"/>
</html:td>
</html:tr>
</html:table>
</html:div>
<!-- Not supporting gopher -->
<!--
<box align="horizontal">
<html:div>&gopher.label;</html:div>
<html:div>&port.label;</html:div>
<html:input name="gopherproxyport" type="text" id="pref:string:network.proxy.gopher_port" size="5" />
</box>
-->
<!-- Not supporting wais right now -->
<!--
<box align="horizontal">
<html:div>&wais.label;</html:div>
<html:input name="waisproxy" type="text" id="pref:string:network.proxy.wais" size="20" />
<spring flex="100%"/>
<html:div>&port.label;</html:div>
<html:input name="waisproxyport" type="text" id="pref:string:network.proxy.wais_port" size="5" />
</box>
-->
<!--
<box align="put name="gopherproxy" type="text" id="pref:string:network.proxy.gopher" size="20" />
<spring flex="100%"/>
<html:div>&direct.label;</html:div>
</box>
-->
<!-- No supporting at this point -->
<!--
<box align="horizontal">
<html:div>&sockhost.label;</html:div>
<html:input name="sockshost" type="text" id="pref:string:network.socks.host" size="20" />
<spring flex="100%"/>
<html:div>&port.label;</html:div>
<html:input name="socksport" type="text" id="pref:string:network.socks.port" size="5" />
</box>
-->
<html:div>
<html:input name="directManualOrAuto" type="radio" id="networkProxyType2"
onclick="DoEnabling();"
pref="true" preftype="int" prefindex="2" prefstring="network.proxy.type"/>
<html:label for="networkProxyType2" accesskey="a" tabindex="0">&autoTypeRadio.label;</html:label>
</html:div>
<box align="horizontal">
&configAutoconfigText.label;
</box>
<box align="horizontal" flex="100%" style="width: 100%;">
<spring flex="25%"/>
<html:input name="" type="text" flex="100%" id="networkProxyAutoconfigURL"
pref="true" preftype="string" prefstring="network.proxy.autoconfig_url"/>
<titledbutton class="dialog push" id="autoReload" value="&reload.label;"/>
</box>
</titledbox>
</box>
</titledbox>
</window>

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

@ -20,7 +20,6 @@
Contributor(s): Robert John Churchill (rjc@netscape.com)
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/pref/pref.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
@ -29,80 +28,39 @@
<window debug="false" xmlns:html="http://www.w3.org/TR/REC-html40"
class="dialog"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="if( parent.handle ) parent.handle.onpageload( 'pref-search' ); else parent.queuedTag = 'pref-search'; InitSingleEngineList(); " title="&title.label;"
onload="parent.initPanel('chrome://communicator/content/pref/pref-search.xul');" title="&title.label;"
orient="vertical">
<html:script language="javascript" src="chrome://communicator/content/pref/pref-search.js"/>
<box type="smallheader" title="&lHeader;" description="&rHeader;"/>
<box orient="vertical">
<titledbox orient="vertical" flex="1">
<title><text value="&legendHeader;"/></title>
<html:div>
<html:input name="powermode" type="radio" id="browserSearchPowermode0"
pref="true" preftype="int" prefindex="0" prefstring="browser.search.powermode"/>
<html:label for="browserSearchPowermode0" accesskey="t" tabindex="0">
&browserSearchButtonText.label;
</html:label>
<html:select id="engineList" ref="NC:SearchEngineRoot"
datasources="rdf:internetsearch"
sortResource="http://home.netscape.com/NC-rdf#Name" sortDirection="ascending"
onchange="return setDefaultSearchEngine(this)" >
<html:option value="" selected="true">
&defaultengine.label;
</html:option>
<template>
<html:option uri="..." value="..." >
<text value="rdf:http://home.netscape.com/NC-rdf#Name" />
</html:option>
</template>
</html:select>
</html:div>
<!-- <html:div>
<html:input name="powermode" type="radio" id="browserSearchPowermode1"
pref="true" preftype="int" prefindex="1" prefstring="browser.search.powermode"/>
<html:label for="browserSearchPowermode1" accesskey="t" tabindex="1">
&enablePowerSearch.label;
</html:label>
</html:div -->
</titledbox>
<titledbox orient="vertical">
<title><text value="&searchResults.label;"/></title>
<html:div>
<html:input name="opensearchpanel" type="checkbox" id="browserSearchOpenSidebarSearchPanel"
pref="true" preftype="bool" prefstring="browser.search.opensidebarsearchpanel"/>
<html:label for="browserSearchOpenSidebarSearchPanel" accesskey="t" tabindex="2">
&openSidebarSearchPanel.label;
</html:label>
</html:div>
<html:div>
&sidebarClickMode.label;
</html:div>
<html:div>
<html:input name="clickCount" type="radio" id="browserSearchSidebarClickCount0"
pref="true" preftype="bool" prefindex="false" prefstring="browser.search.use_double_clicks"/>
<html:label for="browserSearchSidebarClickCount0" accesskey="t" tabindex="2">
&useSingleClicks.label;
</html:label>
</html:div>
<html:div>
<html:input name="clickCount" type="radio" id="browserSearchSidebarClickCount1"
pref="true" preftype="bool" prefindex="true" prefstring="browser.search.use_double_clicks"/>
<html:label for="browserSearchSidebarClickCount1" accesskey="t" tabindex="2">
&useDoubleClicks.label;
</html:label>
</html:div>
<script language="JavaScript">
<![CDATA[
_elementIDs = ["engineList","openSidebarPanel"];
]]>
</script>
</titledbox>
<box class="box-smallheader" title="&lHeader;" description="&rHeader;"/>
<titledbox>
<title><text value="&legendHeader;"/></title>
<text class="label" value="&defaultSearchEngine.label;" accesskey="&defaultSearchEngine.accesskey;" for="engineList"/>
<menulist id="engineList" ref="NC:SearchEngineRoot" datasources="rdf:internetsearch"
sortResource="http://home.netscape.com/NC-rdf#Name" sortDirection="ascending"
pref="true" preftype="string" prefstring="browser.search.defaultengine"
prefattribute="data">
<template>
<menupopup>
<menuitem value="rdf:http://home.netscape.com/NC-rdf#Name" data="..." uri="..."/>
</menupopup>
</template>
</menulist>
</titledbox>
<titledbox orient="vertical">
<title><text value="&searchResults.label;"/></title>
<checkbox id="openSidebarPanel" value="&openSidebarSearchPanel.label;" accesskey="&openSidebarSearchPanel.accesskey;"
pref="true" preftype="bool" prefstring="browser.search.opensidebarsearchpanel"
prefattribute="checked"/>
</titledbox>
</box>
</window>

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

@ -25,65 +25,184 @@
<?xml-stylesheet href="chrome://communicator/skin/pref/pref.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-smart_browsing.dtd" >
<window debug="false" xmlns:html="http://www.w3.org/TR/REC-html40"
class="dialog"
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
%brandDTD;
<!ENTITY % prefSmartBrowsingDTD SYSTEM "chrome://communicator/locale/pref/pref-smart_browsing.dtd" >
%prefSmartBrowsingDTD;
]>
<window xmlns:html="http://www.w3.org/TR/REC-html40"
class="color-dialog"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&title.label;" orient="vertical"
onload="if( parent.handle ) parent.handle.onpageload( 'pref-smart_browsing' ); else parent.queuedTag = 'pref-smart_browsing';">
title="&title.label;"
orient="vertical"
onload="parent.initPanel('chrome://communicator/content/pref/pref-smart_browsing.xul');">
<box type="smallheader" title="&lHeader;" description="&rHeader;"/>
<script language="JavaScript">
<![CDATA[
_elementIDs = ["browserRelatedDisabledForDomains", "addDomain", "browserGoBrowsingEnabled"];
function Startup()
{
// populate tree
var domainPrefField = document.getElementById( "browserRelatedDisabledForDomains" );
var domains = domainPrefField.getAttribute("value").split(",");
if( domains[0] != "" )
{
for( var i = 0; i < domains.length; i++ )
createCell( domains[i] );
}
// select the first item
selectFirstCell();
// enable buttons
doButtonEnabling();
}
<titledbox orient="vertical">
<title><text value="&lHeader;"/></title>
<html:div>
<html:input name="related" type="checkbox" id="browserRelatedEnabled"
pref="true" preftype="bool" prefstring="browser.related.enabled"/>
<html:label for="browserRelatedEnabled" accesskey="n" tabindex="0">
&enableRelatedRadio.label;
</html:label>
</html:div>
<!-- &autoDecp.label;
<html:div>
<html:input name="related" type="radio" id="browserRelatedAutoLoad0"
pref="true" preftype="int" prefindex="0" prefstring="browser.related.autoload"/>
<html:label for="browserRelatedAutoLoad0" accesskey="n" tabindex="0">
&neverRadio;
</html:label>
</html:div>
<html:div>
<html:input name="related" type="radio" id="browserRelatedAutoLoad1"
pref="true" preftype="int" prefindex="1" prefstring="browser.related.autoload"/>
<html:label for="browserRelatedAutoLoad1" accesskey="n" tabindex="0">
&afterAutoloadFirstRadio;
</html:label>
</html:div>
<html:div>
<html:input name="related" type="radio" id="browserRelatedAutoLoad2"
pref="true" preftype="int" prefindex="2" prefstring="browser.related.autoload"/>
<html:label for="browserRelatedAutoLoad2" accesskey="n" tabindex="0">
&afterAutoloadAlwaysRadio;
</html:label>
</html:div>
-->
<html:div>
&doNotDecp.label;
</html:div>
<box align="vertical">
<html:input type="text" name="textstyle" id="browserRelatedDisabledForDomains"
pref="true" preftype="string" prefstring="browser.related.disabledForDomains"/>
</box>
</titledbox>
function selectFirstCell()
{
var domainKids = document.getElementById( "disabledKids" );
if( domainKids.childNodes.length >= 1 ) {
var domainTree = document.getElementById( "disabledDomains" );
domainTree.selectItem( domainKids.firstChild );
}
}
function addDomain()
{
var domainField = document.getElementById( "addDomain" );
if( domainField.value != "" ) {
var domainTree = document.getElementById( "disabledDomains" );
domainTree.selectItem( createCell( domainField.value ) );
rebuildPrefValue();
domainField.value = "";
doButtonEnabling();
}
}
function removeDomain()
{
var domainTree = document.getElementById( "disabledDomains" );
var treeKids = document.getElementById( "disabledKids" );
var selectedItems = domainTree.selectedItems;
if( selectedItems.length >= 1 )
{
for( var i = 0; i < selectedItems.length; i++ )
{
treeKids.removeChild( selectedItems[i] );
}
}
selectFirstCell();
rebuildPrefValue();
}
function rebuildPrefValue()
{
var treeKids = document.getElementById( "disabledKids" );
var string = "";
if( treeKids.hasChildNodes() )
{
for( var i = 0; i < treeKids.childNodes.length; i++ )
{
var domain = treeKids.childNodes[i].firstChild.firstChild.getAttribute("value");
string += ( domain + "," );
}
}
var domainPrefField = document.getElementById( "browserRelatedDisabledForDomains" );
domainPrefField.setAttribute("value",string);
}
function createCell( aValue )
{
var treeKids = document.getElementById( "disabledKids" );
var item = document.createElement( "treeitem" );
var row = document.createElement( "treerow" );
var cell = document.createElement( "treecell" );
cell.setAttribute( "value", aValue );
row.appendChild( cell );
item.appendChild( row );
treeKids.appendChild( item );
return item;
}
<titledbox orient="vertical">
<title><text value="&internetKeywordsHeader.label;"/></title>
<html:div>
<html:input name="keyword" type="checkbox" id="browserGoBrowsingEnabled"
pref="true" preftype="bool" prefstring="keyword.enabled"/>
<html:label for="browserGoBrowsingEnabled" accesskey="n" tabindex="0">
&enableKeyCheck.label;
</html:label>
</html:div>
</titledbox>
function treeHandleEvent( aEvent )
{
if( aEvent.which == 46 )
removeDomain();
}
function doButtonEnabling()
{
var addDomain = document.getElementById("addDomain");
var prefstring = document.getElementById("browserRelatedDisabledForDomains").getAttribute("value");
if( addDomain.value == "" || prefstring.indexOf( addDomain.value + "," ) != -1 )
document.getElementById("addDomainButton").setAttribute("disabled","true");
else
document.getElementById("addDomainButton").removeAttribute("disabled");
}
]]>
</script>
<box class="box-smallheader" title="&lHeader;" description="&rHeader;"/>
<titledbox orient="vertical">
<title><text value="&lHeader;"/></title>
<html>&whatsRelatedDescription.label;</html>
<html id="doNotAcceptText">&doNotDecp.label;</html>
<grid flex="1">
<columns>
<column flex="1"/>
<column/>
</columns>
<rows>
<row>
<tree class="inset" id="disabledDomains" multiple="true" onkeyup="treeHandleEvent(event)">
<treecol/>
<treechildren id="disabledKids"/>
</tree>
<box autostretch="never" valign="top">
<button class="dialog" id="removeDomain" value="&removeDomain.label;" accesskey="&removeDomain.accesskey;"
oncommand="removeDomain();"/>
</box>
</row>
<row>
<box autostretch="never">
<text class="label" id="domainText" value="&domain.label;" accesskey="&domain.accesskey;" for="addDomain"/>
<textfield id="addDomain" flex="1" onkeyup="doButtonEnabling();"/>
</box>
<button disabled="true" class="dialog" id="addDomainButton" value="&addDomain.label;" accesskey="&addDomain.accesskey;"
oncommand="addDomain();"/>
</row>
</rows>
</grid>
<data id="browserRelatedDisabledForDomains" pref="true" preftype="string"
prefstring="browser.related.disabledForDomains" prefattribute="value" wsm_attributes="value"/>
</titledbox>
<titledbox orient="vertical">
<title><text value="&internetKeywordsHeader.label;"/></title>
<html>&internetKeywordsDescription.label;</html>
<box autostretch="never">
<checkbox id="browserGoBrowsingEnabled" value="&keywordsEnabled.label;" accesskey="&keywordsEnabled.accesskey;"
pref="true" preftype="bool" prefstring="keyword.enabled"
prefattribute="checked"/>
<spring flex="1"/>
<button class="dialog" value="&moreInformation.label;" accesskey="&moreInformation.accesskey;"/>
</box>
</titledbox>
</window>

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

@ -7,24 +7,27 @@
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
class="color-dialog"
align="vertical"
title="&title.label;"
onload="if( parent.handle ) parent.handle.onpageload( 'pref-smartupdate' ); else parent.queuedTag = 'pref-smartupdate';">
<box type="smallheader" title="&lHeader;" description="&rHeader;"/>
onload="parent.initPanel('chrome://communicator/content/pref/pref-smartupdate.xul');">
<script language="JavaScript">
<![CDATA[
_elementIDs = ["XPInstallEnabled", "XPInstallNotificationsEnabled"];
]]>
</script>
<box class="box-smallheader" title="&lHeader;" description="&rHeader;"/>
<titledbox orient="vertical">
<html:div class="vertical-gap">
<html:input type="checkbox" id="XPInstallEnabled"
pref="true" preftype="bool" prefstring="xpinstall.enabled" />
<html:label for="XPInstallEnabled">&enableSU.label;</html:label>
</html:div>
<html:div>
<html:input type="checkbox" id="XPInstallNotificationsEnabled"
pref="true" preftype="bool" prefstring="xpinstall.notifications.enabled"/>
<html:label for="XPInstallNotificationsEnabled">&enableNotification.label;</html:label>
</html:div>
<checkbox id="XPInstallEnabled" value="&enableSU.label;" accesskey="&enableSU.accesskey;"
pref="true" preftype="bool" prefstring="xpinstall.enabled"
prefattribute="checked"/>
<checkbox id="XPInstallNotificationsEnabled" value="&enableNotification.label;" accesskey="&enableNotification.accesskey;"
pref="true" preftype="bool" prefstring="xpinstall.notifications.enabled"
prefattribute="checked"/>
</titledbox>
<!--
@ -43,7 +46,7 @@
</tree>
<spring flex="5%"/>
<box align="vertical">
<titledbutton class="dialog push" id="pref:0:bool:smartupdate" value="&uninstallButton.label;"/>
<titledbutton class="dialog push" id="pref:0:bool:smartupdate" value="&uninstallButton.label;" accesskey="&uninstallButton.accesskey;"/>
<spring flex="100%"/>
</box>
</box>

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

@ -19,28 +19,38 @@
Contributor(s):
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/pref/pref.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-wallet.dtd" >
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
%brandDTD;
<!ENTITY % prefWalletDTD SYSTEM "chrome://communicator/locale/pref/pref-wallet.dtd" >
%prefWalletDTD;
]>
<window debug="false" xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
align="vertical" title="&window.title;"
onload="if( parent.handle ) parent.handle.onpageload( 'pref-wallet' ); else parent.queuedTag = 'pref-wallet';">
class="color-dialog"
orient="vertical" title="&window.title;"
onload="parent.initPanel('chrome://communicator/content/pref/pref-wallet.xul');">
<html:script language="JavaScript">
<script language="JavaScript">
<![CDATA[
_elementIDs = ["walletServer", "walletCaptureForms", "signonRememberSignons"];
]]>
</script>
<script language="JavaScript">
<![CDATA[
function viewSignons()
{
window.openDialog("chrome://communicator/content/wallet/SignonViewer.xul","","modal=yes,chrome,resizable=no");
window.openDialog("chrome://wallet/content/SignonViewer.xul","","modal=yes,chrome,resizable=no");
}
function viewWallet()
{
window.openDialog("chrome://communicator/content/wallet/WalletEditor.xul","","modal=yes,chrome,resizable=no");
window.openDialog("chrome://wallet/content/WalletEditor.xul","","modal=yes,chrome,resizable=no");
}
function changePasswords()
@ -50,61 +60,52 @@
wallet = wallet.QueryInterface(Components.interfaces.nsIWalletService);
wallet.WALLET_ChangePassword();
}
</html:script>
]]>
</script>
<box type="smallheader" title="&lHeader;" description="&rHeader;"/>
<box class="box-smallheader" title="&lHeader;" description="&rHeader;"/>
<!--should use titledbox instead of fieldset, but that was causing an assertion
when pref.js was setting it to display:none-->
<titledbox orient="vertical" id="walletAreax">
<title><text value="&walletHeader;"/></title>
<html:div>&walletDetails;</html:div>
<spring class="vgap"/>
<box align="horizontal" vertical-align="baseline" >
<spring flex="1"/>
<html:div>
<html:label for="walletServer" accesskey="c" tabindex="0">
&server.label;
</html:label>
</html:div>
<html:input name="Wallet Server:" type="text" id="walletServer"
pref="true" preftype="string" prefstring="wallet.Server" flex="1"/>
<titledbox orient="vertical">
<title><text value="&walletHeader.label;"/></title>
<html>&walletDescription.label;</html>
<box autostretch="never">
<text class="label" for="walletServer" value="&walletServer.label;" accesskey="&walletServer.accesskey;"/>
<textfield id="walletServer" flex="1"
pref="true" preftype="string" prefstring="wallet.Server"
prefattribute="value"/>
</box>
<box align="horizontal">
<html:input type="checkbox" id="walletCaptureForms" prefdefval="true"
pref="true" preftype="bool" prefstring="wallet.captureForms" />
<html:label for="walletCaptureForms" accesskey="&walletEnabledCheck.accesskey;"
tabindex="0">
&walletEnabledCheck.label;
</html:label>
<spring flex="1"/>
<titledbutton value="&viewWallet.label;" class="dialog push" onclick="viewWallet();"/>
<checkbox id="walletCaptureForms" value="&walletEnabled.label;" accesskey="&walletEnabled.accesskey;"
pref="true" preftype="bool" prefstring="wallet.captureForms"
prefattribute="checked"/>
<separator/>
<box autostretch="never" halign="right">
<button class="dialog" value="&viewWallet.label;" accesskey="&viewWallet.accesskey;"
oncommand="viewWallet();"/>
</box>
</titledbox>
<titledbox orient="vertical" id="signonArea">
<title><text value="&signonHeader;"/></title>
<html:div>&signonDetails;</html:div>
<spring class="vgap"/>
<box align="horizontal" vertical-align="baseline" >
<html:input type="checkbox" id="signonRememberSignons" prefdefval="true"
pref="true" preftype="bool" prefstring="signon.rememberSignons" />
<html:label for="signonEnabledCheck" accesskey="&signonEnabledCheck.accesskey;"
tabindex="0">
&signonEnabledCheck.label;
</html:label>
<spring flex="1"/>
<titledbutton value="&viewSignons.label;" class="dialog push" onclick="viewSignons();"/>
<titledbox orient="vertical">
<title><text value="&signonHeader.label;"/></title>
<html flex="1">&signonDescription.label;</html>
<checkbox id="signonRememberSignons" value="&signonEnabled.label;" accesskey="&signonEnabled.accesskey;"
pref="true" preftype="bool" prefstring="signon.rememberSignons"
prefattribute="checked"/>
<separator/>
<box autostretch="never" halign="right">
<button class="dialog" value="&viewSignons.label;" accesskey="&viewSignons.accesskey;"
oncommand="viewSignons();"/>
</box>
<spring class="vgap"/>
</titledbox>
<spring class="vgap"/>
<box align="horizontal">
<spring flex="50%"/>
<titledbutton value="&changePasswords.label;" class="dialog push"
onclick="changePasswords();"/>
<spring flex="50%"/>
<separator/>
<box autostretch="never" halign="right">
<button class="dialog" value="&changePasswords.label;" accesskey="&changePasswords.accesskey;"
oncommand="changePasswords();"/>
</box>
</window>

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

@ -1,66 +1,45 @@
<?xml version="1.0"?>
<!-- -*- Mode: HTML -*- -->
<!-- The contents of this file are subject to the Netscape 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/NPL/
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 Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s): ______________________________________. -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/pref/pref.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/pref/preftree.xul"?>
<?xul-overlay href="chrome://global/content/platformDialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref.dtd" >
<window id="prefWindow"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&prefWindow.title;"
align="vertical"
class="dialog"
onload="window.handle = new PrefWindow( 'panelFrame' );"
persist="screenX screenY width height"
screenX="24" screenY="24"
width="620" height="550">
<script language="javascript" src="chrome://global/content/strres.js" />
<script language="javascript" src="chrome://global/content/dialogOverlay.js" />
<script language="javascript" src="chrome://global/content/widgetStateManager.js" />
<script language="javascript" src="chrome://communicator/content/pref/pref.js" />
<window id="prefWindow"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="Foopy"
orient="vertical"
class="dialog"
persist="screenX screenY width height"
screenX="24" screenY="24"
onload="hPrefWindow = new nsPrefWindow('panelFrame');"
width="620" height="470">
<script language="javascript" src="chrome://global/content/nsWidgetStateManager.js"></script>
<script language="javascript" src="chrome://communicator/content/pref/nsPrefWindow.js"></script>
<keyset id="keyset"/>
<box flex="1">
<!-- tree sidebar -->
<tree id="prefsTree" class="inset"/>
<tree class="inset" id="prefsTree"/>
<!-- content frame -->
<html:iframe id="panelFrame" name="panelFrame" style="width:0px" flex="6"/>
<script language="javascript">
<html:iframe id="panelFrame" name="panelFrame" style="width:0px" flex="1"/>
<script language="JavaScript">
<![CDATA[
if( window.arguments && window.arguments[0] ) {
dump("*** panel to load is = " + window.arguments[0] + "\n");
document.getElementById("panelFrame").setAttribute("src", window.arguments[0] );
document.getElementById("panelFrame").setAttribute("tag", window.arguments[0] );
}
else {
dump("*** window.arguments not found, defaulting to navigator panel \n");
document.getElementById("panelFrame").setAttribute("src", "chrome://communicator/content/pref/pref-navigator.xul" );
document.getElementById("panelFrame").setAttribute("tag", "chrome://communicator/content/pref/pref-navigator.xul" );
}
]]>
</script>
@ -68,10 +47,6 @@ Contributor(s): ______________________________________. -->
<separator class="groove"/>
<box id="okCancelButtons" />
<keyset>
<key id="fooKey" key="p" xulkey="true" shift="true" onkeydown="foo()"/>
</keyset>
<box id="okCancelButtonsRight" />
</window>

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

@ -24,193 +24,186 @@
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/preftree.dtd" >
<overlay id="prefTreeOverlay"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<tree id="prefsTree"
onselect="window.handle.SwitchPage( event.target )">
<treehead name="tree">
<treerow>
<treecell url="__header" value="&categoryHeader;"/>
</treerow>
</treehead>
<tree id="prefsTree"
onselect="if( hPrefWindow ) hPrefWindow.switchPage();">
<treehead name="tree">
<treerow>
<treecell url="__header" value="&categoryHeader;"/>
</treerow>
</treehead>
<treechildren id="panelChildren">
<treeitem open="true" container="true">
<treeitem container="true" open="true" id="appearance">
<treerow>
<treecell indent="true" url="chrome://communicator/content/pref/pref-appearance.xul" value="&appear.label;"/>
</treerow>
<treechildren>
<treeitem open="true">
<treeitem>
<treerow>
<treecell indent="true" url="chrome://communicator/content/pref/pref-fonts.xul" value="&fonts.label;"/>
</treerow>
</treeitem>
<!-- commmenting out for beta
<treeitem open="true">
<treeitem>
<treerow>
<treecell indent="true" url="chrome://communicator/content/pref/pref-colors.xul" value="&colors.label;"/>
</treerow>
</treeitem>
-->
<!--
<treeitem open="true">
<!--
<treeitem>
<treerow>
<treecell indent="true" url="chrome://communicator/content/pref/pref-themes.xul" value="&themes.label;"/>
</treerow>
</treeitem>
-->
-->
</treechildren>
</treeitem>
<treeitem container="true" open="true">
<!-- XXX remove this when overlays.rdf works for navigator -->
<treeitem container="true" open="true" id="navigator">
<treerow>
<treecell indent="true" url="chrome://communicator/content/pref/pref-navigator.xul" value="&navigator.label;"/>
</treerow>
<treechildren>
<!-- <treeitem open="true">
<treeitem>
<treerow>
<treecell indent="true" url="chrome://communicator/content/pref/pref-languages.xul" value="&languages.label;"/>
</treerow>
</treeitem> -->
<!-- <treeitem open="true">
</treeitem>
<treeitem>
<treerow>
<treecell indent="true" url="chrome://communicator/content/pref/pref-applications.xul" value="&applications.label;"/>
</treerow>
</treeitem> -->
<treeitem open="true">
</treeitem>
<treeitem>
<treerow>
<treecell indent="true" url="chrome://communicator/content/pref/pref-smart_browsing.xul" value="&smartBrowse.label;"/>
</treerow>
</treeitem>
<treeitem open="true">
<treeitem>
<treerow>
<treecell indent="true" url="chrome://communicator/content/pref/pref-search.xul" value="&search.label;"/>
</treerow>
</treeitem>
<treeitem>
<treerow>
<treecell indent="true" url="chrome://communicator/content/pref/pref-policies.xul" value="&policies.label;"/>
</treerow>
</treeitem>
</treechildren>
</treeitem>
<treeitem container="true" open="true">
<!-- XXX -->
<!-- XXX remove once mailnews overlays.rdf works properly -->
<treeitem container="true" open="true" id="mailnews">
<treerow>
<treecell indent="true" url="chrome://messenger/content/pref-mailnews.xul" value="&mail.label;"/>
</treerow>
<treechildren id="mailnewsprefchildren">
<treeitem open="true">
<treechildren id="messengerChildren">
<treeitem>
<treerow>
<treecell indent="true" url="chrome://messenger/content/addressbook/pref-addressing.xul" value="&address.label;"/>
<treecell indent="true" url="chrome://messenger/content/pref-viewing_messages.xul" value="&viewingMessages.label;"/>
</treerow>
</treeitem>
<treeitem open="true">
<treeitem>
<treerow>
<treecell indent="true" url="chrome://messenger/content/messengercompose/pref-messages.xul" value="&mess.label;"/>
<treecell indent="true" url="chrome://messenger/content/messengercompose/pref-composing_messages.xul" value="&composingMessages.label;"/>
</treerow>
</treeitem>
<treeitem open="true">
<treerow>
<treecell indent="true" url="chrome://messenger/content/pref-winsetting.xul" value="&windowSet.label;"/>
</treerow>
</treeitem>
<treeitem open="true">
<treeitem>
<treerow>
<treecell indent="true" url="chrome://messenger/content/messengercompose/pref-formatting.xul" value="&format.label;"/>
</treerow>
</treeitem>
<treeitem open="true">
<treeitem>
<treerow>
<treecell indent="true" url="chrome://messenger/content/addressbook/pref-addressing.xul" value="&address.label;"/>
</treerow>
</treeitem>
<treeitem>
<treerow>
<treecell indent="true" url="chrome://messenger/content/pref-receipts.xul" value="&return.label;"/>
</treerow>
</treeitem>
<treeitem open="true">
<treeitem>
<treerow>
<treecell indent="true" url="chrome://messenger/content/pref-diskspace.xul" value="&disk.label;"/>
</treerow>
</treeitem>
</treechildren>
</treeitem>
<treeitem container="true" open="true">
<!-- XXX -->
<!-- XXX remove once overlays.rdf works properly for editor -->
<treeitem container="true" open="true" id="editor">
<treerow>
<treecell indent="true" url="chrome://communicator/content/pref/pref-composer.xul" value="&compose.label;"/>
</treerow>
<treechildren>
<treeitem open="true">
<treeitem>
<treerow>
<treecell indent="true" url="chrome://communicator/content/pref/pref-editing.xul" value="&editing.label;"/>
</treerow>
</treeitem>
<!-- <treeitem open="true">
<treerow>
<!--
<treeitem>
<treerow>
<treecell indent="true" url="chrome://communicator/content/pref/pref-publish.xul" value="&publish.label;"/>
</treerow>
</treeitem> -->
</treerow>
</treeitem>
-->
</treechildren>
</treeitem>
<!-- XXX -->
<treeitem open="true">
<treeitem open="true" id="smartupdate">
<treerow>
<treecell indent="true" url="chrome://communicator/content/pref/pref-smartupdate.xul" value="&smart.label;"/>
</treerow>
</treeitem>
<!-- <treeitem container="true" open="true">
<!--
<treeitem open="true" id="offline">
<treerow>
<treecell indent="true" url="chrome://communicator/content/pref/pref-offline.xul" value="&offline.label;"/>
</treerow>
<treechildren>
<treeitem open="true">
<treeitem>
<treerow>
<treecell indent="true" url="chrome://communicator/content/pref/pref-download.xul" value="&down.label;"/>
</treerow>
</treeitem>
</treechildren>
</treeitem> -->
</treeitem>
-->
<treeitem container="true" open="true" id="advancedItem">
<treerow>
<treecell indent="true" url="chrome://communicator/content/pref/pref-advanced.xul" value="&advance.label;"/>
</treerow>
<treechildren>
<treeitem open="true">
<treerow>
<treecell indent="true" url="chrome://communicator/content/pref/pref-cookies.xul" value="&cookies.label;" valueWithImages="&cookies.labelWithImages;" id="cookiesCell"/>
</treerow>
</treeitem>
<treeitem open="true">
<treeitem>
<treerow>
<treecell indent="true" url="chrome://communicator/content/pref/pref-wallet.xul" value="&wallet.label;"/>
</treerow>
</treeitem>
<treeitem open="true">
<treeitem>
<treerow>
<treecell indent="true" url="chrome://communicator/content/pref/pref-cache.xul" value="&cache.label;"/>
</treerow>
</treeitem>
<treeitem open="true">
<treeitem>
<treerow>
<treecell indent="true" url="chrome://communicator/content/pref/pref-proxies.xul" value="&proxies.label;"/>
</treerow>
</treeitem>
<treeitem>
<treerow>
<treecell indent="true" url="chrome://communicator/content/pref/pref-mousewheel.xul" value="&mousewheel.label;"/>
@ -218,6 +211,7 @@
</treeitem>
</treechildren>
</treeitem>
<treeitem open="true">
<treerow>
<treecell indent="true" url="chrome://communicator/content/pref/pref-debug.xul" value="&debug.label;"/>

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

@ -21,7 +21,6 @@
* Alec Flett <alecf@netscape.com>
*/
var bundle = srGetStrBundle("chrome://communicator/locale/pref/prefutilities.properties");
const nsIFilePicker = Components.interfaces.nsIFilePicker;
function getFileOrFolderSpec( aTitle, aFolder )
@ -56,7 +55,8 @@ function getFileOrFolderSpec( aTitle, aFolder )
function prefNavSelectFile(folderFieldId, stringId, useNative)
{
var folderField = document.getElementById(folderFieldId);
var file = getFileOrFolderSpec( bundle.GetStringFromName(stringId), false );
var dlgString = stringId ? bundle.GetStringFromName(stringId) : '';
var file = getFileOrFolderSpec( dlgString, false );
if( file != -1 )
{
/* XXX nsILocalFile doesn't have a URL string */
@ -70,7 +70,13 @@ function prefNavSelectFile(folderFieldId, stringId, useNative)
var tempFileSpec = Components.classes["component://netscape/filespec"].createInstance(Components.interfaces.nsIFileSpec);
tempFileSpec.nativePath = file.path;
folderField.value = tempFileSpec.URLString;
try {
var url = tempFileSpec.URLString;
if( url )
folderField.value = url;
}
catch(e) {
}
}
}
}
@ -84,3 +90,5 @@ function setHomePageToCurrentPage(folderFieldId)
if( url )
homePageField.value = url;
}
var bundle = srGetStrBundle("chrome://communicator/locale/pref/prefutilities.properties");

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

@ -1,6 +1,6 @@
tasksOverlay.css
global.css
colors.css
formatting.css
textfield.css
button.css
checkbox.css

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

@ -31,7 +31,7 @@ DIRS = unix
EXPORT_RESOURCE_CONTENT = \
$(srcdir)/tasksOverlay.css \
$(srcdir)/global.css \
$(srcdir)/colors.css \
$(srcdir)/formatting.css \
$(srcdir)/textfield.css \
$(srcdir)/button.css \
$(srcdir)/checkbox.css \

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

@ -1,33 +1,38 @@
/**
* Small Dialog Header (without icon)
**/
box[type="smallheader"] {
behavior: url(chrome://global/content/dialogBindings.xml#smallheader);
border: 1px inset #CCCCCC;
margin-bottom: 5px;
}
.box-smallheader
{
behavior : url(chrome://global/content/dialogBindings.xml#smallheader);
border : 1px inset #CCCCCC;
margin : 0px 5px 6px 5px;
}
box[type="smallheader"] > toolbar.decorated > .left {
font-size: larger;
font-weight: bold;
color: #FFFFFF;
padding-left: 6px;
}
.box-smallheader > .decorated
{
padding : 0px 0px 3px 0px;
}
box[type="smallheader"] > toolbar.decorated > .right {
color: #FFFFFF;
padding-right: 6px;
}
.box-smallheader > .decorated > .box-smallheader-left
{
font-size : larger;
font-weight : bold;
color : #FFFFFF;
padding-left : 6px;
}
box[type="smallheader"] {
.box-smallheader > .decorated > .box-smallheader-right
{
color : #FFFFFF;
padding-right : 6px;
}
}
box[type="smallheader"] > toolbar.decorated {
border: 1px solid #000000;
vertical-align: middle;
padding-top: 3px;
}
.box-smallheader > .decorated
{
border : 1px solid #000000;
vertical-align : middle;
padding-top : 3px;
}
/**
* Large Dialog Header (with icon)

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

@ -0,0 +1,41 @@
/* colors */
.color-dialog
{
background-color : #CCCCCC;
color : #000000;
}
.color-window
{
background-color : #FFFFFF;
color : #000000;
}
/* inset areas */
.inset
{
border : 1px inset #CCCCCC;
margin : 0px 5px 5px 5px;
}
/* formatting */
.groove-top
{
border-top : 2px groove #CCCCCC;
}
.groove-right
{
border-right : 2px groove #CCCCCC;
}
.groove-left
{
border-left : 2px groove #CCCCCC;
}
.groove-bottom
{
border-bottom : 2px groove #CCCCCC;
}

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

@ -14,11 +14,11 @@
@import url(chrome://global/skin/tree.css);
@import url(chrome://global/skin/menubutton.css);
@import url(chrome://global/skin/menulist.css);
@import url(chrome://global/skin/colors.css);
@import url(chrome://global/skin/formatting.css);
@import url(chrome://global/skin/textfield.css);
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */
@namespace html url("http://www.w3.org/TR/REC-html40"); /* namespace for HTML elements */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/TR/REC-html40");
/**********************************
* Window
@ -101,7 +101,7 @@ toolbargrippy:hover {
background-image: url("chrome://global/skin/taskbar-tab-hover.gif");
}
toolbar.standard {
.standard {
color: white;
background-color: #003366;
padding: 0px;
@ -113,15 +113,13 @@ toolbar.standard {
/**
* Navigation Toolbar
*/
toolbar.decorated {
.decorated {
background-image: url("chrome://global/skin/navbar-bg.gif");
background-repeat: repeat-x;
background-position: 0% 0%;
background-color: #CCCCCC;
padding: 0px;
}
toolbar.decorated > #toolbar_throbber_box {
.decorated > #toolbar_throbber_box {
background-color: #CCCCCC;
min-width: 68px;
max-width: 68px;
@ -130,13 +128,13 @@ toolbar.decorated > #toolbar_throbber_box {
background-position: 100% 0%;
}
toolbar.decorated > #toolbar_throbber_box > titledbutton#Throbber
.decorated > #toolbar_throbber_box > titledbutton#Throbber
{
margin-top: 0px;
margin-left: 9px;
}
toolbar.decorated > #toolbar_throbber_box > titledbutton#Throbber:hover:active {
.decorated > #toolbar_throbber_box > titledbutton#Throbber:hover:active {
margin-top: 1px;
margin-left: 10px;
}
@ -574,6 +572,7 @@ window[orient="vertical"]>splitter {
cursor: n-resize;
}
rows>splitter {
/* a vertical splitter */
cursor: n-resize;
@ -677,28 +676,22 @@ box
titledbox
{
display: block;
border: 2px groove white;
padding: 5px;
padding-bottom: 2px;
border: 2px groove #CCCCCC;
padding: 7px;
margin: 5px;
}
title
{
display: block;
font-weight: bold;
margin-left: 6px;
padding-right: 40px;
}
title > *
{
margin-left: 5px;
margin-right: 5px;
}
title > html|*
{
margin-left: 5px;
margin-right: 5px;
margin-left: 3px;
margin-right: 3px;
}
:titledbox-content {
@ -1914,11 +1907,11 @@ html|select[size="1"]:-moz-display-comboboxcontrol-frame:focus {
html
{
margin : 5px;
margin : 1px 5px 4px 5px;
cursor : default;
}
html.header
.header
{
font-weight : bold;
}
@ -1964,16 +1957,36 @@ html|select[size="1"]:-moz-display-comboboxcontrol-frame:focus {
/** box formatting **/
box[autostretch="never"][valign="center"]
box[autostretch="never"]
{
vertical-align : middle;
}
box[autostretch="never"][orient="vertical"][halign="center"]
box[autostretch="never"][valign="top"]
{
vertical-align : top;
}
box[autostretch="never"][valign="bottom"]
{
vertical-align : bottom;
}
box[autostretch="never"][halign="center"]
{
text-align : center;
}
box[autostretch="never"][halign="right"]
{
text-align : right;
}
row
{
vertical-align : middle;
}
/** XUL <scrollbar> element **/
scrollbar
{

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

@ -33,7 +33,7 @@ install::
$(MAKE_INSTALL) global.css $(DISTBROWSER)
$(MAKE_INSTALL) button.css $(DISTBROWSER)
$(MAKE_INSTALL) textfield.css $(DISTBROWSER)
$(MAKE_INSTALL) colors.css $(DISTBROWSER)
$(MAKE_INSTALL) formatting.css $(DISTBROWSER)
$(MAKE_INSTALL) checkbox.css $(DISTBROWSER)
$(MAKE_INSTALL) menubutton.css $(DISTBROWSER)
$(MAKE_INSTALL) menulist.css $(DISTBROWSER)

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

@ -23,11 +23,11 @@
display: none;
}
/* Focus rules for XUL widgets */
checkbox,radio,tree,menulist {
user-focus: normal;
}
menupopup, splitter {
user-focus: ignore;
}
@ -105,8 +105,6 @@ box.toolbar-holder[collapsed="true"] {
/****** Progress Meter ********/
/****** TitledBox ******/
/********* XP Menus ***********/
@ -197,13 +195,13 @@ treecell {
}
.treecell-indent {
behavior: url("resource:/chrome/xulBindings.xml#treecell-indented");
behavior: url("resource:/chrome/xulBindings.xml#treecell-indented");
}
.treecell-iconic {
behavior: url("resource:/chrome/xulBindings.xml#treecell-iconic");
}
.treecell-image {
behavior: url("resource:/chrome/xulBindings.xml#treecell-image");
}
@ -304,3 +302,9 @@ textfield[autocomplete="true"] {
colorpicker {
behavior: url(resource:/chrome/xulBindings.xml#colorpicker);
}
data {
display: none;
behaviour: url(resource:/chrome/xulBindings.xml#data);
}

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

@ -58,6 +58,10 @@
<xul:image/>
</xul:box>
</content>
<interface>
<property name="data" onset="this.setAttribute('data',val); return val;"
onget="return this.getAttribute('data');"/>
</interface>
</binding>
<binding id="menulist">
@ -67,8 +71,12 @@
<xul:image class="menu-dropmarker"/>
</content>
<handlers>
<handler type="command" capturer="true" value="this.selectedItem = event.target"/>
<handler type="command" capturer="true" value="this.selectedItem = event.target; this.data = this.selectedItem.data;"/>
</handlers>
<interface>
<property name="data" onset="this.setAttribute('data',val); return val;"
onget="return this.getAttribute('data');"/>
</interface>
</binding>
<binding id="menubutton">
@ -97,7 +105,7 @@
<xul:text class="tree-cell-text" inherits="crop,value,align" flex="1" crop="right"/>
</content>
</binding>
<binding id="treecell-iconic">
<content autostretch="never">
<xul:image class="tree-cell-icon" inherits="src"/>
@ -110,13 +118,13 @@
<xul:image class="tree-cell-image" inherits="src"/>
</content>
</binding>
<binding id="treecell">
<content autostretch="never">
<xul:text class="tree-cell-text" inherits="crop,value,align" flex="1" crop="right"/>
</content>
</binding>
<binding id="treecell-header">
<content autostretch="never">
<xul:image class="tree-header-image" inherits="src"/>
@ -178,15 +186,64 @@
</content>
</binding>
<!-- radio/radiogroup code -->
<xul:script language="javascript">
<![CDATA[
var XULRadioGroup =
{
setSelectedItem:
function ( aDOMElement )
{
dump("*** setting the selected item\n");
// set information on the group node
dump("*** current group is: " + aDOMElement.group + "\n");
var currentGroup = document.getElementById( aDOMElement.group );
currentGroup.selectedItem = aDOMElement;
currentGroup.data = aDOMElement.data;
dump("*** setting data: " + aDOMElement.data + "\n");
// uncheck all other group nodes
var groupElements = currentGroup.getElementsByAttribute( "group", aDOMElement.group );
for( var i = 0; i < groupElements.length; i++ )
{
dump("*** unchecking element " + i + "\n");
if( groupElements[i] != this && groupElements[i].checked )
{
groupElements[i].checked = false;
groupElements[i].removeAttribute( "checked" );
}
}
},
getSelectedItem:
function ( aRadioGroupElement )
{
var groupElements = aRadioGroupElement.getElementsByAttribute( "group", aRadioGroupElement.id );
for( var i = 0; i < groupElements.length; i++ )
{
if( groupElements[i].checked ||
groupElements[i].getAttribute( "checked" ) == "true" )
return groupElements[i];
}
}
};
]]>
</xul:script>
<binding id="radio" extends="resource:/chrome/xulBindings.xml#checkbox">
<content>
<xul:box flex="1" class="internal-box" autostretch="never">
<xul:box class="checkmark-box" autostretch="never">
<xul:image inherits="src"/>
</xul:box>
<xul:html inherits="value" flex="1"/>
</xul:box>
</content>
<interface>
<property name="data" onset="this.setAttribute('data',val); return val;"
onget="return this.getAttribute('data');"/>
<property name="group" onset="this.setAttribute('group',val); return val;"
onget="return this.getAttribute('group');"/>
<property name="checked" onset="this.setAttribute('checked',val); return val;"
onget="return this.getAttribute('checked');"/>
</interface>
<!--
<handlers>
<handler type="command" value="document.getElementById(this.group).selectedItem = this;"/>
</handlers>
-->
</binding>
<binding id="radio-iconic" extends="resource:/chrome/xulBindings.xml#radio">
@ -195,16 +252,24 @@
<xul:box class="checkmark-box" autostretch="never">
<xul:image/>
</xul:box>
<xul:image inherits="src" class="icon"/>
<xul:image inherits="src" class="icon" />
<xul:html inherits="value" flex="1"/>
</xul:box>
</content>
</binding>
</content>
</binding>
<binding id="radiogroup">
<interface>
<property name="data" onset="this.setAttribute('data',val); return val;"
onget="return this.getAttribute('data');"/>
<!--
<property name="selectedItem" onset="XULRadioGroup.setSelectedItem(val); return val;"
onget="return XULRadioGroup.getSelectedItem(this);"/>
-->
</interface>
<handlers>
<handler type="mouseup" value="try { this.selectedItem = event.target; } catch (e) {}"/>
<handler type="keypress" key=" " value="try { this.selectedItem = event.target; } catch (e) {}"/>
<handler type="mouseup" value="try { this.selectedItem = event.target; this.data = event.target.data; } catch (e) {}"/>
<handler type="keypress" key=" " value="try { this.selectedItem = event.target; this.data = event.target.data; } catch (e) {}"/>
</handlers>
</binding>
@ -279,7 +344,10 @@
onget="return this.anonymousContent[0].firstChild.readonly;"/>
</interface>
<handlers>
<handler type="focus" value="this.setAttribute('focused','true'); this.anonymousContent[0].firstChild.focus();"/>
<handler type="focus" value="this.setAttribute('focused','true');
this.anonymousContent[0].firstChild.focus();
if(this.getAttribute('selectall') == 'true')
this.anonymousContent[0].firstChild.setSelectionRange(0,this.value.length);"/>
<handler type="blur" value="this.removeAttribute('focused'); this.anonymousContent[0].firstChild.blur();"/>
</handlers>
</binding>
@ -294,7 +362,13 @@
<binding id="text">
<handlers>
<handler type="click" value="var forElementID = this.getAttribute('for'); if(forElementID) var forElement = document.getElementById(forElementID); if(forElement) forElement.focus();"/>
<handler type="click" value="var forElementID = this.getAttribute('for');
if(forElementID)
var forElement = document.getElementById(forElementID);
if(forElement)
forElement.focus();
if(forElement && forElement.nodeName == "textfield")
forElement.anonymousContent[0].firstChild.setSelectionRange(0,forElement.value.length);"/>
</handlers>
</binding>
@ -478,5 +552,8 @@
</xul:box>
</content>
</binding>
<binding id="data" extends="xul:spring"/>
</bindings>