This commit is contained in:
blakeross%telocity.com 2002-08-05 04:50:42 +00:00
Родитель 4b9ad5b4c6
Коммит d40fecc056
117 изменённых файлов: 9337 добавлений и 1 удалений

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

@ -42,6 +42,6 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = prefwindow search
DIRS = prefwindow
include $(topsrcdir)/config/rules.mk

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

@ -0,0 +1 @@
Makefile

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

@ -0,0 +1,43 @@
pref-advanced.xul
pref-appearance.xul
pref-applications.xul
pref-applications.js
pref-applications-edit.xul
pref-applications-new.xul
pref-applications-new.js
overrideHandler.js
pref-charset.js
pref-charset.xul
pref-cache.js
pref-cache.xul
pref-calibrate-screen.xul
pref-colors.js
pref-colors.xul
pref-themes.xul
pref-themes.js
pref-debug.xul
pref-debug1.xul
pref-debug2.xul
pref-download.xul
pref-fonts.xul
pref-fonts.js
pref-help.js
pref-history.xul
pref-http.xul
pref-http.js
pref-languages.xul
pref-languages-add.xul
pref-languages.js
pref-navigator.js
pref-navigator.xul
pref-offline.xul
pref-policies.xul
pref-proxies.js
pref-proxies.xul
pref-search.js
pref-search.xul
pref-smart_browsing.xul
pref-smartupdate.xul
nsPrefWindow.js
pref.xul
preftree.xul

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

@ -0,0 +1,36 @@
#
# 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.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
ifeq ($(OS_ARCH),WINNT)
DIRS = win
else
DIRS = unix
endif
include $(topsrcdir)/config/rules.mk

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 158 B

Двоичные данные
browser/components/prefwindow/content/autocomplete-autofill-on.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 158 B

Двоичные данные
browser/components/prefwindow/content/autocomplete-showpopup.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 100 B

Двоичные данные
browser/components/prefwindow/content/autocomplete-showsearch.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 158 B

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

@ -0,0 +1,389 @@
/* -*- 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!! <<=
**/
var queuedTag;
function initPanel ( aPrefTag )
{
if( hPrefWindow )
hPrefWindow.onpageload( aPrefTag )
else
queuedTag = aPrefTag;
}
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 = ["preftype", "prefstring", "prefattribute", "disabled"];
this.pref = null;
this.cancelHandlers = [];
this.okHandlers = [];
// set up window
this.onload();
}
nsPrefWindow.prototype =
{
onload:
function ()
{
try
{
this.pref = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPref);
}
catch(e)
{
dump("*** Failed to create prefs object\n");
return;
}
},
init:
function ()
{
if( window.queuedTag )
{
this.onpageload( window.queuedTag );
}
if( window.arguments[1] )
this.openBranch( window.arguments[1], window.arguments[2] );
},
onOK:
function ()
{
var tag = document.getElementById( hPrefWindow.contentFrame ).getAttribute("tag");
if( tag == "" )
{
tag = document.getElementById( hPrefWindow.contentFrame ).getAttribute("src");
}
hPrefWindow.wsm.savePageData( tag );
for( var i = 0; i < hPrefWindow.okHandlers.length; i++ )
{
hPrefWindow.okHandlers[i]();
}
hPrefWindow.savePrefs();
},
onCancel:
function ()
{
for( var i = 0; i < hPrefWindow.cancelHandlers.length; i++ )
{
hPrefWindow.cancelHandlers[i]();
}
},
registerOKCallbackFunc:
function ( aFunctionReference )
{
this.okHandlers[this.okHandlers.length] = aFunctionReference;
},
registerCancelCallbackFunc:
function ( aFunctionReference )
{
this.cancelHandlers[this.cancelHandlers.length] = aFunctionReference;
},
getPrefIsLocked:
function ( aPrefString )
{
return hPrefWindow.pref.PrefIsLocked(aPrefString);
},
getPref:
function ( aPrefType, aPrefString, aDefaultFlag )
{
var pref = hPrefWindow.pref;
try
{
switch ( aPrefType )
{
case "bool":
return !aDefaultFlag ? pref.GetBoolPref( aPrefString ) : pref.GetDefaultBoolPref( aPrefString );
case "int":
return !aDefaultFlag ? pref.GetIntPref( aPrefString ) : pref.GetDefaultIntPref( aPrefString );
case "localizedstring":
return pref.getLocalizedUnicharPref( aPrefString );
case "color":
case "string":
default:
return !aDefaultFlag ? pref.CopyUnicharPref( aPrefString ) : pref.CopyDefaultUnicharPref( aPrefString );
}
}
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":
case "localizedstring":
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 );
if ("initialized" in pageData && pageData.initialized)
{
for( var elementID in pageData )
{
if (elementID == "initialized") continue;
var itemObject = pageData[elementID];
if (typeof(itemObject) != "object") break;
if ( "prefstring" in itemObject && itemObject.prefstring )
{
var elt = itemObject.localname;
var prefattribute = itemObject.prefattribute;
if (!prefattribute) {
if (elt == "radiogroup" || elt == "textbox" || elt == "menulist")
prefattribute = "value";
else if (elt == "checkbox")
prefattribute = "checked";
else if (elt == "button")
prefattribute = "disabled";
}
var value = itemObject[prefattribute];
var preftype = itemObject.preftype;
if (!preftype) {
if (elt == "textbox")
preftype = "string";
else if (elt == "checkbox" || elt == "button")
preftype = "bool";
else if (elt == "radiogroup" || elt == "menulist")
preftype = "int";
}
switch( 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":
case "localizedstring":
default:
if( typeof(value) != "string" )
{
value = toString(value);
}
break;
}
if( value != this.getPref( preftype, itemObject.prefstring ) )
{
this.setPref( preftype, itemObject.prefstring, value );
}
}
}
}
}
try
{
this.pref.savePrefFile(null);
}
catch (e)
{
try
{
var prefUtilBundle = document.getElementById("bundle_prefutilities");
var alertText = prefUtilBundle.getString("prefSaveFailedAlert");
var titleText = prefUtilBundle.getString("prefSaveFailedTitle");
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
.getService(Components.interfaces.nsIPromptService);
promptService.alert(window, titleText, alertText);
}
catch (e)
{
dump(e + "\n");
}
}
},
switchPage:
function ()
{
var prefPanelTree = document.getElementById( "prefsTree" );
var selectedItem = prefPanelTree.contentView.getItemAtIndex(prefPanelTree.currentIndex);
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 ).removeAttribute( "tag" );
else
document.getElementById( this.contentFrame ).setAttribute( "tag", newTag );
}
},
onpageload:
function ( aPageTag )
{
var header = document.getElementById("header");
header.setAttribute("title",
window.frames[this.contentFrame].document.documentElement.getAttribute("headertitle"));
if( !(aPageTag in this.wsm.dataManager.pageData) )
{
var prefElements = window.frames[this.contentFrame].document.getElementsByAttribute( "prefstring", "*" );
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 elt = prefElements[i].localName;
if (!preftype) {
if (elt == "textbox")
preftype = "string";
else if (elt == "checkbox" || elt == "button")
preftype = "bool";
else if (elt == "radiogroup" || elt == "menulist")
preftype = "int";
}
var prefdefval = prefElements[i].getAttribute( "prefdefval" );
var prefattribute = prefElements[i].getAttribute( "prefattribute" );
if (!prefattribute) {
if (elt == "radiogroup" || elt == "textbox" || elt == "menulist")
prefattribute = "value";
else if (elt == "checkbox")
prefattribute = "checked";
else if (elt == "button")
prefattribute = "disabled";
}
var prefvalue;
switch( preftype )
{
case "bool":
prefvalue = this.getPref( preftype, prefstring );
break;
case "int":
prefvalue = this.getPref( preftype, prefstring );
break;
case "string":
case "localizedstring":
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;
var isPrefLocked = this.getPrefIsLocked(prefstring);
if (isPrefLocked)
root.disabled = "true";
root.localname = prefElements[i].localName;
}
}
this.wsm.setPageData( aPageTag ); // do not set extra elements, accept hard coded defaults
if( 'Startup' in window.frames[ this.contentFrame ])
{
window.frames[ this.contentFrame ].Startup();
}
this.wsm.dataManager.pageData[aPageTag].initialized=true;
},
openBranch:
function ( aComponentName, aSelectItem )
{
var panelTree = document.getElementById( "prefsTree" );
var selectItem = document.getElementById( aSelectItem );
var selectItemroot = document.getElementById( aComponentName );
var parentIndex = panelTree.contentView.getIndexOfItem( selectItemroot );
if (parentIndex != -1 && !panelTree.view.isContainerOpen(parentIndex))
panelTree.view.toggleOpenState(parentIndex);
var index = panelTree.view.getIndexOfItem( selectItem );
if (index == -1)
return;
panelTree.treeBoxObject.selection.select( index );
}
};

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

@ -0,0 +1,428 @@
/**
* Datasource initialization
**/
var gRDF = Components.classes["@mozilla.org/rdf/rdf-service;1"]
.getService(Components.interfaces.nsIRDFService);
/**
* Handler Override class
**/
function HandlerOverride(aURI)
{
this.URI = aURI;
this.mUpdateMode = false;
}
HandlerOverride.prototype = {
// general information
get mimeType()
{
return getLiteralForContentType(this.URI, "value");
},
set mimeType(aMIMETypeString)
{
if (!this.mUpdateMode)
assertMIMEStuff(MIME_URI(aMIMETypeString), "value", aMIMETypeString.toLowerCase());
else
changeMIMEStuff(MIME_URI(aMIMETypeString), "value", aMIMETypeString.toLowerCase());
},
get description()
{
return getLiteralForContentType(this.URI, "description");
},
set description(aDescriptionString)
{
if (!this.mUpdateMode)
assertMIMEStuff(MIME_URI(this.mimeType), "description", aDescriptionString);
else
changeMIMEStuff(MIME_URI(this.mimeType), "description", aDescriptionString);
},
get isEditable()
{
return getLiteralForContentType(this.URI, "editable");
},
set isEditable(aIsEditableString)
{
if (!this.mUpdateMode)
assertMIMEStuff(MIME_URI(this.mimeType), "editable", aIsEditableString);
else
changeMIMEStuff(MIME_URI(this.mimeType), "editable", aIsEditableString);
},
get largeIconURL()
{
var url = getLiteralForContentType(this.URI, "largeIcon");
if (!url)
url = "chrome://communicator/skin/content-large.gif";
return url;
},
set largeIconURL(aLargeIconURL)
{
if (!this.mUpdateMode)
assertMIMEStuff(MIME_URI(this.mimeType), "largeIcon", aLargeIconURL);
else
changeMIMEStuff(MIME_URI(this.mimeType), "largeIcon", aLargeIconURL);
},
get smallIconURL()
{
var url = getLiteralForContentType(this.URI, "smallIcon");
if (!url)
url = "chrome://communicator/skin/content-small.gif";
return url;
},
set smallIconURL(aSmallIconURL)
{
if (!this.mUpdateMode)
assertMIMEStuff(MIME_URI(this.mimeType), "smallIcon", aSmallIconURL);
else
changeMIMEStuff(MIME_URI(this.mimeType), "smallIcon", aSmallIconURL);
},
get extensions()
{
var extensionResource = gRDF.GetResource(NC_RDF("fileExtensions"));
var contentTypeResource = gRDF.GetResource(MIME_URI(this.mimeType));
var extensionTargets = gDS.GetTargets(contentTypeResource, extensionResource, true);
var extString = "";
if (extensionTargets) {
extensionTargets = extensionTargets.QueryInterface(Components.interfaces.nsISimpleEnumerator);
while (extensionTargets.hasMoreElements()) {
var currentExtension = extensionTargets.getNext();
if (currentExtension) {
currentExtension = currentExtension.QueryInterface(Components.interfaces.nsIRDFLiteral);
extString += currentExtension.Value.toLowerCase() + " ";
}
}
}
return extString;
},
addExtension: function (aExtensionString)
{
assertMIMEStuff(MIME_URI(this.mimeType), "fileExtensions", aExtensionString.toLowerCase());
},
removeExtension: function (aExtensionString)
{
unassertMIMEStuff(MIME_URI(this.mimeType), "fileExtensions", aExtensionString.toLowerCase());
},
// content handling
get saveToDisk()
{
return getHandlerInfoForType(this.URI, "saveToDisk");
},
set saveToDisk(aSavedToDisk)
{
var handlerSource = gRDF.GetResource(HANDLER_URI(this.mimeType));
var handlerProperty = gRDF.GetResource(NC_RDF("saveToDisk"));
var trueLiteral = gRDF.GetLiteral("true");
var hasSaveToDisk = gDS.HasAssertion(handlerSource, handlerProperty, trueLiteral, true);
if (!hasSaveToDisk) {
var falseLiteral = gRDF.GetLiteral("false");
hasSaveToDisk = gDS.HasAssertion(handlerSource, handlerProperty, falseLiteral, true);
}
if (!this.mUpdateMode || !hasSaveToDisk)
assertMIMEStuff(HANDLER_URI(this.mimeType), "saveToDisk", aSavedToDisk);
else
changeMIMEStuff(HANDLER_URI(this.mimeType), "saveToDisk", aSavedToDisk);
this.setHandlerProcedure("handleInternal", "false");
},
get handleInternal()
{
return getHandlerInfoForType(this.URI, "handleInternal");
},
set handleInternal(aHandledInternally)
{
var handlerSource = gRDF.GetResource(HANDLER_URI(this.mimeType));
var handlerProperty = gRDF.GetResource(NC_RDF("handleInternal"));
var trueLiteral = gRDF.GetLiteral("true");
var hasHandleInternal = gDS.HasAssertion(handlerSource, handlerProperty, trueLiteral, true);
if (!hasHandleInternal) {
var falseLiteral = gRDF.GetLiteral("false");
hasHandleInternal = gDS.HasAssertion(handlerSource, handlerProperty, falseLiteral, true);
}
if (!this.mUpdateMode || !hasHandleInternal)
assertMIMEStuff(HANDLER_URI(this.mimeType), "handleInternal", aHandledInternally);
else
changeMIMEStuff(HANDLER_URI(this.mimeType), "handleInternal", aHandledInternally);
this.setHandlerProcedure("saveToDisk", "false");
},
setHandlerProcedure: function (aHandlerProcedure, aValue)
{
var handlerSource = gRDF.GetResource(HANDLER_URI(this.mimeType));
var handlerProperty = gRDF.GetResource(NC_RDF(aHandlerProcedure));
var oppositeValue = aValue == "false" ? "true" : "false";
var trueLiteral = gRDF.GetLiteral(oppositeValue);
var hasCounterpart = gDS.HasAssertion(handlerSource, handlerProperty, trueLiteral, true);
if (hasCounterpart) {
var falseLiteral = gRDF.GetLiteral(aValue);
gDS.Change(handlerSource, handlerProperty, trueLiteral, falseLiteral);
}
},
get alwaysAsk()
{
return getHandlerInfoForType(this.URI, "alwaysAsk");
},
set alwaysAsk(aAlwaysAsk)
{
if (!this.mUpdateMode)
assertMIMEStuff(HANDLER_URI(this.mimeType), "alwaysAsk", aAlwaysAsk);
else
changeMIMEStuff(HANDLER_URI(this.mimeType), "alwaysAsk", aAlwaysAsk);
},
// helper application
get appDisplayName()
{
return getHelperAppInfoForType(this.URI, "prettyName");
},
set appDisplayName(aDisplayName)
{
if (!this.mUpdateMode)
assertMIMEStuff(APP_URI(this.mimeType), "prettyName", aDisplayName);
else
changeMIMEStuff(APP_URI(this.mimeType), "prettyName", aDisplayName);
},
get appPath()
{
return getHelperAppInfoForType(this.URI, "path");
},
set appPath(aAppPath)
{
if (!this.mUpdateMode)
assertMIMEStuff(APP_URI(this.mimeType), "path", aAppPath);
else
changeMIMEStuff(APP_URI(this.mimeType), "path", aAppPath);
},
/**
* After setting the various properties on this override, we need to
* build the links between the mime type resource, the handler for that
* resource, and the helper app (if any) associated with the resource.
* We also need to add this mime type to the RDF seq (list) of types.
**/
buildLinks: function()
{
// assert the handler resource
var mimeSource = gRDF.GetResource(MIME_URI(this.mimeType));
var handlerProperty = gRDF.GetResource(NC_RDF("handlerProp"));
var handlerResource = gRDF.GetResource(HANDLER_URI(this.mimeType));
gDS.Assert(mimeSource, handlerProperty, handlerResource, true);
// assert the helper app resource
var helperAppProperty = gRDF.GetResource(NC_RDF("externalApplication"));
var helperAppResource = gRDF.GetResource(APP_URI(this.mimeType));
gDS.Assert(handlerResource, helperAppProperty, helperAppResource, true);
// add the mime type to the MIME types seq
var container = Components.classes["@mozilla.org/rdf/container;1"].createInstance();
if (container) {
container = container.QueryInterface(Components.interfaces.nsIRDFContainer);
if (container) {
var containerRes = gRDF.GetResource("urn:mimetypes:root");
container.Init(gDS, containerRes);
var element = gRDF.GetResource(MIME_URI(this.mimeType));
if (container.IndexOf(element) == -1)
container.AppendElement(element);
}
}
}
};
/**
* Utility functions for building URIs easily
**/
function NC_RDF(aProperty)
{
return "http://home.netscape.com/NC-rdf#" + aProperty;
}
function HANDLER_URI(aHandler)
{
return "urn:mimetype:handler:" + aHandler;
}
function APP_URI(aType)
{
return "urn:mimetype:externalApplication:" + aType;
}
function MIME_URI(aType)
{
return "urn:mimetype:" + aType;
}
/**
* Utility functions for reading data from the RDF datasource
**/
function getLiteralForContentType(aURI, aProperty)
{
var contentTypeResource = gRDF.GetResource(aURI);
var propertyResource = gRDF.GetResource(NC_RDF(aProperty));
return getLiteral(contentTypeResource, propertyResource);
}
function getLiteral(aSource, aProperty)
{
var node = gDS.GetTarget(aSource, aProperty, true);
if (node) {
node = node.QueryInterface(Components.interfaces.nsIRDFLiteral);
return node.Value;
}
return "";
}
function getHandlerInfoForType(aURI, aPropertyString)
{
// get current selected type
var handler = HANDLER_URI(getLiteralForContentType(aURI, "value"));
var source = gRDF.GetResource(handler);
var property = gRDF.GetResource(NC_RDF(aPropertyString));
var target = gDS.GetTarget(source, property, true);
if (target) {
target = target.QueryInterface(Components.interfaces.nsIRDFLiteral);
return target.Value;
}
return "";
}
function getHelperAppInfoForType(aURI, aPropertyString)
{
var appURI = APP_URI(getLiteralForContentType(aURI, "value"));
var appRes = gRDF.GetResource(appURI);
var appProperty = gRDF.GetResource(NC_RDF(aPropertyString));
return getLiteral(appRes, appProperty);
}
function mimeHandlerExists(aMIMEType)
{
var valueProperty = gRDF.GetResource(NC_RDF("value"));
var mimeSource = gRDF.GetResource(MIME_URI(aMIMEType));
var mimeLiteral = gRDF.GetLiteral(gMIMEField.value);
return gDS.HasAssertion(mimeSource, valueProperty, mimeLiteral, true);
}
// write to the ds
function assertMIMEStuff(aMIMEString, aPropertyString, aValueString)
{
var mimeSource = gRDF.GetResource(aMIMEString);
var valueProperty = gRDF.GetResource(NC_RDF(aPropertyString));
var mimeLiteral = gRDF.GetLiteral(aValueString);
gDS.Assert(mimeSource, valueProperty, mimeLiteral, true);
}
function changeMIMEStuff(aMIMEString, aPropertyString, aValueString)
{
var mimeSource = gRDF.GetResource(aMIMEString);
var valueProperty = gRDF.GetResource(NC_RDF(aPropertyString));
var mimeLiteral = gRDF.GetLiteral(aValueString);
var currentValue = gDS.GetTarget(mimeSource, valueProperty, true);
gDS.Change(mimeSource, valueProperty, currentValue, mimeLiteral);
}
function unassertMIMEStuff(aMIMEString, aPropertyString, aValueString)
{
var mimeSource = gRDF.GetResource(aMIMEString);
var valueProperty = gRDF.GetResource(NC_RDF(aPropertyString));
var mimeLiteral = gRDF.GetLiteral(aValueString);
gDS.Unassert(mimeSource, valueProperty, mimeLiteral, true);
}
function removeOverride(aMIMEType)
{
dump("*** mimeType = " + aMIMEType + "\n");
// remove entry from seq
var rdfc = Components.classes["@mozilla.org/rdf/container;1"].createInstance();
if (rdfc) {
rdfc = rdfc.QueryInterface(Components.interfaces.nsIRDFContainer);
if (rdfc) {
var containerRes = gRDF.GetResource("urn:mimetypes:root");
rdfc.Init(gDS, containerRes);
var element = gRDF.GetResource(MIME_URI(aMIMEType));
if (rdfc.IndexOf(element) != -1) {
try {
rdfc.RemoveElement(element, true);
}
catch(e) {
// suppress (benign?) errors
}
}
}
}
// remove items from the graph
var urns = [ [MIME_URI, ["description", "editable", "value", "fileExtensions", "smallIcon", "largeIcon"],
[HANDLER_URI, "handlerProp"]],
[HANDLER_URI, ["handleInternal", "saveToDisk", "alwaysAsk"],
[APP_URI, "externalApplication"]],
[APP_URI, ["path", "prettyName"]] ];
for (var i = 0; i < urns.length; i++) {
var mimeRes = gRDF.GetResource(urns[i][0](aMIMEType));
// unassert the toplevel properties
var properties = urns[i][1];
for (var j = 0; j < properties.length; j++) {
var propertyRes = gRDF.GetResource(NC_RDF(properties[j]), true);
if (properties[j] == "fileExtensions") { // hacky. do it better next time.
var mimeValues = gDS.GetTargets(mimeRes, propertyRes, true);
mimeValues = mimeValues.QueryInterface(Components.interfaces.nsISimpleEnumerator);
while (mimeValues.hasMoreElements()) {
var currItem = mimeValues.getNext();
if (mimeRes && propertyRes && currItem)
gDS.Unassert(mimeRes, propertyRes, currItem, true);
}
}
else {
var mimeValue = gDS.GetTarget(mimeRes, propertyRes, true);
if (mimeRes && propertyRes && mimeValue)
gDS.Unassert(mimeRes, propertyRes, mimeValue, true);
}
}
if (urns[i][2]) {
var linkRes = gRDF.GetResource(NC_RDF(urns[i][2][1]), true);
var linkTarget = gRDF.GetResource(urns[i][2][0](aMIMEType), true);
gDS.Unassert(mimeRes, linkRes, linkTarget);
}
}
try {
gDS.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource).Flush();
} catch(e) {
}
}
function checkInput() {
var result = true;
// Check for empty MIME type field.
if ( gMIMEField.value.search(/\S/) == -1 ) {
// Input is not OK.
result = false;
// Focus the mime type field.
gMIMEField.focus();
// Put up alert. Title is same as parent dialog's.
var title = window.document.documentElement.getAttribute( "title" );
var text = gPrefApplicationsBundle.getString("emptyMIMEType");
var prompter = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
prompter.alert(window, title, text);
}
return result;
}

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

@ -0,0 +1,170 @@
<?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):
Mike Kowalski <mikejk@ameritech.net>
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd">
%brandDTD;
<!ENTITY % prefAdvancedDTD SYSTEM "chrome://communicator/locale/pref/pref-advanced.dtd"> %prefAdvancedDTD;
]>
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://communicator/content/pref/pref-advanced.xul');"
headertitle="&lHeader;">
<script type="application/x-javascript">
<![CDATA[
var panel = "chrome://communicator/content/pref/pref-advanced.xul";
var _elementIDs = ["advancedJavaAllow", "advancedMailFTP", "advancedMailFTPAddress"];
function Startup() {
ftpCheck();
turboCheck();
}
function ftpCheck() {
var checked = document.getElementById("advancedMailFTP").checked;
var field = document.getElementById("advancedMailFTPAddress");
field.disabled = !checked;
if (checked)
field.focus();
}
/*
* Name: turboCheck()
*
* Arguments: none
*
* Description: This function is called when the root advanced prefs panel
* is loaded. The turbo mode setting is not exactly a preference -- setting
* the checkbox should (on leaving the prefs with an "Ok") result in a call
* to the backend to do the necessary win32 registry twiddling needed for
* turbo mode to go into effect. Clearing it should undo this work. We need
* to call the backend to determine if turbo mode is enabled (since we are
* required to check for it in a non-trivial way) and then explicitly set the
* checkbox here based on what we find. Finally, we have to hide the checkbox
* (and the group box that frames it) if we are not executing on a Win32
* platform.
*
* Return Value: void
*
* Original Code: syd@netscape.com 6/8/2001
*
*/
function turboCheck()
{
var frame = document.getElementById("perfSettings");
if (navigator.platform != "Win32") {
frame.setAttribute("hidden", "true");
return;
}
if (!("isTurboEnabled" in parent))
parent.isTurboEnabled = -1;
else {
document.getElementById("enableTurbo").checked = parent.isTurboEnabled;
return;
}
var winhooksService = Components.classes["@mozilla.org/winhooks;1"].getService(Components.interfaces.nsIWindowsHooks);
if (winhooksService) {
parent.isTurboEnabled = winhooksService.isOptionEnabled("-turbo");
document.getElementById("enableTurbo").checked = parent.isTurboEnabled;
}
parent.hPrefWindow.registerOKCallbackFunc( saveTurboSetting );
}
/*
* Name: saveTurboSetting()
*
* Arguments: none
*
* Description: This function is called when the user hits the OK button in
* the preferences panel. The function determines what the turbo "preference"
* setting is and performs the appropriate action to enable or disable turbo mode.
*
* Return Value: void
*
* Original Code: syd@netscape.com 6/9/2001
*
*/
function saveTurboSetting() {
if (navigator.platform != "Win32")
return;
var winhooksService = Components.classes["@mozilla.org/winhooks;1"].getService(Components.interfaces.nsIWindowsHooks);
if (winhooksService && parent.isTurboEnabled != -1) {
if (parent.isTurboEnabled)
winhooksService.startupAddOption("-turbo");
else
winhooksService.startupRemoveOption("-turbo");
var appShell = Components.classes['@mozilla.org/appshell/appShellService;1'].getService();
appShell = appShell.QueryInterface( Components.interfaces.nsIAppShellService );
var nativeAppSupport = null;
try {
nativeAppSupport = appShell.nativeAppSupport;
}
catch ( ex ) {
}
if (nativeAppSupport)
nativeAppSupport.isServerMode = parent.isTurboEnabled;
}
}
]]>
</script>
<groupbox id="advancedSettings" align="start">
<caption label="&advancedTitle.label;"/>
<vbox align="start" id="contentEnablingBox">
<checkbox id="advancedJavaAllow" label="&enbJavaCheck.label;" accesskey="&enbJavaCheck.accesskey;"
prefstring="security.enable_java"/>
</vbox>
<vbox>
<vbox align="start">
<checkbox id="advancedMailFTP" label="&sendAddFtpCheck.label;" accesskey="&sendAddFtpCheck.accesskey;"
prefstring="advanced.mailftp"
oncommand="ftpCheck();"/>
</vbox>
<hbox class="indent">
<textbox id="advancedMailFTPAddress"
preftype="string" prefstring="network.ftp.anonymous_password"
flex="2"/>
</hbox>
</vbox>
<separator/>
</groupbox>
<groupbox id="perfSettings">
<caption id="perfLabel" label="&perfTitle.label;"/>
<vbox id="perfBox" align="start">
<checkbox id="enableTurbo" label="&enableTurbo.label;" accesskey="&enableTurboCheck.accesskey;"
oncommand="parent.isTurboEnabled = this.checked;"/>
<vbox class="indent" flex="1">
<description>&perfdescription.label;</description>
</vbox>
</vbox>
</groupbox>
</page>

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

@ -0,0 +1,68 @@
<?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/
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"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
%brandDTD;
<!ENTITY % prefAppearanceDTD SYSTEM "chrome://communicator/locale/pref/pref-appearance.dtd" >
%prefAppearanceDTD;
]>
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel(panel);"
headertitle="&lHeader;">
<script type="application/x-javascript">
<![CDATA[
var panel = "chrome://communicator/content/pref/pref-appearance.xul";
var _elementIDs = ["generalStartupBrowser", "showHideTooltips", "useSiteIcons"];
]]>
</script>
<groupbox id="generalStartupPreferences" align="start">
<caption label="&onStartLegend.label;"/>
<!-- XXX remove when navigator overlays.rdf works -->
<checkbox id="generalStartupBrowser"
label="&navCheck.label;" accesskey="&navCheck.accesskey;"
prefstring="general.startup.browser"/>
<!-- XXX -->
</groupbox>
<vbox class="box-padded" align="start">
<separator class="thin" />
<checkbox id="showHideTooltips" label="&showHideTooltips.label;"
accesskey="&showHideTooltips.accesskey;"
prefstring="browser.chrome.toolbar_tips"/>
<checkbox id="useSiteIcons" label="&useSiteIcons.label;"
accesskey="&useSiteIcons.accesskey;"
prefstring="browser.chrome.site_icons"/>
<separator/>
</vbox>
</page>

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

@ -0,0 +1,349 @@
<?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/
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):
Ben Goodger <ben@netscape.com>, original implementor
-->
<?xml-stylesheet href="chrome://communicator/skin/"?>
<?xml-stylesheet href="chrome://communicator/skin/prefpanels.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-applications-edit.dtd">
<dialog id="pickAppHandler"
style="width: 30em;"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&editType.label;"
onload="Startup();"
ondialogaccept="return onAccept();">
<stringbundle id="bundle_prefApplications"
src="chrome://communicator/locale/pref/pref-applications.properties"/>
<script type="application/x-javascript" src="chrome://global/content/dialogOverlay.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/pref/overrideHandler.js"/>
<script type="application/x-javascript">
<![CDATA[
var gExtensionLabel = null;
var gMIMEField = null;
var gHandlerGroup = null;
var gAppPath = null;
var gAskBeforeOpen = null;
var gContentType = null;
var gPrefApplicationsBundle = null;
var gOldMIME = null;
var gOldDesc = null;
var gOldExtensions = null;
function Startup()
{
gContentType = document.getElementById("contentType");
gExtensionLabel = document.getElementById("extension");
gMIMEField = document.getElementById("mimeType");
gHandlerGroup = document.getElementById("handler");
gAppPath = document.getElementById("appPath");
gAskBeforeOpen = document.getElementById("askBeforeOpen");
gPrefApplicationsBundle = document.getElementById("bundle_prefApplications");
var handlerInfo = window.arguments[0];
// Test to see if this dialog is being called from the helper app dialog.
if ( !( "URI" in handlerInfo ) ) {
// Arg is an nsHelperAppDlg object in this case.
window.gHelperAppDlg = window.arguments[0];
var info = window.arguments[0].mLauncher.MIMEInfo;
// Get mime type from which we can construct a HandlerInfo...
var mimeType = info.MIMEType.toLowerCase();
// Construct what we need from mime type URI.
getDS();
handlerInfo = window.arguments[0] = new HandlerOverride( MIME_URI( mimeType ) );
// Don't let the user change the mime type; we ignore any such changes anyway.
gMIMEField.setAttribute( "readonly", "true" );
}
gExtensionLabel.setAttribute("value", handlerInfo.extensions);
gMIMEField.value = handlerInfo.mimeType;
gOldMIME = handlerInfo.mimeType;
gOldDesc = handlerInfo.description;
gOldExtensions = handlerInfo.extensions;
// figure out how this type is handled
var data = 0;
if (handlerInfo.handleInternal == "true")
data = 0;
else if (handlerInfo.saveToDisk == "true")
data = 1;
else
data = 2;
gHandlerGroup.selectedItem = gHandlerGroup.getElementsByAttribute("value", data)[0];
doEnabling();
var appPath = handlerInfo.appPath;
if (appPath != undefined)
gAppPath.value = appPath;
var prefs = Components.classes["@mozilla.org/preferences;1"].
getService(Components.interfaces.nsIPrefBranch);
var forceAlwaysAsk = prefs.
getBoolPref("browser.helperApps.alwaysAsk.force");
if (forceAlwaysAsk)
{
gAskBeforeOpen.checked = true;
gAskBeforeOpen.disabled = true;
}
else
{
gAskBeforeOpen.checked = handlerInfo.alwaysAsk == "true" ? true : false;
}
gContentType.setAttribute("value", handlerInfo.description);
var ext;
var posOfFirstSpace = handlerInfo.extensions.indexOf(" ");
if (posOfFirstSpace > -1)
ext = handlerInfo.extensions.substr(0, posOfFirstSpace);
else
ext = handlerInfo.extensions;
var imageString = "moz-icon://" + "dummy." + ext.toLowerCase() + "?size=32&contentType=" + handlerInfo.mimeType;
document.getElementById("contentTypeImage").setAttribute("src", imageString);
// If opened from helper app dialog, then focus goes to radio buttons.
if ( "gHelperAppDlg" in window )
gHandlerGroup.focus();
else
gMIMEField.focus();
sizeToContent();
moveToAlertPosition();
}
function doEnabling()
{
}
function chooseApp()
{
var filePicker = Components.classes["@mozilla.org/filepicker;1"].createInstance();
if (filePicker)
filePicker = filePicker.QueryInterface(Components.interfaces.nsIFilePicker);
if (filePicker) {
const FP = Components.interfaces.nsIFilePicker
var windowTitle = gPrefApplicationsBundle.getString("chooseHandler");
var programsFilter = gPrefApplicationsBundle.getString("programsFilter");
filePicker.init(window, windowTitle, FP.modeOpen);
if (navigator.platform == "Win32")
filePicker.appendFilter(programsFilter, "*.exe; *.com");
else
filePicker.appendFilters(FP.filterAll);
if ( filePicker.show() == FP.returnOK ) {
var file = filePicker.file.QueryInterface(Components.interfaces.nsILocalFile);
gAppPath.value = file.path;
gAppPath.select();
selectAppRadio();
}
}
}
function selectAppRadio()
{
if (gHandlerGroup.value != "2")
gHandlerGroup.selectedItem = gHandlerGroup.getElementsByAttribute("value", "2")[0];
doEnabling();
}
var gDS = null;
function getDS()
{
const mimeTypes = "UMimTyp";
var fileLocator = Components.classes["@mozilla.org/file/directory_service;1"].getService();
if (fileLocator)
fileLocator = fileLocator.QueryInterface(Components.interfaces.nsIProperties);
var file = fileLocator.get(mimeTypes, Components.interfaces.nsIFile);
var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
gDS = gRDF.GetDataSource(ioService.getURLSpecFromFile(file));
}
function onAccept()
{
// Validate input.
if ( !checkInput() ) {
return false;
}
getDS();
gMIMEField.value = gMIMEField.value.toLowerCase();
// figure out if this mime type already exists.
if (gMIMEField.value != gOldMIME) {
var exists = mimeHandlerExists(gMIMEField.value);
if (exists) {
var titleMsg = gPrefApplicationsBundle.getString("handlerExistsTitle");
var dialogMsg = gPrefApplicationsBundle.getString("handlerExists");
dialogMsg = dialogMsg.replace(/%mime%/g, gMIMEField.value);
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
var replace = promptService.confirm(window, titleMsg, dialogMsg);
if (!replace)
window.close();
// delete mimetype we're overwriting
if (gMIMEField.value)
removeOverride(gMIMEField.value);
}
}
if (gOldMIME)
removeOverride(gOldMIME); // delete old handler
// now save the information
var handlerInfo = new HandlerOverride(MIME_URI(gMIMEField.value));
handlerInfo.mUpdateMode = mimeHandlerExists(gMIMEField.value);
handlerInfo.mimeType = gMIMEField.value;
// set description, editable, and extensions
handlerInfo.description = gOldDesc
handlerInfo.isEditable = true;
var extensions = gOldExtensions.toLowerCase().split(" ");
for (var i = 0; i < extensions.length; i++) {
var currExtension = extensions[i];
handlerInfo.addExtension(currExtension);
}
// other info we need to set (not reflected in UI)
if (gHandlerGroup.value == "2") {
handlerInfo.appPath = gAppPath.value;
handlerInfo.setHandlerProcedure("saveToDisk", "false");
handlerInfo.setHandlerProcedure("handleInternal", "false");
}
else if (gHandlerGroup.value == "1")
handlerInfo.saveToDisk = true;
else
handlerInfo.handleInternal = true;
handlerInfo.alwaysAsk = gAskBeforeOpen.checked;
// need to make the following dynamic to track changes. otherwise the
// app pretty name remains the same.
// better still, find a way to XP dynamically discover the pretty name of the app
// from the OS.
var file = Components.classes["@mozilla.org/file/local;1"].createInstance();
if (file)
file = file.QueryInterface(Components.interfaces.nsILocalFile);
if (file) {
try {
file.initWithPath(gAppPath.value);
handlerInfo.appDisplayName = file.unicodeLeafName;
}
catch(e) {
handlerInfo.appDisplayName = gAppPath.value;
}
}
// do the rest of the work (ugly yes, but it works)
handlerInfo.buildLinks();
// flush the ds to disk.
var remoteDS = gDS.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
if (remoteDS)
remoteDS.Flush();
// See if invoked on behalf of helper app dialog...
if ( "gHelperAppDlg" in window ) {
// Get mime info.
var info = gHelperAppDlg.mLauncher.MIMEInfo;
// Update fields that might have changed.
if ( gHandlerGroup.value == "1" ) {
info.preferredAction = Components.interfaces.nsIMIMEInfo.saveToDisk;
} else if ( gHandlerGroup.value == "2" ) {
info.preferredAction = Components.interfaces.nsIMIMEInfo.useHelperApp;
info.preferredApplicationHandler = file;
info.applicationDescription = handlerInfo.appDisplayName;
} else {
info.preferredAction = Components.interfaces.nsIMIMEInfo.handleInternally;
}
// tell the helper app dialog to update itself
gHelperAppDlg.updateSelf = true;
}
window.opener.gUpdateTypeRV = true;
return true;
}
]]>
</script>
<hbox align="center">
<image id="contentTypeImage"/>
<label id="contentType" crop="right"/>
</hbox>
<separator class="thin"/>
<separator class="groove"/>
<separator class="thin"/>
<grid>
<columns>
<column flex="1"/>
<column flex="3"/>
</columns>
<rows>
<row align="center">
<label value="&extension.label;"/>
<label id="extension"/>
</row>
<row align="center">
<label value="&mimetype.label;" accesskey="&mimetype.accesskey;"
control="mimeType"/>
<textbox id="mimeType" flex="1"/>
</row>
</rows>
</grid>
<separator class="thin"/>
<groupbox>
<caption label="&handledby.label;"/>
<radiogroup id="handler">
<!-- Turn this off since we can't make it work yet
<radio value="4" label="&useDefault.label;" accesskey="&useDefault.accesskey;" oncommand="doEnabling();"/>
-->
<radio value="1" label="&saveToDisk.label;" accesskey="&saveToDisk.accesskey;" oncommand="doEnabling();"/>
<hbox align="center">
<radio value="2" label="&application.label;" accesskey="&application.accesskey;" oncommand="doEnabling();"/>
<textbox id="appPath" flex="1" onchange="selectAppRadio();"/>
<button label="&browse.label;" accesskey="&browse.accesskey;"
oncommand="chooseApp();"/>
</hbox>
</radiogroup>
</groupbox>
<hbox align="center">
<checkbox id="askBeforeOpen" label="&askBeforeOpen.label;" accesskey="&askBeforeOpen.accesskey;"/>
</hbox>
</dialog>

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

@ -0,0 +1,181 @@
/* -*- Mode: Java; tab-width: 2; c-basic-offset: 2; -*-
*
* 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):
*/
var gDescriptionField = null;
var gExtensionField = null;
var gMIMEField = null;
var gAppPath = null;
var gPrefApplicationsBundle = null;
function Startup()
{
doSetOKCancel(onOK);
gDescriptionField = document.getElementById("description");
gExtensionField = document.getElementById("extensions");
gMIMEField = document.getElementById("mimeType");
gAppPath = document.getElementById("appPath");
gPrefApplicationsBundle = document.getElementById("bundle_prefApplications");
// If an arg was passed, then it's an nsIHelperAppLauncherDialog
if ( "arguments" in window && window.arguments[0] ) {
// Get mime info.
var info = window.arguments[0].mLauncher.MIMEInfo;
// Fill the fields we can from this.
gDescriptionField.value = info.Description;
gExtensionField.value = info.primaryExtension;
gMIMEField.value = info.MIMEType;
// an app may have been selected in the opening dialog but not in the mimeinfo
var app = info.preferredApplicationHandler || window.arguments[0].chosenApp;
if ( app ) {
gAppPath.value = app.path;
}
// Don't let user change mime type.
gMIMEField.setAttribute( "readonly", "true" );
// Start user in app field.
gAppPath.focus();
} else {
gDescriptionField.focus();
}
sizeToContent();
moveToAlertPosition();
}
function chooseApp()
{
const nsIFilePicker = Components.interfaces.nsIFilePicker;
var filePicker = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);
if (filePicker) {
const FP = Components.interfaces.nsIFilePicker
var windowTitle = gPrefApplicationsBundle.getString("chooseHandler");
var programsFilter = gPrefApplicationsBundle.getString("programsFilter");
filePicker.init(window, windowTitle, FP.modeOpen);
if (navigator.platform == "Win32")
filePicker.appendFilter(programsFilter, "*.exe; *.com");
else
filePicker.appendFilters(FP.filterAll);
var filePicked = filePicker.show();
if (filePicked == nsIFilePicker.returnOK && filePicker.file) {
var file = filePicker.file.QueryInterface(Components.interfaces.nsILocalFile);
gAppPath.value = file.path;
gAppPath.select();
}
}
}
var gDS = null;
function onOK()
{
// Make sure all fields are filled in OK.
if ( !checkInput() ) {
return false;
}
const mimeTypes = "UMimTyp";
var fileLocator = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties);
var file = fileLocator.get(mimeTypes, Components.interfaces.nsIFile);
var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
gDS = gRDF.GetDataSource(ioService.getURLSpecFromFile(file));
gMIMEField.value = gMIMEField.value.toLowerCase();
// figure out if this mime type already exists.
var exists = mimeHandlerExists(gMIMEField.value);
if (exists) {
var titleMsg = gPrefApplicationsBundle.getString("handlerExistsTitle");
var dialogMsg = gPrefApplicationsBundle.getString("handlerExists");
dialogMsg = dialogMsg.replace(/%mime%/g, gMIMEField.value);
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
var replace = promptService.confirm(window, titleMsg, dialogMsg);
if (!replace)
{
window.close();
return;
}
}
// now save the information
var handlerInfo = new HandlerOverride(MIME_URI(gMIMEField.value));
handlerInfo.mUpdateMode = exists; // XXX Somewhat sleazy, I know...
handlerInfo.mimeType = gMIMEField.value;
handlerInfo.description = gDescriptionField.value;
var extensionString = gExtensionField.value.replace(/[*.;]/g, "").toLowerCase();
var extensions = extensionString.split(" ");
for (var i = 0; i < extensions.length; i++) {
var currExtension = extensions[i];
handlerInfo.addExtension(currExtension);
}
handlerInfo.appPath = gAppPath.value;
// other info we need to set (not reflected in UI)
handlerInfo.isEditable = true;
handlerInfo.saveToDisk = false;
handlerInfo.handleInternal = false;
handlerInfo.alwaysAsk = true;
file = Components.classes["@mozilla.org/file/local;1"].createInstance();
if (file)
file = file.QueryInterface(Components.interfaces.nsILocalFile);
if (file) {
try {
file.initWithPath(gAppPath.value);
handlerInfo.appDisplayName = file.leafName;
}
catch(e) {
handlerInfo.appDisplayName = gAppPath.value;
}
}
// do the rest of the work (ugly yes, but it works)
handlerInfo.buildLinks();
// flush the ds to disk.
var remoteDS = gDS.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
if (remoteDS)
remoteDS.Flush();
// If an arg was passed, then it's an nsIHelperAppLauncherDialog
// and we need to update its MIMEInfo.
if ( "arguments" in window && window.arguments[0] ) {
// Get mime info.
var info = window.arguments[0].mLauncher.MIMEInfo;
// Update fields that might have changed.
info.preferredAction = Components.interfaces.nsIMIMEInfo.useHelperApp;
info.Description = gDescriptionField.value;
info.preferredApplicationHandler = file;
info.applicationDescription = handlerInfo.appDisplayName;
// Tell the nsIHelperAppLauncherDialog to update to the changes
window.arguments[0].updateSelf = true;
}
window.opener.gNewTypeRV = gMIMEField.value;
window.close();
}

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

@ -0,0 +1,83 @@
<?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/
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):
Ben Goodger <ben@netscape.com>, original implementor
-->
<?xml-stylesheet href="chrome://communicator/skin/"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-applications-edit.dtd">
<window id="newFileType"
class="dialog" style="width: 30em; -moz-user-focus: ignore;"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&newTypeTitle.label;"
onload="Startup();">
<stringbundle id="bundle_prefApplications"
src="chrome://communicator/locale/pref/pref-applications.properties"/>
<script type="application/x-javascript" src="chrome://communicator/content/pref/overrideHandler.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-applications-new.js"/>
<keyset id="dialogKeys"/>
<grid flex="1">
<columns>
<column/>
<column flex="1"/>
</columns>
<rows>
<row align="center">
<label value="&newDescription.label;" accesskey="&newDescription.accesskey;"
control="description"/>
<textbox id="description" flex="1"/>
</row>
<row align="center">
<label value="&newExtensions.label;" accesskey="&newExtensions.accesskey;"
control="extensions"/>
<textbox id="extensions" flex="1"/>
</row>
<row align="center">
<label value="&newMIME.label;" accesskey="&newMIME.accesskey;"
control="mimeType"/>
<textbox id="mimeType" flex="1"/>
</row>
<row align="center">
<label value="&newAppPath.label;" accesskey="&newAppPath.accesskey;"
control="appPath"/>
<hbox align="center">
<textbox id="appPath" flex="1"/>
<button label="&browse.label;" accesskey="&browse.accesskey;"
oncommand="chooseApp();"/>
</hbox>
</row>
</rows>
</grid>
<separator/>
<hbox id="okCancelButtonsRight"/>
</window>

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

@ -0,0 +1,162 @@
/* -*- Mode: Java; tab-width: 2; c-basic-offset: 2; -*-
*
* 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):
*/
var gNewTypeRV = null;
var gUpdateTypeRV = null;
var gList = null;
var gDS = null;
var gPrefApplicationsBundle = null;
var gExtensionField = null;
var gMIMETypeField = null;
var gHandlerField = null;
var gNewTypeButton = null;
var gEditButton = null;
var gRemoveButton = null;
function newType()
{
window.openDialog("chrome://communicator/content/pref/pref-applications-new.xul", "appEdit", "chrome,modal=yes,resizable=no");
if (gNewTypeRV) {
//gList.builder.rebuild();
gList.setAttribute("ref", "urn:mimetypes");
gNewTypeRV = null;
}
}
function removeType()
{
var titleMsg = gPrefApplicationsBundle.getString("removeHandlerTitle");
var dialogMsg = gPrefApplicationsBundle.getString("removeHandler");
dialogMsg = dialogMsg.replace(/%n/g, "\n");
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
var remove = promptService.confirm(window, titleMsg, dialogMsg);
if (remove) {
var uri = gList.selectedItems[0].id;
var handlerOverride = new HandlerOverride(uri);
removeOverride(handlerOverride.mimeType);
gList.setAttribute("ref", "urn:mimetypes");
}
}
function editType()
{
if (gList.selectedItems && gList.selectedItems[0]) {
var uri = gList.selectedItems[0].id;
var handlerOverride = new HandlerOverride(uri);
window.openDialog("chrome://communicator/content/pref/pref-applications-edit.xul", "appEdit", "chrome,modal=yes,resizable=no", handlerOverride);
selectApplication();
}
}
function Startup()
{
// set up the string bundle
gPrefApplicationsBundle = document.getElementById("bundle_prefApplications");
// set up the elements
gList = document.getElementById("appList");
gExtensionField = document.getElementById("extension");
gMIMETypeField = document.getElementById("mimeType");
gHandlerField = document.getElementById("handler");
gNewTypeButton = document.getElementById("newTypeButton");
gEditButton = document.getElementById("editButton");
gRemoveButton = document.getElementById("removeButton");
// Disable the Edit & Remove buttons until we click on something
updateLockedButtonState(false);
const mimeTypes = "UMimTyp";
var fileLocator = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties);
var file = fileLocator.get(mimeTypes, Components.interfaces.nsIFile);
var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
dump("spec is " + ioService.getURLSpecFromFile(file));
gDS = gRDF.GetDataSource(ioService.getURLSpecFromFile(file));
// intialize the listbox
gList.database.AddDataSource(gDS);
gList.setAttribute("ref", "urn:mimetypes");
}
function selectApplication()
{
if (gList.selectedItems && gList.selectedItems.length && gList.selectedItems[0]) {
var uri = gList.selectedItems[0].id;
var handlerOverride = new HandlerOverride(uri);
gExtensionField.setAttribute("value", handlerOverride.extensions);
gMIMETypeField.setAttribute("value", handlerOverride.mimeType);
// figure out how this type is handled
if (handlerOverride.handleInternal == "true")
gHandlerField.setAttribute("value",
gPrefApplicationsBundle.getString("handleInternally"));
else if (handlerOverride.saveToDisk == "true")
gHandlerField.setAttribute("value",
gPrefApplicationsBundle.getString("saveToDisk"));
else
gHandlerField.setAttribute("value", handlerOverride.appDisplayName);
var ext;
var posOfFirstSpace = handlerOverride.extensions.indexOf(" ");
if (posOfFirstSpace > -1)
ext = handlerOverride.extensions.substr(0, posOfFirstSpace);
else
ext = handlerOverride.extensions;
var imageString = "moz-icon://" + "dummy." + ext.toLowerCase() + "?size=32&contentType=" + handlerOverride.mimeType;
document.getElementById("contentTypeImage").setAttribute("src", imageString);
updateLockedButtonState(handlerOverride.isEditable == "true");
delete handlerOverride;
} else {
updateLockedButtonState(false)
gHandlerField.removeAttribute("value");
document.getElementById("contentTypeImage").removeAttribute("src");
gExtensionField.removeAttribute("value");
gMIMETypeField.removeAttribute("value");
}
}
// disable locked buttons
function updateLockedButtonState(handlerEditable)
{
gNewTypeButton.disabled = parent.hPrefWindow.getPrefIsLocked(gNewTypeButton.getAttribute("prefstring") );
if (!handlerEditable ||
parent.hPrefWindow.getPrefIsLocked(gEditButton.getAttribute("prefstring"))) {
gEditButton.disabled = true;
} else {
gEditButton.disabled = false;
}
if (!handlerEditable ||
parent.hPrefWindow.getPrefIsLocked(gRemoveButton.getAttribute("prefstring"))) {
gRemoveButton.disabled = true;
} else {
gRemoveButton.disabled = false;
}
}
function clearRememberedSettings()
{
var prefBranch = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPrefBranch);
if (prefBranch) {
prefBranch.setCharPref("browser.helperApps.neverAsk.saveToDisk", "");
prefBranch.setCharPref("browser.helperApps.neverAsk.openFile", "");
}
}

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

@ -0,0 +1,135 @@
<?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/
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):
Ben Goodger <ben@netscape.com>, original implementor
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-applications.dtd" >
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
onload="parent.initPanel('chrome://communicator/content/pref/pref-applications.xul');"
headertitle="&lHeader;">
<stringbundle id="bundle_prefApplications"
src="chrome://communicator/locale/pref/pref-applications.properties"/>
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-applications.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/pref/overrideHandler.js"/>
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["useNSPluginFinder"];
]]>
</script>
<groupbox flex="1">
<caption label="&descript;"/>
<label value="&fileTypes.label;"/>
<hbox flex="1">
<vbox flex="1">
<listbox id="appList" flex="1"
sortResource="http://home.netscape.com/NC-rdf#value"
sortDirection="ascending"
datasources="rdf:null" ref="urn:mimetypes"
onselect="selectApplication();">
<template>
<rule>
<conditions>
<content uri="?uri"/>
<!-- the RDF Seq of MIME types -->
<triple subject="?uri" object="?MIME-types"
predicate="http://home.netscape.com/NC-rdf#MIME-types"/>
<!-- each MIME type -->
<member container="?MIME-types" child="?type"/>
<!-- MIME type value -->
<triple subject="?type" object="?value"
predicate="http://home.netscape.com/NC-rdf#value"/>
<triple subject="?type" object="?editable"
predicate="http://home.netscape.com/NC-rdf#editable"/>
</conditions>
<action>
<listitem uri="?type" label="?value"/>
</action>
</rule>
</template>
</listbox>
<hbox>
<vbox><image id="contentTypeImage"/></vbox>
<grid orient="horizontal">
<columns>
<column/>
<column flex="1"/>
</columns>
<rows>
<row>
<label value="&exten;"/>
<label id="extension"/>
</row>
<row>
<label value="&mimeType;"/>
<label id="mimeType"/>
</row>
<row>
<label value="&handle;"/>
<label id="handler"/>
</row>
</rows>
</grid>
</hbox>
</vbox>
<vbox>
<button id="newTypeButton"
label="&newTypeButton.label;" accesskey="&newTypeButton.accesskey;"
oncommand="newType();"
prefstring="pref.application.disable_button.new_type"/>
<button id="editButton"
label="&editButton.label;" accesskey="&editButton.accesskey;"
oncommand="editType();"
prefstring="pref.application.disable_button.edit"/>
<button id="removeButton"
label="&removeButton.label;" accesskey="&removeButton.accesskey;"
oncommand="removeType();"
prefstring="pref.application.disable_button.remove"/>
</vbox>
</hbox>
</groupbox>
<groupbox id="pluginFinderBox">
<caption label="&plugins.label;"/>
<vbox>
<hbox pack="start" align="center">
<checkbox id="useNSPluginFinder" label="&pluginFinder.label;"
prefstring="application.use_ns_plugin_finder"/>
</hbox>
<description>&pluginFinderDesc.label;</description>
</vbox>
</groupbox>
<groupbox>
<caption label="&fileOpening.label;"/>
<hbox pack="start" align="center">
<description flex="1">&resetText.label;</description>
<spacer flex="1"/>
<button label="&resetButton.label;" oncommand="clearRememberedSettings();"/>
</hbox>
</groupbox>
</page>

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

@ -0,0 +1,100 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
*/
const nsIFilePicker = Components.interfaces.nsIFilePicker;
const nsILocalFile = Components.interfaces.nsILocalFile;
const nsIFile = Components.interfaces.nsIFile;
const nsIProperties = Components.interfaces.nsIProperties;
const kCacheParentDirPref = "browser.cache.disk.parent_directory";
function Startup()
{
var path = null;
var pref = null;
try
{
pref = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
path = pref.getComplexValue(kCacheParentDirPref, nsILocalFile);
}
catch (ex)
{
// parent_directory pref not set; path is null so we'll failover
// to filling in the parent_directory as the profile directory
}
if (!path)
{
try
{
// no disk cache folder found; default to profile directory
var dirSvc = Components.classes["@mozilla.org/file/directory_service;1"]
.getService(nsIProperties);
var ifile = dirSvc.get("ProfD", nsIFile);
path = ifile.QueryInterface(nsILocalFile);
// now remember the new assumption
if (pref)
pref.setComplexValue(kCacheParentDirPref, nsILocalFile, path);
}
catch (ex)
{
}
}
// if both pref and dir svc fail leave this field blank else show path
if (path)
document.getElementById("browserCacheDiskCacheFolder").value =
path.path;
}
function prefCacheSelectFolder()
{
var fp = Components.classes["@mozilla.org/filepicker;1"]
.createInstance(nsIFilePicker);
var pref = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
var prefutilitiesBundle = document.getElementById("bundle_prefutilities");
var title = prefutilitiesBundle.getString("cachefolder");
fp.init(window, title, nsIFilePicker.modeGetFolder);
try
{
var initialDir = pref.getComplexValue(kCacheParentDirPref, nsILocalFile);
if (initialDir)
fp.displayDirectory = initialDir;
}
catch (ex)
{
// ignore exception: file picker will open at default location
}
fp.appendFilters(nsIFilePicker.filterAll);
var ret = fp.show();
if (ret == nsIFilePicker.returnOK) {
var localFile = fp.file.QueryInterface(nsILocalFile);
var viewable = fp.file.path;
var folderField = document.getElementById("browserCacheDiskCacheFolder");
folderField.value = viewable;
pref.setComplexValue(kCacheParentDirPref, nsILocalFile, localFile)
}
}
function prefClearCache(aType)
{
var classID = Components.classes["@mozilla.org/network/cache-service;1"];
var cacheService = classID.getService(Components.interfaces.nsICacheService);
cacheService.evictEntries(aType);
}
function prefClearMemCache()
{
prefClearCache(Components.interfaces.nsICache.STORE_IN_MEMORY);
}
function prefClearDiskCache()
{
prefClearCache(Components.interfaces.nsICache.STORE_ON_DISK);
}

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

@ -0,0 +1,115 @@
<?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/
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):
Diego Biurrun <diego@biurrun.de>
- added disk cache folder choice
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
%brandDTD;
<!ENTITY % prefCacheDTD SYSTEM "chrome://communicator/locale/pref/pref-cache.dtd" >
%prefCacheDTD;
]>
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://communicator/content/pref/pref-cache.xul');"
headertitle="&lHeader;">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["browserCacheMemoryCache", "browserCacheDiskCache", "browserCacheCheckDocFrequency"];
]]>
</script>
<stringbundle id="bundle_prefutilities"
src="chrome://communicator/locale/pref/prefutilities.properties"/>
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-cache.js"/>
<groupbox>
<caption label="&cacheTitle.label;"/>
<description>&cachePara;</description>
<separator class="thin"/>
<grid>
<columns>
<column/>
<column flex="1"/>
<column/>
</columns>
<rows>
<row align="center">
<label value="&memCache.label;" accesskey="&memCache.accesskey;" control="browserCacheMemoryCache"/>
<hbox align="center">
<textbox id="browserCacheMemoryCache" size="8" preftype="int"
prefstring="browser.cache.memory.capacity"/>
<label value="&kbytes;"/>
</hbox>
<button label="&clearMemCache.label;" accesskey="&clearMemCache.accesskey;"
oncommand="prefClearMemCache();"
id="clearMemCache"
prefstring="pref.advanced.cache.disable_button.clear_memory"/>
</row>
<row align="center">
<label value="&diskCache.label;" accesskey="&diskCache.accesskey;" control="browserCacheDiskCache"/>
<hbox align="center">
<textbox id="browserCacheDiskCache" size="8" preftype="int"
prefstring="browser.cache.disk.capacity" prefattribute="value"/>
<label value="&kbytes;"/>
</hbox>
<button label="&clearDiskCache.label;" accesskey="&clearDiskCache.accesskey;"
oncommand="prefClearDiskCache();"
id="clearDiskCache"
prefstring="pref.advanced.cache.disable_button.clear_disk"/>
</row>
<row align="center">
<label value="&diskCacheFolder.label;"/>
<hbox align="center">
<textbox id="browserCacheDiskCacheFolder" readonly="true"/>
</hbox>
<button label="&chooseDiskCacheFolder.label;" accesskey="&chooseDiskCacheFolder.accesskey;"
oncommand="prefCacheSelectFolder();" id="chooseDiskCacheFolder"/>
</row>
<description>&diskCacheFolderExplanation;</description>
</rows>
</grid>
<separator class="thin"/>
<description>&docCache;</description>
<vbox align="start" class="indent">
<radiogroup id="browserCacheCheckDocFrequency"
prefstring="browser.cache.check_doc_frequency">
<radio value="1" label="&everyTimeRadio.label;" accesskey="&everyTimeRadio.accesskey;"/>
<radio value="3" label="&autoRadio.label;" accesskey="&autoRadio.accesskey;"/>
<radio value="0" label="&oncePsessionRadio.label;" accesskey="&oncePsessionRadio.accesskey;"/>
<radio value="2" label="&neverRadio.label;" accesskey="&neverRadio.accesskey;"/>
</radiogroup>
</vbox>
</groupbox>
</page>

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

@ -0,0 +1,71 @@
<?xml version="1.0"?>
<!--
The contents of this file are subject to the Mozilla Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-2000 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s):
-->
<?xml-stylesheet href="chrome://navigator/skin/" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-fonts.dtd" >
<window id="calibrateScreen"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&calibrateDialog.title;"
class="dialog"
onload="Init();"
persist="screenX screenY">
<script type="application/x-javascript"
src="chrome://communicator/content/pref/pref-fonts.js"/>
<vbox align="center">
<vbox id="horizRuler" width="300" height="30" style="margin: 10px; margin-bottom: 0px">
<hbox height="10px" style="border-bottom: 1px solid black; border-left: 1px solid black; border-right: 1px solid black;"/>
<hbox height="10px" style="border-top: 1px solid black; border-left: 1px solid black; border-right: 1px solid black;"/>
</vbox>
<hbox align="center">
<label value="&calibrate.instructions;"/>
</hbox>
<separator class="thin"/>
<hbox align="center">
<textbox id="horizSize" size="5"/>
<menulist id="units" persist="value">
<menupopup>
<menuitem value="centimetres" label="&units.centimetres;"/>
<menuitem value="inches" label="&units.inches;"/>
</menupopup>
</menulist>
</hbox>
<separator/>
<keyset id="dialogKeys"/>
<hbox id="okCancelButtonsRight"/>
</vbox>
</window>

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

@ -0,0 +1,340 @@
//get prefInt services
var availCharsetDict = [];
var prefInt = null; //Preferences Interface
var pref_string_title = "";
var pref_string_content = "";
function Init()
{
var applicationArea = "";
if ("arguments" in window && window.arguments[0])
applicationArea = window.arguments[0];
prefInt = Components.classes["@mozilla.org/preferences;1"];
if (prefInt) {
prefInt = prefInt.getService(Components.interfaces.nsIPref);
if (applicationArea.indexOf("mail") != -1) {
pref_string_title = "intl.charsetmenu.mailedit";
} else {
//default is the browser
pref_string_title = "intl.charsetmenu.browser.static";
}
pref_string_content = prefInt.getLocalizedUnicharPref(pref_string_title);
AddRemoveLatin1('add');
}
LoadAvailableCharSets();
LoadActiveCharSets();
}
function readRDFString(aDS,aRes,aProp)
{
var n = aDS.GetTarget(aRes, aProp, true);
if (n)
return n.QueryInterface(Components.interfaces.nsIRDFLiteral).Value;
else
return "";
}
function LoadAvailableCharSets()
{
try {
var available_charsets_listbox = document.getElementById('available_charsets');
var rdf=Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
var kNC_Root = rdf.GetResource("NC:DecodersRoot");
var kNC_name = rdf.GetResource("http://home.netscape.com/NC-rdf#Name");
var rdfDataSource = rdf.GetDataSource("rdf:charset-menu");
var rdfContainer = Components.classes["@mozilla.org/rdf/container;1"].getService(Components.interfaces.nsIRDFContainer);
rdfContainer.Init(rdfDataSource, kNC_Root);
var availableCharsets = rdfContainer.GetElements();
var charset;
for (var i = 0; i < rdfContainer.GetCount(); i++) {
charset = availableCharsets.getNext().QueryInterface(Components.interfaces.nsIRDFResource);
availCharsetDict[i] = new Array(2);
availCharsetDict[i][0] = readRDFString(rdfDataSource, charset, kNC_name);
availCharsetDict[i][1] = charset.Value;
AddListItem(document,
available_charsets_listbox,
availCharsetDict[i][1],
availCharsetDict[i][0]);
}
}
catch (e) {}
}
function GetCharSetTitle(id)
{
if (availCharsetDict) {
for (var j = 0; j < availCharsetDict.length; j++) {
if (availCharsetDict[j][1] == id) {
return availCharsetDict[j][0];
}
}
}
return '';
}
function AddRemoveLatin1(action)
{
var arrayOfPrefs = [];
arrayOfPrefs = pref_string_content.split(', ');
if (arrayOfPrefs.length > 0) {
for (var i = 0; i < arrayOfPrefs.length; i++) {
if (arrayOfPrefs[i] == 'ISO-8859-1') {
if (action == 'remove') {
arrayOfPrefs[i] = arrayOfPrefs[arrayOfPrefs.length-1];
arrayOfPrefs.length = arrayOfPrefs.length - 1;
}
pref_string_content = arrayOfPrefs.join(', ');
return;
}
}
if (action == 'add') {
arrayOfPrefs[arrayOfPrefs.length] = 'ISO-8859-1';
pref_string_content = arrayOfPrefs.join(', ');
}
}
}
function LoadActiveCharSets()
{
var active_charsets = document.getElementById('active_charsets');
var arrayOfPrefs = [];
var str;
var tit;
arrayOfPrefs = pref_string_content.split(', ');
if (arrayOfPrefs.length > 0) {
for (var i = 0; i < arrayOfPrefs.length; i++) {
str = arrayOfPrefs[i];
tit = GetCharSetTitle(str);
if (str && tit)
AddListItem(document, active_charsets, str, tit);
}
}
}
function SelectAvailableCharset()
{
//Remove the selection in the active charsets list
var active_charsets = document.getElementById('active_charsets');
if (active_charsets.selectedItems.length > 0)
active_charsets.clearSelection();
update_buttons();
} //SelectAvailableCharset
function SelectActiveCharset()
{
//Remove the selection in the available charsets list
var available_charsets = document.getElementById('available_charsets');
if (available_charsets.selectedItems.length > 0)
available_charsets.clearSelection();
update_buttons();
} //SelectActiveCharset
function enable_save()
{
var save_button = document.documentElement.getButton("accept");
save_button.removeAttribute('disabled');
}
function update_buttons()
{
var available_charsets = document.getElementById('available_charsets');
var active_charsets = document.getElementById('active_charsets');
var remove_button = document.getElementById('remove_button');
var add_button = document.getElementById('add_button');
var up_button = document.getElementById('up_button');
var down_button = document.getElementById('down_button');
var activeCharsetSelected = (active_charsets.selectedItems.length > 0);
remove_button.disabled = !activeCharsetSelected;
if (activeCharsetSelected) {
up_button.disabled = !(active_charsets.selectedItems[0].previousSibling);
down_button.disabled = !(active_charsets.selectedItems[0].nextSibling);
}
else {
up_button.disabled = true;
down_button.disabled = true;
}
add_button.disabled = (available_charsets.selectedItems.length == 0);
}
function AddAvailableCharset()
{
var active_charsets = document.getElementById('active_charsets');
var available_charsets = document.getElementById('available_charsets');
for (var nodeIndex=0; nodeIndex < available_charsets.selectedItems.length; nodeIndex++)
{
var selItem = available_charsets.selectedItems[nodeIndex];
var charsetname = selItem.label;
var charsetid = selItem.id;
var already_active = false;
for (var item = active_charsets.firstChild; item != null; item = item.nextSibling) {
if (charsetid == item.id) {
already_active = true;
break;
}//if
}//for
if (already_active == false) {
AddListItem(document, active_charsets, charsetid, charsetname);
}//if
}//for
available_charsets.clearSelection();
enable_save();
} //AddAvailableCharset
function RemoveActiveCharset()
{
var listbox = document.getElementById('active_charsets');
var nextNode = null;
var numSelected = listbox.selectedItems.length;
var deleted_all = false;
while (listbox.selectedItems.length > 0) {
var selectedNode = listbox.selectedItems[0];
dump(selectedNode + " - " + listbox.selectedItems.length + "\n");
nextNode = selectedNode.nextSibling;
if (!nextNode) {
if (selectedNode.previousSibling)
nextNode = selectedNode.previousSibling;
}
listbox.removeChild(selectedNode);
} //while
if (nextNode) {
listbox.selectItem(nextNode)
} else {
//listbox.clearSelection();
}
enable_save();
} //RemoveActiveCharset
function Save()
{
// Iterate through the 'active charsets tree to collect the charsets
// that the user has chosen.
var active_charsets = document.getElementById('active_charsets');
var charsetid = "";
var num_charsets = 0;
var pref_string_content = '';
for (var item = active_charsets.firstChild; item != null; item = item.nextSibling) {
charsetid = item.id;
if (charsetid.length > 1) {
num_charsets++;
//separate >1 charsets by commas
if (num_charsets > 1)
pref_string_content = pref_string_content + ", " + charsetid;
else
pref_string_content = charsetid;
}
}
try
{
if (prefInt) {
prefInt.SetCharPref(pref_string_title, pref_string_content);
window.close();
}
}
catch(ex) {
confirm('exception' + ex);
}
return true;
} //Save
function MoveUp() {
var listbox = document.getElementById('active_charsets');
if (listbox.selectedItems.length == 1) {
var selected = listbox.selectedItems[0];
var before = selected.previousSibling
if (before) {
listbox.insertBefore(selected, before);
listbox.selectItem(selected);
listbox.ensureElementIsVisible(selected);
}
}
enable_save();
} //MoveUp
function MoveDown() {
var listbox = document.getElementById('active_charsets');
if (listbox.selectedItems.length == 1) {
var selected = listbox.selectedItems[0];
if (selected.nextSibling) {
if (selected.nextSibling.nextSibling)
listbox.insertBefore(selected, selected.nextSibling.nextSibling);
else
selected.parentNode.appendChild(selected);
listbox.selectItem(selected);
}
}
enable_save();
} //MoveDown
function AddListItem(doc, listbox, ID, UIstring)
{
// Create a treerow for the new item
var item = doc.createElement('listitem');
// Copy over the attributes
item.setAttribute('label', UIstring);
item.setAttribute('id', ID);
listbox.appendChild(item);
}

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

@ -0,0 +1,83 @@
<?xml version="1.0"?> <!-- -*- Mode: SGML; indent-tabs-mode: nil; -*- -->
<!--
The contents of this file are subject to the Netscape Public License
Version 1.1 (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) 1999 Netscape Communications Corporation. All Rights
Reserved.
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/sidebar/customize.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-charset.dtd" >
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&charset.customize.title.label;"
onload="Init();"
ondialogaccept="return Save();"
persist="width height"
headertitle="&charset.customize.left.header;"
width="500" height="394">
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-charset.js"/>
<script type="application/x-javascript">
<![CDATA[
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
observerService.notifyObservers(null, "charsetmenu-selected", "other");
]]>
</script>
<!-- The two-pane -->
<hbox flex="1">
<vbox flex="1">
<label value="&charset.customize.additional.label;"/>
<!-- Available Charsets Tree -->
<listbox id="available_charsets" flex="1" seltype="multiple"
onselect="SelectAvailableCharset();"
ondblclick="AddAvailableCharset();"/>
<separator class="thin"/>
<hbox align="center">
<button id="add_button" oncommand="AddAvailableCharset();"
label="&charset.customize.add.label;" disabled="true"/>
</hbox>
</vbox>
<separator orient="vertical"/>
<vbox flex="1">
<label value="&charset.customize.current.label;"/>
<listbox id="active_charsets" flex="1" seltype="multiple"
onselect="SelectActiveCharset();"
ondblclick="RemoveActiveCharset();"/>
<separator class="thin"/>
<hbox align="center">
<button id="remove_button" oncommand="RemoveActiveCharset();"
disabled="true"
label="&charset.customize.remove.label;"/>
</hbox>
</vbox>
<vbox>
<spacer flex="1"/>
<button id="up_button" class="up small" disabled="true"
oncommand="MoveUp();"/>
<button id="down_button" class="down small" disabled="true"
oncommand="MoveDown();"/>
<spacer flex="1"/>
</vbox>
</hbox>
</dialog>

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

@ -0,0 +1,40 @@
function setColorWell(aPicker)
{
var colorRef = aPicker.nextSibling; // colour value is held here
colorRef.setAttribute( "value", aPicker.color );
}
function setColorWellSr(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 );
// set the colour value internally for use in prefwindow
colorRef.setAttribute( "value", color );
}
function getColorFromWellAndSetValue(aPickerId)
{
var picker = document.getElementById(aPickerId);
var colorRef = picker.nextSibling;
var color = colorRef.getAttribute("value");
picker.color = color;
return color;
}
function Startup()
{
getColorFromWellAndSetValue("foregroundtextmenu");
getColorFromWellAndSetValue("backgroundmenu");
getColorFromWellAndSetValue("unvisitedlinkmenu");
getColorFromWellAndSetValue("visitedlinkmenu");
return true;
}

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

@ -0,0 +1,104 @@
<?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/
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):
Ben Goodger <ben@netscape.com>
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xul-overlay href="chrome://communicator/content/pref/platformPrefOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-colors.dtd" >
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://communicator/content/pref/pref-colors.xul');"
headertitle="&lHeader;">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["foregroundText", "background", "browserUseSystemColors", "unvisitedLinks", "visitedLinks", "browserUnderlineAnchors", "browserUseDocumentColors", "syntaxHighlight"];
]]>
</script>
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-colors.js"/>
<hbox>
<groupbox flex="1" id="pageColours">
<caption label="&color;"/>
<hbox align="center">
<label value="&textColor.label;" accesskey="&textColor.accesskey;" control="foregroundtextmenu"/>
<spacer flex="1"/>
<colorpicker type="button" id="foregroundtextmenu" palettename="standard" onchange="setColorWell(this)"/>
<data id="foregroundText" preftype="color" prefstring="browser.display.foreground_color" prefattribute="value" wsm_attributes="value"/>
</hbox>
<hbox align="center" style="margin-top: 5px">
<label value="&backgroundColor.label;" accesskey="&backgroundColor.accesskey;" control="backgroundmenu"/>
<spacer flex="1"/>
<colorpicker type="button" id="backgroundmenu" palettename="standard" onchange="setColorWell(this)"/>
<data id="background" preftype="color" prefstring="browser.display.background_color" prefattribute="value" wsm_attributes="value"/>
</hbox>
<separator class="thin"/>
<hbox align="center">
<checkbox id="browserUseSystemColors" label="&useSystemColors.label;" accesskey="&useSystemColors.accesskey;"
prefstring="browser.display.use_system_colors"/>
</hbox>
</groupbox>
<groupbox flex="1">
<caption label="&links;"/>
<hbox align="center">
<label value="&linkColor.label;" accesskey="&linkColor.accesskey;" control="unvisitedlinkmenu"/>
<spacer flex="1"/>
<colorpicker type="button" id="unvisitedlinkmenu" palettename="standard" onchange="setColorWell(this)"/>
<data id="unvisitedLinks" preftype="string" prefstring="browser.anchor_color" prefattribute="value" wsm_attributes="value"/>
</hbox>
<hbox align="center" style="margin-top: 5px">
<label value="&visitedLinkColor.label;" accesskey="&visitedLinkColor.accesskey;" control="visitedlinkmenu"/>
<spacer flex="1"/>
<colorpicker type="button" id="visitedlinkmenu" palettename="standard" onchange="setColorWell(this)"/>
<data id="visitedLinks" preftype="string" prefstring="browser.visited_color" prefattribute="value" wsm_attributes="value"/>
</hbox>
<separator class="thin"/>
<hbox align="center">
<checkbox id="browserUnderlineAnchors" label="&underlineLinks.label;" accesskey="&underlineLinks.accesskey;"
prefstring="browser.underline_anchors"/>
</hbox>
</groupbox>
</hbox>
<groupbox>
<caption label="&someProvColors;"/>
<radiogroup id="browserUseDocumentColors"
preftype="bool" prefstring="browser.display.use_document_colors">
<radio value="true" label="&alwaysUseDocumentColors.label;" accesskey="&alwaysUseDocumentColors.accesskey;"/>
<radio value="false" label="&useMyColors.label;" accesskey="&useMyColors.accesskey;"/>
</radiogroup>
</groupbox>
<groupbox>
<caption label="&viewsource;"/>
<hbox align="center">
<checkbox id="syntaxHighlight" label="&syntaxHighlight.label;" accesskey="&syntaxHighlight.accesskey;"
prefstring="view_source.syntax_highlight"/>
</hbox>
</groupbox>
</page>

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

@ -0,0 +1,104 @@
<?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/
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"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-debug.dtd" >
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://communicator/content/pref/pref-debug.xul');"
headertitle="&lHeader;">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["nglayoutDebugWindow", "nglayoutUseNativePrintDialog", "printUseGlobalPrintSettings",
"debugXULBoxes", "browserDOMWindowDumpEnabled",
"javascriptOptionsStrict", "javascriptOptionsShowInConsole",
"nglayoutDebugUseXBLForms",
"acceleratorKeyValue", "menuAccessKeyValue"];
]]>
</script>
<groupbox align="start">
<caption label="&widgetRendering.label;"/>
<grid flex="1">
<columns>
<column/>
<column/>
</columns>
<rows>
<row align="center">
<checkbox id="debugXULBoxes" label="&debugXULBox.label;"
prefstring="xul.debug.box"/>
<checkbox id="nglayoutDebugWindow" label="&debugWindow.label;"
prefstring="nglayout.widget.debugWindow"/>
</row>
</rows>
</grid>
</groupbox>
<!-- nothing on this page has accesskeys because this is a temporary debug
panel and you can damn well click the widgets! -->
<groupbox align="start">
<caption label="&debugMiscellaneous.label;"/>
<checkbox id="browserDOMWindowDumpEnabled" label="&debugEnableDump.label;"
prefstring="browser.dom.window.dump.enabled"/>
<checkbox id="javascriptOptionsStrict" label="&debugStrictJavascript.label;"
prefstring="javascript.options.strict"/>
<checkbox id="javascriptOptionsShowInConsole" label="&debugConsoleJavascript.label;"
prefstring="javascript.options.showInConsole"/>
<checkbox id="nglayoutDebugUseXBLForms" label="&debugUseXBLForms.label;"
prefstring="nglayout.debug.enable_xbl_forms"/>
<checkbox id="nglayoutUseNativePrintDialog" label="&useNativePrintDialog.label;"
prefstring="print.use_native_print_dialog"/>
<checkbox id="printUseGlobalPrintSettings" label="&printUseGlobalPrintSettings.label;"
prefstring="print.use_global_printsettings"/>
</groupbox>
<groupbox>
<caption label="&accelerators.label;"/>
<description value="&acceleratorsBlurb.label;"/>
<grid flex="1">
<columns>
<column/>
<column/>
</columns>
<rows>
<row align="center">
<label value="&acceleratorKey.label;" for="acceleratorKeyValue"/>
<textbox id="acceleratorKeyValue" preftype="int"
prefstring="ui.key.accelKey" size="5"/>
<label value="&menuAccessKey.label;" control="menuAccessKeyValue"/>
<textbox id="menuAccessKeyValue" preftype="int"
prefstring="ui.key.menuAccessKey" size="5"/>
</row>
</rows>
</grid>
</groupbox>
</page>

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

@ -0,0 +1,78 @@
<?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/
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"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-debug1.dtd" >
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://communicator/content/pref/pref-debug1.xul');"
headertitle="&lHeader;">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["nglayoutDebugPaintFlashing", "nglayoutDebugPaintDumping",
"nglayoutDebugInvalidateDumping", "nglayoutDebugEventDumping",
"nglayoutDebugMotionEventDumping", "nglayoutDebugCrossingEventDumping",
"layoutReflowShowFrameCounts", "layoutReflowDumpFrameCounts",
"layoutReflowDumpFrameByFrameCounts" ];
]]>
</script>
<!-- nothing on this page has accesskeys because this is a temporary debug
panel and you can damn well click the widgets! -->
<!-- Event Debugging -->
<groupbox>
<caption label="&debugEventDebugging.label;"/>
<vbox align="start">
<checkbox id="nglayoutDebugPaintFlashing" label="&debugPaintFlashing.label;"
prefstring="nglayout.debug.paint_flashing"/>
<checkbox id="nglayoutDebugPaintDumping" label="&debugPaintDumping.label;"
prefstring="nglayout.debug.paint_dumping"/>
<checkbox id="nglayoutDebugInvalidateDumping" label="&debugInvalidateDumping.label;"
prefstring="nglayout.debug.invalidate_dumping"/>
<checkbox id="nglayoutDebugEventDumping" label="&debugEventDumping.label;"
prefstring="nglayout.debug.invalidate_dumping"/>
<checkbox id="nglayoutDebugMotionEventDumping" label="&debugMotionEventDumping.label;"
prefstring="nglayout.debug.motion_event_dumping"/>
<checkbox id="nglayoutDebugCrossingEventDumping" label="&debugCrossingEventDumping.label;"
prefstring="nglayout.debug.motion_event_dumping"/>
</vbox>
</groupbox>
<!-- Reflow events -->
<groupbox>
<caption label="&debugReflowEvents.label;"/>
<vbox align="start">
<checkbox id="layoutReflowShowFrameCounts" label="&debugReflowShowFrameCounts.label;"
prefstring="layout.reflow.showframecounts"/>
<checkbox id="layoutReflowDumpFrameCounts" label="&debugReflowDumpFrameCounts.label;"
prefstring="layout.reflow.dumpframecounts"/>
<checkbox id="layoutReflowDumpFrameByFrameCounts" label="&debugReflowDumpFrameByFrameCounts.label;"
prefstring="layout.reflow.dumpframebyframecounts"/>
</vbox>
</groupbox>
</page>

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

@ -0,0 +1,75 @@
<?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/
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"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-debug2.dtd" >
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://communicator/content/pref/pref-debug2.xul');"
headertitle="&lHeader;">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["dirFormat", "nglayoutDebugDisableXULCache",
"browserEnableCache", "browserEnableDiskCache", ];
]]>
</script>
<!-- nothing on this page has accesskeys because this is a temporary debug
panel and you can damn well click the widgets! -->
<groupbox>
<caption label="&debugNetworking.label;"/>
<vbox align="start">
<description>&dirFormat;</description>
<vbox align="start" class="indent">
<radiogroup id="dirFormat"
prefstring="network.dir.format">
<!-- If we display a raw option, then people select it, and complain
when they don't actually get results -->
<!-- <radio value="1" label="&raw.label;"/> -->
<radio value="2" label="&html.label;"/>
<!-- OK, this is application/http-index-format, not XUL. But the
result is that the XUL viwer is used. Anyway, this is only a
debug panel, so lets not get worked up about it -->
<radio value="3" label="&xul.label;"/>
</radiogroup>
</vbox>
</vbox>
</groupbox>
<groupbox>
<caption label="&debugCache.label;"/>
<vbox align="start">
<checkbox id="nglayoutDebugDisableXULCache" label="&debugDisableXULCache.label;"
prefstring="nglayout.debug.disable_xul_cache"/>
<checkbox id="browserEnableDiskCache" label="&debugEnableDiskCache.label;"
prefstring="browser.cache.disk.enable"/>
<checkbox id="browserEnableCache" label="&debugEnableMemCache.label;"
prefstring="browser.cache.memory.enable"/>
</vbox>
</groupbox>
</page>

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

@ -0,0 +1,50 @@
<?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/
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"?>
<?xul-overlay href="chrome://communicator/content/communicatorOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-download.dtd" >
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://communicator/content/pref/pref-download.xul');"
headertitle="&lHeader;">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["downloadBehavior"];
]]>
</script>browser.downloadmanager.behavior
<groupbox>
<caption label="&downloadBehavior.label;"/>
<radiogroup id="downloadBehavior" prefstring="browser.downloadmanager.behavior">
<radio value="0" label="&openDM.label;" accesskey="&openDM.accesskey;"/>
<radio value="1" label="&openProgressDialog.label;" accesskey="&openProgressDialog.accesskey;"/>
<radio value="2" label="&doNothing.label;" accesskey="&doNothing.accesskey;"/>
</radiogroup>
</groupbox>
</page>

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

@ -0,0 +1,639 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Gervase Markham <gerv@gerv.net>
* Tuukka Tolvanen <tt@lament.cjb.net>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
try
{
var fontList = Components.classes["@mozilla.org/gfx/fontlist;1"].createInstance();
if (fontList)
fontList = fontList.QueryInterface(Components.interfaces.nsIFontList);
var pref = Components.classes["@mozilla.org/preferences;1"].getService( Components.interfaces.nsIPref );
}
catch(e)
{
dump("failed to get font list or pref object: "+e+" in pref-fonts.js\n");
}
var fontTypes = ["serif", "sans-serif", "cursive", "fantasy", "monospace"];
var variableSize, fixedSize, minSize, languageList;
var languageData = [];
var currentLanguage;
var gPrefutilitiesBundle;
// manual data retrieval function for PrefWindow
function GetFields()
{
var dataObject = parent.hPrefWindow.wsm.dataManager.pageData["chrome://communicator/content/pref/pref-fonts.xul"];
// store data for language independent widgets
var lists = ["selectLangs", "proportionalFont"];
for( var i = 0; i < lists.length; i++ )
{
if( !( "dataEls" in dataObject ) )
dataObject.dataEls = [];
dataObject.dataEls[ lists[i] ] = [];
dataObject.dataEls[ lists[i] ].value = document.getElementById( lists[i] ).value;
}
dataObject.defaultFont = document.getElementById( "proportionalFont" ).value;
dataObject.fontDPI = document.getElementById( "screenResolution" ).value;
dataObject.useDocFonts = document.getElementById( "browserUseDocumentFonts" ).checked ? 1 : 0;
// 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 = "languageData" in aDataObject ? aDataObject.languageData : languageData ;
currentLanguage = "currentLanguage" in aDataObject ? aDataObject.currentLanguage : null ;
var lists = ["selectLangs", "proportionalFont"];
var prefvalue;
for( var i = 0; i < lists.length; i++ )
{
var element = document.getElementById( lists[i] );
if( "dataEls" in aDataObject )
{
element.selectedItem = element.getElementsByAttribute( "value", aDataObject.dataEls[ lists[i] ].value )[0];
}
else
{
var prefstring = element.getAttribute( "prefstring" );
var preftype = element.getAttribute( "preftype" );
if( prefstring && preftype )
{
prefvalue = parent.hPrefWindow.getPref( preftype, prefstring );
element.selectedItem = element.getElementsByAttribute( "value", prefvalue )[0];
}
}
}
var screenResolution = document.getElementById( "screenResolution" );
var resolution;
if( "fontDPI" in aDataObject )
{
resolution = aDataObject.fontDPI;
}
else
{
prefvalue = parent.hPrefWindow.getPref( "int", "browser.display.screen_resolution" );
if( prefvalue != "!/!ERROR_UNDEFINED_PREF!/!" )
resolution = prefvalue;
else
resolution = 96; // If it all goes horribly wrong, fall back on 96.
}
setResolution( resolution );
if ( parent.hPrefWindow.getPrefIsLocked( "browser.display.screen_resolution" ) ) {
screenResolution.disabled = true;
}
var useDocFontsCheckbox = document.getElementById( "browserUseDocumentFonts" );
if( "useDocFonts" in aDataObject && aDataObject.useDocFonts != undefined )
useDocFontsCheckbox.checked = aDataObject.useDocFonts ? true : false;
else
{
prefvalue = parent.hPrefWindow.getPref( "int", "browser.display.use_document_fonts" );
if( prefvalue != "!/!ERROR_UNDEFINED_PREF!/!" )
useDocFontsCheckbox.checked = prefvalue ? true : false ;
}
if ( parent.hPrefWindow.getPrefIsLocked( "browser.display.use_document_fonts" ) ) {
useDocFontsCheckbox.disabled = true;
}
}
function Startup()
{
variableSize = document.getElementById( "sizeVar" );
fixedSize = document.getElementById( "sizeMono" );
minSize = document.getElementById( "minSize" );
languageList = document.getElementById( "selectLangs" );
gPrefutilitiesBundle = document.getElementById("bundle_prefutilities");
// register our ok callback function
parent.hPrefWindow.registerOKCallbackFunc( saveFontPrefs );
// eventually we should detect the default language and select it by default
selectLanguage();
// Allow user to ask the OS for a DPI if we are under X or OS/2
if ((navigator.appVersion.indexOf("X11") != -1) || (navigator.appVersion.indexOf("OS/2") != -1))
{
document.getElementById( "systemResolution" ).removeAttribute( "hidden" );
}
// Set up the labels for the standard issue resolutions
var resolution;
resolution = document.getElementById( "screenResolution" );
// Set an attribute on the selected resolution item so we can fall back on
// it if an invalid selection is made (select "Other...", hit Cancel)
resolution.selectedItem.setAttribute("current", "true");
var defaultResolution;
var otherResolution;
// On OS/2, 120 is the default system resolution.
// 96 is valid, but used only for for 640x480.
if (navigator.appVersion.indexOf("OS/2") != -1)
{
defaultResolution = "120";
otherResolution = "96";
} else {
defaultResolution = "96";
otherResolution = "72";
}
var dpi = resolution.getAttribute( "dpi" );
resolution = document.getElementById( "defaultResolution" );
resolution.setAttribute( "value", defaultResolution );
resolution.setAttribute( "label", dpi.replace(/\$val/, defaultResolution ) );
resolution = document.getElementById( "otherResolution" );
resolution.setAttribute( "value", otherResolution );
resolution.setAttribute( "label", dpi.replace(/\$val/, otherResolution ) );
// Get the pref and set up the dialog appropriately. Startup is called
// after SetFields so we can't rely on that call to do the business.
var prefvalue = parent.hPrefWindow.getPref( "int", "browser.display.screen_resolution" );
if( prefvalue != "!/!ERROR_UNDEFINED_PREF!/!" )
resolution = prefvalue;
else
resolution = 96; // If it all goes horribly wrong, fall back on 96.
setResolution( resolution );
// This prefstring is a contrived pref whose sole purpose is to lock some
// elements in this panel. The value of the pref is not used and does not matter.
if ( parent.hPrefWindow.getPrefIsLocked( "browser.display.languageList" ) ) {
disableAllFontElements();
}
}
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 );
},
appendString:
function ( aString )
{
var menuItemNode = document.createElement( "menuitem" );
if( menuItemNode )
{
menuItemNode.setAttribute( "label", aString );
this.listElement.firstChild.appendChild( menuItemNode );
}
},
appendFontNames:
function ( aDataObject )
{
var popupNode = document.createElement( "menupopup" );
var strDefaultFontFace = "";
var fontName;
while (aDataObject.hasMoreElements()) {
fontName = aDataObject.getNext();
fontName = fontName.QueryInterface(Components.interfaces.nsISupportsWString);
var fontNameStr = fontName.toString();
if (strDefaultFontFace == "")
strDefaultFontFace = fontNameStr;
var itemNode = document.createElement( "menuitem" );
itemNode.setAttribute( "value", fontNameStr );
itemNode.setAttribute( "label", fontNameStr );
popupNode.appendChild( itemNode );
}
if (strDefaultFontFace != "") {
this.listElement.removeAttribute( "disabled" );
} else {
this.listElement.setAttribute( "value", strDefaultFontFace );
this.listElement.setAttribute( "label",
gPrefutilitiesBundle.getString("nofontsforlang") );
this.listElement.setAttribute( "disabled", "true" );
}
this.listElement.appendChild( popupNode );
return strDefaultFontFace;
}
};
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://communicator/content/pref/pref-fonts.xul"] = GetFields();
}
// saving font prefs
var dataObject = parent.hPrefWindow.wsm.dataManager.pageData["chrome://communicator/content/pref/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 minSizePref = "font.minimum-size." + language;
var currVariableSize = 12, currFixedSize = 12, minSizeVal = 0;
try
{
currVariableSize = pref.GetIntPref( variableSizePref );
currFixedSize = pref.GetIntPref( fixedSizePref );
minSizeVal = pref.GetIntPref( minSizePref );
}
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 );
if ( minSizeVal != dataObject.languageData[language].minSize ) {
pref.SetIntPref ( minSizePref, dataObject.languageData[language].minSize );
}
}
// font scaling
var fontDPI = parseInt( dataObject.fontDPI );
var documentFonts = dataObject.useDocFonts;
var defaultFont = dataObject.defaultFont;
try
{
var currDPI = pref.GetIntPref( "browser.display.screen_resolution" );
var currFonts = pref.GetIntPref( "browser.display.use_document_fonts" );
var currDefault = pref.CopyUnicharPref( "font.default" );
}
catch(e)
{
}
if( currDPI != fontDPI )
pref.SetIntPref( "browser.display.screen_resolution", fontDPI );
if( currFonts != documentFonts )
pref.SetIntPref( "browser.display.use_document_fonts", documentFonts );
if( currDefault != defaultFont )
{
pref.SetUnicharPref( "font.default", defaultFont );
}
}
function saveState()
{
for( var i = 0; i < fontTypes.length; i++ )
{
// preliminary initialisation
if( currentLanguage && !( currentLanguage in languageData ) )
languageData[currentLanguage] = [];
if( currentLanguage && !( "types" in languageData[currentLanguage] ) )
languageData[currentLanguage].types = [];
// save data for the previous language
if( currentLanguage && currentLanguage in languageData &&
"types" in languageData[currentLanguage] )
languageData[currentLanguage].types[fontTypes[i]] = document.getElementById( fontTypes[i] ).value;
}
if( currentLanguage && currentLanguage in languageData &&
"types" in languageData[currentLanguage] )
{
languageData[currentLanguage].variableSize = parseInt( variableSize.value );
languageData[currentLanguage].fixedSize = parseInt( fixedSize.value );
languageData[currentLanguage].minSize = parseInt( minSize.value );
}
}
// Selects size (or the nearest entry that exists in the list)
// in the menulist minSize
function minSizeSelect(size)
{
var items = minSize.getElementsByAttribute( "value", size );
if (items.length > 0)
minSize.selectedItem = items[0];
else if (size < 6)
minSizeSelect(6);
else if (size > 24)
minSizeSelect(24);
else
minSizeSelect(size - 1);
}
function selectLanguage()
{
// save current state
saveState();
if( !currentLanguage )
currentLanguage = languageList.value;
for( var i = 0; i < fontTypes.length; i++ )
{
// build and populate the font list for the newly chosen font type
var fontEnumerator = fontList.availableFonts(languageList.value, fontTypes[i]);
var selectElement = new listElement( fontTypes[i] );
selectElement.clearList();
var strDefaultFontFace = selectElement.appendFontNames(fontEnumerator);
//the first font face name returned by the enumerator is our last resort
var defaultListSelection = selectElement.listElement.getElementsByAttribute( "value", strDefaultFontFace)[0];
var selectedItem;
//fall-back initialization values (first font face list entry)
defaultListSelection = strDefaultFontFace ? selectElement.listElement.getElementsByAttribute( "value", strDefaultFontFace)[0] : null;
if( languageList.value in languageData )
{
// data exists for this language, pre-select items based on this information
var dataElements = selectElement.listElement.getElementsByAttribute( "value", languageData[languageList.value].types[fontTypes[i]] );
selectedItem = dataElements.length ? dataElements[0] : defaultListSelection;
minSizeSelect(languageData[languageList.value].minSize);
if (strDefaultFontFace)
{
selectElement.listElement.selectedItem = selectedItem;
variableSize.removeAttribute("disabled");
fixedSize.removeAttribute("disabled");
minSize.removeAttribute("disabled");
variableSize.selectedItem = variableSize.getElementsByAttribute( "value", languageData[languageList.value].variableSize )[0];
fixedSize.selectedItem = fixedSize.getElementsByAttribute( "value", languageData[languageList.value].fixedSize )[0];
}
else
{
variableSize.setAttribute("disabled","true");
fixedSize.setAttribute("disabled","true");
minSize.setAttribute("disabled","true");
}
}
else
{
if (strDefaultFontFace) {
//initialze pref panel only if font faces are available for this language family
var selectVal;
try {
var fontPrefString = "font.name." + fontTypes[i] + "." + languageList.value;
selectVal = parent.hPrefWindow.pref.CopyUnicharPref( fontPrefString );
var dataEls = selectElement.listElement.getElementsByAttribute( "value", selectVal );
// we need to honor name-list in case name is unavailable
if (!dataEls.length) {
var fontListPrefString = "font.name-list." + fontTypes[i] + "." + languageList.value;
var nameList = parent.hPrefWindow.pref.CopyUnicharPref( fontListPrefString );
var fontNames = nameList.split(",");
var stripWhitespace = /^\s*(.*)\s*$/;
for (j = 0; j < fontNames.length; j++) {
selectVal = fontNames[j].replace(stripWhitespace, "$1");
dataEls = selectElement.listElement.getElementsByAttribute("value", selectVal);
if (dataEls.length)
break; // exit loop if we find one
}
}
selectedItem = dataEls.length ? dataEls[0] : defaultListSelection;
if (!dataEls.length)
selectedVal = strDefaultFontFace;
}
catch(e) {
//always initialize: fall-back to default values
selectVal = strDefaultFontFace;
selectedItem = defaultListSelection;
}
selectElement.listElement.selectedItem = selectedItem;
variableSize.removeAttribute("disabled");
fixedSize.removeAttribute("disabled");
minSize.removeAttribute("disabled");
try {
var variableSizePref = "font.size.variable." + languageList.value;
var fixedSizePref = "font.size.fixed." + languageList.value;
var sizeVarVal = parent.hPrefWindow.pref.GetIntPref( variableSizePref );
var sizeFixedVal = parent.hPrefWindow.pref.GetIntPref( fixedSizePref );
variableSize.selectedItem = variableSize.getElementsByAttribute( "value", sizeVarVal )[0];
fixedSize.selectedItem = fixedSize.getElementsByAttribute( "value", sizeFixedVal )[0];
}
catch(e) {
//font size lists can simply deafult to the first entry
}
var minSizeVal = 0;
try {
var minSizePref = "font.minimum-size." + languageList.value;
minSizeVal = pref.GetIntPref( minSizePref );
}
catch(e) {}
minSizeSelect( minSizeVal );
}
else
{
//disable otherwise
variableSize.setAttribute("disabled","true");
fixedSize.setAttribute("disabled","true");
minSize.setAttribute("disabled","true");
minSizeSelect(0);
}
}
}
currentLanguage = languageList.value;
}
function changeScreenResolution()
{
var screenResolution = document.getElementById("screenResolution");
var userResolution = document.getElementById("userResolution");
var previousSelection = screenResolution.getElementsByAttribute("current", "true")[0];
if (screenResolution.value == "other")
{
// If the user selects "Other..." we bring up the calibrate screen dialog
var rv = { newdpi : 0 };
var calscreen = window.openDialog("chrome://communicator/content/pref/pref-calibrate-screen.xul",
"_blank",
"modal,chrome,centerscreen,resizable=no,titlebar",
rv);
if (rv.newdpi != -1)
{
// They have entered values, and we have a DPI value back
var dpi = screenResolution.getAttribute( "dpi" );
setResolution ( rv.newdpi );
previousSelection.removeAttribute("current");
screenResolution.selectedItem.setAttribute("current", "true");
}
else
{
// They've cancelled. We can't leave "Other..." selected, so...
// we re-select the previously selected item.
screenResolution.selectedItem = previousSelection;
}
}
else if (!(screenResolution.value == userResolution.value))
{
// User has selected one of the hard-coded resolutions
userResolution.setAttribute("hidden", "true");
previousSelection.removeAttribute("current");
screenResolution.selectedItem.setAttribute("current", "true");
}
}
function setResolution( resolution )
{
// Given a number, if it's equal to a hard-coded resolution we use that,
// otherwise we set the userResolution field.
var screenResolution = document.getElementById( "screenResolution" );
var userResolution = document.getElementById( "userResolution" );
var items = screenResolution.getElementsByAttribute( "value", resolution );
if (items.length)
{
// If it's one of the hard-coded values, we'll select it directly
screenResolution.selectedItem = items[0];
userResolution.setAttribute( "hidden", "true" );
}
else
{
// Otherwise we need to set up the userResolution field
var dpi = screenResolution.getAttribute( "dpi" );
userResolution.setAttribute( "value", resolution );
userResolution.setAttribute( "label", dpi.replace(/\$val/, resolution) );
userResolution.removeAttribute( "hidden" );
screenResolution.selectedItem = userResolution;
}
}
// "Calibrate screen" dialog code
function Init()
{
sizeToContent();
doSetOKCancel(onOK, onCancel);
document.getElementById("horizSize").focus();
}
function onOK()
{
// Get value from the dialog to work out dpi
var horizSize = parseFloat(document.getElementById("horizSize").value);
var units = document.getElementById("units").value;
if (!horizSize || horizSize < 0)
{
// We can't calculate anything without a proper value
window.arguments[0].newdpi = -1;
return true;
}
// Convert centimetres to inches.
// The magic number is allowed because it's a fundamental constant :-)
if (units === "centimetres")
{
horizSize /= 2.54;
}
// These shouldn't change, but you can't be too careful.
var horizBarLengthPx = document.getElementById("horizRuler").boxObject.width;
var horizDPI = parseInt(horizBarLengthPx) / horizSize;
// Average the two <shrug>.
window.arguments[0].newdpi = Math.round(horizDPI);
return true;
}
function onCancel()
{
// We return -1 to show that no value has been given.
window.arguments[0].newdpi = -1;
return true;
}
// disable font items, but not the browserUseDocumentFonts checkbox nor the resolution
// menulist
function disableAllFontElements()
{
var doc_ids = [ "selectLangs", "proportionalFont",
"sizeVar", "serif", "sans-serif",
"cursive", "fantasy", "monospace",
"sizeMono", "minSize" ];
for (i=0; i<doc_ids.length; i++) {
element = document.getElementById( doc_ids[i] );
element.disabled = true;
}
}

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

@ -0,0 +1,289 @@
<?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/
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-2000 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s):
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-fonts.dtd" >
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://communicator/content/pref/pref-fonts.xul');"
headertitle="&lHeader;">
<stringbundle id="bundle_prefutilities"
src="chrome://communicator/locale/pref/prefutilities.properties"/>
<script type="application/x-javascript"
src="chrome://communicator/content/pref/pref-fonts.js"/>
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["selectLangs"];
]]>
</script>
<groupbox>
<caption>
<hbox align="center">
<label value="&language.label;"
accesskey="&language.accesskey;"
control="selectLangs"/>
</hbox>
<menulist id="selectLangs" oncommand="selectLanguage();"
preftype="localizedstring" prefstring="font.language.group"
wsm_attributes="value">
<menupopup>
<menuitem value="x-western" label="&font.langGroup.latin1;"/>
<menuitem value="x-central-euro" label="&font.langGroup.latin2;"/>
<menuitem value="ja" label="&font.langGroup.japanese;"/>
<menuitem value="zh-TW" label="&font.langGroup.trad-chinese;"/>
<menuitem value="zh-CN" label="&font.langGroup.simpl-chinese;"/>
<menuitem value="ko" label="&font.langGroup.korean;"/>
<menuitem value="x-cyrillic" label="&font.langGroup.cyrillic;"/>
<menuitem value="x-baltic" label="&font.langGroup.baltic;"/>
<menuitem value="el" label="&font.langGroup.el;"/>
<menuitem value="tr" label="&font.langGroup.turkish;"/>
<menuitem value="x-unicode" label="&font.langGroup.unicode;"/>
<menuitem value="x-user-def" label="&font.langGroup.user-def;"/>
<menuitem value="th" label="&font.langGroup.thai;"/>
<menuitem value="he" label="&font.langGroup.hebrew;"/>
<menuitem value="ar" label="&font.langGroup.arabic;"/>
</menupopup>
</menulist>
</caption>
<separator class="thin"/>
<grid>
<columns>
<column/>
<column flex="1"/>
<column/>
</columns>
<rows>
<row align="center">
<spacer/>
<hbox align="center">
<label value="&typefaces.label;"/>
</hbox>
<hbox align="center">
<label value="&sizes.label;"/>
</hbox>
</row>
<row>
<separator class="thin"/>
</row>
<row align="center">
<hbox align="center" pack="end">
<label value="&proportional.label;"
accesskey="&proportional.accesskey;"
control="proportionalFont"/>
</hbox>
<menulist id="proportionalFont" flex="1" style="width: 0px;"
preftype="string" prefstring="font.default">
<menupopup>
<menuitem value="serif"
label="&useDefaultFontSerif.label;"/>
<menuitem value="sans-serif"
label="&useDefaultFontSansSerif.label;"/>
</menupopup>
</menulist>
<menulist id="sizeVar" class="small-margin">
<menupopup>
<menuitem value="8" label="8"/>
<menuitem value="9" label="9"/>
<menuitem value="10" label="10"/>
<menuitem value="11" label="11"/>
<menuitem value="12" label="12"/>
<menuitem value="13" label="13"/>
<menuitem value="14" label="14"/>
<menuitem value="15" label="15"/>
<menuitem value="16" label="16"/>
<menuitem value="18" label="18"/>
<menuitem value="20" label="20"/>
<menuitem value="24" label="24"/>
<menuitem value="26" label="26"/>
<menuitem value="28" label="28"/>
<menuitem value="32" label="32"/>
<menuitem value="36" label="36"/>
<menuitem value="40" label="40"/>
<menuitem value="48" label="48"/>
<menuitem value="56" label="56"/>
<menuitem value="64" label="64"/>
<menuitem value="72" label="72"/>
</menupopup>
</menulist>
</row>
<row>
<separator class="thin"/>
</row>
<row align="center">
<hbox align="center" pack="end">
<label value="&serif.label;"
accesskey="&serif.accesskey;"
control="serif"/>
</hbox>
<menulist id="serif" flex="1" style="width: 0px;">
<menupopup/>
</menulist>
<spacer/>
</row>
<row align="center">
<hbox align="center" pack="end">
<label value="&sans-serif.label;"
accesskey="&sans-serif.accesskey;"
control="sans-serif"/>
</hbox>
<menulist id="sans-serif" flex="1" style="width: 0px;">
<menupopup/>
</menulist>
<spacer/>
</row>
<row align="center">
<hbox align="center" pack="end">
<label value="&cursive.label;"
accesskey="&cursive.accesskey;"
control="cursive"/>
</hbox>
<menulist id="cursive">
<menupopup/>
</menulist>
<spacer/>
</row>
<row align="center">
<hbox align="center" pack="end">
<label value="&fantasy.label;"
accesskey="&fantasy.accesskey;"
control="fantasy"/>
</hbox>
<menulist id="fantasy">
<menupopup/>
</menulist>
<spacer/>
</row>
<row align="center">
<hbox align="center" pack="end">
<label value="&monospace.label;"
accesskey="&monospace.accesskey;"
control="monospace"/>
</hbox>
<menulist id="monospace"
flex="1" style="width: 0px;" crop="right">
<menupopup/>
</menulist>
<menulist id="sizeMono">
<menupopup>
<menuitem value="8" label="8"/>
<menuitem value="9" label="9"/>
<menuitem value="10" label="10"/>
<menuitem value="11" label="11"/>
<menuitem value="12" label="12"/>
<menuitem value="13" label="13"/>
<menuitem value="14" label="14"/>
<menuitem value="15" label="15"/>
<menuitem value="16" label="16"/>
<menuitem value="18" label="18"/>
<menuitem value="20" label="20"/>
<menuitem value="24" label="24"/>
<menuitem value="26" label="26"/>
<menuitem value="28" label="28"/>
<menuitem value="32" label="32"/>
<menuitem value="36" label="36"/>
<menuitem value="40" label="40"/>
<menuitem value="48" label="48"/>
<menuitem value="56" label="56"/>
<menuitem value="64" label="64"/>
<menuitem value="72" label="72"/>
</menupopup>
</menulist>
</row>
<row>
<separator class="thin"/>
</row>
<row>
<spacer/>
<hbox align="center" pack="end">
<label value="&minSize.label;"
accesskey="&minSize.accesskey;"
control="minSize"/>
</hbox>
<menulist id="minSize">
<menupopup>
<menuitem value="0" label="&minSize.none;"/>
<menuitem value="6" label="6"/>
<menuitem value="7" label="7"/>
<menuitem value="8" label="8"/>
<menuitem value="9" label="9"/>
<menuitem value="10" label="10"/>
<menuitem value="11" label="11"/>
<menuitem value="12" label="12"/>
<menuitem value="13" label="13"/>
<menuitem value="14" label="14"/>
<menuitem value="15" label="15"/>
<menuitem value="16" label="16"/>
<menuitem value="18" label="18"/>
<menuitem value="20" label="20"/>
<menuitem value="22" label="22"/>
<menuitem value="24" label="24"/>
</menupopup>
</menulist>
</row>
</rows>
</grid>
</groupbox>
<separator class="thin"/>
<hbox align="center">
<!-- Unchecking this removes the ability to select dynamic fonts -->
<checkbox id="browserUseDocumentFonts"
label="&useDocumentFonts.label;"
accesskey="&useDocumentFonts.accesskey;"/>
</hbox>
<separator class="thin"/>
<hbox align="center">
<label value="&resolution.label;"
accesskey="&resolution.accesskey;"
control="screenResolution"/>
<menulist id="screenResolution"
oncommand="changeScreenResolution()"
dpi="&resolution.dpival;">
<menupopup>
<menuitem value=""
label="&resolution.dpival;"
id="otherResolution"/>
<menuitem value=""
label="&resolution.dpival;"
id="defaultResolution"/>
<menuitem value="0"
label="&resolution.system.label;"
id="systemResolution"
hidden="true"/>
<menuseparator/>
<menuitem id="userResolution" hidden="true"/>
<menuitem value="other" label="&resolution.other;"/>
</menupopup>
</menulist>
</hbox>
</page>

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

@ -0,0 +1,77 @@
// these are keys for resolving the preferences dialog subframe
// in terms of the context-sensitive help that should be loaded
// from the help button. The "mail_prefs_display" things given
// here represent (for the help window itself) the help content.
var fm = {
"chrome://communicator/content/pref/pref-appearance.xul": "appearance_pref",
"chrome://communicator/content/pref/pref-fonts.xul": "appearance_pref_fonts",
"chrome://communicator/content/pref/pref-colors.xul": "appearance_pref_colors",
"chrome://communicator/content/pref/pref-themes.xul": "appearance_pref_themes",
"chrome://content-packs/content/pref-contentpacks.xul": "appearance_pref_content_packs",
"chrome://communicator/content/pref/pref-navigator.xul": "navigator_pref_navigator",
"chrome://communicator/content/pref/pref-history.xul": "navigator_pref_history",
"chrome://communicator/content/pref/pref-languages.xul": "navigator_pref_languages",
"chrome://communicator/content/pref/pref-applications.xul": "navigator_pref_helper_applications",
"chrome://communicator/content/pref/pref-smart_browsing.xul": "navigator_pref_smart_browsing",
"chrome://communicator/content/pref/pref-search.xul": "navigator_pref_internet_searching",
"chrome://communicator/content/pref/pref-scripts.xul": "advanced_pref_scripts",
"chrome://messenger/content/pref-mailnews.xul": "mail_prefs_general",
"chrome://messenger/content/pref-viewing_messages.xul": "mail_prefs_display",
"chrome://messenger/content/messengercompose/pref-composing_messages.xul": "mail_prefs_messages",
"chrome://messenger/content/messengercompose/pref-formatting.xul": "mail_prefs_formatting",
"chrome://messenger/content/addressbook/pref-addressing.xul": "nav_view",
"chrome://messenger/content/pref-labels.xul": "mail-prefs-labels",
"chrome://messenger/content/pref-receipts.xul": "mail-prefs-receipts",
"chrome://editor/content/pref-composer.xul": "composer_prefs_general",
"chrome://editor/content/pref-editing.xul": "composer_prefs_newpage",
"chrome://messenger/content/pref-mailnews.xul": "mail_prefs_general",
"chrome://messenger/content/pref-viewing_messages.xul": "mail_prefs_display",
"chrome://messenger/content/messengercompose/pref-composing_messages.xul": "mail_prefs_messages",
"chrome://messenger/content/messengercompose/pref-formatting.xul": "mail_prefs_formatting",
"chrome://messenger/content/addressbook/pref-addressing.xul": "mail_prefs_addressing",
"chrome://communicator/content/pref/pref-offline.xul": "mail_prefs_offline",
"chrome://aim/content/pref-IM_instantmessage.xul": "im_prefs_general",
"chrome://aim/content/pref-IM_privacy.xul": "im_prefs_privacy",
"chrome://aim/content/pref-IM_notification.xul": "im_prefs_notification",
"chrome://aim/content/pref-IM_away.xul": "im_prefs_away",
"chrome://aim/content/pref-IM_connection.xul": "im_prefs_connection",
"chrome://aim/content/pref-IM_buddyicon.xul": "im_prefs_buddy_icons",
"chrome://aim/content/pref-IM_style.xul": "im_prefs_styles",
"chrome://aim/content/pref-Icq_icq.xul": "icq-prefs-gen",
"chrome://aim/content/pref-Icq_privacy.xul": "icq-prefs-privacy",
"chrome://aim/content/pref-Icq_notification.xul": "icq-prefs-notifs",
"chrome://aim/content/pref-Icq_away.xul": "icq_prefs_away",
"chrome://aim/content/pref-Icq_connection.xul": "icq_prefs_connect",
"chrome://communicator/content/pref/pref-security.xul": "sec_gen",
"chrome://cookie/content/pref-cookies.xul": "cookies_prefs",
"chrome://cookie/content/pref-images.xul": "images_prefs",
"chrome://wallet/content/pref-wallet.xul": "forms_prefs",
"chrome://pippki/content/pref-masterpass.xul": "passwords_master",
"chrome://wallet/content/pref-passwords.xul": "passwords_prefs",
"chrome://pippki/content/pref-ssl.xul": "ssl_prefs",
"chrome://pippki/content/pref-certs.xul": "certs_prefs",
"chrome://pippki/content/pref-validation.xul": "validation_prefs",
"chrome://communicator/content/pref/pref-advanced.xul": "advanced_pref_advanced",
"chrome://communicator/content/pref/pref-cache.xul": "advanced_pref_cache",
"chrome://communicator/content/pref/pref-debug.xul": "debug",
"chrome://communicator/content/pref/pref-debug1.xul": "debug_event",
"chrome://communicator/content/pref/pref-debug2.xul": "debug_network",
"chrome://communicator/content/pref/pref-http.xul": "advanced_http_networking",
"chrome://communicator/content/pref/pref-inspector.xul": "inspector",
"chrome://communicator/content/pref/pref-download.xul": "navigator_pref_downloads",
"chrome://communicator/content/pref/pref-mousewheel.xul": "advanced_pref_mouse_wheel",
"chrome://communicator/content/pref/pref-smartupdate.xul": "advanced_pref_installation",
"chrome://communicator/content/pref/pref-tabs.xul": "navigator_pref_tabbed_browsing",
"chrome://communicator/content/pref/pref-winhooks.xul": "advanced_pref_system",
"chrome://communicator/content/pref/pref-proxies.xul": "advanced_pref_proxies"
}
function doHelpButton() {
var subsrc = document.getElementById("panelFrame").getAttribute("src");
if ( fm[subsrc] ) {
openHelp(fm[subsrc]);
} else {
openHelp('prefs');
}
}

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

@ -0,0 +1,116 @@
<?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/
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):
Jason Eager <jce2@po.cwru.edu>
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-history.dtd" >
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://communicator/content/pref/pref-history.xul');"
headertitle="&lHeader;">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["histDay"];
function Startup()
{
var urlbarHistButton = document.getElementById("ClearUrlBarHistoryButton");
try {
var urlBarHist = Components.classes["@mozilla.org/browser/urlbarhistory;1"]
.getService(Components.interfaces.nsIUrlbarHistory);
var isBtnLocked = parent.hPrefWindow.getPrefIsLocked(urlbarHistButton.getAttribute("prefstring"));
var pref = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
var lastUrl = pref.getComplexValue("general.open_location.last_url",
Components.interfaces.nsISupportsWString).data;
urlbarHistButton.disabled = ( urlBarHist.count == 0 && !lastUrl ) || isBtnLocked ;
}
catch(ex) {
}
var globalHistButton = document.getElementById("browserClearHistory");
var globalHistory = Components.classes["@mozilla.org/browser/global-history;1"]
.getService(Components.interfaces.nsIBrowserHistory);
if (globalHistory.count == 0)
globalHistButton.disabled = true;
}
function prefClearGlobalHistory()
{
var globalHistory = Components.classes["@mozilla.org/browser/global-history;1"]
.getService(Components.interfaces.nsIBrowserHistory);
globalHistory.removeAllPages();
}
function prefClearUrlbarHistory()
{
var button = document.getElementById("ClearUrlBarHistoryButton");
var urlBarHistory = Components.classes["@mozilla.org/browser/urlbarhistory;1"]
.getService(Components.interfaces.nsIUrlbarHistory);
urlBarHistory.clearHistory();
var pref = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
var str = Components.classes["@mozilla.org/supports-wstring;1"]
.createInstance(Components.interfaces.nsISupportsWString);
str.data = "";
pref.setComplexValue("general.open_location.last_url",
Components.interfaces.nsISupportsWString,
str);
}
]]>
</script>
<groupbox>
<caption label="&header3.label;"/>
<description>&historyPages.label;</description>
<hbox align="center">
<label value="&pageHis.label;" accesskey="&pageHis.accesskey;" control="histDay"/>
<textbox id="histDay" size="3"
preftype="int" prefstring="browser.history_expire_days"/>
<label value="&days.label;"/>
<spacer flex="1"/>
<button label="&clearHistory.label;" accesskey="&clearHistory.accesskey;"
oncommand="prefClearGlobalHistory(); this.disabled = true;"
id="browserClearHistory"
prefstring="pref.browser.history.disable_button.clear_hist"/>
</hbox>
</groupbox>
<!-- no honey, I haven't been viewing porn, honest! -->
<groupbox>
<caption label="&locationBarHistory.label;"/>
<hbox align="center">
<description flex="1">&clearLocationBar.label;</description>
<hbox align="center" pack="end">
<button id="ClearUrlBarHistoryButton" label="&clearLocationBarButton.label;" accesskey="&clearLocationBarButton.accesskey;"
oncommand="prefClearUrlbarHistory(); this.disabled = true;"
prefstring="pref.browser.history.disable_button.clear_urlbar"/>
</hbox>
</hbox>
</groupbox>
</page>

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

@ -0,0 +1,63 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Ryan Cassin.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Ryan Cassin <rcassin@supernova.org>
* Kathleen Brade <brade@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
function checkPipelining()
{
try {
var enableHTTP11 = document.getElementById("httpVersion11");
var enableKeepAlive = document.getElementById("enableKeepAlive");
var enablePipelining = document.getElementById("enablePipelining");
var doDisable = !(enableHTTP11.selected && enableKeepAlive.checked);
enablePipelining.disabled = doDisable;
} catch(e) {}
}
function checkPipeliningProxy()
{
try {
var enableHTTP11 = document.getElementById("httpVersion11Proxy");
var enableKeepAlive = document.getElementById("enableKeepAliveProxy");
var enablePipelining = document.getElementById("enablePipeliningProxy");
var doDisable = !(enableHTTP11.selected && enableKeepAlive.checked);
enablePipelining.disabled = doDisable;
} catch(e) {}
}

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

@ -0,0 +1,113 @@
<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is mozilla.org code.
-
- The Initial Developer of the Original Code is
- Ryan Cassin.
- Portions created by the Initial Developer are Copyright (C) 2002
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Ryan Cassin <rcassin@supernova.org>
- Kathleen Brade <brade@netscape.com>
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the LGPL or the GPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-http.dtd" >
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://communicator/content/pref/pref-http.xul');checkPipelining();checkPipeliningProxy();"
headertitle="&lHeader;">
<script type="application/x-javascript"
src="chrome://communicator/content/pref/pref-http.js"/>
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["httpVersion", "enableKeepAlive", "enablePipelining",
"httpVersionProxy",
"enableKeepAliveProxy", "enablePipeliningProxy"];
]]>
</script>
<description>&prefPara;</description>
<hbox align="start">
<groupbox flex="1">
<caption label="&prefDirect.label;"/>
<vbox class="box-padded" align="start">
<radiogroup id="httpVersion"
preftype="string" prefstring="network.http.version"
oncommand="checkPipelining();">
<radio value="1.0" label="&prefEnableHTTP10.label;"
accesskey="&prefEnableHTTP10.accesskey;"/>
<radio value="1.1" label="&prefEnableHTTP11.label;"
accesskey="&prefEnableHTTP11.accesskey;" id="httpVersion11"/>
</radiogroup>
<separator/>
<checkbox id="enableKeepAlive" label="&prefEnableKeepAlive.label;"
accesskey="&prefEnableKeepAlive.accesskey;"
prefstring="network.http.keep-alive" oncommand="checkPipelining();"/>
<checkbox id="enablePipelining" label="&prefEnablePipelining.label;"
accesskey="prefEnablePipelining.accesskey;"
prefstring="network.http.pipelining"/>
</vbox>
</groupbox>
<groupbox flex="1">
<caption label="&prefProxy.label;"/>
<vbox class="box-padded" align="start">
<radiogroup id="httpVersionProxy"
preftype="string" prefstring="network.http.proxy.version"
oncommand="checkPipeliningProxy();">
<radio value="1.0" label="&prefEnableHTTP10.label;"
accesskey="&prefEnableHTTP10Proxy.accesskey;"/>
<radio value="1.1" label="&prefEnableHTTP11.label;"
accesskey="&prefEnableHTTP11Proxy.accesskey;" id="httpVersion11Proxy"/>
</radiogroup>
<separator/>
<checkbox id="enableKeepAliveProxy" label="&prefEnableKeepAlive.label;"
accesskey="&prefEnableKeepAliveProxy.accesskey;"
prefstring="network.http.proxy.keep-alive" oncommand="checkPipeliningProxy();"/>
<checkbox id="enablePipeliningProxy" label="&prefEnablePipelining.label;"
accesskey="&prefEnablePipeliningProxy.accesskey;"
prefstring="network.http.proxy.pipelining"/>
</vbox>
</groupbox>
</hbox>
<description>&prefPipeWarning;</description>
</page>

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

@ -0,0 +1,51 @@
<?xml version="1.0"?> <!-- -*- Mode: SGML; indent-tabs-mode: nil; -*- -->
<!--
The contents of this file are subject to the Netscape Public License
Version 1.1 (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) 1999 Netscape Communications Corporation. All Rights
Reserved.
Contributor(s):
Adrian Havill <havill@redhat.com>
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-languages.dtd" >
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&languages.customize.add.title.label;"
onload="Init();"
ondialogaccept="return AddAvailableLanguage();"
style="width: 25em;height: 25em;">
<script type="application/x-javascript" src="pref-languages.js"/>
<!-- XXX: Replace strres.js when pref-languages is converted -->
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
<description>&languages.customize.prefAddLangDescript;</description>
<separator class="thin"/>
<description>&languages.customize.available.label;</description>
<listbox id="available_languages" flex="1" seltype="multiple"
ondblclick="HandleDoubleClick(event.target)"/>
<hbox align="center">
<label value="&languages.customize.others.label;" control="languages.other"/>
<textbox id="languages.other" size="6" />
<label value="&languages.customize.others.examples;" control="languages.other"/>
</hbox>
</dialog>

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

@ -0,0 +1,578 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape Communications
* Corporation. Portions created by Netscape are
* Copyright (C) 2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Adrian Havill <havill@redhat.com>
*/
//GLOBALS
//locale bundles
var regionsBundle;
var languagesBundle;
var acceptedBundle;
var prefLangBundle;
//dictionary of all supported locales
var availLanguageDict;
//XUL listbox handles
var available_languages;
var active_languages;
//XUL window pref window interface object
var pref_string = new String();
//Reg expression for splitting multiple pref values
var separatorRe = /\s*,\s*/;
function GetBundles()
{
if (!regionsBundle) regionsBundle = srGetStrBundle("chrome://global/locale/regionNames.properties");
if (!languagesBundle) languagesBundle = srGetStrBundle("chrome://global/locale/languageNames.properties");
if (!prefLangBundle) prefLangBundle = srGetStrBundle("chrome://communicator/locale/pref/pref-languages.properties");
if (!acceptedBundle) acceptedBundle = srGetStrBundle("resource:/res/language.properties");
}
function Init()
{
try {
GetBundles();
}
catch(ex) {
}
ReadAvailableLanguages();
if (!("arguments" in window)) {
//no caller arguments - load base window
try {
active_languages = document.getElementById('active_languages');
} //try
catch(ex) {
} //catch
try {
parent.initPanel('chrome://communicator/content/pref/pref-languages.xul');
}
catch(ex) {
//pref service backup
} //catch
pref_string = active_languages.getAttribute("prefvalue");
LoadActiveLanguages();
SelectLanguage();
} else {
//load available languages popup
try {
//add language popup
available_languages = document.getElementById('available_languages');
active_languages = window.opener.document.getElementById('active_languages');
pref_string = window.opener.document.getElementById('intlAcceptLanguages').label;
} //try
catch(ex) {
} //catch
LoadAvailableLanguages();
}
}
function AddLanguage()
{
//cludge: make pref string available from the popup
document.getElementById('intlAcceptLanguages').label = pref_string;
window.openDialog("chrome://communicator/content/pref/pref-languages-add.xul","_blank","modal,chrome,centerscreen,resizable=yes,titlebar", "addlangwindow");
UpdateSavePrefString();
SelectLanguage();
}
function ReadAvailableLanguages()
{
availLanguageDict = new Array();
var visible = new String();
var str = new String();
var i =0;
var acceptedBundleEnum = acceptedBundle.getSimpleEnumeration();
var curItem;
var stringName;
var stringNameProperty;
while (acceptedBundleEnum.hasMoreElements()) {
//progress through the bundle
curItem = acceptedBundleEnum.getNext();
//"unpack" the item, nsIPropertyElement is now partially scriptable
curItem = curItem.QueryInterface(Components.interfaces.nsIPropertyElement);
//dump string name (key)
stringName = curItem.key;
stringNameProperty = stringName.split('.');
if (stringNameProperty[1] == 'accept') {
//dump the UI string (value)
visible = curItem.value;
//if (visible == 'true') {
str = stringNameProperty[0];
var stringLangRegion = stringNameProperty[0].split('-');
if (stringLangRegion[0]) {
var tit;
try {
tit = languagesBundle.GetStringFromName(stringLangRegion[0]);
}
catch (ex) {
tit = "";
}
if (stringLangRegion.length > 1) {
try {
tit += "/" + regionsBundle.GetStringFromName(stringLangRegion[1]);
}
catch (ex) {
tit += "["+str+"]";
}
} //if region
tit = tit + " [" + str + "]";
} //if language
if (str && tit) {
availLanguageDict[i] = new Array(3);
availLanguageDict[i][0] = tit;
availLanguageDict[i][1] = str;
availLanguageDict[i][2] = visible;
i++;
} // if str&tit
//} //if visible
} //if accepted
} //while
availLanguageDict.sort( // sort on first element
function (a, b) {
if (a[0] < b[0]) return -1;
if (a[0] > b[0]) return 1;
return 0;
});
}
function LoadAvailableLanguages()
{
if (availLanguageDict)
for (var i = 0; i < availLanguageDict.length; i++) {
if (availLanguageDict[i][2] == 'true') {
AddListItem(document, available_languages, availLanguageDict[i][1], availLanguageDict[i][0]);
} //if
} //for
}
function LoadActiveLanguages()
{
if (pref_string) {
var arrayOfPrefs = pref_string.split(separatorRe);
for (var i = 0; i < arrayOfPrefs.length; i++) {
var str = arrayOfPrefs[i];
var tit = GetLanguageTitle(str);
if (str) {
if (!tit)
tit = '[' + str + ']';
AddListItem(document, active_languages, str, tit);
} //if
} //for
}
}
function LangAlreadyActive(langId)
{
var found = false;
try {
var arrayOfPrefs = pref_string.split(separatorRe);
if (arrayOfPrefs)
for (var i = 0; i < arrayOfPrefs.length; i++) {
if (arrayOfPrefs[i] == langId) {
found = true;
break;
}
}
return found;
}
catch(ex){
return false;
}
}
function isAlpha(mixedCase) {
var allCaps = mixedCase.toUpperCase();
for (var i = allCaps.length - 1; i >= 0; i--) {
var c = allCaps.charAt(i);
if (c < 'A' || c > 'Z') return false;
}
return true;
}
function isAlphaNum(mixedCase) {
var allCaps = mixedCase.toUpperCase();
for (var i = allCaps.length - 1; i >= 0; i--) {
var c = allCaps.charAt(i);
if ((c < 'A' || c > 'Z') && (c < '0' || c > '9')) return false;
}
return true;
}
function IsRFC1766LangTag(candidate) {
/* Valid language codes examples:
i.e. ja-JP-kansai (Kansai dialect of Japanese)
en-US-texas (Texas dialect)
i-klingon-tng (did TOS Klingons speak in non-English?)
sgn-US-MA (Martha Vineyard's Sign Language)
*/
var tags = candidate.split('-');
/* if not IANA "i" or a private "x" extension, the primary
tag should be a ISO 639 country code, two or three letters long.
we don't check if the country code is bogus or not.
*/
var checkedTags = 0;
if (tags[0].toLowerCase() != "x" && tags[0].toLowerCase() != "i") {
if (tags[0].length != 2 && tags[0].length != 3) return false;
if (!isAlpha(tags[0])) return false;
checkedTags++;
/* the first subtag can be either a 2 letter ISO 3166 country code,
or an IANA registered tag from 3 to 8 characters.
*/
if (tags.length > 1) {
if (tags[1].length < 2 || tags[1].length > 3) return false;
if (!isAlphaNum(tags[1])) return false;
/* do not allow user-assigned ISO 3166 country codes */
if (tags[1].length == 2 && isAlpha(tags[1])) {
var countryCode = tags[1].toUpperCase();
if (countryCode == "AA" || countryCode == "ZZ") return false;
if (countryCode[0] == 'X') return false;
if (countryCode[0] == 'Q' && countryCode[1] > 'L') return false;
}
checkedTags++;
}
}
else if (tags.length < 2) return false;
else {
if ((tags[1].length < 1) || (tags[1].length > 8)) return false;
if (!isAlphaNum(tags[1])) return false;
checkedTags++;
}
/* any remaining subtags must be one to eight alphabetic characters */
for (var i = checkedTags; i < tags.length; i++) {
if ((tags[1].length < 1) || (tags[i].length > 8)) return false;
if (!isAlphaNum(tags[i])) return false;
checkedTags++;
}
return true;
}
function AddAvailableLanguage()
{
var Languagename = new String();
var Languageid = new String();
//selected languages
for (var nodeIndex=0; nodeIndex < available_languages.selectedItems.length; nodeIndex++) {
var selItem = available_languages.selectedItems[nodeIndex];
Languagename = selItem.getAttribute('label');
Languageid = selItem.getAttribute('id');
if (!LangAlreadyActive(Languageid)) {
AddListItem(window.opener.document, active_languages, Languageid, Languagename);
}//if
} //loop selected languages
//user-defined languages
var otherField = document.getElementById( "languages.other" );
if (otherField.value) {
/* reject bogus lang strings, INCLUDING those with HTTP "q"
values kludged on the end of them
*/
if (!IsRFC1766LangTag(otherField.value)) {
window.alert(prefLangBundle.GetStringFromName("illegalOtherLanguage"));
return false;
}
Languageid = otherField.value;
Languageid = Languageid.toLowerCase();
Languagename = GetLanguageTitle(Languageid);
if (!Languagename)
Languagename = '[' + Languageid + ']';
if (!LangAlreadyActive(Languageid)) {
AddListItem(window.opener.document, active_languages, Languageid, Languagename);
}//if
}
available_languages.clearSelection();
return true;
} //AddAvailableLanguage
function HandleDoubleClick(node)
{
var languageId = node.id;
var languageName = node.getAttribute('label');
if (languageName && languageName.length > 0)
{
if (!LangAlreadyActive(languageId)) {
AddListItem(window.opener.document, active_languages, languageId, languageName);
}
window.close();
}//if
} //HandleDoubleClick
function RemoveActiveLanguage()
{
var nextNode = null;
var numSelected = active_languages.selectedItems.length;
var deleted_all = false;
while (active_languages.selectedItems.length > 0) {
var selectedNode = active_languages.selectedItems[0];
nextNode = selectedNode.nextSibling;
if (!nextNode)
if (selectedNode.previousSibling)
nextNode = selectedNode.previousSibling;
active_languages.removeChild(selectedNode);
} //while
if (nextNode) {
active_languages.selectItem(nextNode)
} else {
//active_languages.clearSelection();
}
UpdateSavePrefString();
} //RemoveActiveLanguage
function GetLanguageTitle(id)
{
if (availLanguageDict)
for (var j = 0; j < availLanguageDict.length; j++) {
if ( availLanguageDict[j][1] == id) {
//title =
return availLanguageDict[j][0];
}
}
return '';
}
function AddListItem(doc, listbox, langID, langTitle)
{
try { //let's beef up our error handling for languages without label / title
// Create a listitem for the new Language
var item = doc.createElement('listitem');
// Copy over the attributes
item.setAttribute('label', langTitle);
item.setAttribute('id', langID);
listbox.appendChild(item);
} //try
catch (ex) {
} //catch
}
function UpdateSavePrefString()
{
var num_languages = 0;
pref_string = "";
for (var item = active_languages.firstChild; item != null; item = item.nextSibling) {
var languageid = item.getAttribute('id');
if (languageid.length > 1) {
num_languages++;
//separate >1 languages by commas
if (num_languages > 1) {
pref_string = pref_string + "," + " " + languageid;
} else {
pref_string = languageid;
} //if
} //if
}//for
active_languages.setAttribute("prefvalue", pref_string);
}
function MoveUp() {
if (active_languages.selectedItems.length == 1) {
var selected = active_languages.selectedItems[0];
var before = selected.previousSibling
if (before) {
before.parentNode.insertBefore(selected, before);
active_languages.selectItem(selected);
active_languages.ensureElementIsVisible(selected);
}
}
if (active_languages.selectedIndex == 0)
{
// selected item is first
var moveUp = document.getElementById("up");
moveUp.disabled = true;
}
if (active_languages.childNodes.length > 1)
{
// more than one item so we can move selected item back down
var moveDown = document.getElementById("down");
moveDown.disabled = false;
}
UpdateSavePrefString();
} //MoveUp
function MoveDown() {
if (active_languages.selectedItems.length == 1) {
var selected = active_languages.selectedItems[0];
if (selected.nextSibling) {
if (selected.nextSibling.nextSibling) {
active_languages.insertBefore(selected, selected.nextSibling.nextSibling);
}
else {
active_languages.appendChild(selected);
}
active_languages.selectItem(selected);
}
}
if (active_languages.selectedIndex == active_languages.childNodes.length - 1)
{
// selected item is last
var moveDown = document.getElementById("down");
moveDown.disabled = true;
}
if (active_languages.childNodes.length > 1)
{
// more than one item so we can move selected item back up
var moveUp = document.getElementById("up");
moveUp.disabled = false;
}
UpdateSavePrefString();
} //MoveDown
function SelectLanguage() {
if (active_languages.selectedItems.length) {
document.getElementById("remove").disabled = false;
var selected = active_languages.selectedItems[0];
document.getElementById("down").disabled = !selected.nextSibling;
document.getElementById("up").disabled = !selected.previousSibling;
}
else {
document.getElementById("remove").disabled = true;
document.getElementById("down").disabled = true;
document.getElementById("up").disabled = true;
}
if (parent.hPrefWindow.getPrefIsLocked(document.getElementById("up").getAttribute("prefstring")))
document.getElementById("up").disabled = true;
if (parent.hPrefWindow.getPrefIsLocked(document.getElementById("down").getAttribute("prefstring")))
document.getElementById("down").disabled = true;
if (parent.hPrefWindow.getPrefIsLocked(document.getElementById("add").getAttribute("prefstring")))
document.getElementById("add").disabled = true;
if (parent.hPrefWindow.getPrefIsLocked(document.getElementById("remove").getAttribute("prefstring")))
document.getElementById("remove").disabled = true;
} // SelectLanguage

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

@ -0,0 +1,90 @@
<?xml version="1.0"?> <!-- -*- Mode: SGML; indent-tabs-mode: nil; -*- -->
<!--
The contents of this file are subject to the Netscape Public License
Version 1.1 (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) 1999 Netscape Communications Corporation. All Rights
Reserved.
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-languages.dtd" >
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="Init();"
headertitle="&languages.customize.lHeader;">
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-languages.js"/>
<!-- XXX: Replace strres.js when pref-languages.js is converted -->
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["active_languages", "DefaultCharsetList"];
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
observerService.notifyObservers(null, "charsetmenu-selected", "other");
]]>
</script>
<broadcaster id="intlAcceptLanguages"
value=""
preftype="localizedstring"
prefstring="intl.accept_languages"/>
<groupbox flex="1">
<caption label="&langtitle.label;"/>
<description>&languages.customize.prefLangDescript;</description>
<description>&languages.customize.active.label;</description>
<hbox flex="1">
<listbox id="active_languages" flex="1" style="width: 0px; height: 0px;"
preftype="localizedstring" prefstring="intl.accept_languages" prefvalue="" prefattribute="prefvalue" wsm_attributes="prefvalue"
seltype="multiple" onselect="SelectLanguage();"/>
<vbox>
<button oncommand="MoveUp();" id="up" class="up" disabled="true"
label="&languages.customize.moveUp.label;"
accesskey="&languages.customize.moveUp.accesskey;"
prefstring="pref.browser.language.disable_button.up"/>
<button oncommand="MoveDown();" id="down" class="down" disabled="true"
label="&languages.customize.moveDown.label;"
accesskey="&languages.customize.moveDown.accesskey;"
prefstring="pref.browser.language.disable_button.down"/>
<spacer flex="1"/>
<button id="add"
label="&languages.customize.addButton.label;"
oncommand="AddLanguage();"
prefstring="pref.browser.language.disable_button.add"/>
<button id="remove" disabled="true"
label="&languages.customize.deleteButton.label;"
oncommand="RemoveActiveLanguage();"
prefstring="pref.browser.language.disable_button.remove"/>
</vbox>
</hbox>
</groupbox>
<groupbox align="start">
<caption label="&languages.customize.Charset.grouplabel;"/>
<label value="&languages.customize.DefaultCharset.label;" control="DefaultCharsetList"/>
<menulist id="DefaultCharsetList" ref="NC:DecodersRoot" datasources="rdf:charset-menu"
prefstring="intl.charset.default" preftype="localizedstring"
wsm_attributes="value">
<template>
<menupopup>
<menuitem label="rdf:http://home.netscape.com/NC-rdf#Name" value="..." uri="..."/>
</menupopup>
</template>
</menulist>
</groupbox>
</page>

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

@ -0,0 +1,195 @@
<?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/
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):
bryner@uiuc.edu
sspitzer@netscape.com
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE window [
<!ENTITY % platformDTD SYSTEM "chrome://global-platform/locale/platformDialogOverlay.dtd" >
%platformDTD;
<!ENTITY % prefMousewheelDTD SYSTEM "chrome://communicator/locale/pref/pref-mousewheel.dtd" >
%prefMousewheelDTD;
]>
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://communicator/content/pref/pref-mousewheel.xul');"
headertitle="&title.label;">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["mousewheelWithNoKeyAction", "mousewheelWithNoKeyNumlines", "mousewheelWithNoKeySysNumlines",
"mousewheelWithAltKeyAction", "mousewheelWithAltKeyNumlines", "mousewheelWithAltKeySysNumlines",
"mousewheelWithCtrlKeyAction", "mousewheelWithCtrlKeyNumlines", "mousewheelWithCtrlKeySysNumlines",
"mousewheelWithShiftKeyAction", "mousewheelWithShiftKeyNumlines", "mousewheelWithShiftKeySysNumlines"];
function switchPage( aElement )
{
var deck = document.getElementById( "modifierDeck" );
deck.setAttribute( "selectedIndex", aElement.selectedItem.value );
}
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] );
}
}
function enableField(aCheckbox, aNodeID)
{
var el = document.getElementById(aNodeID);
if (aCheckbox.checked)
el.setAttribute("disabled", "true");
else
el.removeAttribute("disabled");
}
]]>
</script>
<hbox align="center">
<label value="&mouseWheelPanel.label;" accesskey="&mouseWheelPanel.accesskey;"
control="mouseWheelMode"/>
</hbox>
<separator class="thin"/>
<groupbox>
<caption>
<hbox>
<menulist id="mouseWheelMode" oncommand="switchPage(this);"
preftype="bool" prefstring="pref.mousewheel.disable_button.modifier" prefattribute="disabled">
<menupopup>
<menuitem value="0" label="&usingJustTheWheel.label;"/>
<menuitem value="1" label="&usingWheelAndAlt.label;"/>
<menuitem value="2" label="&usingWheelAndCtrl.label;"/>
<menuitem value="3" label="&usingWheelAndShft.label;"/>
</menupopup>
</menulist>
</hbox>
</caption>
<deck id="modifierDeck" class="indent">
<!-- no key modifiers -->
<radiogroup id="mousewheelWithNoKeyAction"
prefstring="mousewheel.withnokey.action">
<hbox align="start">
<radio value="0" label="&scroll.label;" accesskey="&scroll.accesskey;"/>
<vbox align="start">
<hbox align="center">
<textbox id="mousewheelWithNoKeyNumlines" size="3"
preftype="int" prefstring="mousewheel.withnokey.numlines"
prefattribute="value"/>
<label value="&scrollLines.label;"/>
</hbox>
<checkbox id="mousewheelWithNoKeySysNumlines" label="&useSystemDefault.label;" accesskey="&useSystemDefault.accesskey;"
prefstring="mousewheel.withnokey.sysnumlines"
oncommand="enableField(this, 'mousewheelWithNoKeyNumlines');"/>
</vbox>
</hbox>
<radio value="1" label="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
<radio value="2" label="&history.label;" accesskey="&history.accesskey;"/>
<radio value="3" label="&textsize.label;" accesskey="&textsize.accesskey;"/>
</radiogroup>
<!-- alt modifiers -->
<radiogroup id="mousewheelWithAltKeyAction"
prefstring="mousewheel.withaltkey.action">
<hbox align="start">
<radio value="0" label="&scroll.label;" accesskey="&scroll.accesskey;"/>
<vbox align="start">
<hbox align="center">
<textbox id="mousewheelWithAltKeyNumlines" size="3"
preftype="int" prefstring="mousewheel.withaltkey.numlines"/>
<label value="&scrollLines.label;"/>
</hbox>
<checkbox id="mousewheelWithAltKeySysNumlines" label="&useSystemDefault.label;" accesskey="&useSystemDefault.accesskey;"
prefstring="mousewheel.withaltkey.sysnumlines"
oncommand="enableField(this, 'mousewheelWithAltKeyNumlines');"/>
</vbox>
</hbox>
<radio value="1" label="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
<radio value="2" label="&history.label;" accesskey="&history.accesskey;"/>
<radio value="3" label="&textsize.label;" accesskey="&textsize.accesskey;"/>
</radiogroup>
<!-- ctrl modifiers -->
<radiogroup id="mousewheelWithCtrlKeyAction"
prefstring="mousewheel.withcontrolkey.action" >
<hbox align="start">
<radio value="0" label="&scroll.label;" accesskey="&scroll.accesskey;"/>
<vbox align="start">
<hbox align="center">
<textbox id="mousewheelWithCtrlKeyNumlines" size="3"
preftype="int" prefstring="mousewheel.withcontrolkey.numlines"/>
<label value="&scrollLines.label;"/>
</hbox>
<checkbox id="mousewheelWithCtrlKeySysNumlines" label="&useSystemDefault.label;" accesskey="&useSystemDefault.accesskey;"
prefstring="mousewheel.withcontrolkey.sysnumlines"
oncommand="enableField(this, 'mousewheelWithCtrlKeyNumlines');"/>
</vbox>
</hbox>
<radio value="1" label="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
<radio value="2" label="&history.label;" accesskey="&history.accesskey;"/>
<radio value="3" label="&textsize.label;" accesskey="&textsize.accesskey;"/>
</radiogroup>
<!-- shift modifiers -->
<radiogroup id="mousewheelWithShiftKeyAction" prefstring="mousewheel.withshiftkey.action">
<hbox align="start">
<radio value="0" label="&scroll.label;" accesskey="&scroll.accesskey;"/>
<vbox align="start">
<hbox align="center">
<textbox id="mousewheelWithShiftKeyNumlines" size="3"
preftype="int" prefstring="mousewheel.withshiftkey.numlines"/>
<label value="&scrollLines.label;"/>
</hbox>
<checkbox id="mousewheelWithShiftKeySysNumlines" label="&useSystemDefault.label;" accesskey="&useSystemDefault.accesskey;"
prefstring="mousewheel.withshiftkey.sysnumlines"
oncommand="enableField(this, 'mousewheelWithShiftKeyNumlines');"/>
</vbox>
</hbox>
<radio value="1" label="&scrollPgUpPgDn.label;" accesskey="&scrollPgUpPgDn.accesskey;"/>
<radio value="2" label="&history.label;" accesskey="&history.accesskey;"/>
<radio value="3" label="&textsize.label;" accesskey="&textsize.accesskey;"/>
</radiogroup>
</deck>
</groupbox>
</page>

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

@ -0,0 +1,60 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
*/
const nsIFilePicker = Components.interfaces.nsIFilePicker;
const nsIWindowMediator = Components.interfaces.nsIWindowMediator;
const nsIPrefService = Components.interfaces.nsIPrefService;
const nsIPrefLocalizedString = Components.interfaces.nsIPrefLocalizedString;
const FILEPICKER_CONTRACTID = "@mozilla.org/filepicker;1";
const WINDOWMEDIATOR_CONTRACTID = "@mozilla.org/appshell/window-mediator;1";
const PREFSERVICE_CONTRACTID = "@mozilla.org/preferences-service;1";
function selectFile()
{
var fp = Components.classes[FILEPICKER_CONTRACTID]
.createInstance(nsIFilePicker);
var prefutilitiesBundle = document.getElementById("bundle_prefutilities");
var title = prefutilitiesBundle.getString("choosehomepage");
fp.init(window, title, nsIFilePicker.modeOpen);
fp.appendFilters(nsIFilePicker.filterAll | nsIFilePicker.filterText |
nsIFilePicker.filterXML | nsIFilePicker.filterHTML |
nsIFilePicker.filterImages);
var ret = fp.show();
if (ret == nsIFilePicker.returnOK) {
var folderField = document.getElementById("browserStartupHomepage");
folderField.value = fp.fileURL.spec;
}
}
function setHomePageToCurrentPage()
{
var windowManager = Components.classes[WINDOWMEDIATOR_CONTRACTID]
.getService(nsIWindowMediator);
var browserWindow = windowManager.getMostRecentWindow("navigator:browser");
if (browserWindow) {
var browser = browserWindow.document.getElementById("content");
var url = browser.webNavigation.currentURI.spec;
if (url) {
var homePageField = document.getElementById("browserStartupHomepage");
homePageField.value = url;
}
}
}
function setHomePageToDefaultPage()
{
var prefService = Components.classes[PREFSERVICE_CONTRACTID]
.getService(nsIPrefService);
var pref = prefService.getDefaultBranch(null);
var url = pref.getComplexValue("browser.startup.homepage",
nsIPrefLocalizedString).data;
var homePageField = document.getElementById("browserStartupHomepage");
homePageField.value = url;
}

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

@ -0,0 +1,118 @@
<?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/
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"?>
<?xul-overlay href="chrome://communicator/content/communicatorOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/pref/platformPrefOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-navigator.dtd" >
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="pref-navigator"
onload="parent.initPanel('chrome://communicator/content/pref/pref-navigator.xul');"
headertitle="&lHeader;">
<stringbundle id="bundle_prefutilities" src="chrome://communicator/locale/pref/prefutilities.properties"/>
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-navigator.js"/>
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["startupPage", "browserStartupHomepage",
"bookmarksButton", "goButton",
"homeButton", "printButton",
"searchButton"];
]]>
</script>
<hbox id="pref-nav-platform-extensions">
<!-- navigator starts with -->
<groupbox flex="1">
<caption label="&navRadio;"/>
<radiogroup id="startupPage" prefstring="browser.startup.page">
<radio value="0" label="&blankPageRadio.label;" accesskey="&blankPageRadio.accesskey;"/>
<radio value="1" label="&homePageRadio.label;" accesskey="&homePageRadio.accesskey;"/>
<radio value="2" label="&lastPageRadio.label;" accesskey="&lastPageRadio.accesskey;"/>
</radiogroup>
</groupbox>
</hbox>
<!-- homepage specification -->
<groupbox>
<caption label="&header2.label;"/>
<vbox flex="1">
<description>&homePageIntro.label;</description>
<hbox align="center">
<label value="&location.label;" accesskey="&location.accesskey;" control="browserStartupHomepage"/>
<textbox id="browserStartupHomepage" type="autocomplete" flex="1"
searchSessions="history" timeout="50" maxrows="6" preftype="localizedstring"
prefstring="browser.startup.homepage"/> <!-- we may wish to change this to data
when we support fancy formatted local filenames -->
</hbox>
<hbox align="center" pack="end">
<button label="&useCurrent.label;" accesskey="&useCurrent.accesskey;"
oncommand="setHomePageToCurrentPage();"
id="browserUseCurrent"
prefstring="pref.browser.homepage.disable_button.current_page"/>
<button label="&browseFile.label;" accesskey="&browseFile.accesskey;"
oncommand="selectFile();"
id="browserChooseFile"
prefstring="pref.browser.homepage.disable_button.select_file"/>
<button label="&useDefault.label;" accesskey="&useDefault.accesskey;"
oncommand="setHomePageToDefaultPage();"
id="browserUseDefault"
prefstring="pref.browser.homepage.disable_button.default_page"/>
</hbox>
</vbox>
</groupbox>
<!-- toolbar buttons customization -->
<groupbox flex="1" id="prefShowButtons" orient="horizontal">
<caption label="&toolbarIntro.label;"/>
<vbox id="prefShowButtonsBox1">
<checkbox id="bookmarksButton"
label="&bookmarksButton.label;"
prefstring="browser.toolbars.showbutton.bookmarks"/>
<checkbox id="goButton"
label="&goButton.label;"
prefstring="browser.toolbars.showbutton.go"/>
<checkbox id="homeButton"
label="&homeButton.label;"
prefstring="browser.toolbars.showbutton.home"/>
</vbox>
<vbox id="prefShowButtonsbox">
<checkbox id="searchButton"
label="&searchButton.label;"
prefstring="browser.toolbars.showbutton.search"/>
<checkbox id="printButton"
label="&printButton.label;"
prefstring="browser.toolbars.showbutton.print"/>
</vbox>
<vbox id="prefShowButtonBox">
</vbox>
</groupbox>
</page>

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

@ -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/
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): Mohan Bhamidipati (mohanb@netscape.com)
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
%brandDTD;
<!ENTITY % offlineDTD SYSTEM "chrome://communicator/locale/pref/pref-offline.dtd" >
%offlineDTD;
]>
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://communicator/content/pref/pref-offline.xul');"
headertitle="&boxHeader;">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["offlineStartupstate", "whengoingOnlinestate", "whengoingOfflinestate", "offlineCompactFolder", "offlineCompactFolderMin"];
]]>
function Startup()
{
var aCheckbox = document.getElementById("offlineCompactFolder");
enableField(aCheckbox, "offlineCompactFolderMin");
}
function enableField(aCheckbox, aNodeID)
{
var aField = document.getElementById(aNodeID);
if (aCheckbox.checked)
aField.removeAttribute("disabled");
else
aField.setAttribute("disabled", "true");
}
</script>
<groupbox>
<caption label="&rHeader;"/>
<!-- uncomment when 82487 is fixed -->
<!-- <label value="&textStart;"/>
<radiogroup id="offlineStartupstate"
prefstring="offline.startup_state">
<radio value="0" label="&radioAskMode;"/>
<radio value="1" label="&radioUsePrev;"/>
</radiogroup> -->
<separator class="thin"/>
<label value="&textGoingOnline;"/>
<radiogroup id="whengoingOnlinestate"
prefstring="offline.send.unsent_messages">
<radio value="0" label="&radioAskUnsent;"/>
<radio value="1" label="&radioAutoSend;"/>
<radio value="2" label="&radioNotSend;"/>
</radiogroup>
<separator class="thin"/>
<label value="&textGoingOffline;"/>
<radiogroup id="whengoingOfflinestate"
prefstring="offline.download.download_messages">
<radio value="0" label="&radioAskDownload;"/>
<radio value="1" label="&radioAutoDownload;"/>
<radio value="2" label="&radioNotDownload;"/>
</radiogroup>
</groupbox>
<groupbox>
<caption label="&Diskspace;"/>
<hbox align="center">
<checkbox id="offlineCompactFolder" label="&offlineCompact.label;" accesskey="&offlineCompact.accesskey;"
prefstring="mail.prompt_purge_threshhold"
oncommand="enableField(this,'offlineCompactFolderMin');"/>
<textbox id="offlineCompactFolderMin" size="5" value="100"
preftype="int" prefstring="mail.purge_threshhold"/>
<label value="&kb.label;"/>
</hbox>
</groupbox>
</page>

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

@ -0,0 +1,76 @@
<?xml version="1.0"?> <?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
%brandDTD;
<!ENTITY % policiesDTD SYSTEM "chrome://communicator/locale/pref/pref-policies.dtd" >
%policiesDTD;
]>
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://communicator/content/pref/pref-policies.xul');"
headertitle="&lHeader;">
<groupbox>
<description>&zoneIntro.label;</description>
<label value="&policies.label;"/>
<hbox>
<tree id="zones" flex="1">
<treecols>
<treecol flex="1"/>
</treecols>
<treechildren id="zoneChildren" flex="1">
<treeitem open="true">
<treerow>
<treecell label="&default.label;"/>
</treerow>
<treechildren id="defaultChildren">
<treeitem>
<treerow>
<treecell indent="true" label="&allWebsites.label;"/>
</treerow>
</treeitem>
</treechildren>
</treeitem>
<treeitem open="true">
<treerow>
<treecell label="&trusted.label;"/>
</treerow>
<treechildren id="trustedChildren"/>
</treeitem>
<treeitem open="true">
<treerow>
<treecell label="&annoyances.label;"/>
</treerow>
</treeitem>
<treeitem open="true">
<treerow>
<treecell label="&restricted.label;"/>
</treerow>
</treeitem>
</treechildren>
</tree>
<vbox>
<button label="&addSite.label;" accesskey="&addSite.accesskey;"
oncommand="addSite();"/>
<spacer flex="1"/>
</vbox>
</hbox>
<label class="header" value="&description.label;"/>
<hbox class="indent">
<description id="description"></description>
</hbox>
<hbox align="center">
<button label="&settings.label;" accesskey="&settings.accesskey;"
oncommand="settings();"/>
</hbox>
</groupbox>
</page>

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

@ -0,0 +1,67 @@
function Startup()
{
DoEnabling();
}
function DoEnabling()
{
var i;
var ftp = document.getElementById("networkProxyFTP");
var ftpPort = document.getElementById("networkProxyFTP_Port");
var gopher = document.getElementById("networkProxyGopher");
var gopherPort = document.getElementById("networkProxyGopher_Port");
var http = document.getElementById("networkProxyHTTP");
var httpPort = document.getElementById("networkProxyHTTP_Port");
var socks = document.getElementById("networkProxySOCKS");
var socksPort = document.getElementById("networkProxySOCKS_Port");
var socksVersion = document.getElementById("networkProxySOCKSVersion");
var socksVersion4 = document.getElementById("networkProxySOCKSVersion4");
var socksVersion5 = document.getElementById("networkProxySOCKSVersion5");
var ssl = document.getElementById("networkProxySSL");
var sslPort = document.getElementById("networkProxySSL_Port");
var noProxy = document.getElementById("networkProxyNone");
var autoURL = document.getElementById("networkProxyAutoconfigURL");
var autoReload = document.getElementById("autoReload");
// convenience arrays
var manual = [ftp, ftpPort, gopher, gopherPort, http, httpPort, socks, socksPort, socksVersion, socksVersion4, socksVersion5, ssl, sslPort, noProxy];
var auto = [autoURL, autoReload];
// radio buttons
var radiogroup = document.getElementById("networkProxyType");
switch ( radiogroup.value ) {
case "0":
for (i = 0; i < manual.length; i++)
manual[i].setAttribute( "disabled", "true" );
for (i = 0; i < auto.length; i++)
auto[i].setAttribute( "disabled", "true" );
break;
case "1":
for (i = 0; i < auto.length; i++)
auto[i].setAttribute( "disabled", "true" );
if (!radiogroup.disabled)
for (i = 0; i < manual.length; i++)
manual[i].removeAttribute( "disabled" );
break;
case "2":
default:
for (i = 0; i < manual.length; i++)
manual[i].setAttribute( "disabled", "true" );
if (!radiogroup.disabled)
for (i = 0; i < auto.length; i++)
auto[i].removeAttribute( "disabled" );
break;
}
}
const nsIProtocolProxyService = Components.interfaces.nsIProtocolProxyService;
const kPROTPROX_CID = '{e9b301c0-e0e4-11D3-a1a8-0050041caf44}';
function ReloadPAC() {
var autoURL = document.getElementById("networkProxyAutoconfigURL");
var pps = Components.classesByID[kPROTPROX_CID]
.getService(nsIProtocolProxyService);
pps.configureFromPAC(autoURL.value);
}

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

@ -0,0 +1,157 @@
<?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/
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):
Jason Eager <jce2@po.cwru.edu>
-Added a syntax example for the "no proxy" field.
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-proxies.dtd" >
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://communicator/content/pref/pref-proxies.xul');"
headertitle="&lHeader;">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["networkProxyType",
"networkProxyFTP", "networkProxyFTP_Port",
"networkProxyGopher", "networkProxyGopher_Port",
"networkProxyHTTP", "networkProxyHTTP_Port",
"networkProxySOCKS", "networkProxySOCKS_Port",
"networkProxySOCKSVersion",
"networkProxySSL", "networkProxySSL_Port",
"networkProxyNone", "networkProxyAutoconfigURL"];
]]>
</script>
<stringbundle id="bundle_prefutilities"
src="chrome://pref/locale/prefutilities.properties"/>
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-proxies.js"/>
<groupbox flex="1">
<caption label="&proxyTitle.label;"/>
<radiogroup id="networkProxyType" prefstring="network.proxy.type" align="stretch">
<radio value="0" label="&directTypeRadio.label;" accesskey="&directTypeRadio.accesskey;" oncommand="DoEnabling();"/>
<radio value="1" label="&manualTypeRadio.label;" accesskey="&manualTypeRadio.accesskey;" oncommand="DoEnabling();"/>
<grid class="indent" flex="1">
<columns>
<column/>
<column flex="1"/>
</columns>
<rows>
<row align="center">
<hbox align="center" pack="end">
<label value="&http.label;" accesskey="&http.accesskey;" control="networkProxyHTTP"/>
</hbox>
<hbox align="center">
<textbox id="networkProxyHTTP" preftype="string" prefstring="network.proxy.http"
flex="1"/>
<label value="&port.label;" accesskey="&HTTPport.accesskey;" control="networkProxyHTTP_Port"/>
<textbox id="networkProxyHTTP_Port" preftype="int" prefstring="network.proxy.http_port"
size="5"/>
</hbox>
</row>
<row align="center">
<hbox align="center" pack="end">
<label value="&ssl.label;" accesskey="&ssl.accesskey;" control="networkProxySSL"/>
</hbox>
<hbox align="center">
<textbox id="networkProxySSL" preftype="string" prefstring="network.proxy.ssl"
flex="1"/>
<label value="&port.label;" accesskey="&SSLport.accesskey;" control="networkProxySSL_Port"/>
<textbox id="networkProxySSL_Port" preftype="int" prefstring="network.proxy.ssl_port"
size="5"/>
</hbox>
</row>
<row align="center">
<hbox align="center" pack="end">
<label value="&ftp.label;" accesskey="&ftp.accesskey;" control="networkProxyFTP"/>
</hbox>
<hbox align="center">
<textbox id="networkProxyFTP" preftype="string" prefstring="network.proxy.ftp"
flex="1"/>
<label value="&port.label;" accesskey="&FTPport.accesskey;" control="networkProxyFTP_Port"/>
<textbox id="networkProxyFTP_Port" preftype="int" prefstring="network.proxy.ftp_port"
size="5"/>
</hbox>
</row>
<row align="center">
<hbox align="center" pack="end">
<label value="&gopher.label;" accesskey="&gopher.accesskey;" control="networkProxyGopher"/>
</hbox>
<hbox align="center">
<textbox id="networkProxyGopher" preftype="string" prefstring="network.proxy.gopher"
flex="1"/>
<!-- gopher port doesn't have an accesskey because the window needs a redesign - bbaetz -->
<label value="&port.label;" accesskey="&gopherPort.accesskey;" control="networkProxyGopher_Port"/>
<textbox id="networkProxyGopher_Port" preftype="int" prefstring="network.proxy.gopher_port"
prefattribute="value" size="5"/>
</hbox>
</row>
<row align="center">
<hbox align="center" pack="end">
<label value="&socks.label;" accesskey="&socks.accesskey;" control="networkProxySOCKS"/>
</hbox>
<hbox align="center">
<textbox id="networkProxySOCKS" preftype="string" prefstring="network.proxy.socks"
flex="1"/>
<label value="&port.label;" accesskey="&SOCKSport.accesskey;" control="networkProxySOCKS_Port"/>
<textbox id="networkProxySOCKS_Port" preftype="int" prefstring="network.proxy.socks_port"
size="5"/>
</hbox>
</row>
<row>
<spacer/>
<radiogroup id="networkProxySOCKSVersion" orient="horizontal"
prefstring="network.proxy.socks_version">
<radio id="networkProxySOCKSVersion4" value="4" label="&socks4.label;" accesskey="&socks4.accesskey;" />
<radio id="networkProxySOCKSVersion5" value="5" label="&socks5.label;" accesskey="&socks5.accesskey;" />
</radiogroup>
</row>
<row align="center">
<hbox align="center" pack="end">
<label value="&noproxy.label;" accesskey="&noproxy.accesskey;" control="networkProxyNone"/>
</hbox>
<textbox id="networkProxyNone" preftype="string" prefstring="network.proxy.no_proxies_on"/>
</row>
<row>
<spacer/>
<label value="&noproxyExplain.label;" control="networkProxyNone"/>
</row>
</rows>
</grid>
<radio value="2" label="&autoTypeRadio.label;" accesskey="&autoTypeRadio.accesskey;" oncommand="DoEnabling();"/>
<hbox class="indent" flex="1" align="center">
<textbox id="networkProxyAutoconfigURL" flex="1"
preftype="string" prefstring="network.proxy.autoconfig_url"/>
<button id="autoReload" label="&reload.label;" accesskey="&reload.accesskey;"
oncommand="ReloadPAC();"
prefstring="pref.advanced.proxies.disable_button.reload"/>
</hbox>
</radiogroup>
</groupbox>
</page>

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

@ -0,0 +1,130 @@
<?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/
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"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
%brandDTD;
<!ENTITY % proxyDTD SYSTEM "chrome://communicator/locale/pref/pref-proxy-manual.dtd" >
%proxyDTD;
]>
<window xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&window.title;"
class="dialog"
onload="if( parent.handle ) parent.handle.onpageload( 'pref-proxy-manual' ); else parent.queuedTag = 'pref-proxy-manual';">
<keyset id="dialogKeys"/>
<html:div flex="100%">
<vbox>
<hbox>
<html:div>
&intro.label;
</html:div>
</hbox>
<hbox>
<html:div>
&ftp.label;
</html:div>
<html:input name="ftpproxy" type="text" id="networkProxyHTTP"
pref="true" preftype="string" prefstring="network.proxy.http" size="30"/>
<spacer flex="100%"/>
<html:div>
&port.label;
</html:div>
<html:input name="ftpproxyport" type="text" id="networkProxyHTTPPort"
pref="true" preftype="string" prefstring="network.proxy.http_port" size="5"/>
</hbox>
<hbox>
<html:div>
&gopher.label;
</html:div>
<html:input name="gopherproxy" type="text" id="networkProxyGopher"
pref="true" preftype="string" prefstring="network.proxy.gopher" size="30"/>
<spacer flex="100%"/>
<html:div>
&port.label;
</html:div>
<html:input name="gopherproxyport" type="text" id="networkProxyGopherPort"
pref="true" preftype="string" prefstring="network.proxy.gopher_port" size="5"/>
</hbox>
<hbox>
<html:div>
&http.label;
</html:div>
<html:input name="httpproxy" type="text" id="networkProxyHTTP"
pref="true" preftype="string" prefstring="network.proxy.http" size="30"/>
<spacer flex="100%"/>
<html:div>
&port.label;
</html:div>
<html:input name="httpproxyport" type="text" id="networkProxyHTTPPort"
pref="true" preftype="string" prefstring="network.proxy.http_port" size="5"/>
</hbox>
<hbox>
<html:div>
&wais.label;
</html:div>
<html:input name="waisproxy" type="text" id="networkProxyWAIS"
pref="true" preftype="string" prefstring="network.proxy.wais" size="30"/>
<spacer flex="100%"/>
<html:div>
&port.label;
</html:div>
<html:input name="waisproxyport" type="text" id="networkProxyWAISPort"
pref="true" preftype="string" prefstring="network.proxy.wais_port" size="5"/>
</hbox>
<hbox>
<html:div>
&direct.label;
</html:div>
</hbox>
<hbox>
<html:div>
&noproxy.label;
</html:div>
<html:input name="noproxy" type="text" id="networProxyNone"
pref="true" preftype="string" prefstring="network.proxy.none" size="60"/>
</hbox>
<hbox>
<html:div>
&sockhost.label;
</html:div>
<html:input name="sockshost" type="text" id="networkSocksHost"
pref="true" preftype="string" prefstring="network.socks.host" size="30"/>
<spacer flex="100%"/>
<html:div>
&port.label;
</html:div>
<html:input name="socksport" type="text" id="networkSocksPort"
pref="true" preftype="string" prefstring="network.socks.port" size="5"/>
</hbox>
<hbox id="okCancelButtons"/>
</vbox>
</html:div>
</window>

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

@ -0,0 +1,190 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla.org Code.
*
* The Initial Developer of the Original Code is
* Doron Rosenberg.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Jonas Jørgensen <jonasj@jonasj.dk>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
const pref = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPref);
// need it globally, but can only set it in startup()
var data;
function changeDisabledState(state){
//Set the states of the groupbox children state based on the "javascript enabled" checkbox value
document.getElementById("allowScripts").disabled = state;
document.getElementById("allowWindowMoveResize").disabled = state;
document.getElementById("allowWindowOpen").disabled = state;
document.getElementById("allowImageSrcChange").disabled = state;
document.getElementById("allowDocumentCookieSet").disabled = state;
document.getElementById("allowDocumentCookieGet").disabled = state;
document.getElementById("allowWindowStatusChange").disabled = state;
document.getElementById("allowWindowFlip").disabled = state;
document.getElementById("allowHideStatusBar").disabled = state;
}
function javascriptEnabledChange(){
// if javascriptAllowMailNews is overlayed (mailnews is installed), then if javascriptAllowMailnews
// and javascriptAllowNavigator are unchecked, we disable the tree items.
// If javascriptAllowMailNews is not available, we only take javascriptAllowNavigator in consideration
if (document.getElementById('javascriptAllowMailNews')){
if (!document.getElementById('javascriptAllowNavigator').checked && !document.getElementById('javascriptAllowMailNews').checked)
changeDisabledState(true);
else changeDisabledState(false);
} else {
changeDisabledState(!document.getElementById('javascriptAllowNavigator').checked);
}
}
function getPrefValueForCheckbox(prefName){
var prefValue = false;
try {
prefValue = pref.GetBoolPref(prefName);
}
catch(e) {}
// the prefs are stored in terms of disabling,
// but we want our value in terms of enabling.
// so let's invert the prefValue.
return !prefValue;
}
function Startup(){
data = parent.hPrefWindow.wsm.dataManager.pageData["chrome://communicator/content/pref/pref-scripts.xul"];
//If scriptData does not exist, then it is the first time the panel was shown and we default to false
if (!("scriptData" in data)){
var changedList = ["allowWindowOpenChanged",
"allowWindowMoveResizeChanged",
"allowWindowStatusChangeChanged",
"allowWindowFlipChanged",
"allowDocumentCookieSetChanged",
"allowDocumentCookieGetChanged",
"allowImageSrcChangeChanged",
"allowHideStatusBarChanged"];
data.scriptData = [];
for(var run = 0; run < changedList.length; run++ ){
data.scriptData[ changedList[run] ] = [];
data.scriptData[ changedList[run] ].value = false;
}
document.getElementById("allowWindowOpen").checked = getPrefValueForCheckbox("dom.disable_open_during_load");
document.getElementById("allowWindowMoveResize").checked = getPrefValueForCheckbox("dom.disable_window_move_resize");
document.getElementById("allowWindowFlip").checked = getPrefValueForCheckbox("dom.disable_window_flip");
document.getElementById("allowWindowStatusChange").checked = getPrefValueForCheckbox("dom.disable_window_status_change");
document.getElementById("allowImageSrcChange").checked = getPrefValueForCheckbox("dom.disable_image_src_set");
document.getElementById("allowDocumentCookieGet").checked = getPrefValueForCheckbox("dom.disable_cookie_get");
document.getElementById("allowDocumentCookieSet").checked = getPrefValueForCheckbox("dom.disable_cookie_set");
document.getElementById("allowHideStatusBar").checked = getPrefValueForCheckbox("dom.disable_window_open_feature.status");
//If we don't have a checkbox under groupbox pluginPreferences, we should hide it
var pluginGroup = document.getElementById("pluginPreferences")
var children = pluginGroup.childNodes;
if (!children || children.length <= 1) // 1 for the caption
pluginGroup.setAttribute("hidden", "true");
}
javascriptEnabledChange();
document.getElementById("AllowList").addEventListener("CheckboxStateChange", onCheckboxCheck, false);
parent.hPrefWindow.registerOKCallbackFunc(doOnOk);
}
function doOnOk(){
//If a user makes a change to this panel, goes to another panel, and returns to this panel to
//make another change, then we cannot use data[elementName]. This is because data[elementName]
//contains the original xul change and we would loose the new change. Thus we track all changes
//by using getElementById.
//The nested functions are needed because doOnOk cannot access anything outside of its scope
//when it is called
function getCheckboxValue(name){
if ("onCheckboxCheck" in window)
return document.getElementById(name).checked;
return data[name].checked;
}
var data = parent.hPrefWindow.wsm.dataManager.pageData["chrome://communicator/content/pref/pref-scripts.xul"];
if (data.scriptData["allowWindowOpenChanged"].value){
parent.hPrefWindow.setPref("bool", "dom.disable_open_during_load",
!getCheckboxValue('allowWindowOpen'));
}
if (data.scriptData["allowWindowMoveResizeChanged"].value){
parent.hPrefWindow.setPref("bool", "dom.disable_window_move_resize",
!getCheckboxValue('allowWindowMoveResize'));
}
if (data.scriptData["allowWindowStatusChangeChanged"].value){
parent.hPrefWindow.setPref("bool", "dom.disable_window_status_change",
!getCheckboxValue("allowWindowStatusChange"));
}
if (data.scriptData["allowWindowFlipChanged"].value){
parent.hPrefWindow.setPref("bool", "dom.disable_window_flip",
!getCheckboxValue("allowWindowFlip"));
}
if (data.scriptData["allowDocumentCookieSetChanged"].value){
parent.hPrefWindow.setPref("bool", "dom.disable_cookie_set",
!getCheckboxValue("allowDocumentCookieSet"));
}
if (data.scriptData["allowDocumentCookieGetChanged"].value){
parent.hPrefWindow.setPref("bool", "dom.disable_cookie_get",
!getCheckboxValue("allowDocumentCookieGet"));
}
if (data.scriptData["allowImageSrcChangeChanged"].value){
parent.hPrefWindow.setPref("bool", "dom.disable_image_src_set",
!getCheckboxValue("allowImageSrcChange"));
}
if (data.scriptData["allowHideStatusBarChanged"].value) {
parent.hPrefWindow.setPref("bool", "dom.disable_window_open_feature.status",
!getCheckboxValue("allowHideStatusBar"));
}
}
function onCheckboxCheck(event)
{
data.scriptData[event.target.id+"Changed"].value = !data.scriptData[event.target.id+"Changed"].value;
}

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

@ -0,0 +1,97 @@
<?xml version="1.0"?><!-- -*- Mode: HTML -*- -->
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla.org Code.
-
- The Initial Developer of the Original Code is
- Doron Rosenberg.
- Portions created by the Initial Developer are Copyright (C) 2001
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the LGPL or the GPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xul-overlay href="chrome://communicator/content/communicatorOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-scripts.dtd">
<page id="scriptsAndWindowPanel" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://communicator/content/pref/pref-scripts.xul');"
headertitle="&lHeader;">
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-scripts.js"/>
<script type="application/x-javascript">
<![CDATA[
var panel = "chrome://communicator/content/pref/pref-scripts.xul";
var _elementIDs = ["javascriptAllowNavigator",
"allowWindowOpen",
"allowWindowMoveResize",
"allowWindowFlip",
"allowWindowStatusChange",
"allowImageSrcChange",
"allowDocumentCookieSet",
"allowDocumentCookieGet",
"allowHideStatusBar"];
]]>
</script>
<groupbox id="javascriptPreferences" flex="1">
<caption label="&enableJavaScript.label;"/>
<checkbox id="javascriptAllowNavigator" label="&navigator.label;" accesskey="&navigator.accesskey;"
pref="true" preftype="bool" prefstring="javascript.enabled"
prefattribute="checked" oncommand="javascriptEnabledChange();"/>
<separator/>
<label id="allowScripts" value="&allowScripts.label;"/>
<listbox id="AllowList" flex="1">
<listitem type="checkbox" id="allowWindowOpen" label="&allowWindowOpen.label;"/>
<listitem type="checkbox" id="allowWindowMoveResize" label="&allowWindowMoveResize.label;"/>
<listitem type="checkbox" id="allowWindowFlip" label="&allowWindowFlip.label;"/>
<listitem type="checkbox" id="allowHideStatusBar" label="&allowHideStatusBar.label;"/>
<listitem type="checkbox" id="allowWindowStatusChange" label="&allowWindowStatusChange.label;"/>
<listitem type="checkbox" id="allowImageSrcChange" label="&allowWindowImageSrcChange.label;"/>
<listitem type="checkbox" id="allowDocumentCookieSet" label="&allowDocumentCookieSet.label;"/>
<listitem type="checkbox" id="allowDocumentCookieGet" label="&allowDocumentCookieGet.label;"/>
</listbox>
</groupbox>
<groupbox id="pluginPreferences">
<caption label="&enablePlugin.label;"/>
<!-- mailnews will add its checkbox here using overlay (mailPrefOverlay.xul).
The day we add a checkbox for plugins in browser, please do the following:
1) make sure that doesn't break the mailnews overlay, we'll probably have to add an
insertafter command to insure the proper order of the checkboxes
2) remove the js code in pref-scripts.js that hide this groupbox when not checkbox
has been defined (function Startup)
-->
</groupbox>
</page>

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

@ -0,0 +1,70 @@
/*
* 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):
* Robert John Churchill <rjc@netscape.com>
* Mark Olson <maolson@earthlink.net>
*/
function checkEngine()
{
var engineList = document.getElementById("engineList");
var engineValue = engineList.label;
//nothing is selected
if (!engineValue)
{
try
{
var prefInt = null; //Preferences Interface
var strDefaultSearchEngineName;
prefInt = Components.classes["@mozilla.org/preferences;1"];
if (prefInt)
{
prefInt = prefInt.getService(Components.interfaces.nsIPref);
strDefaultSearchEngineName = prefInt.getLocalizedUnicharPref("browser.search.defaultenginename");
}
var engineListSelection = engineList.getElementsByAttribute( "label", strDefaultSearchEngineName );
var selectedItem = engineListSelection.length ? engineListSelection[0] : null;
if (selectedItem)
{
//select a locale-dependent predefined search engine in absence of a user default
engineList.selectedItem = selectedItem;
}
else
{
//select the first listed search engine
engineList.selectedIndex = 1;
}
}
catch(e)
{
//select the first listed search engine
engineList.selectedIndex = 1;
}
}
}

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

@ -0,0 +1,77 @@
<?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/
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): Robert John Churchill (rjc@netscape.com)
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-search.dtd" >
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://communicator/content/pref/pref-search.xul');checkEngine()"
headertitle="&lHeader;">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["engineList","openSidebarPanel","sidebarSearchMode"];
]]>
</script>
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-search.js"/>
<groupbox>
<caption label="&legendHeader;"/>
<hbox align="center">
<label value="&defaultSearchEngine.label;" accesskey="&defaultSearchEngine.accesskey;" control="engineList"/>
<menulist id="engineList" ref="NC:SearchEngineRoot" datasources="rdf:internetsearch"
sortResource="http://home.netscape.com/NC-rdf#Name" sortDirection="ascending"
preftype="string" prefstring="browser.search.defaultengine">
<template>
<menupopup>
<menuitem value="..." uri="..."
src="rdf:http://home.netscape.com/NC-rdf#Icon"
label="rdf:http://home.netscape.com/NC-rdf#Name"/>
</menupopup>
</template>
</menulist>
</hbox>
</groupbox>
<groupbox>
<caption label="&searchResults.label;"/>
<!-- XXX - unfortunately we can't have an autostretch never box here
because it causes the text not to wrap and the panel content
to go offscreen. We need to come up with a better solution
to allow wrapping and even focusrings - ben@netscape.com -->
<checkbox id="openSidebarPanel" label="&openSidebarSearchPanel.label;" accesskey="&openSidebarSearchPanel.accesskey;"
prefstring="browser.search.opensidebarsearchpanel"/>
</groupbox>
<groupbox>
<caption label="&sidebarSearchTabPref.label;"/>
<radiogroup id="sidebarSearchMode"
prefdefval="0"
prefstring="browser.search.mode">
<radio value="0" label="&searchModeBasic.label;" accesskey="&searchModeBasic.accesskey;"/>
<radio value="1" label="&searchModeAdvanced.label;" accesskey="&searchModeAdvanced.accesskey;"/>
</radiogroup>
</groupbox>
</page>

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

@ -0,0 +1,40 @@
<?xml version="1.0"?>
<!--
- The contents of this file are subject to the Mozilla Public
- License Version 1.1 (the "License"); you may not use this file
- except in compliance with the License. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS
- IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- implied. See the License for the specific language governing
- rights and limitations under the License.
-
- The Original Code is mozilla.org code.
-
- The Initial Developer of the Original Code is Netscape
- Communications Corp. Portions created by Netscape are
- Copyright (C) 2001 Netscape Communications Corp. All
- Rights Reserved.
-
- Contributor(s):
- Terry Hayes <thayes@netscape.com>
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-security.dtd" >
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://communicator/content/pref/pref-security.xul');"
headertitle="&lHeader;">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = [];
]]>
</script>
<description> &rContent1;</description>
<description> &rContent2;</description>
<!-- Overlays add UI here -->
</page>

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

@ -0,0 +1,118 @@
<?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/
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):
Joe Hewitt <hewitt@netscape.com>
-->
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-smart_browsing.dtd" >
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/prefpanels.css" type="text/css"?>
<dialog id="pref-smart_browsing-ac" title="&autoCompleteAdvanced.title;"
ondialogaccept="return onAccept();"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript"><![CDATA[
window.onload = function()
{
setCheck("cbxAutoFill", window.arguments[0]);
setCheck("cbxShowPopup", window.arguments[1]);
setCheck("cbxShowSearch", window.arguments[2]);
setCheck("cbxMatchOnlyTyped", window.arguments[3]);
updateImage("AutoFill");
updateImage("ShowPopup");
updateImage("ShowSearch");
updateShowPopup();
}
function onAccept()
{
window.opener.receiveACPrefs(getCheck("cbxAutoFill"),
getCheck("cbxShowPopup"),
getCheck("cbxShowSearch"),
getCheck("cbxMatchOnlyTyped"));
return true;
}
function getCheck(aName)
{
return document.getElementById(aName).checked;
}
function setCheck(aName, aTruth)
{
if (aTruth == "true")
document.getElementById(aName).setAttribute("checked", "true");
else
document.getElementById(aName).removeAttribute("checked");
}
function updateImage(aImg)
{
var img = document.getElementById("img"+aImg);
var checked = document.getElementById("cbx"+aImg).checked;
if (aImg == "AutoFill") {
img.setAttribute("src", "chrome://communicator/content/pref/autocomplete-autofill-"+(checked?"on":"off")+".gif");
} else if (aImg == "ShowPopup") {
img.setAttribute("hidden", !checked);
updateImage("ShowSearch");
} else if (aImg == "ShowSearch") {
var checked2 = document.getElementById("cbxShowPopup").checked;
img.setAttribute("hidden", !checked2 || !checked);
}
}
function updateShowPopup()
{
var spChecked = document.getElementById("cbxShowPopup").checked;
var showSearch = document.getElementById("cbxShowSearch");
showSearch.disabled = !spChecked;
}
]]></script>
<groupbox>
<caption label="&autoCompleteAdvanced.title;"/>
<vbox>
<checkbox id="cbxAutoFill" label="&autoCompleteAutoFill.label;"
oncommand="updateImage('AutoFill')"/>
<checkbox id="cbxShowPopup" label="&autoCompleteShowPopup.label;"
oncommand="updateShowPopup(); updateImage('ShowPopup')"/>
<checkbox id="cbxShowSearch" label="&autoCompleteShowSearch.label;"
oncommand="updateImage('ShowSearch')"/>
<checkbox id="cbxMatchOnlyTyped" label="&autoCompleteMatchOnlyTyped.label;"/>
</vbox>
</groupbox>
<label value="&autocompletePreview.label;"/>
<dialogheader>
<vbox height="159">
<image id="imgAutoFill" style="min-width: 401px;"/>
<image id="imgShowPopup" src="chrome://communicator/content/pref/autocomplete-showpopup.gif"/>
<image id="imgShowSearch" src="chrome://communicator/content/pref/autocomplete-showsearch.gif"/>
</vbox>
</dialogheader>
</dialog>

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

@ -0,0 +1,74 @@
/*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* August 15, 2001.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corp. Portions created by Netscape Communications
* Corp. are Copyright (C) 2001, Netscape Communications Corp. All
* Rights Reserved.
*
* Contributor(s):
* Diego Biurrun <diego@biurrun.de>
*/
function moreInfo()
{
var browserURL = null;
var regionBundle = document.getElementById("bundle_region");
var smartBrowsingURL = regionBundle.getString("smartBrowsingURL");
if (smartBrowsingURL) {
try {
var prefs = Components.classes["@mozilla.org/preferences;1"];
if (prefs) {
prefs = prefs.getService();
if (prefs)
prefs = prefs.QueryInterface(Components.interfaces.nsIPref);
}
if (prefs) {
var url = prefs.CopyCharPref("browser.chromeURL");
if (url)
browserURL = url;
}
} catch(e) {
}
if (browserURL == null)
browserURL = "chrome://navigator/content/navigator.xul";
window.openDialog( browserURL, "_blank", "chrome,all,dialog=no", smartBrowsingURL );
}
}
function showACAdvanced()
{
window.openDialog("chrome://communicator/content/pref/pref-smart_browsing-ac.xul", "",
"modal=yes,chrome,resizable=no",
document.getElementById("browserUrlbarAutoFill").getAttribute("value"),
document.getElementById("browserUrlbarShowPopup").getAttribute("value"),
document.getElementById("browserUrlbarShowSearch").getAttribute("value"),
document.getElementById("browserUrlbarMatchOnlyTyped").getAttribute("value"));
}
function receiveACPrefs(aAutoFill, aShowPopup, aShowSearch, aAutoType)
{
document.getElementById("browserUrlbarAutoFill").setAttribute("value", aAutoFill);
document.getElementById("browserUrlbarShowPopup").setAttribute("value", aShowPopup);
document.getElementById("browserUrlbarShowSearch").setAttribute("value", aShowSearch);
document.getElementById("browserUrlbarMatchOnlyTyped").setAttribute("value", aAutoType);
}
function toggleAutoCompleteAdvancedButton()
{
var browserAutoCompleteEnabled = document.getElementById("browserAutoCompleteEnabled");
var autoCompleteAdvancedButton = document.getElementById("autoCompleteAdvancedButton");
autoCompleteAdvancedButton.disabled = !browserAutoCompleteEnabled.checked;
}

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

@ -0,0 +1,89 @@
<?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/
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):
Blake Ross <blakeross@telocity.com>
Diego Biurrun <diego@biurrun.de>
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/prefpanels.css" type="text/css"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
%brandDTD;
<!ENTITY % prefSmartBrowsingDTD SYSTEM "chrome://communicator/locale/pref/pref-smart_browsing.dtd" >
%prefSmartBrowsingDTD;
]>
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://communicator/content/pref/pref-smart_browsing.xul');"
headertitle="&lHeader;">
<stringbundle id="bundle_region"
src="chrome://global-region/locale/region.properties"/>
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-smart_browsing.js"/>
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["browserGoBrowsingEnabled", "browserAutoCompleteEnabled",
"browserUrlbarAutoFill", "browserUrlbarShowPopup", "browserUrlbarShowSearch",
"browserUrlbarMatchOnlyTyped"];
]]>
</script>
<groupbox>
<caption label="&internetKeywordsHeader.label;"/>
<description>&internetKeywordsDescription.label;</description>
<hbox align="center">
<checkbox id="browserGoBrowsingEnabled" label="&keywordsEnabled.label;" accesskey="&keywordsEnabled.accesskey;"
prefstring="keyword.enabled"/>
<spacer flex="1"/>
<button label="&moreInformation.label;" accesskey="&moreInformation.accesskey;" oncommand="moreInfo();"
id="moreInformationButton"
prefstring="pref.browser.smartbrowsing.disable_button.more_info"/>
</hbox>
</groupbox>
<groupbox>
<caption label="&autoCompleteHeader.label;"/>
<hbox align="center">
<checkbox id="browserAutoCompleteEnabled" label="&autoCompleteEnabled.label;"
accesskey="&autoCompleteEnabled.accesskey;"
prefstring="browser.urlbar.autocomplete.enabled"
oncommand="toggleAutoCompleteAdvancedButton()" flex="1"/>
<button label="&autoCompleteAdvanced.label;" oncommand="showACAdvanced()" id="autoCompleteAdvancedButton"/>
<data id="browserUrlbarAutoFill" preftype="bool" prefattribute="value"
prefstring="browser.urlbar.autoFill"/>
<data id="browserUrlbarShowPopup" preftype="bool" prefattribute="value"
prefstring="browser.urlbar.showPopup"/>
<data id="browserUrlbarShowSearch" preftype="bool" prefattribute="value"
prefstring="browser.urlbar.showSearch"/>
<data id="browserUrlbarMatchOnlyTyped" preftype="bool" prefattribute="value"
prefstring="browser.urlbar.matchOnlyTyped"/>
</hbox>
</groupbox>
</page>

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

@ -0,0 +1,119 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-smartupdate.dtd" >
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://communicator/content/pref/pref-smartupdate.xul'); initUpdateNotifications();"
headertitle="&lHeader;">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["XPInstallEnabled", "updateNotificationsEnabled",
"updateFrequency"];
function initUpdateNotifications()
{
var prefs = Components.classes["@mozilla.org/preferences-service;1"].
getService(Components.interfaces.nsIPrefBranch);
if (!prefs.getBoolPref("update_notifications.enabled"))
{
// disable frequency radiogroup
var freqWeekly = document.getElementById("freqWeekly");
var freqMonthly = document.getElementById("freqMonthly");
freqWeekly.setAttribute("disabled", "true");
freqMonthly.setAttribute("disabled", "true");
}
}
function toggleFrequency()
{
var enabled = document.getElementById("updateNotificationsEnabled");
var freqWeekly = document.getElementById("freqWeekly");
var freqMonthly = document.getElementById("freqMonthly");
if (enabled.getAttribute("checked") == "true")
{
// enable frequency radiogroup
freqWeekly.removeAttribute("disabled");
freqMonthly.removeAttribute("disabled");
}
else
{
// disable frequency radiogroup
freqWeekly.setAttribute("disabled", "true");
freqMonthly.setAttribute("disabled", "true");
}
}
]]>
</script>
<groupbox align="start">
<caption label="&smartTitle.label;"/>
<checkbox id="XPInstallEnabled" label="&enableSU.label;" accesskey="&enableSU.accesskey;"
prefstring="xpinstall.enabled"/>
</groupbox>
<groupbox align="start">
<caption label="&updateNotifications.label;"/>
<description>&updateNotifications.desc;</description>
<checkbox id="updateNotificationsEnabled" label="&enableUN.label;"
accesskey="&enableUN.accesskey;" oncommand="toggleFrequency();"
prefstring="update_notifications.enabled"/>
<radiogroup id="updateFrequency" orient="horizontal"
prefstring="update_notifications.provider.0.frequency"
prefdefval="7">
<radio id="freqWeekly" label="&weekly.label;"
accesskey="&weekly.accesskey;" value="7"/>
<radio id="freqMonthly" label="&monthly.label;"
accesskey="&monthly.accesskey;" value="30"/>
</radiogroup>
</groupbox>
<!--
<groupbox align="start">
<caption label="Installed Packages"/>
<script>
<![CDATA[
function InstallPackage()
{
var chromeRegistry = Components.classes["@mozilla.org/chrome/chrome-registry;1"].getService();
if ( chromeRegistry )
chromeRegistry = chromeRegistry.QueryInterface( Components.interfaces.nsIChromeRegistry );
var packageURI = prompt('give the resource uri of the package to install','');
if (packageURI)
chromeRegistry.installPackage(packageURI, false);
}
]]>
</script>
<button label="Install Package" oncommand="InstallPackage();"/>
</groupbox>
-->
<!--
<html:fieldset style="width: 100%; height: 100%">
<html:div class="hspace-both">&selectUninstall.label;</html:div>
<hbox class="hspace-both vspace" flex="100%" style="width: 93%; height: 100%">
<tree id="smartUpdatePackages" flex="100%" style="height: 40%;">
<treecols>
<treecol flex="1"/>
</treecols>
<treechildren flex="1">
<treeitem>
<treerow>
<treeitem/>
</treerow>
</treeitem>
</treechildren>
</tree>
<spacer flex="5%"/>
<vbox>
<button class="push" id="pref:0:bool:smartupdate" label="&uninstallButton.label;" accesskey="&uninstallButton.accesskey;"/>
<spacer flex="100%"/>
</vbox>
</hbox>
<spacer style="height: 28px;"/>
</html:fieldset>
-->
</page>

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

@ -0,0 +1,68 @@
<?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/
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"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-tabs.dtd">
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://communicator/content/pref/pref-tabs.xul');
loadPanel();"
headertitle="&tabHeader.label;">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["tabStrip", "tabBackground", "middleClick", "urlBar"];
function loadPanel() {
if (navigator.platform.indexOf("Mac") != -1) {
var string = document.getElementById("macUrlbarPref");
var checkbox = document.getElementById("urlBar");
checkbox.label = string.getAttribute("label");
}
}
]]>
</script>
<data id="macUrlbarPref" label="&urlbarMac.label;"/>
<groupbox id="generalTabPreferences" align="start">
<caption label="&tabDisplay.label;"/>
<checkbox id="tabStrip"
label="&autoHide.label;"
prefstring="browser.tabs.autoHide"/>
<checkbox id="tabBackground"
label="&background.label;"
prefstring="browser.tabs.loadInBackground"/>
</groupbox>
<groupbox id="useTabPreferences" align="start">
<caption label="&openTabs.label;"/>
<checkbox id="middleClick"
label="&middleClick.label;"
prefstring="browser.tabs.opentabfor.middleclick"/>
<checkbox id="urlBar"
label="&urlbarWinUnix.label;"
prefstring="browser.tabs.opentabfor.urlbar"/>
</groupbox>
</page>

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

@ -0,0 +1,252 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla.org Code.
*
* The Initial Developer of the Original Code is
* Doron Rosenberg.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Ben Goodger <ben@netscape.com> (Original Author)
* Blake Ross <blaker@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
var gShowDescription = true;
var gData;
try {
var chromeRegistry = Components.classes["@mozilla.org/chrome/chrome-registry;1"].getService();
if (chromeRegistry)
chromeRegistry = chromeRegistry.QueryInterface(Components.interfaces.nsIXULChromeRegistry);
}
catch(e) {}
function Startup()
{
gData = parent.hPrefWindow.wsm.dataManager.pageData["chrome://communicator/content/pref/pref-themes.xul"];
var list = document.getElementById( "skinsList" );
if ("loaded" in gData && "themeIndex" in gData) {
list.selectedIndex = gData.themeIndex;
return;
}
gData.loaded = true;
parent.hPrefWindow.registerOKCallbackFunc( applySkin );
const kPrefSvcContractID = "@mozilla.org/preferences;1";
const kPrefSvcIID = Components.interfaces.nsIPref;
const kPrefSvc = Components.classes[kPrefSvcContractID].getService(kPrefSvcIID);
var theme = null;
try {
theme = kPrefSvc.getComplexValue("general.skins.selectedSkin",
Components.interfaces.nsISupportsWString).data;
} catch (e) {
}
var matches;
for (var i = 0; i < list.childNodes.length; ++i) {
var child = list.childNodes[i];
var name = child.getAttribute("name");
if (!theme)
matches = chromeRegistry.isSkinSelected(name, true) == Components.interfaces.nsIChromeRegistry.FULL;
else
matches = name == theme;
if (matches) {
list.selectItem(child);
break;
}
}
var navbundle = document.getElementById("bundle_navigator");
var showSkinsDescription = navbundle.getString("showskinsdescription");
if( showSkinsDescription == "false" )
{
gShowDescription = false;
var description = document.getElementById("description");
while (description.hasChildNodes())
description.removeChild(description.firstChild);
}
}
function applySkin()
{
var data = parent.hPrefWindow.wsm.dataManager.pageData["chrome://communicator/content/pref/pref-themes.xul"];
if (data.name == null)
return;
const kPrefSvcContractID = "@mozilla.org/preferences;1";
const kPrefSvcIID = Components.interfaces.nsIPref;
const kPrefSvc = Components.classes[kPrefSvcContractID].getService(kPrefSvcIID);
var theme = null;
try {
theme = kPrefSvc.getComplexValue("general.skins.selectedSkin",
Components.interfaces.nsISupportsWString).data;
} catch (e) {
}
if (theme == data.name) return;
try {
var reg = Components.classes["@mozilla.org/chrome/chrome-registry;1"].getService();
if (reg)
reg = reg.QueryInterface(Components.interfaces.nsIXULChromeRegistry);
}
catch(e) {}
var inUse = reg.isSkinSelected(data.name, true);
if (!theme && inUse == Components.interfaces.nsIChromeRegistry.FULL) return;
var str = Components.classes["@mozilla.org/supports-wstring;1"]
.createInstance(Components.interfaces.nsISupportsWString);
str.data = data.name;
kPrefSvc.setComplexValue("general.skins.selectedSkin", Components.interfaces.nsISupportsWString, str);
// shut down quicklaunch so the next launch will have the new skin
var appShell = Components.classes['@mozilla.org/appshell/appShellService;1'].getService();
appShell = appShell.QueryInterface(Components.interfaces.nsIAppShellService);
try {
appShell.nativeAppSupport.isServerMode = false;
}
catch(ex) {
}
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
var strBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"].getService();
strBundleService = strBundleService.QueryInterface(Components.interfaces.nsIStringBundleService);
var navbundle = strBundleService.createBundle("chrome://navigator/locale/navigator.properties");
var brandbundle = strBundleService.createBundle("chrome://global/locale/brand.properties");
if (promptService && navbundle && brandbundle) {
var dialogTitle = navbundle.GetStringFromName("switchskinstitle");
var brandName = brandbundle.GetStringFromName("brandShortName");
var msg = navbundle.formatStringFromName("switchskins", [brandName], 1);
promptService.alert(window, dialogTitle, msg);
}
}
function uninstallSkin()
{
var list = document.getElementById("skinsList");
var selectedSkinItem = list.selectedItems[0];
var skinName = selectedSkinItem.getAttribute("name");
var inUse = chromeRegistry.isSkinSelected(skinName, true);
chromeRegistry.uninstallSkin(skinName, true);
if (inUse)
chromeRegistry.refreshSkins();
list.selectedIndex = 0;
}
function themeSelect()
{
var list = document.getElementById("skinsList");
if (!list)
return;
var prefbundle = document.getElementById("bundle_prefutilities");
var selectedItem = list.selectedItems.length ? list.selectedItems[0] : null;
if (selectedItem && selectedItem.getAttribute("skin") == "true") {
var themeName = selectedItem.getAttribute("displayName");
var skinName = selectedItem.getAttribute("name");
gData.name = skinName;
gData.themeIndex = list.selectedIndex;
var oldTheme;
try {
oldTheme = !chromeRegistry.checkThemeVersion(skinName);
}
catch(e) {
oldTheme = false;
}
var nameField = document.getElementById("displayName");
var author = document.getElementById("author");
var image = document.getElementById("previewImage");
var descText = document.createTextNode(selectedItem.getAttribute("description"));
var description = document.getElementById("description");
var uninstallButton = document.getElementById("uninstallSkin");
var uninstallLabel = prefbundle.getString("uninstallThemePrefix");
while (description.hasChildNodes())
description.removeChild(description.firstChild);
nameField.setAttribute("value", themeName);
author.setAttribute("value", selectedItem.getAttribute("author"));
image.setAttribute("src", selectedItem.getAttribute("image"));
// XXX - this sucks and should only be temporary.
var selectedSkin = "";
try {
const kPrefSvcContractID = "@mozilla.org/preferences;1";
const kPrefSvcIID = Components.interfaces.nsIPref;
const kPrefSvc = Components.classes[kPrefSvcContractID].getService(kPrefSvcIID);
selectedSkin = kPrefSvc.CopyCharPref("general.skins.selectedSkin");
}
catch (e) {
}
if (!oldTheme) {
if( gShowDescription )
description.appendChild(descText);
var locType = selectedItem.getAttribute("loctype");
uninstallButton.disabled = (selectedSkin == skinName) || (locType == "install");
uninstallLabel = uninstallLabel.replace(/%theme_name%/, themeName);
uninstallButton.label = uninstallLabel;
}
else {
var brandbundle = document.getElementById("bundle_brand");
uninstallLabel = uninstallLabel.replace(/%theme_name%/, themeName);
uninstallButton.label = uninstallLabel;
uninstallButton.disabled = selectedSkin == skinName;
var newText = prefbundle.getString("oldTheme");
newText = newText.replace(/%theme_name%/, themeName);
newText = newText.replace(/%brand%/g, brandbundle.getString("brandShortName"));
if( gShowDescription ) {
descText = document.createTextNode(newText);
description.appendChild(descText);
}
}
}
else {
uninstallButton.disabled = true;
gData.name = null;
}
}

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

@ -0,0 +1,94 @@
<?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/
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/prefpanels.css" type="text/css"?>
<!DOCTYPE window [
<!ENTITY % themesDTD SYSTEM "chrome://communicator/locale/pref/pref-themes.dtd" >
%themesDTD;
<!ENTITY % regionDTD SYSTEM "chrome://global-region/locale/region.dtd" >
%regionDTD;
]>
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
onload="parent.initPanel('chrome://communicator/content/pref/pref-themes.xul'); Startup()"
headertitle="&lHeader;">
<stringbundle id="bundle_prefutilities"
src="chrome://communicator/locale/pref/prefutilities.properties"/>
<stringbundle id="bundle_brand"
src="chrome://global/locale/brand.properties"/>
<stringbundle id="bundle_navigator"
src="chrome://navigator/locale/navigator.properties"/>
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-themes.js"/>
<description>&skinIntro.label;</description>
<description>&installedThemes.label;</description>
<listbox id="skinsList" datasources="rdf:chrome"
onselect="themeSelect();"
ref="urn:mozilla:skin:root" rows="5">
<template>
<rule>
<listitem uri="..." skin="true"
label="rdf:http://www.mozilla.org/rdf/chrome#displayName"
author="rdf:http://www.mozilla.org/rdf/chrome#author"
displayName="rdf:http://www.mozilla.org/rdf/chrome#displayName"
name="rdf:http://www.mozilla.org/rdf/chrome#name"
description="rdf:http://www.mozilla.org/rdf/chrome#description"
image="rdf:http://www.mozilla.org/rdf/chrome#image"
loctype="rdf:http://www.mozilla.org/rdf/chrome#locType"/>
</rule>
</template>
</listbox>
<separator class="thin"/>
<hbox id="previewImageContainer" class="inset" align="center" pack="center">
<image id="previewImage"/>
</hbox>
<separator class="thin"/>
<hbox>
<vbox flex="1">
<label class="header" id="displayName" value=""/>
<hbox align="center">
<label value="&author.label;"/>
<label id="author"/>
</hbox>
<label id="description" flex="1"/>
</vbox>
<vbox>
<button id="uninstallSkin" label="&uninstallSkin.label;" oncommand="uninstallSkin();"/>
</vbox>
</hbox>
<separator/>
<hbox align="start">
<html:a id="themesLink" href="&getNewThemesURL;"
style="display: block;" target="_new">&getNewThemes.label;</html:a>
</hbox>
</page>

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

@ -0,0 +1,150 @@
/* -*- Mode: C++; 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):
* Bill Law <law@netscape.com>
* Aaron Kaluszka <ask@swva.net>
*/
// Turn this on to get debug output.
const debug = 1;
function debugDump( text ) {
if ( debug ) {
dump( text + "\n" );
}
}
function dumpObject( obj, name ) {
for ( prop in obj ) {
debugDump( name + "." + prop + "=" + obj[prop] );
}
}
// Top-level windows integration preferences.
if ( !( "winHooks" in parent ) ) {
parent.winHooks = new Object;
parent.winHooks.settings = null;
parent.winHooks.winhooks = null;
parent.winHooks.prefs = null;
}
// This function is called when the user presses Ok to close the prefs window.
function onOK() {
try {
// Get updates from dialog if we're displayed.
if ( "GetFields" in window ) {
GetFields();
}
// Update prefs.
parent.winHooks.winhooks.settings = parent.winHooks.prefs;
}
catch(e) {
dump( e + "\n" );
}
}
var gPrefService = null;
var gPrefBranch = null;
// This function is called when our pref panel is loaded.
function Startup() {
const prefbase = "system.windows.lock_ui.";
// initialise preference component.
// While the data is coming from the system registry, we use a set
// of parallel preferences to indicate if the ui should be locked.
if (!gPrefService) {
gPrefService = Components.classes["@mozilla.org/preferences-service;1"];
gPrefService = gPrefService.getService();
gPrefService = gPrefService.QueryInterface(Components.interfaces.nsIPrefService);
gPrefBranch = gPrefService.getBranch(prefbase);
}
// Get globals.
var settings = parent.winHooks.settings;
var winhooks = parent.winHooks.winhooks;
var prefs = parent.winHooks.prefs;
if ( !winhooks ) {
// Get component service.
try {
winhooks = Components.classes[ "@mozilla.org/winhooks;1" ].getService( Components.interfaces.nsIWindowsHooks );
if ( winhooks ) {
// Try to get preferences.
prefs = winhooks.settings;
// Set globals.
parent.winHooks.winhooks = winhooks;
parent.winHooks.prefs = prefs;
}
}
catch(e) {
dump( e + "\n" );
}
}
if ( !settings ) {
// Set state specific to this panel (not shared with the "default browser"
// button state from the Navigator panel).
settings = parent.winHooks.settings = [ "isHandlingHTML",
"isHandlingJPEG",
"isHandlingGIF",
"isHandlingPNG",
"isHandlingMNG",
"isHandlingXBM",
"isHandlingBMP",
"isHandlingICO",
"isHandlingXML",
"isHandlingXHTML",
"isHandlingXUL",
"isHandlingHTTP",
"isHandlingHTTPS",
"isHandlingFTP",
"isHandlingCHROME",
"isHandlingGOPHER",
"showDialog" ];
// Register so we get called when pref window Ok is pressed.
parent.hPrefWindow.registerOKCallbackFunc( onOK );
}
// Transfer object settings to the dialog checkboxes.
for( var index in settings ) {
var setting = settings[ index ];
var checkbox = document.getElementById( setting );
if ( checkbox && prefs[ setting ] ) {
checkbox.setAttribute( "checked", "true" );
}
// disable the xul element if the appropriate pref is locked.
if (gPrefBranch && gPrefBranch.prefIsLocked(setting)) {
checkbox.disabled = true;
}
}
}
function GetFields() {
// Get globals.
var settings = parent.winHooks.settings;
var winhooks = parent.winHooks.winhooks;
var prefs = parent.winHooks.prefs;
// Transfer data from dialog to prefs object.
for( var index in settings ) {
var setting = settings[ index ];
var checkbox = document.getElementById( setting );
if ( checkbox ) {
prefs[ setting ] = checkbox.checked;
}
}
}

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

@ -0,0 +1,79 @@
<?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/
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):
Bill Law <law@netscape.com>
Aaron Kaluszka <ask@swva.net>
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
%brandDTD;
<!ENTITY % platformDTD SYSTEM "chrome://global-platform/locale/platformDialogOverlay.dtd" >
%platformDTD;
<!ENTITY % prefWinhooksDTD SYSTEM "chrome://communicator/locale/pref/pref-winhooks.dtd" >
%prefWinhooksDTD;
]>
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://communicator/content/pref/pref-winhooks.xul');"
headertitle="&title.label;">
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-winhooks.js"/>
<!-- File types -->
<label value="&files.text;"/>
<listbox class="indent" style="width: 0px; height: 0px;" flex="2">
<listitem type="checkbox" id="isHandlingHTML" label="&html.label;" accesskey="&html.accesskey;"/>
<listitem type="checkbox" id="isHandlingJPEG" label="&jpeg.label;" accesskey="&jpeg.accesskey;"/>
<listitem type="checkbox" id="isHandlingGIF" label="&gif.label;" accesskey="&gif.accesskey;"/>
<listitem type="checkbox" id="isHandlingPNG" label="&png.label;" accesskey="&png.accesskey;"/>
<listitem type="checkbox" id="isHandlingMNG" label="&mng.label;" accesskey="&mng.accesskey;"/>
<listitem type="checkbox" id="isHandlingXBM" label="&xbm.label;" accesskey="&xbm.accesskey;"/>
<listitem type="checkbox" id="isHandlingBMP" label="&bmp.label;" accesskey="&bmp.accesskey;"/>
<listitem type="checkbox" id="isHandlingICO" label="&ico.label;" accesskey="&ico.accesskey;"/>
<listitem type="checkbox" id="isHandlingXML" label="&xml.label;" accesskey="&xml.accesskey;"/>
<listitem type="checkbox" id="isHandlingXHTML" label="&xhtml.label;" accesskey="&xhtml.accesskey;"/>
<listitem type="checkbox" id="isHandlingXUL" label="&xul.label;" accesskey="&xul.accesskey;"/>
</listbox>
<separator/>
<!-- Internet Shortcuts -->
<label value="&shortcuts.text;"/>
<listbox class="indent" style="width: 0px; height: 0px;" flex="2">
<listitem type="checkbox" id="isHandlingHTTP" label="&http.label;" accesskey="&http.accesskey;"/>
<listitem type="checkbox" id="isHandlingHTTPS" label="&https.label;" accesskey="&https.accesskey;"/>
<listitem type="checkbox" id="isHandlingFTP" label="&ftp.label;" accesskey="&ftp.accesskey;"/>
<listitem type="checkbox" id="isHandlingCHROME" label="&chrome.label;" accesskey="&chrome.accesskey;"/>
<listitem type="checkbox" id="isHandlingGOPHER" label="&gopher.label;" accesskey="&gopher.accesskey;"/>
</listbox>
<separator/>
<!-- Misc -->
<hbox align="center">
<checkbox id="showDialog" label="&showDialog.label;" accesskey="&showDialog.accesskey;"/>
</hbox>
<spacer flex="1"/>
</page>

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

@ -0,0 +1,81 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xul-overlay href="chrome://communicator/content/pref/preftree.xul"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref.dtd" >
<!-- This dialog has a fixed size and is not resizable.
You MAY NOT increase the size of this dialog.
Questions, Comments -> ben@netscape.com -->
<dialog id="prefDialog"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&prefWindow.title;"
style="&prefWindow.size;"
windowtype="mozilla:preferences"
buttons="accept,cancel,help"
onload="Startup();"
ondialogaccept="return hPrefWindow.onOK(event);"
ondialogcancel="return hPrefWindow.onCancel(event);"
ondialoghelp="return doHelpButton(event)"
persist="screenX screenY">
<script>
<![CDATA[
var hPrefWindow = null;
/** General startup routine for preferences dialog.
* Place all necessary modifications to pref tree here.
**/
function Startup()
{
hPrefWindow = new nsPrefWindow('panelFrame');
if( !hPrefWindow )
throw "failed to create prefwindow";
hPrefWindow.init();
// If this call worked, we could center the window here:
// centerWindowOnScreen();
}
]]>
</script>
<stringbundle id="bundle_prefutilities"
src="chrome://communicator/locale/pref/prefutilities.properties"/>
<script type="application/x-javascript" src="chrome://global/content/nsWidgetStateManager.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/pref/nsPrefWindow.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-help.js"/>
<script type="application/x-javascript" src="chrome://help/content/contextHelp.js"/>
<hbox flex="1">
<!-- tree sidebar -->
<tree id="prefsTree" style="width: 13em;"/>
<vbox flex="1">
<dialogheader id="header"/>
<iframe id="panelFrame" name="panelFrame" style="width: 0px" flex="1"/>
</vbox>
</hbox>
<script type="application/x-javascript">
<![CDATA[
if(window.arguments && window.arguments[0]) {
document.getElementById("panelFrame").setAttribute("src", window.arguments[0] );
document.getElementById("panelFrame").setAttribute("tag", window.arguments[0] );
}
else {
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>
<separator/>
</dialog>

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

@ -0,0 +1,189 @@
<?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/
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):
Ben Goodger <ben@netscape.com>
-->
<?xul-overlay href="chrome://communicator/content/pref/platformPrefOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/preftree.dtd" >
<overlay id="prefTreeOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script>
<![CDATA[
var _elementIDs = []; // hack
]]>
</script>
<tree id="prefsTree" seltype="single" hidecolumnpicker="true"
onselect="if( hPrefWindow ) hPrefWindow.switchPage();">
<treecols>
<treecol id="categoryCol" label="&category.label;" flex="1" primary="true"/>
</treecols>
<treechildren id="panelChildren">
<treeitem container="true" id="appearance">
<treerow>
<treecell url="chrome://communicator/content/pref/pref-appearance.xul" label="&appear.label;"/>
</treerow>
<treechildren id="appearanceChildren">
<treeitem>
<treerow>
<treecell url="chrome://communicator/content/pref/pref-fonts.xul" label="&fonts.label;"/>
</treerow>
</treeitem>
<treeitem>
<treerow>
<treecell url="chrome://communicator/content/pref/pref-colors.xul" label="&colors.label;"/>
</treerow>
</treeitem>
<treeitem id="themes-panel">
<treerow>
<treecell url="chrome://communicator/content/pref/pref-themes.xul" label="&themes.label;"/>
</treerow>
</treeitem>
</treechildren>
</treeitem>
<!-- XXX remove this when overlays.rdf works for navigator -->
<treeitem container="true" id="navigator">
<treerow>
<treecell url="chrome://communicator/content/pref/pref-navigator.xul" label="&navigator.label;"/>
</treerow>
<treechildren>
<treeitem>
<treerow>
<treecell url="chrome://communicator/content/pref/pref-history.xul" label="&history.label;"/>
</treerow>
</treeitem>
<treeitem>
<treerow>
<treecell url="chrome://communicator/content/pref/pref-languages.xul" label="&languages.label;"/>
</treerow>
</treeitem>
<treeitem>
<treerow>
<treecell url="chrome://communicator/content/pref/pref-applications.xul" label="&applications.label;"/>
</treerow>
</treeitem>
<treeitem>
<treerow>
<treecell url="chrome://communicator/content/pref/pref-smart_browsing.xul" label="&smartBrowse.label;"/>
</treerow>
</treeitem>
<treeitem>
<treerow>
<treecell url="chrome://communicator/content/pref/pref-search.xul" label="&search.label;"/>
</treerow>
</treeitem>
<treeitem>
<treerow>
<treecell url="chrome://communicator/content/pref/pref-tabs.xul" label="&tabWindows.label;"/>
</treerow>
</treeitem>
<treeitem>
<treerow>
<treecell url="chrome://communicator/content/pref/pref-download.xul" label="&download.label;"/>
</treerow>
</treeitem>
<!-- Taking out Policies panel b/c bug 44121
<treeitem>
<treerow>
<treecell url="chrome://communicator/content/pref/pref-policies.xul" label="&policies.label;"/>
</treerow>
</treeitem> -->
</treechildren>
</treeitem>
<!-- Security and Privacy items -->
<treeitem container="true" id="securityItem">
<treerow>
<treecell url="chrome://communicator/content/pref/pref-security.xul" label="&security.label;" />
</treerow>
<treechildren id="securityChildren"/>
</treeitem>
<treeitem container="true" id="advancedItem">
<treerow>
<treecell url="chrome://communicator/content/pref/pref-advanced.xul" label="&advance.label;"/>
</treerow>
<treechildren id="advancedChildren">
<treeitem>
<treerow>
<treecell url="chrome://communicator/content/pref/pref-scripts.xul" label="&scriptsAndWindows.label;"/>
</treerow>
</treeitem>
<treeitem>
<treerow>
<treecell url="chrome://communicator/content/pref/pref-cache.xul" label="&cache.label;"/>
</treerow>
</treeitem>
<treeitem>
<treerow>
<treecell url="chrome://communicator/content/pref/pref-proxies.xul" label="&proxies.label;"/>
</treerow>
</treeitem>
<treeitem>
<treerow>
<treecell url="chrome://communicator/content/pref/pref-http.xul" label="&httpnetworking.label;"/>
</treerow>
</treeitem>
<treeitem>
<treerow>
<treecell url="chrome://communicator/content/pref/pref-smartupdate.xul" label="&smart.label;"/>
</treerow>
</treeitem>
<treeitem id="mousewheelItem">
<treerow>
<treecell url="chrome://communicator/content/pref/pref-mousewheel.xul" label="&mousewheel.label;"/>
</treerow>
</treeitem>
</treechildren>
</treeitem>
<treeitem container="true" id="debugItem">
<treerow>
<treecell url="chrome://communicator/content/pref/pref-debug.xul" label="&debug.label;"/>
</treerow>
<treechildren id="debugChildren">
<treeitem>
<treerow>
<treecell url="chrome://communicator/content/pref/pref-debug1.xul" label="&debug1.label;"/>
</treerow>
</treeitem>
<treeitem>
<treerow>
<treecell url="chrome://communicator/content/pref/pref-debug2.xul" label="&debug2.label;"/>
</treerow>
</treeitem>
</treechildren>
</treeitem>
<treeitem id="offlineItem">
<treerow>
<treecell url="chrome://communicator/content/pref/pref-offline.xul" label="&offline.label;"/>
</treerow>
</treeitem>
</treechildren>
</tree>
</overlay>

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

@ -0,0 +1 @@
Makefile

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

@ -0,0 +1,30 @@
#
# 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.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk

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

@ -0,0 +1,2 @@
comm.jar:
content/browser/pref/platformPrefOverlay.xul

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

@ -0,0 +1,33 @@
<?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/
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):
Ben Goodger <ben@netscape.com>
-->
<!DOCTYPE window SYSTEM "chrome://communicator-platform/locale/pref/platformPrefOverlay.dtd">
<overlay id="platformPreferencesOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
</overlay>

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

@ -0,0 +1 @@
Makefile

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

@ -0,0 +1,30 @@
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 2001 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk

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

@ -0,0 +1,2 @@
comm.jar:
content/browser/pref/platformPrefOverlay.xul

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

@ -0,0 +1,213 @@
<?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/
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):
Ben Goodger <ben@netscape.com>
Bill Law <law@netscape.com>
-->
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd">
%brandDTD;
<!ENTITY % platformPrefOverlayDTD SYSTEM "chrome://communicator-platform/locale/pref/platformPrefOverlay.dtd">
%platformPrefOverlayDTD;
]>
<overlay id="platformPreferencesOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<!-- Windows integration is (obviously) only applicable on Windows. -->
<treechildren id="advancedChildren">
<treeitem id="winhooks">
<treerow>
<treecell url="chrome://communicator/content/pref/pref-winhooks.xul" label="&winhooks.label;"/>
</treerow>
</treeitem>
</treechildren>
<!-- Add "set default browser" button to Navigator panel. -->
<hbox id="pref-nav-platform-extensions">
<groupbox flex="1">
<caption label="&defaultBrowserGroup.label;"/>
<deck id="defaultBrowserDeck" flex="1">
<!-- We use a deck for the three cases:
o If not already the default, then use child 0 (with button enabled)
o If already the default, then use child 1 (with disabled button).
o If the user has already pushed the "Set As Default" button, then use child 2
(with different text and a disabled button).
-->
<vbox flex="1">
<description>&makeDefaultText;</description>
<hbox>
<spacer flex="1"/>
<button label="&defaultBrowserButton.label;"
oncommand="makeDefault()"/>
<spacer flex="1"/>
</hbox>
</vbox>
<vbox flex="1">
<description>&alreadyDefaultText;</description>
<hbox>
<spacer flex="1"/>
<button label="&defaultBrowserButton.label;"
autostretch="never"
disabled="true"/>
<spacer flex="1"/>
</hbox>
</vbox>
<vbox flex="1">
<description pack="start">&defaultPendingText;</description>
<hbox>
<spacer flex="1"/>
<button label="&defaultBrowserButton.label;"
autostretch="never"
disabled="true"/>
<spacer flex="1"/>
</hbox>
</vbox>
</deck>
</groupbox>
</hbox>
<script type="application/x-javascript">
<![CDATA[
// This overlay is pulled into multiple places. We only want this
// code to kick in when we're overlaid onto pref-navigator.xul. And,
// we don't want to conflict with code within other files. So,
// we use anonymous functions throughout.
if (document.documentElement.id == "pref-navigator") {
// "Install" the SetFields function. This will be
// called whenever the Navigator pane is shown.
window.SetFields = function( pageData ) {
// Determine if we have been selected as the default browser
// already, and enable/disable the "Set As Default" button
// accordingly.
// We store our state info in the same place as the code in
// pref-winhooks.js uses so that this panel and the
// Advanced/System panel are kept in synch.
if (!("winHooks" in parent)) {
// Neither the Advanced/System panel nor this panel has
// appeared. Initialize the state information.
parent.winHooks = new Object;
// Get winhooks service.
parent.winHooks.winhooks = Components.classes[ "@mozilla.org/winhooks;1" ]
.getService( Components.interfaces.nsIWindowsHooks );
// Extract current settings (these are what the user has checked on
// the Advanced/System panel).
parent.winHooks.prefs = parent.winHooks.winhooks.settings;
}
// Ensure our additional state info is set.
if (!("makeDefaultPending" in parent.winHooks)) {
parent.winHooks.makeDefaultPending = false;
}
// Figure out which <deck> child should be activated.
// Default is child 0 (with button enabled).
var deckState = 0;
// Start by checking http/https/ftp and html/xhtml/xml.
var prefs = parent.winHooks.prefs;
if (prefs.isHandlingHTTP &&
prefs.isHandlingHTTPS &&
prefs.isHandlingFTP &&
prefs.isHandlingHTML &&
prefs.isHandlingXHTML &&
prefs.isHandlingXML) {
// The user *wants* us to be the default, apparently. This means
// that the deck *might* be in one of the other two states (with
// button disabled), depending on whether the registry matches.
// We test the registry settings using a scratch copy of the
// settings because we don't care about some of them, but we
// don't want to mess up the user's choices from the
// Advanced/System panel.
var testSettings = parent.winHooks.winhooks.settings;
// Test that these are set.
testSettings.isHandlingHTTP = true;
testSettings.isHandlingHTTPS = true;
testSettings.isHandlingFTP = true;
testSettings.isHandlingHTML = true;
testSettings.isHandlingXHTML = true;
testSettings.isHandlingXML = true;
// Ignore the rest.
testSettings.isHandlingCHROME = false;
testSettings.isHandlingGOPHER = false;
testSettings.isHandlingJPEG = false;
testSettings.isHandlingGIF = false;
testSettings.isHandlingMNG = false;
testSettings.isHandlingPNG = false;
testSettings.isHandlingBMP = false;
testSettings.isHandlingICO = false;
testSettings.isHandlingXUL = false;
// Now test whether the registry matches that.
if ( testSettings.registryMatches ) {
// Disable the button. The only remaining question
// is what text appears alongside it. That will
// vary depending on whether the user has pressed
// the "Set As Default" button already.
if ( parent.winHooks.makeDefaultPending ) {
deckState = 2;
} else {
deckState = 1;
}
}
}
// Now, switch the deck to the appropriate state.
document.getElementById("defaultBrowserDeck").selectedIndex = deckState;
// Return true to tell caller to process the standard pref fields.
return true;
}
// "Install" the makeDefault function;
window.makeDefault = function() {
// Extract current settings (these are what the
// user has checked on the Advanced/System panel).
var settings = parent.winHooks.prefs;
// Turn on all "default browser" settings.
settings.isHandlingHTTP = true;
settings.isHandlingHTTPS = true;
settings.isHandlingFTP = true;
settings.isHandlingHTML = true;
settings.isHandlingXHTML = true;
settings.isHandlingXML = true;
// Register callback that will be called when and if the
// user presses the OK button.
parent.hPrefWindow.registerOKCallbackFunc( function () {
// Apply the settings.
parent.winHooks.winhooks.settings = parent.winHooks.prefs;
} );
// Flip the deck to the "make-default pending" state.
document.getElementById("defaultBrowserDeck").selectedIndex = 2;
// Remember this state when next displayed.
parent.winHooks.makeDefaultPending = true;
}
}
]]>
</script>
</overlay>

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

@ -0,0 +1 @@
Makefile

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

@ -0,0 +1,29 @@
pref-advanced.dtd
pref-appearance.dtd
pref-applications.dtd
pref-applications.properties
pref-applications-edit.dtd
pref-cache.dtd
pref-charset.dtd
pref-colors.dtd
pref-themes.dtd
pref-debug.dtd
pref-debug1.dtd
pref-debug2.dtd
pref-download.dtd
pref-fonts.dtd
pref-history.dtd
pref-http.dtd
pref-languages.dtd
pref-languages.properties
pref-navigator.dtd
pref-offline.dtd
pref-policies.dtd
pref-proxies.dtd
pref-search.dtd
pref-smart_browsing.dtd
pref-smartupdate.dtd
preftree.dtd
pref.dtd
prefutilities.properties

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

@ -0,0 +1,32 @@
#
# 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.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = unix win
include $(topsrcdir)/config/rules.mk

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

@ -0,0 +1,23 @@
<!--LOCALIZATION NOTE : FILE 'Advanced' prefs settings -->
<!ENTITY lHeader "Advanced">
<!ENTITY advancedTitle.label "Features that help interpret web pages">
<!ENTITY autoLoadImgCheck.label "Automatically load images">
<!ENTITY autoLoadImgCheck.accesskey "i">
<!ENTITY enbJavaCheck.label "Enable Java">
<!ENTITY enbJavaCheck.accesskey "j">
<!ENTITY sendAddFtpCheck.label "Send this email address as anonymous FTP password:">
<!ENTITY sendAddFtpCheck.accesskey "e">
<!ENTITY imageBlocking.label "Image Blocking...">
<!ENTITY imageBlocking.accesskey "b">
<!ENTITY perfTitle.label "Quick Launch">
<!ENTITY enableTurbo.label "Keep &brandShortName; in memory to improve startup performance">
<!ENTITY enableTurboCheck.accesskey "t">
<!ENTITY perfdescription.label "If you check this item, part of &brandShortName; will stay in memory when not in use, allowing it to start up faster.">

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

@ -0,0 +1,40 @@
<!-- extracted from content/pref-appearance.xul -->
<!--LOCALIZATION NOTE : FILE The Appearance prefs dialog. -->
<!ENTITY lHeader "Appearance">
<!--LOCALIZATION NOTE (onStartLegend.label): Don't translate "&brandShortName;".
Place &brandShortName; in the phrase where the name of the application should
appear
-->
<!ENTITY onStartLegend.label "When &brandShortName; starts up, open">
<!ENTITY appear "Appearance">
<!--LOCALIZATION NOTE (navCheck.label): DONT_TRANSLATE -->
<!ENTITY navCheck.label "Navigator">
<!ENTITY navCheck.accesskey "n">
<!--LOCALIZATION NOTE (compCheck.label): DONT_TRANSLATE -->
<!ENTITY compCheck.label "Composer">
<!ENTITY compCheck.accesskey "c">
<!ENTITY calCheck.label "Calendar">
<!ENTITY calCheck.accesskey "a">
<!ENTITY showToolsLegend.label "Show toolbars as">
<!ENTITY picsNtextRadio.label "Pictures and text">
<!ENTITY picsNtextRadio.accesskey "p">
<!ENTITY picsOnlyRadio.label "Pictures only">
<!ENTITY picsOnlyRadio.accesskey "o">
<!ENTITY textonlyRadio.label "Text only">
<!ENTITY textonlyRadio.accesskey "x">
<!ENTITY showHideTooltips.label "Show Tooltips">
<!ENTITY showHideTooltips.accesskey "t">
<!ENTITY useSiteIcons.label "Show Web Site Icons">
<!ENTITY useSiteIcons.accesskey "i">
<!--LOCALIZATION NOTE (languageList.txt.label): Don't translate "&brandShortName;".
Place &brandShortName; in the phrase where the name of the application should appear
-->
<!ENTITY languageList.txt.label "Choose a language for &brandShortName;. The setting affects the language for text that appears in dialog boxes, menus, toolbars, and button labels. You must restart &brandShortName; for a new language setting to take effect.">
<!--LOCALIZATION NOTE (languageList.label): Don't translate "&brandShortName;".
Place &brandShortName; in the phrase where the name of the application should appear
-->
<!ENTITY languageList.label "Choose your preferred language for &brandShortName;:">

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

@ -0,0 +1,31 @@
<!ENTITY editType.label "Edit Type">
<!ENTITY extension.label "Extension:">
<!ENTITY mimetype.label "MIME Type:">
<!ENTITY mimetype.accesskey "m">
<!ENTITY handledby.label "Handled By">
<!ENTITY useDefault.label "Use system default">
<!ENTITY useDefault.accesskey "u">
<!ENTITY saveToDisk.label "Save to Disk">
<!ENTITY saveToDisk.accesskey "s">
<!ENTITY application.label "Application">
<!ENTITY application.accesskey "a">
<!ENTITY browse.label "Choose...">
<!ENTITY browse.accesskey "c">
<!ENTITY askBeforeOpen.label "Ask me before opening downloaded files of this type">
<!ENTITY askBeforeOpen.accesskey "k">
<!ENTITY newDescription.label "Description of type:">
<!ENTITY newDescription.accesskey "d">
<!ENTITY newExtensions.label "File extension:">
<!ENTITY newExtensions.accesskey "e">
<!ENTITY newMIME.label "MIME type:">
<!ENTITY newMIME.accesskey "m">
<!ENTITY newAppPath.label "Application to use:">
<!ENTITY newAppPath.accesskey "a">
<!ENTITY newTypeTitle.label "New Type">

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

@ -0,0 +1,24 @@
<!-- extracted from content/pref-applications.xul -->
<!--LOCALIZATION NOTE : FILE The Applications prefs dialog -->
<!ENTITY lHeader "Helper Applications">
<!ENTITY descript "Specify which application should handle each file type">
<!ENTITY fileTypes.label "File types:">
<!ENTITY aimLaunchSelect.label "AOL Instant Messenger Launch">
<!ENTITY newTypeButton.label "New Type...">
<!ENTITY newTypeButton.accesskey "n">
<!ENTITY editButton.label "Edit...">
<!ENTITY editButton.accesskey "e">
<!ENTITY removeButton.label "Remove">
<!ENTITY removeButton.accesskey "r">
<!ENTITY file "File Type Details">
<!ENTITY exten "Extension:">
<!--LOCALIZATION NOTE (mimeType): 'MIME' should not be translated -->
<!ENTITY mimeType "MIME type:">
<!ENTITY handle "Handled by:">
<!ENTITY resetText.label "Click &quot;Reset&quot; to clear your file-opening preferences and be asked before opening files.">
<!ENTITY resetButton.label "Reset">
<!ENTITY fileOpening.label "Opening files">
<!ENTITY plugins.label "Plug-in Finder Service">
<!ENTITY pluginFinder.label "Always use the Netscape Plug-in Finder Service (PFS) to get plug-ins.">
<!ENTITY pluginFinderDesc.label "If this option is not checked, the PFS is used only when a plug-in location is not specified by the web page that requires the plug-in.">

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

@ -0,0 +1,15 @@
# foo
saveToDisk=Save to Disk
handleInternally=Handled Internally
chooseHandler=Choose Application Helper
programsFilter=Programs
handlerExists=A helper already exists for the MIME type '%mime%'. Do you want to replace it?
handlerExistsTitle=Helper Application Exists
emptyMIMEType=You must specify a MIME type.
removeHandlerTitle=Remove File Type
removeHandler=If you remove a registered type, the helper will no longer be able to automatically handle files of this type. %n%nAre you sure you want to remove this file type?

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

@ -0,0 +1,45 @@
<!-- extracted from content/pref-BidiOptions.xul -->
<!--LOCALIZATION NOTE : FILE Bidi Options prefs dialog -->
<!ENTITY title.label "Bidi Options">
<!ENTITY lHeader "Bidi Options">
<!ENTITY direction.label "Default Direction">
<!ENTITY directionLTR.label "Left to Right">
<!ENTITY directionLTR.accesskey "l">
<!ENTITY directionRTL.label "Right to Left">
<!ENTITY directionRTL.accesskey "r">
<!ENTITY texttype.label "Text Type">
<!ENTITY charsettexttype.label "Based on Character Set">
<!ENTITY charsettexttype.accesskey "c">
<!ENTITY logicaltexttype.label "Logical">
<!ENTITY logicaltexttype.accesskey "g">
<!ENTITY visualtexttype.label "Visual">
<!ENTITY visualtexttype.accesskey "v">
<!ENTITY numeral.label "Numeral Shape">
<!ENTITY regularcontextnumeral.label "Contextual">
<!ENTITY regularcontextnumeral.accesskey "x">
<!ENTITY hindicontextnumeral.label "Hindi Numerals on RTL Document Direction">
<!ENTITY hindicontextnumeral.accesskey "u">
<!ENTITY arabicnumeral.label "Arabic">
<!ENTITY arabicnumeral.accesskey "a">
<!ENTITY hindinumeral.label "Hindi">
<!ENTITY hindinumeral.accesskey "h">
<!ENTITY controlstextmode.label "Text Mode in Controls">
<!ENTITY logicalcontrolstextmode.label "Logical">
<!ENTITY logicalcontrolstextmode.accesskey "o">
<!ENTITY visualcontrolstextmode.label "Visual">
<!ENTITY visualcontrolstextmode.accesskey "s">
<!ENTITY containercontrolstextmode.label "Like Containing Document">
<!ENTITY containercontrolstextmode.accesskey "d">
<!ENTITY clipboardtextmode.label "Text Mode in clipboard">
<!ENTITY logicalclipboardtextmode.label "Logical">
<!ENTITY logicalclipboardtextmode.accesskey "b">
<!ENTITY visualclipboardtextmode.label "Visual">
<!ENTITY visualclipboardtextmode.accesskey "v">
<!ENTITY sourceclipboardtextmode.label "As Source">
<!ENTITY sourceclipboardtextmode.accesskey "z">
<!ENTITY characterset.label "Character set">
<!ENTITY doccharacterset.label "Use the document specified character set">
<!ENTITY doccharacterset.accesskey "n">
<!ENTITY defaultcharacterset.label "Use my default character set, overriding the document-specified character set">
<!ENTITY defaultcharacterset.accesskey "m">

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

@ -0,0 +1,30 @@
<!-- extracted from content/pref-cache.xul -->
<!--LOCALIZATION NOTE : FILE Cache prefs dialog -->
<!ENTITY lHeader "Cache">
<!ENTITY cacheTitle.label "Set Cache Options">
<!ENTITY cachePara "The cache keeps copies of frequently visited web pages on your hard disk. This reduces the amount of time you are connected to the Internet. (Clicking Reload always shows you the latest version of a page.)">
<!ENTITY memCache.label "Memory Cache:">
<!ENTITY memCache.accesskey "m">
<!ENTITY diskCache.label "Disk Cache:">
<!ENTITY diskCache.accesskey "d">
<!ENTITY kbytes "KB">
<!ENTITY diskCacheFolder.label "Disk Cache Folder:">
<!ENTITY clearMemCache.label "Clear Memory Cache">
<!ENTITY clearMemCache.accesskey "c">
<!ENTITY clearDiskCache.label "Clear Disk Cache">
<!ENTITY clearDiskCache.accesskey "l">
<!ENTITY chooseDiskCacheFolder.label "Choose Folder...">
<!ENTITY chooseDiskCacheFolder.accesskey "h">
<!ENTITY diskCacheFolderExplanation "Cache files will be stored in a subfolder named &quot;Cache&quot; of the directory you specify. Restart &brandShortName; for changes to take effect.">
<!ENTITY docCache "Compare the page in the cache to the page on the network:">
<!ENTITY chooseFolder.label "Choose Folder...">
<!ENTITY chooseFolder.accesskey "f">
<!ENTITY oncePsessionRadio.label "Once per session">
<!ENTITY oncePsessionRadio.accesskey "o">
<!ENTITY everyTimeRadio.label "Every time I view the page">
<!ENTITY everyTimeRadio.accesskey "e">
<!ENTITY neverRadio.label "Never">
<!ENTITY neverRadio.accesskey "n">
<!ENTITY autoRadio.label "When the page is out of date">
<!ENTITY autoRadio.accesskey "w">

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

@ -0,0 +1,41 @@
<!--
- The contents of this file are subject to the Mozilla Public
- License Version 1.1 (the "License"); you may not use this file
- except in compliance with the License. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS
- IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- implied. See the License for the specific language governing
- rights and limitations under the License.
-
- The Original Code is Mozilla Communicator.
-
- The Initial Developer of the Original Code is Netscape
- Communications Corp. Portions created by Netscape Communications
- Corp. are Copyright (C) 1999 Netscape Communications Corp. All
- Rights Reserved.
-
- Contributor(s): Stephen Lamm <slamm@netscape.com>
-->
<!-- extracted from ./pref-charset.xul -->
<!-- LOCALIZATION NOTE Charset Coding Preferences Dialog: Do NOT localize the term "Character Coding" -->
<!ENTITY charset.customize.title.label "Customize Character Coding">
<!ENTITY charset.customize.left.header "Character Coding">
<!ENTITY charset.customize.right.header "Select Supported Charsets">
<!ENTITY charset.customize.current.label "Active Character Codings:">
<!ENTITY charset.customize.reorder.label "Reorder">
<!ENTITY charset.customize.remove.label "Remove">
<!ENTITY charset.customize.additional.label "Available Character Codings:">
<!ENTITY charset.customize.add.label "Add">
<!ENTITY charset.customize.cancel.label "Cancel">
<!ENTITY charset.customize.save.label "Save">
<!ENTITY charset.customize.save.popup "Please restart the browser for changes to take effect...">
<!ENTITY charset.customize.moveUp.label "Up">
<!ENTITY charset.customize.moveUp.accesskey "u">
<!ENTITY charset.customize.moveDown.label "Down">
<!ENTITY charset.customize.moveDown.accesskey "d">

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

@ -0,0 +1,30 @@
<!-- extracted from content/pref-colors.xul -->
<!-- LOCALIZATION NOTE : FILE Color management prefs -->
<!ENTITY lHeader "Colors">
<!ENTITY color "Text and Background">
<!ENTITY textColor.label "Text:">
<!ENTITY textColor.accesskey "t">
<!ENTITY backgroundColor.label "Background:">
<!ENTITY backgroundColor.accesskey "b">
<!ENTITY useSystemColors.label "Use system colors">
<!ENTITY useSystemColors.accesskey "s">
<!ENTITY underlineLinks.label "Underline links">
<!ENTITY underlineLinks.accesskey "u">
<!ENTITY links "Link Colors">
<!ENTITY linkColor.label "Unvisited Links:">
<!ENTITY linkColor.accesskey "l">
<!ENTITY visitedLinkColor.label "Visited Links:">
<!ENTITY visitedLinkColor.accesskey "v">
<!-- LOCALIZATION NOTE (someProvColors): This is the start of a sentence and will be followed by the following radio buttons. -->
<!ENTITY someProvColors "When a web page provides its own colors and background">
<!-- LOCALIZATION NOTE (alwaysUseDocColors.label): This is option one, and it appends to 'someProvColors' above. -->
<!ENTITY alwaysUseDocumentColors.label "Always use the colors and background specified by the web page">
<!ENTITY alwaysUseDocumentColors.accesskey "a">
<!-- LOCALIZATION NOTE (ignoreDocColors.label): This is option two, and it appends to 'someProvColors' above. -->
<!ENTITY useMyColors.label "Use my chosen colors, ignoring the colors and background image specified">
<!ENTITY useMyColors.accesskey "i">
<!ENTITY viewsource "View Source Window">
<!ENTITY syntaxHighlight.label "Enable syntax highlighting">
<!ENTITY syntaxHighlight.accesskey "e">

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

@ -0,0 +1,26 @@
<!-- extracted from content/pref-debug.xul -->
<!--LOCALIZATION NOTE : FILE DONT_TRANSLATE This file should not be translated -->
<!ENTITY lHeader "Debug">
<!ENTITY rHeader "General debugging preferences">
<!-- Miscelleneous -->
<!ENTITY debugMiscellaneous.label "Miscellaneous">
<!ENTITY debugEnableDump.label "Enable JavaScript dump() output">
<!ENTITY debugStrictJavascript.label "Show strict JavaScript warnings">
<!ENTITY debugConsoleJavascript.label "Show Javascript errors and warnings in Mozilla chrome in the js console">
<!ENTITY debugUseXBLForms.label "Use XBL-based form controls (takes effect after restart). These are still under construction.">
<!-- Debug: Turn on gfx-rendered widgets -->
<!ENTITY widgetRendering.label "Rendering">
<!ENTITY debugWindow.label "debug window">
<!ENTITY debugXULBox.label "debug XUL boxes">
<!ENTITY useNativePrintDialog.label "Use Native Print Dialog (where supported)">
<!ENTITY printUseGlobalPrintSettings.label "Use Global Print Settings">
<!-- Accelerator Key -->
<!ENTITY accelerators.label "Keyboard accelerators">
<!ENTITY acceleratorsBlurb.label "A value of zero disables a modifier key.">
<!ENTITY acceleratorKey.label "Accelerator key:">
<!ENTITY menuAccessKey.label "Menu access key:">

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

@ -0,0 +1,21 @@
<!-- extracted from content/pref-debug.xul -->
<!--LOCALIZATION NOTE : FILE DONT_TRANSLATE This file should not be translated -->
<!ENTITY lHeader "Events">
<!ENTITY rHeader "Event debugging preferences">
<!-- Event Debugging -->
<!ENTITY debugEventDebugging.label "Event Debugging">
<!ENTITY debugPaintFlashing.label "Paint Flashing (Caps-Lock toggles)">
<!ENTITY debugPaintDumping.label "Paint Dumping">
<!ENTITY debugInvalidateDumping.label "Invalidate Dumping">
<!ENTITY debugEventDumping.label "Event Dumping">
<!ENTITY debugMotionEventDumping.label "Motion Event Dumping">
<!ENTITY debugCrossingEventDumping.label "Crossing Event Dumping">
<!-- Reflow events -->
<!ENTITY debugReflowEvents.label "Reflow Debugging">
<!ENTITY debugReflowShowFrameCounts.label "Show frame counts">
<!ENTITY debugReflowDumpFrameCounts.label "Dump frame counts">
<!ENTITY debugReflowDumpFrameByFrameCounts.label "Dump frame by frame counts">

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

@ -0,0 +1,20 @@
<!-- extracted from content/pref-debug.xul -->
<!--LOCALIZATION NOTE : FILE DONT_TRANSLATE This file should not be translated -->
<!ENTITY lHeader "Networking">
<!ENTITY rHeader "Network debugging preferences">
<!-- Network-->
<!ENTITY debugNetworking.label "Networking">
<!ENTITY dirFormat "Directory Listing Format">
<!ENTITY raw.label "Raw - for debugging only">
<!ENTITY html.label "HTML">
<!ENTITY xul.label "XUL (tree-based)">
<!ENTITY httpVersion.label "HTTP Version">
<!-- Cache -->
<!ENTITY debugCache.label "Cache">
<!ENTITY debugDisableXULCache.label "Disable XUL Cache">
<!ENTITY debugEnableMemCache.label "Enable Mem Cache">
<!ENTITY debugEnableDiskCache.label "Enable Disk Cache">

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

@ -0,0 +1,8 @@
<!ENTITY lHeader "Downloads">
<!ENTITY downloadBehavior.label "When starting a download">
<!ENTITY openDM.label "Open the download manager">
<!ENTITY openDM.accesskey "m">
<!ENTITY openProgressDialog.label "Open a progress dialog">
<!ENTITY openProgressDialog.accesskey "p">
<!ENTITY doNothing.label "Don't open anything">
<!ENTITY doNothing.accesskey "D">

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

@ -0,0 +1,84 @@
<!-- extracted from content/pref-fonts.xul -->
<!-- LOCALIZATION NOTE : FILE 'Fonts' prefs dialog -->
<!ENTITY lHeader "Fonts">
<!ENTITY language.label "Fonts for:">
<!ENTITY language.accesskey "t">
<!ENTITY typefaces.label "Typeface">
<!ENTITY sizes.label "Size (pixels)">
<!ENTITY proportional.label "Proportional:">
<!ENTITY proportional.accesskey "p">
<!ENTITY serif.label "Serif:">
<!ENTITY serif.accesskey "s">
<!ENTITY sans-serif.label "Sans-serif:">
<!ENTITY sans-serif.accesskey "n">
<!ENTITY monospace.label "Monospace:">
<!ENTITY monospace.accesskey "m">
<!-- LOCALIZATION NOTE (fantasy.label): 'Fantasy' means 'Ornate' -->
<!ENTITY fantasy.label "Fantasy:">
<!ENTITY fantasy.accesskey "f">
<!ENTITY cursive.label "Cursive:">
<!ENTITY cursive.accesskey "c">
<!ENTITY fontsize.units "pixels">
<!ENTITY font.langGroup.latin1 "Western">
<!ENTITY font.langGroup.latin2 "Central European">
<!ENTITY font.langGroup.japanese "Japanese">
<!ENTITY font.langGroup.trad-chinese "Traditional Chinese">
<!ENTITY font.langGroup.simpl-chinese "Simplified Chinese">
<!ENTITY font.langGroup.korean "Korean">
<!ENTITY font.langGroup.cyrillic "Cyrillic">
<!ENTITY font.langGroup.baltic "Baltic">
<!ENTITY font.langGroup.el "Greek">
<!ENTITY font.langGroup.turkish "Turkish">
<!ENTITY font.langGroup.unicode "Unicode">
<!ENTITY font.langGroup.user-def "User Defined">
<!ENTITY font.langGroup.thai "Thai">
<!ENTITY font.langGroup.hebrew "Hebrew">
<!ENTITY font.langGroup.arabic "Arabic">
<!-- Minimum font size -->
<!ENTITY minSize.label "Minimum font size:">
<!ENTITY minSize.accesskey "z">
<!ENTITY minSize.none "None">
<!-- default font type -->
<!ENTITY useDefaultFontSerif.label "Serif">
<!ENTITY useDefaultFontSansSerif.label "Sans Serif">
<!ENTITY newLanguages.label "New languages can be configured using the Languages Panel.">
<!ENTITY useDocumentFonts.label "Allow documents to use other fonts">
<!ENTITY useDocumentFonts.accesskey "o">
<!-- leaving this stuff in for now -->
<!ENTITY header2 "When a webpage chooses its own fonts">
<!ENTITY useDefaultFont.label "Use my default fonts, ignoring the fonts the page has chosen">
<!ENTITY useDefaultFont.accesskey "u">
<!-- LOCALIZATION NOTE (useDocFontNonDynamic): Translate 'Dynamic Fonts' according to Netscape Glossary -->
<!ENTITY useDocFontNonDynamic.label "Use the fonts chosen by the page">
<!ENTITY useDocFontNonDynamic.accesskey "p">
<!-- LOCALIZATION NOTE (useDocFontDynamic): Translate 'Dynamic Fonts' according to Netscape Glossary -->
<!ENTITY useDocFontDynamic.label "Use all the fonts chosen by the page">
<!ENTITY useDocFontDynamic.accesskey "a">
<!-- font scaling -->
<!ENTITY resolution.label "Display resolution:">
<!ENTITY resolution.accesskey "r">
<!-- LOCALIZATION NOTE (resolution.dpi): dpi stands for "dots per inch" -->
<!ENTITY resolution.dpi "dpi">
<!-- LOCALIZATION NOTE (resolution.dpi): $val will be replaced by a numeric dpi value. -->
<!ENTITY resolution.dpival "$val &resolution.dpi;">
<!ENTITY resolution.system.label "System setting">
<!ENTITY resolution.other "Other...">
<!-- screen calibration dialog -->
<!ENTITY calibrateDialog.title "Calibrate Resolution">
<!ENTITY calibrate.instructions "The length of the line above is:">
<!ENTITY units.inches "inches">
<!ENTITY units.centimetres "centimeters">

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

@ -0,0 +1,15 @@
<!ENTITY lHeader "History">
<!ENTITY header3.label "Browsing History">
<!ENTITY historyPages.label "History is a list of previously visited pages.">
<!ENTITY pageHis.label "Remember visited pages for the last">
<!ENTITY pageHis.accesskey "p">
<!ENTITY days.label "days">
<!ENTITY clearHistory.label "Clear History">
<!ENTITY clearHistory.accesskey "r">
<!ENTITY locationBarHistory.label "Location Bar History">
<!ENTITY clearLocationBar.label "Clear the list of sites stored in the location bar menu.">
<!ENTITY clearLocationBarButton.label "Clear Location Bar">
<!ENTITY clearLocationBarButton.accesskey "b">

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

@ -0,0 +1,20 @@
<!ENTITY lHeader "HTTP Networking">
<!ENTITY rHeader "HTTP Network Preferences">
<!-- Network-->
<!ENTITY prefDirect.label "Direct Connection Options">
<!ENTITY prefProxy.label "Proxy Connection Options">
<!ENTITY prefEnableHTTP10.label "Use HTTP 1.0">
<!ENTITY prefEnableHTTP10.accesskey "U">
<!ENTITY prefEnableHTTP10Proxy.accesskey "S">
<!ENTITY prefEnableHTTP11.label "Use HTTP 1.1">
<!ENTITY prefEnableHTTP11.accesskey "H">
<!ENTITY prefEnableHTTP11Proxy.accesskey "T">
<!ENTITY prefEnableKeepAlive.label "Enable Keep-Alive">
<!ENTITY prefEnableKeepAlive.accesskey "K">
<!ENTITY prefEnableKeepAliveProxy.accesskey "L">
<!ENTITY prefEnablePipelining.label "Enable Pipelining">
<!ENTITY prefEnablePipelining.accesskey "P">
<!ENTITY prefEnablePipeliningProxy.accesskey "I">
<!ENTITY prefPara "HTTP connections may be fine-tuned using these options to enhance either performance or compatibility. Some proxy servers, for example, are known to require HTTP/1.0 (see the release notes for details).">
<!ENTITY prefPipeWarning "WARNING: pipelining is an experimental feature, designed to improve page-load performance, that is unfortunately not well supported by some web servers and proxies.">

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

@ -0,0 +1,35 @@
<!-- LOCALIZATION NOTE : FILE 'Languages' preferences dialog -->
<!ENTITY languages.customize.prefLangDescript "Web pages are sometimes available in more than one language. Choose languages for displaying web pages, in order of preference.">
<!ENTITY languages.customize.lHeader "Languages">
<!ENTITY languages.customize.rHeader "Languages in which webpages are displayed">
<!ENTITY langtitle.label "Languages for Web Pages">
<!ENTITY languages.customize.prefAddLangDescript "Select the language(s) you would like to add.">
<!ENTITY languages.customize.engOrder.label "1">
<!ENTITY languages.customize.engOption.label "English">
<!ENTITY languages.customize.addButton.label "Add...">
<!ENTITY languages.customize.deleteButton.label "Remove">
<!ENTITY languages.customize.title.label "Customize Languages">
<!ENTITY languages.customize.add.title.label "Add Languages">
<!ENTITY languages.customize.left.header "Character Coding">
<!ENTITY languages.customize.right.header "Select Supported Charsets">
<!ENTITY languages.customize.available.label "Languages:">
<!ENTITY languages.customize.active.label "Languages in order of preference:">
<!ENTITY languages.customize.reorder.label "Reorder">
<!ENTITY languages.customize.remove.label "Remove">
<!ENTITY languages.customize.additional.label "Available Charactersets">
<!ENTITY languages.customize.add.label "Add">
<!ENTITY languages.customize.others.label "Others:">
<!ENTITY languages.customize.Charset.grouplabel "Character Coding">
<!ENTITY languages.customize.DefaultCharset.label "Default Character Coding:">
<!-- LOCALIZATION NOTE Charset Coding Preferences Dialog: Do NOT localize the terms "en-bz, ar-jo" -->
<!ENTITY languages.customize.others.examples "e.g.: en-bz, ar-jo">
<!ENTITY languages.customize.cancel.label "Cancel">
<!ENTITY languages.customize.save.label "Save">
<!ENTITY languages.customize.ok.label "OK">
<!ENTITY languages.customize.save.popup "Please restart the browser for changes to take effect...">
<!ENTITY languages.customize.moveUp.label "Move Up">
<!ENTITY languages.customize.moveUp.accesskey "u">
<!ENTITY languages.customize.moveDown.label "Move Down">
<!ENTITY languages.customize.moveDown.accesskey "d">

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

@ -0,0 +1 @@
illegalOtherLanguage=Not a valid language code.

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

@ -0,0 +1,21 @@
<!-- LOCALIZATION NOTE : FILE Mouse-wheel management prefs, for those lucky OSes that support mouse wheels -->
<!ENTITY title.label "Mouse Wheel">
<!ENTITY mouseWheelTitle.label "Mouse wheel configuration">
<!ENTITY mouseWheelPanel.label "Specify mouse wheel behavior when used with this modifier key: ">
<!ENTITY mouseWheelPanel.accesskey "w">
<!ENTITY usingJustTheWheel.label "No modifier key">
<!ENTITY usingWheelAndAlt.label "&altKey.label;">
<!ENTITY usingWheelAndCtrl.label "&ctrlKey.label;">
<!ENTITY usingWheelAndShft.label "&shiftKey.label;">
<!ENTITY scroll.label "Scroll the document by ">
<!ENTITY scroll.accesskey "s">
<!ENTITY scrollLines.label " lines. ">
<!ENTITY useSystemDefault.label "Use system default">
<!ENTITY useSystemDefault.accesskey "y">
<!ENTITY scrollPgUpPgDn.label "Scroll a page up or a page down">
<!ENTITY scrollPgUpPgDn.accesskey "p">
<!ENTITY history.label "Move back and forward in the browsing history">
<!ENTITY history.accesskey "h">
<!ENTITY textsize.label "Make the text larger or smaller">
<!ENTITY textsize.accesskey "t">

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

@ -0,0 +1,28 @@
<!ENTITY lHeader "Navigator">
<!ENTITY navRadio "When Navigator starts up, display">
<!ENTITY blankPageRadio.label "Blank page">
<!ENTITY blankPageRadio.accesskey "n">
<!ENTITY homePageRadio.label "Home page">
<!ENTITY homePageRadio.accesskey "h">
<!ENTITY lastPageRadio.label "Last page visited">
<!ENTITY lastPageRadio.accesskey "l">
<!ENTITY header2.label "Home Page">
<!ENTITY homePageIntro.label "Clicking the Home button takes you to this page.">
<!ENTITY location.label "Location:">
<!ENTITY location.accesskey "a">
<!ENTITY useCurrent.label "Use Current Page">
<!ENTITY useCurrent.accesskey "u">
<!ENTITY browseFile.label "Choose File...">
<!ENTITY browseFile.accesskey "c">
<!ENTITY useDefault.label "Restore Default">
<!ENTITY useDefault.accesskey "r">
<!ENTITY toolbarIntro.label "Select the buttons you want to see in the toolbars">
<!ENTITY bookmarksButton.label "Bookmarks">
<!ENTITY goButton.label "Go">
<!ENTITY homeButton.label "Home">
<!ENTITY printButton.label "Print">
<!ENTITY searchButton.label "Search">

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

@ -0,0 +1,25 @@
<!-- extracted from content/pref-offline.xul -->
<!--LOCALIZATION NOTE : FILE The 'Offline' preferences dialog -->
<!ENTITY window.title "Offline &amp; Disk Space">
<!ENTITY boxHeader "Offline &amp; Disk Space">
<!ENTITY rHeader "Offline">
<!--LOCALIZATION NOTE (textStart): Don't translate "&brandShortName;".
Place "&brandShortName;" in the phrase where the name of the application should
appear
-->
<!ENTITY textStart "When starting &brandShortName;:">
<!ENTITY radioAskMode "Ask me if I want online or offline mode">
<!ENTITY radioUsePrev "Use my previous online/offline state">
<!ENTITY textGoingOnline "When going online:">
<!ENTITY radioAskUnsent "Ask me if I want to send my unsent messages">
<!ENTITY radioAutoSend "Automatically send my unsent messages">
<!ENTITY radioNotSend "Do not send my unsent messages">
<!ENTITY textGoingOffline "When going offline:">
<!ENTITY radioAskDownload "Ask me if I want to download messages for offline use">
<!ENTITY radioAutoDownload "Automatically download messages for offline use">
<!ENTITY radioNotDownload "Do not download messages for offline use">
<!ENTITY Diskspace "Disk Space">
<!ENTITY offlineCompact.label "Compact folders when it will save over">
<!ENTITY offlineCompact.accesskey "c">
<!ENTITY kb.label "KB">

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

@ -0,0 +1,20 @@
<!ENTITY lHeader "Security Policies">
<!ENTITY rHeader "(text here)">
<!ENTITY zoneIntro.label "&brandShortName; allows you to create policies that determine what access certain websites have to various functionality, including aspects of scripting and Java.">
<!ENTITY policies.label "Policies:">
<!ENTITY default.label "Default Policy">
<!ENTITY allWebsites.label "All Websites">
<!ENTITY trusted.label "Trusted Sites">
<!ENTITY annoyances.label "Common Annoyances">
<!ENTITY restricted.label "Restricted Sites">
<!ENTITY addSite.label "Add Site...">
<!ENTITY addSite.accesskey "a">
<!ENTITY settings.label "Settings for ">
<!ENTITY settings.accesskey "s">
<!ENTITY description.label "Policy Description:">

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

@ -0,0 +1,39 @@
<!-- extracted from content/pref-proxies.xul -->
<!--LOCALIZATION NOTE : FILE The Proxies preferences dialog -->
<!ENTITY lHeader "Proxies">
<!ENTITY proxyTitle.label "Configure Proxies to Access the Internet">
<!ENTITY directTypeRadio.label "Direct connection to the Internet">
<!ENTITY directTypeRadio.accesskey "d">
<!ENTITY manualTypeRadio.label "Manual proxy configuration">
<!ENTITY manualTypeRadio.accesskey "m">
<!ENTITY autoTypeRadio.label "Automatic proxy configuration URL:">
<!ENTITY autoTypeRadio.accesskey "a">
<!ENTITY configAutoconfigText.label "Configuration location (URL):">
<!ENTITY configAutoconfigText.accesskey "u">
<!ENTITY reload.label "Reload">
<!ENTITY reload.accesskey "l">
<!ENTITY ftp.label "FTP Proxy:">
<!ENTITY ftp.accesskey "f">
<!ENTITY gopher.label "Gopher Proxy:">
<!ENTITY gopher.accesskey "g">
<!ENTITY http.label "HTTP Proxy:">
<!ENTITY http.accesskey "h">
<!ENTITY ssl.label "SSL Proxy:">
<!ENTITY ssl.accesskey "s">
<!ENTITY socks.label "SOCKS Host:">
<!ENTITY socks.accesskey "c">
<!ENTITY socks4.label "SOCKS v4">
<!ENTITY socks4.accesskey "k">
<!ENTITY socks5.label "SOCKS v5">
<!ENTITY socks5.accesskey "v">
<!ENTITY port.label "Port:">
<!ENTITY HTTPport.accesskey "p">
<!ENTITY SSLport.accesskey "o">
<!ENTITY FTPport.accesskey "r">
<!-- No accesskey for gopher (':' doesn't go well) - mpt's going to redesign the window -->
<!ENTITY gopherPort.accesskey "">
<!ENTITY SOCKSport.accesskey "t">
<!ENTITY noproxy.label "No Proxy for:">
<!ENTITY noproxy.accesskey "n">
<!ENTITY noproxyExplain.label "Example: .mozilla.org, .net.nz">

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

@ -0,0 +1,12 @@
<!-- LOCALIZATION NOTE : FILE Proxy management prefs -->
<!ENTITY window.title "View Manual Proxy Configuration">
<!ENTITY intro.label "You may configure a proxy and port number for each of the internet protocols that &brandShortName; supports.">
<!ENTITY ftp.label "FTP Proxy:">
<!ENTITY gopher.label "Gopher Proxy:">
<!ENTITY http.label "HTTP Proxy:">
<!ENTITY wais.label "WAIS Proxy:">
<!ENTITY port.label "Port:">
<!ENTITY direct.label "You may provide a list of domains that &brandShortName; should access directly, rather than via the proxy:">
<!ENTITY noproxy.label "No Proxy for:">
<!ENTITY sockhost.label "SOCKS v5 Host:">

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

@ -0,0 +1,21 @@
<!-- extracted from content/pref-scripts.xul -->
<!--LOCALIZATION NOTE : FILE The 'Scripts & Plugins' preferences dialog -->
<!ENTITY lHeader "Scripts &amp; Plugins">
<!--LOCALIZATION NOTE (enableJsCheck.label): 'JavaScript' should never be translated -->
<!ENTITY navigator.label "Navigator">
<!ENTITY navigator.accesskey "r">
<!ENTITY enableJavaScript.label "Enable JavaScript for">
<!ENTITY allowScripts.label "Allow scripts to:">
<!ENTITY allowWindowOpen.label "Open unrequested windows">
<!ENTITY allowWindowMoveResize.label "Move or resize existing windows">
<!ENTITY allowWindowFlip.label "Raise or lower windows">
<!ENTITY allowWindowStatusChange.label "Change status bar text">
<!ENTITY allowWindowImageSrcChange.label "Change images">
<!ENTITY allowDocumentCookieSet.label "Create or change cookies">
<!ENTITY allowDocumentCookieGet.label "Read cookies">
<!ENTITY allowHideStatusBar.label "Hide the status bar">
<!ENTITY enablePlugin.label "Enable Plugins for">

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

@ -0,0 +1,22 @@
<!-- extracted from content/pref-search.xul -->
<!-- LOCALIZATION NOTE : FILE The Search prefs dialog -->
<!--LOCALIZATION NOTE (lHeader): Translate "Search" according to Netscape glossary -->
<!ENTITY lHeader "Internet Search">
<!ENTITY legendHeader "Default Search Engine">
<!ENTITY defaultSearchEngine.label "Search using:">
<!ENTITY defaultSearchEngine.accesskey "u">
<!ENTITY openSidebarSearchPanel.label "Open the Search tab in the Sidebar when search results are available">
<!ENTITY openSidebarSearchPanel.accesskey "o">
<!ENTITY defaultengine.label "Netscape Search">
<!ENTITY searchResults.label "Search Results">
<!ENTITY sidebarSearchTabPref.label "Sidebar Search Tab Preference">
<!ENTITY searchModeBasic.label "Basic">
<!ENTITY searchModeBasic.accesskey "b">
<!ENTITY searchModeAdvanced.label "Advanced">
<!ENTITY searchModeAdvanced.accesskey "a">

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

@ -0,0 +1,26 @@
<!--
- The contents of this file are subject to the Mozilla Public
- License Version 1.1 (the "License"); you may not use this file
- except in compliance with the License. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS
- IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- implied. See the License for the specific language governing
- rights and limitations under the License.
-
- The Original Code is mozilla.org code.
-
- The Initial Developer of the Original Code is Netscape
- Communications Corp. Portions created by Netscape are
- Copyright (C) 2001 Netscape Communications Corp. All
- Rights Reserved.
-
- Contributor(s):
- Terry Hayes <thayes@netscape.com>
-->
<!--LOCALIZATION NOTE : FILE 'Privacy and Security' prefs settings -->
<!ENTITY lHeader "Privacy &amp; Security">
<!ENTITY rContent1 "Privacy &amp; Security preferences determine how your browser fills in forms and passwords, how it works with cookies and images, and how it uses certificates and smart cards.">
<!ENTITY rContent2 "If no subcategories are visible on the left under Privacy &amp; Security, double-click the category to expand the list.">

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

@ -0,0 +1,27 @@
<!-- extracted from content/pref-smart_browsing.xul -->
<!--LOCALIZATION NOTE : FILE The SmartBrowsing prefs dialog -->
<!ENTITY lHeader "Smart Browsing">
<!--LOCALIZATION NOTE (internetKeywordsHeader.label): DONT_TRANSLATE -->
<!ENTITY internetKeywordsHeader.label "Internet Keywords">
<!ENTITY internetKeywordsDescription.label "&brandShortName; Internet Keywords enables fast access to services such as stock quotes, search and other information from the Location bar.">
<!ENTITY moreInformation.label "More Information...">
<!ENTITY moreInformation.accesskey "m">
<!--LOCALIZATION NOTE (enableKeyCheck.label): Do not translate 'Internet Keywords' -->
<!ENTITY keywordsEnabled.label "Enable Internet Keywords">
<!ENTITY keywordsEnabled.accesskey "k">
<!ENTITY autoCompleteHeader.label "Location Bar Autocomplete">
<!ENTITY autoCompleteEnabled.label "Automatically complete text typed into Location bar.">
<!ENTITY autoCompleteEnabled.accesskey "l">
<!ENTITY autoCompleteAdvanced.label "Advanced...">
<!ENTITY autoCompleteAdvanced.title "Autocomplete Preferences">
<!ENTITY autoCompleteAutoFill.label "Autocomplete best match as you type">
<!ENTITY autoCompleteShowPopup.label "Show list of matching results">
<!ENTITY autoCompleteShowSearch.label "Show internet search engine">
<!ENTITY autoCompleteMatchOnlyTyped.label "Match only websites you've typed previously">
<!ENTITY autocompletePreview.label "Preview">

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше