bug 333383 - move SeaMonkey pref window UI to suite/ - cvs remove old filesin xpfe/, r+sr=Neil

This commit is contained in:
kairo%kairo.at 2006-05-17 19:38:42 +00:00
parent 63a50089be
commit 5add892b01
116 changed files with 0 additions and 11245 deletions

View File

@ -1 +0,0 @@
Makefile

View File

@ -1 +0,0 @@
Makefile

View File

@ -1 +0,0 @@
Makefile

View File

@ -1,49 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Ben Goodger <ben@netscape.com>
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<overlay id="platformPreferencesOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<!-- the poor macintosh doesn't support any of the extra goodies that unix and
windows do, so this file is blank. (that doesn't mean it's not required,
so don't remove it!) -->
</overlay>

View File

@ -1,426 +0,0 @@
/* -*- Mode: Java; tab-width: 4; 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
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Ben "Count XULula" Goodger <ben@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
const _DEBUG = false;
/** PrefWindow IV
* =============
* This is a general page switcher and pref loader.
* =>> CHANGES MUST BE REVIEWED BY ben@netscape.com!! <<=
**/
var hPrefWindow = null;
var queuedTag;
function initPanel ( aPrefTag )
{
if( hPrefWindow )
hPrefWindow.onpageload( aPrefTag )
else
queuedTag = aPrefTag;
}
function onLoad()
{
hPrefWindow = new nsPrefWindow('panelFrame');
if (!hPrefWindow)
throw "failed to create prefwindow";
else
hPrefWindow.init();
}
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.chromeRegistry = null;
this.observerService= null;
this.cancelHandlers = [];
this.okHandlers = [];
// if there is a system pref switch
this.pagePrefChanged = false;
// the set of pages, which are updated after a system pref switch
this.pagePrefUpdated = [];
// set up window
this.onload();
}
nsPrefWindow.prototype =
{
onload:
function ()
{
try
{
this.pref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch(null);
this.chromeRegistry = Components.classes["@mozilla.org/chrome/chrome-registry;1"].getService(Components.interfaces.nsIChromeRegistrySea);
this.observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
}
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] );
},
onAccept:
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++ )
try {
hPrefWindow.okHandlers[i]();
} catch (e) {
dump("some silly ok handler /*"+hPrefWindow.okHandlers[i]+"*/ failed: "+ e);
}
hPrefWindow.savePrefs();
return true;
},
onCancel:
function ()
{
for( var i = 0; i < hPrefWindow.cancelHandlers.length; i++ )
try {
hPrefWindow.cancelHandlers[i]();
} catch (e) {
dump("some silly cancel handler /*"+hPrefWindow.cancelHandlers[i]+"*/ failed: "+ e);
}
return true;
},
registerOKCallbackFunc:
function ( aFunctionReference )
{
this.okHandlers[this.okHandlers.length] = aFunctionReference;
},
registerCancelCallbackFunc:
function ( aFunctionReference )
{
this.cancelHandlers[this.cancelHandlers.length] = aFunctionReference;
},
getPrefIsLocked:
function ( aPrefString )
{
return this.pref.prefIsLocked(aPrefString);
},
getPref:
function ( aPrefType, aPrefString )
{
try
{
switch ( aPrefType )
{
case "bool":
return this.pref.getBoolPref( aPrefString );
case "int":
return this.pref.getIntPref( aPrefString );
case "localfile":
return this.pref.getComplexValue( aPrefString, Components.interfaces.nsILocalFile);
case "localizedstring":
return this.pref.getComplexValue( aPrefString, Components.interfaces.nsIPrefLocalizedString ).data;
case "color":
case "string":
default:
return this.pref.getComplexValue( aPrefString, Components.interfaces.nsISupportsString ).data;
}
}
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":
this.pref.setBoolPref( aPrefString, aValue );
break;
case "int":
this.pref.setIntPref( aPrefString, aValue );
break;
case "localfile":
this.pref.setComplexValue( aPrefString, Components.interfaces.nsILocalFile, aValue );
break;
case "color":
case "string":
case "localizedstring":
default:
var supportsString = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
supportsString.data = aValue;
this.pref.setComplexValue( aPrefString, Components.interfaces.nsISupportsString, supportsString );
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" || elt == "listitem")
prefattribute = "checked";
else if (elt == "colorpicker")
prefattribute = "color";
else if (elt == "button")
prefattribute = "disabled";
}
var value = itemObject[prefattribute];
var preftype = itemObject.preftype;
if (!preftype) {
if (elt == "textbox" || elt == "colorpicker")
preftype = "string";
else if (elt == "checkbox" || elt == "listitem" || 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, 10);
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;
}
// the pref is not saved, if the pref value is not
// changed or the pref is locked.
if( !this.getPrefIsLocked(itemObject.prefstring) &&
(value != this.getPref( preftype, itemObject.prefstring)))
this.setPref( preftype, itemObject.prefstring, value );
}
}
}
}
try
{
Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefService)
.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"));
// update widgets states when it is first loaded, or there are
// system pref switch. (i.e., to refect the changed lock status).
if(!(aPageTag in this.wsm.dataManager.pageData) ||
(this.pagePrefChanged && (!(aPageTag in this.pagePrefUpdated))))
{
var prefElements = window.frames[this.contentFrame].document.getElementsByAttribute( "prefstring", "*" );
if (this.pagePrefChanged)
this.pagePrefUpdated[aPageTag] = [];
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" || elt == "colorpicker")
preftype = "string";
else if (elt == "checkbox" || elt == "listitem" || 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" || elt == "listitem")
prefattribute = "checked";
else if (elt == "colorpicker")
prefattribute = "color";
else if (elt == "button")
prefattribute = "disabled";
}
var prefvalue = this.getPref( preftype, prefstring );
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.view.selection.select( index );
}
};

View File

@ -1,383 +0,0 @@
/**
* 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)
{
changeMIMEStuff(MIME_URI(aMIMETypeString), "value", aMIMETypeString.toLowerCase());
},
get description()
{
return getLiteralForContentType(this.URI, "description");
},
set description(aDescriptionString)
{
changeMIMEStuff(MIME_URI(this.mimeType), "description", aDescriptionString);
},
get isEditable()
{
return getLiteralForContentType(this.URI, "editable");
},
set isEditable(aIsEditableString)
{
changeMIMEStuff(MIME_URI(this.mimeType), "editable", aIsEditableString);
},
get extensions()
{
var extensionResource = gRDF.GetUnicodeResource(NC_RDF("fileExtensions"));
var contentTypeResource = gRDF.GetUnicodeResource(MIME_URI(this.mimeType));
var extensionTargets = gDS.GetTargets(contentTypeResource, extensionResource, true);
var extString = "";
if (extensionTargets) {
while (extensionTargets.hasMoreElements()) {
var currentExtension = extensionTargets.getNext();
if (currentExtension) {
currentExtension = currentExtension.QueryInterface(Components.interfaces.nsIRDFLiteral);
if (extString != "") {
extString += " ";
}
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());
},
clearExtensions: function ()
{
var extArray = this.extensions.split(" ");
for (i = extArray.length - 1; i >= 0; --i) {
this.removeExtension(extArray[i]);
}
},
// content handling
get saveToDisk()
{
return getHandlerInfoForType(this.URI, "saveToDisk");
},
set saveToDisk(aSavedToDisk)
{
changeMIMEStuff(HANDLER_URI(this.mimeType), "saveToDisk", aSavedToDisk);
this.setHandlerProcedure("handleInternal", "false");
this.setHandlerProcedure("useSystemDefault", "false");
},
get useSystemDefault()
{
return getHandlerInfoForType(this.URI, "useSystemDefault");
},
set useSystemDefault(aUseSystemDefault)
{
changeMIMEStuff(HANDLER_URI(this.mimeType), "useSystemDefault", aUseSystemDefault);
this.setHandlerProcedure("handleInternal", "false");
this.setHandlerProcedure("saveToDisk", "false");
},
get handleInternal()
{
return getHandlerInfoForType(this.URI, "handleInternal");
},
set handleInternal(aHandledInternally)
{
changeMIMEStuff(HANDLER_URI(this.mimeType), "handleInternal", aHandledInternally);
this.setHandlerProcedure("saveToDisk", "false");
this.setHandlerProcedure("useSystemDefault", "false");
},
setHandlerProcedure: function (aHandlerProcedure, aValue)
{
var handlerSource = gRDF.GetUnicodeResource(HANDLER_URI(this.mimeType));
var handlerProperty = gRDF.GetUnicodeResource(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)
{
changeMIMEStuff(HANDLER_URI(this.mimeType), "alwaysAsk", aAlwaysAsk);
},
// helper application
get appDisplayName()
{
return getHelperAppInfoForType(this.URI, "prettyName");
},
set appDisplayName(aDisplayName)
{
changeMIMEStuff(APP_URI(this.mimeType), "prettyName", aDisplayName);
},
get appPath()
{
return getHelperAppInfoForType(this.URI, "path");
},
set appPath(aAppPath)
{
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.GetUnicodeResource(MIME_URI(this.mimeType));
var handlerProperty = gRDF.GetUnicodeResource(NC_RDF("handlerProp"));
var handlerResource = gRDF.GetUnicodeResource(HANDLER_URI(this.mimeType));
gDS.Assert(mimeSource, handlerProperty, handlerResource, true);
// assert the helper app resource
var helperAppProperty = gRDF.GetUnicodeResource(NC_RDF("externalApplication"));
var helperAppResource = gRDF.GetUnicodeResource(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.GetUnicodeResource("urn:mimetypes:root");
container.Init(gDS, containerRes);
var element = gRDF.GetUnicodeResource(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.GetUnicodeResource(aURI);
var propertyResource = gRDF.GetUnicodeResource(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.GetUnicodeResource(handler);
var property = gRDF.GetUnicodeResource(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.GetUnicodeResource(appURI);
var appProperty = gRDF.GetUnicodeResource(NC_RDF(aPropertyString));
return getLiteral(appRes, appProperty);
}
function mimeHandlerExists(aMIMEType)
{
var valueProperty = gRDF.GetUnicodeResource(NC_RDF("value"));
var mimeSource = gRDF.GetUnicodeResource(MIME_URI(aMIMEType));
var mimeLiteral = gRDF.GetLiteral(aMIMEType);
return gDS.HasAssertion(mimeSource, valueProperty, mimeLiteral, true);
}
// write to the ds
function assertMIMEStuff(aMIMEString, aPropertyString, aValueString)
{
var mimeSource = gRDF.GetUnicodeResource(aMIMEString);
var valueProperty = gRDF.GetUnicodeResource(NC_RDF(aPropertyString));
var mimeLiteral = gRDF.GetLiteral(aValueString);
gDS.Assert(mimeSource, valueProperty, mimeLiteral, true);
}
function changeMIMEStuff(aMIMEString, aPropertyString, aValueString)
{
var mimeSource = gRDF.GetUnicodeResource(aMIMEString);
var valueProperty = gRDF.GetUnicodeResource(NC_RDF(aPropertyString));
var mimeLiteral = gRDF.GetLiteral(aValueString);
var currentValue = gDS.GetTarget(mimeSource, valueProperty, true);
if (currentValue) {
gDS.Change(mimeSource, valueProperty, currentValue, mimeLiteral);
} else {
gDS.Assert(mimeSource, valueProperty, mimeLiteral, true);
}
}
function unassertMIMEStuff(aMIMEString, aPropertyString, aValueString)
{
var mimeSource = gRDF.GetUnicodeResource(aMIMEString);
var valueProperty = gRDF.GetUnicodeResource(NC_RDF(aPropertyString));
var mimeLiteral = gRDF.GetLiteral(aValueString);
gDS.Unassert(mimeSource, valueProperty, mimeLiteral, true);
}
function removeOverride(aMIMEType)
{
// 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.GetUnicodeResource("urn:mimetypes:root");
rdfc.Init(gDS, containerRes);
var element = gRDF.GetUnicodeResource(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", "useSystemDefault"],
[APP_URI, "externalApplication"]],
[APP_URI, ["path", "prettyName"]] ];
for (var i = 0; i < urns.length; i++) {
var mimeRes = gRDF.GetUnicodeResource(urns[i][0](aMIMEType));
// unassert the toplevel properties
var properties = urns[i][1];
for (var j = 0; j < properties.length; j++) {
var propertyRes = gRDF.GetUnicodeResource(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 ("2" in urns[i] && urns[i][2]) {
var linkRes = gRDF.GetUnicodeResource(NC_RDF(urns[i][2][1]), true);
var linkTarget = gRDF.GetUnicodeResource(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;
}

View File

@ -1,67 +0,0 @@
<?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 Communicator client code, released
- March 31, 1998.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corporation.
- Portions created by the Initial Developer are Copyright (C) 1998-1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<!DOCTYPE overlay SYSTEM "chrome://communicator/locale/pref/permissionsPrefsOverlay.dtd" >
<overlay id="permissionsPrefsOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<treechildren id="securityChildren">
<treeitem position="1">
<treerow>
<treecell url="chrome://communicator/content/pref/pref-cookies.xul"
label="&cookies.label;"
id="cookiesCell"/>
</treerow>
</treeitem>
<treeitem position="2">
<treerow>
<treecell url="chrome://communicator/content/pref/pref-images.xul"
label="&images.label;"/>
</treerow>
</treeitem>
<treeitem id="popupspref" position="3">
<treerow>
<treecell url="chrome://communicator/content/pref/pref-popups.xul"
label="&popups.label;"/>
</treerow>
</treeitem>
</treechildren>
</overlay>

View File

@ -1,379 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Mike Kowalski <mikejk@ameritech.net>
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE page [
<!ENTITY % brandDTD SYSTEM "chrome://branding/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="&pref.advanced.title;">
<script type="application/x-javascript">
<![CDATA[
var panel = "chrome://communicator/content/pref/pref-advanced.xul";
var _elementIDs = ["advancedJavaAllow", "systemPrefCheck"];
function Startup() {
turboCheck();
sysPrefCheck();
initJVMConfigList();
}
/*
* 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.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 appStartup = Components.classes["@mozilla.org/toolkit/app-startup;1"].
getService(Components.interfaces.nsIAppStartup);
var nativeAppSupport = null;
try {
nativeAppSupport = appStartup.nativeAppSupport;
}
catch ( ex ) {
}
if (nativeAppSupport)
nativeAppSupport.isServerMode = parent.isTurboEnabled;
}
}
function sysPrefCheck() {
var frame = document.getElementById("systemPrefs");
if ("@mozilla.org/system-preference-service;1" in Components.classes)
try {
var appShell = Components.classes["@mozilla.org/system-preference-service;1"].getService(Components.interfaces.nsIPrefBranch);
return;
}
catch(e) {}
frame.hidden = true;
}
function sysPrefUpdate() {
var checkObj = document.getElementById("systemPrefCheck");
var prefstring = checkObj.getAttribute( "prefstring" );
parent.hPrefWindow.setPref("bool", prefstring, checkObj.checked);
parent.hPrefWindow.pagePrefChanged = true;
parent.hPrefWindow.pagePrefUpdated = [];
}
]]>
</script>
<groupbox id="advancedSettings" align="start">
<caption label="&prefEnableJava.caption;"/>
<vbox align="start" id="contentEnablingBox">
<checkbox id="advancedJavaAllow" label="&enbJavaCheck.label;"
accesskey="&enbJavaCheck.accesskey;"
prefstring="security.enable_java"
oncommand="javaCheck(true)"/>
</vbox>
<separator/>
</groupbox>
<script type="application/x-javascript">
<![CDATA[
function javaCheck(setFocus) {
if (!jvmConfigList) return;
var checked = document.getElementById("advancedJavaAllow").checked;
setVisible(checked);
}
const nsIJVMConfig = Components.interfaces.nsIJVMConfig;
var jvmConfigMgr;
var jvmConfigList = getJVMConfigList();
const currentJVMPluginPath = getCurrentJVMPluginPath();
var oldJVMConfig = null;
function getJVMConfigMgr() {
return "@mozilla.org/oji/jvm-config-mgr;1" in Components.classes
&& Components.classes["@mozilla.org/oji/jvm-config-mgr;1"]
.getService(Components.interfaces.nsIJVMConfigManager);
}
function getJVMConfigList() {
if (!jvmConfigMgr)
jvmConfigMgr = getJVMConfigMgr();
return jvmConfigMgr && jvmConfigMgr.getJVMConfigList();
}
function getCurrentJVMPluginPath() {
var result = "";
if ("application/x-java-vm" in navigator.mimeTypes)
try {
var prefs = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
// Since we don't have a fullPath attribute in nsIDOMPlugin,
// we have to set the set pref "plugin.expose_full_path"
// to true and then get it. Related bug is 204476
var oldValue = prefs.getBoolPref("plugin.expose_full_path");
if (!oldValue)
prefs.setBoolPref("plugin.expose_full_path", true);
try {
result = navigator.mimeTypes["application/x-java-vm"]
.enabledPlugin.filename;
} catch (e) {};
// Set the pref to original value.
if (!oldValue)
prefs.setBoolPref("plugin.expose_full_path", oldValue);
} catch (e) {}
return result;
}
const jvmConfigListView = {
currentJVMConfig : null,
rowCount : 0,
setTree : function(tree) {},
getImageSrc : function(row, column) {},
getProgressMode : function(row, column) {},
getCellValue : function(row, column) {},
isSeparator : function(index) {return false;},
isSorted: function() { return false; },
isContainer : function(index) {return false;},
cycleHeader : function(column) {},
getRowProperties : function(index, prop) {},
getColumnProperties : function(column, prop) {},
getCellProperties : function(row, column, prop) {},
getCellText : function(row,column) {
if (jvmConfigList) {
var jvmConfig = jvmConfigList.queryElementAt(row, nsIJVMConfig);
if (column.id == "name")
return jvmConfig.version;
if (column.id == "home")
return jvmConfig.path.path;
}
return "";
},
refresh : function(jvmConfigListObj) {
if (jvmConfigList) {
this.rowCount = jvmConfigList.length;
var currentIndex = -1;
for (i = 0; i < this.rowCount; i++) {
var jvmConfig = jvmConfigList.queryElementAt(i, nsIJVMConfig)
var jvmHome = jvmConfig.path.path;
if (currentJVMPluginPath.indexOf(jvmHome + "/") >= 0) {
this.currentJVMConfig = jvmConfig;
currentIndex = i;
}
}
// Only show the panel if we have the choice.
if (jvmConfigList.length == 0 ||
(jvmConfigList.length == 1 && currentIndex >= 0)) {
setVisible(false);
return;
}
jvmConfigListObj.treeBoxObject.view = this;
if (currentIndex >= 0)
jvmConfigListView.selection.select(currentIndex);
} else {
this.rowCount = 0;
}
},
getCurrentJVMConfig : function() {
return this.currentJVMConfig;
}
};
function setVisible(visible) {
var javaConfigPanel = document.getElementById("javaPluginSettings");
javaConfigPanel.hidden = !visible;
}
function initJVMConfigList() {
var javaChecked = document.getElementById("advancedJavaAllow").checked;
if (jvmConfigList) {
var jvmConfigListObj = document.getElementById("jvmConfigListObj");
if (jvmConfigListObj) {
jvmConfigListView.refresh(jvmConfigListObj);
oldJVMConfig = jvmConfigListView.getCurrentJVMConfig();
parent.hPrefWindow.registerOKCallbackFunc(switchJVM);
}
if (!javaChecked) setVisible(false);
} else {
setVisible(false);
}
}
function switchJVM() {
var currentIndex = jvmConfigListView.selection.currentIndex;
if (currentIndex >= 0 && jvmConfigMgr && jvmConfigList) {
var currentJVMConfig =
jvmConfigList.queryElementAt(currentIndex, nsIJVMConfig);
if (currentJVMConfig && currentJVMConfig != oldJVMConfig) {
var promptService =
Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
.getService(Components.interfaces.nsIPromptService);
var navbundle = document.getElementById("navBundle");
var brandbundle = document.getElementById("brandBundle");
var dialogTitle = navbundle.getString("switchJVMTitle");
try {
jvmConfigMgr.setCurrentJVMConfig(currentJVMConfig);
} catch (e) {
errorMsg = navbundle.getString("switchJVMFailed");
promptService.alert(window, dialogTitle, errorMsg);
return;
}
oldJVMConfig = currentJVMConfig;
}
}
}
]]>
</script>
<stringbundle id="navBundle"
src="chrome://navigator/locale/navigator.properties"/>
<stringbundle id="brandBundle"
src="chrome://branding/locale/brand.properties"/>
<groupbox id="javaPluginSettings" align="start">
<caption label="&prefJvmConf.caption;"/>
<tree id="jvmConfigListObj" style="width: 60em; height: 10em"
hidecolumnpicker="true">
<treecols>
<treecol id="name" label="&jvm.name;" flex="2"/>
<splitter class="tree-splitter"/>
<treecol id="home" label="&jvm.home;" flex="13"/>
</treecols>
<treechildren/>
</tree>
</groupbox>
<groupbox id="perfSettings">
<caption id="perfLabel" label="&prefTurbo.caption;"/>
<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>&prefTurbo.desc;</description>
</vbox>
</vbox>
</groupbox>
<groupbox id="systemPrefs">
<caption id="systemPrefCaption" label="&systemPref.caption;"/>
<vbox id="systemPrefBox" align="start">
<checkbox id="systemPrefCheck" label="&systemPrefCheck.label;"
accesskey="&systemPrefCheck.accesskey;"
prefstring="config.use_system_prefs"
oncommand="sysPrefUpdate();"/>
<vbox class="indent" flex="1">
<description>&systemPref.desc;</description>
</vbox>
</vbox>
</groupbox>
</page>

View File

@ -1,106 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE page [
<!ENTITY % brandDTD SYSTEM "chrome://branding/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="&pref.appearance.title;">
<script type="application/x-javascript">
<![CDATA[
var panel = "chrome://communicator/content/pref/pref-appearance.xul";
var _elementIDs = [
"generalStartupBrowser", "toolbarStyle", "showHideTooltips",
"useSiteIcons", "useSmoothScroll", "enableAutomaticImageResizing"
];
]]>
</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>
<groupbox id="toolbarStyleBox">
<caption label="&showToolsLegend.label;"/>
<radiogroup id="toolbarStyle" align="start"
prefstring="browser.chrome.toolbar_style">
<radio group="toolbarStyle" value="2" label="&picsNtextRadio.label;" accesskey="&picsNtextRadio.accesskey;"/>
<radio group="toolbarStyle" value="0" label="&picsOnlyRadio.label;" accesskey="&picsOnlyRadio.accesskey;"/>
<radio group="toolbarStyle" value="1" label="&textonlyRadio.label;" accesskey="&textonlyRadio.accesskey;"/>
</radiogroup>
</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"/>
<checkbox id="useSmoothScroll"
label="&useSmoothScroll.label;"
accesskey="&useSmoothScroll.accesskey;"
prefstring="general.smoothScroll"/>
<checkbox id="enableAutomaticImageResizing"
label="&enableAutomaticImageResizing.label;"
accesskey="&enableAutomaticImageResizing.accesskey;"
prefstring="browser.enable_automatic_image_resizing"/>
<separator/>
</vbox>
</page>

View File

@ -1,474 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Ben Goodger <ben@netscape.com>, original implementor
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/"?>
<?xml-stylesheet href="chrome://communicator/skin/prefpanels.css" type="text/css"?>
<!DOCTYPE dialog 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;"
newtitle="&newType.label;"
onload="Startup();"
ondialogaccept="return onAccept();">
<stringbundle id="bundle_prefApplications"
src="chrome://communicator/locale/pref/pref-applications.properties"/>
<stringbundle id="bundle_Brand" src="chrome://branding/locale/brand.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 gExtension = null;
var gMIMEField = null;
var gHandlerGroup = null;
var gAppPath = null;
var gAskBeforeOpen = null;
var gDescription = null;
var gPrefApplicationsBundle = null;
var gOldMIME = null;
var gOldDesc = null;
var gOldExtensions = null;
const nsIMIMEInfo = Components.interfaces.nsIMIMEInfo;
function Startup()
{
gDescription = document.getElementById("description");
gExtension = document.getElementById("extension");
gMIMEField = document.getElementById("mimeType");
gHandlerGroup = document.getElementById("handler");
gAppPath = document.getElementById("appPath");
gAskBeforeOpen = document.getElementById("askBeforeOpen");
gPrefApplicationsBundle = document.getElementById("bundle_prefApplications");
// Set values for radio items to nsIMIMEInfo constants
var rSaveToDisk = document.getElementById("saveToDisk");
var rUseHelperApp = document.getElementById("useHelperApp");
var rUseSystemDefault = document.getElementById("useSystemDefault");
rSaveToDisk.value = nsIMIMEInfo.saveToDisk;
rUseHelperApp.value = nsIMIMEInfo.useHelperApp;
rUseSystemDefault.value = nsIMIMEInfo.useSystemDefault;
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;
// Update entry (without dialog showing).
try {
updateEntry(info);
} catch(e) { dump("updateEntry failed: " + e + "\n"); }
// Close the dialog.
window.close();
// Done.
return;
}
// Default to true in case the preference cannot be retrieved
var forceAlwaysAsk = true;
try {
var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
var prefBranch = prefService.getBranch("browser.helperApps.alwaysAsk.");
forceAlwaysAsk = prefBranch.getBoolPref("force");
} catch(e) {
dump("forceAlwaysAsk defaulting to true since preference couldn't be opened\n");
}
if ( !handlerInfo.URI )
{
// Opening for "New Type".
document.title = document.documentElement.getAttribute("newtitle");
// Initialize some stuff to blank for new types.
gOldMIME = gOldDesc = gOldExtensions = "";
// Make default "use system default."
gHandlerGroup.value = nsIMIMEInfo.useSystemDefault;
// Always ask box default depends on pref.
gAskBeforeOpen.checked = forceAlwaysAsk;
gAskBeforeOpen.disabled = forceAlwaysAsk;
// Put focus on mime type field.
gMIMEField.focus();
// Size/position the dialog.
sizeToContent();
window.moveToAlertPosition();
// Avoid the normal "edit" case code.
return;
}
gExtension.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 = nsIMIMEInfo.saveToDisk;
if (handlerInfo.saveToDisk == "true")
data = nsIMIMEInfo.saveToDisk;
else if (handlerInfo.useSystemDefault == "true")
data = nsIMIMEInfo.useSystemDefault;
else
data = nsIMIMEInfo.useHelperApp;
gHandlerGroup.value = data;
doEnabling();
var appPath = handlerInfo.appPath;
if (appPath != undefined)
gAppPath.value = appPath;
if (forceAlwaysAsk)
{
gAskBeforeOpen.checked = true;
gAskBeforeOpen.disabled = true;
}
else
{
gAskBeforeOpen.checked = handlerInfo.alwaysAsk == "true" ? true : false;
}
gDescription.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 != nsIMIMEInfo.useHelperApp)
gHandlerGroup.value = nsIMIMEInfo.useHelperApp;
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);
var fileHandler = ioService.getProtocolHandler("file").QueryInterface(Components.interfaces.nsIFileProtocolHandler);
gDS = gRDF.GetDataSource(fileHandler.getURLSpecFromFile(file));
}
function updateEntry(info)
{
// Initialize data source.
getDS();
// Get mime type from which we can construct a HandlerInfo...
var mimeType = info.MIMEType.toLowerCase();
// Create HandlerOverride and populate it.
var entry = new HandlerOverride(MIME_URI(mimeType));
entry.mUpdateMode = mimeHandlerExists(mimeType);
entry.mimeType = mimeType;
entry.isEditable = true;
entry.alwaysAsk = info.alwaysAskBeforeHandling;
// If not updating (i.e., a newly encountered mime type),
// then update extension list and description.
if (!entry.mUpdateMode) {
var extEnumerator = info.getFileExtensions();
while (extEnumerator.hasMore()) {
entry.addExtension(extEnumerator.getNext());
}
entry.description = info.description;
entry.appDisplayName = "";
}
if (info.preferredAction == nsIMIMEInfo.saveToDisk) {
entry.saveToDisk = true;
if (!entry.mUpdateMode) {
// Creating a new entry, set path.
entry.appPath = "";
}
} else if (info.preferredAction == nsIMIMEInfo.useSystemDefault ||
info.preferredApplicationHandler == null) {
entry.useSystemDefault = true;
if (!entry.mUpdateMode) {
// Creating a new entry, set path.
entry.appPath = "";
}
} else {
entry.saveToDisk = false;
entry.useSystemDefault = false;
entry.handleInternal = false;
entry.appPath = info.preferredApplicationHandler.path;
entry.appDisplayName = info.applicationDescription;
}
// Do RDF magic.
entry.buildLinks();
// flush the ds to disk.
var remoteDS = gDS.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
if (remoteDS)
remoteDS.Flush();
}
function onAccept()
{
// Validate input.
if ( !checkInput() ) {
return false;
}
getDS();
gMIMEField.value = gMIMEField.value.toLowerCase();
// Get the promptservice, we will need it
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
// Check if Mozilla can handle this type internally, in which case
// an entry would have no effect
try {
var webNavigationInfo =
Components.classes["@mozilla.org/webnavigation-info;1"]
.getService(Components.interfaces.nsIWebNavigationInfo);
if (webNavigationInfo.isTypeSupported(gMIMEField.value, null)) {
var brandBundle = document.getElementById("bundle_Brand");
var text = gPrefApplicationsBundle.getString("canHandleInternally");
text = text.replace(/%brand%/g, brandBundle.getString("brandShortName"));
if (promptService.confirmEx(
window,
gPrefApplicationsBundle.getString("canHandleInternallyTitle"),
text,
(Components.interfaces.nsIPromptService.BUTTON_POS_1 *
Components.interfaces.nsIPromptService.BUTTON_TITLE_IS_STRING) |
(Components.interfaces.nsIPromptService.BUTTON_POS_0 *
Components.interfaces.nsIPromptService.BUTTON_TITLE_CANCEL),
null,
gPrefApplicationsBundle.getString("canHandleInternallyContinue"),
null,
null,
{}
) == 0)
return false;
}
}
catch (ex) {}
// 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 replace = promptService.confirm(window, titleMsg, dialogMsg);
if (!replace)
return true;
// delete mimetype we're overwriting
if (gMIMEField.value)
removeOverride(gMIMEField.value);
}
}
if (gOldMIME && gOldMIME != gMIMEField.value)
removeOverride(gOldMIME); // delete old handler
// now save the information
var handlerInfo = new HandlerOverride(MIME_URI(gMIMEField.value));
handlerInfo.mUpdateMode = (gOldMIME == gMIMEField.value);
handlerInfo.mimeType = gMIMEField.value;
// set description, editable, and extensions
handlerInfo.isEditable = true;
handlerInfo.description = gDescription.value;
handlerInfo.clearExtensions();
var extensions = gExtension.value.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 == nsIMIMEInfo.useHelperApp) {
handlerInfo.appPath = gAppPath.value;
handlerInfo.setHandlerProcedure("saveToDisk", "false");
handlerInfo.setHandlerProcedure("useSystemDefault", "false");
handlerInfo.setHandlerProcedure("handleInternal", "false");
}
else if (gHandlerGroup.value == nsIMIMEInfo.saveToDisk)
handlerInfo.saveToDisk = true;
else if (gHandlerGroup.value == nsIMIMEInfo.useSystemDefault)
handlerInfo.useSystemDefault = 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.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();
window.opener.gUpdateTypeRV = true;
return true;
}
]]>
</script>
<vbox>
<hbox align="center">
<image id="contentTypeImage"/>
<grid flex="1">
<columns>
<column/>
<column flex="1"/>
</columns>
<rows>
<row align="center">
<label value="&mimetype.label;" accesskey="&mimetype.accesskey;" control="mimeType"/>
<textbox id="mimeType"/>
</row>
<row align="center">
<label value="&description.label;" accesskey="&description.accesskey;" control="description"/>
<textbox id="description" crop="right" flex="1"/>
</row>
<row align="center">
<label value="&extension.label;" accesskey="&extension.accesskey;" control="extension"/>
<textbox id="extension"/>
</row>
</rows>
</grid>
</hbox>
<separator class="thin"/>
<groupbox>
<caption label="&handling.label;"/>
<radiogroup id="handler">
<radio id="useSystemDefault" label="&useDefault.label;" accesskey="&useDefault.accesskey;" oncommand="doEnabling();"/>
<hbox align="center">
<radio id="useHelperApp" 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>
<radio id="saveToDisk" label="&saveToDisk.label;" accesskey="&saveToDisk.accesskey;" oncommand="doEnabling();"/>
</radiogroup>
</groupbox>
<separator class="thin"/>
<hbox align="center">
<checkbox id="askBeforeOpen" label="&askBeforeOpen.label;" accesskey="&askBeforeOpen.accesskey;"/>
</hbox>
</vbox>
</dialog>

View File

@ -1,267 +0,0 @@
/* -*- Mode: Java; tab-width: 2; c-basic-offset: 2; -*-
*
* ***** 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
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
var gUpdateTypeRV = null;
var gList = null;
var gDS = null;
var gPrefApplicationsBundle = null;
var gExtensionField = null;
var gMIMEDescField = null;
var gHandlerField = null;
var gNewTypeButton = null;
var gEditButton = null;
var gRemoveButton = null;
function newType()
{
var handlerOverride = new HandlerOverride();
window.openDialog("chrome://communicator/content/pref/pref-applications-edit.xul", "appEdit", "chrome,modal=yes,resizable=no", handlerOverride);
}
function removeType()
{
// Only prompt if setting is "useHelperApp".
var uri = gList.view.getResourceAtIndex(gList.currentIndex).Value;
var handlerOverride = new HandlerOverride(uri);
if ( !handlerOverride.useSystemDefault && !handlerOverride.saveToDisk ) {
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) {
return;
}
}
removeOverride(handlerOverride.mimeType);
selectApplication();
}
function editType()
{
if (gList.currentIndex >= 0) {
var uri = gList.view.getResourceAtIndex(gList.currentIndex).Value;
var handlerOverride = new HandlerOverride(uri);
window.openDialog("chrome://communicator/content/pref/pref-applications-edit.xul", "appEdit", "chrome,modal=yes,resizable=no", handlerOverride);
selectApplication();
}
}
const xmlSinkObserver = {
onBeginLoad: function(aSink)
{
},
onInterrupt: function(aSink)
{
},
onResume: function(aSink)
{
},
// This is called when the RDF data source has finished loading.
onEndLoad: function(aSink)
{
// Unhook observer.
aSink.removeXMLSinkObserver(this);
// Convert old "don't ask" pref info to helper app pref entries
try {
var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
var prefBranch = prefService.getBranch("browser.helperApps.neverAsk.");
if (!prefBranch) return;
} catch(e) { return; }
var neverAskSave = new Array();
var neverAskOpen = new Array();
try {
neverAskSave = prefBranch.getCharPref("saveToDisk").split(",");
} catch(e) {}
try {
neverAskOpen = prefBranch.getCharPref("openFile").split(",");
} catch(e) {}
var i;
var type;
var newEntries = {};
for ( i = 0; i < neverAskSave.length; i++ ) {
// See if mime type is in data source.
type = decodeURIComponent(neverAskSave[i]);
if (type != "" && !mimeHandlerExists(type)) {
// Not in there, need to create an entry now so user can edit it.
newEntries[type] = "saveToDisk";
}
}
for ( i = 0; i < neverAskOpen.length; i++ ) {
// See if mime type is in data source.
type = decodeURIComponent(neverAskOpen[i]);
if (type != "" && !mimeHandlerExists(type)) {
// Not in there, need to create an entry now so user can edit it.
newEntries[type] = "useSystemDefault";
}
}
// Now create all new entries.
for ( var newEntry in newEntries ) {
this.createNewEntry(newEntry, newEntries[newEntry]);
}
// Don't need these any more!
try { prefBranch.clearUserPref("saveToDisk"); } catch(e) {}
try { prefBranch.clearUserPref("openFile"); } catch(e) {}
},
onError: function(aSink, aStatus, aMsg)
{
},
createNewEntry: function(mimeType, action)
{
// Create HandlerOverride and populate it.
var entry = new HandlerOverride(MIME_URI(mimeType));
entry.mUpdateMode = false;
entry.mimeType = mimeType;
entry.description = "";
entry.isEditable = true;
entry.alwaysAsk = false;
entry.appPath = "";
entry.appDisplayName = "";
// This sets preferred action.
entry[action] = true;
// Do RDF magic.
entry.buildLinks();
}
}
function Startup()
{
// set up the string bundle
gPrefApplicationsBundle = document.getElementById("bundle_prefApplications");
// set up the elements
gList = document.getElementById("appList");
gExtensionField = document.getElementById("extension");
gMIMEDescField = document.getElementById("mimeDesc");
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);
var fileHandler = ioService.getProtocolHandler("file").QueryInterface(Components.interfaces.nsIFileProtocolHandler);
gDS = gRDF.GetDataSource(fileHandler.getURLSpecFromFile(file));
// intialize the listbox
gList.database.AddDataSource(gDS);
gList.builder.rebuild();
// Test whether the data source is already loaded.
if (gDS.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource).loaded) {
// Do it now.
xmlSinkObserver.onEndLoad(gDS.QueryInterface(Components.interfaces.nsIRDFXMLSink));
} else {
// Add observer that will kick in when data source load completes.
gDS.QueryInterface(Components.interfaces.nsIRDFXMLSink).addXMLSinkObserver( xmlSinkObserver );
}
}
function selectApplication()
{
if (gList.currentIndex >= 0) {
var uri = gList.view.getResourceAtIndex(gList.currentIndex).Value;
var handlerOverride = new HandlerOverride(uri);
gExtensionField.setAttribute("value", handlerOverride.extensions);
gMIMEDescField.setAttribute("value", handlerOverride.description);
// 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 if (handlerOverride.useSystemDefault == "true")
gHandlerField.setAttribute("value",
gPrefApplicationsBundle.getString("useSystemDefault"));
else
gHandlerField.setAttribute("value",
gPrefApplicationsBundle.getFormattedString("useHelperApp", [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");
gMIMEDescField.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;
}
}

View File

@ -1,151 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Ben Goodger <ben@netscape.com>, original implementor
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE page 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="&pref.applications.title;">
<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="&pref.applications.caption;"/>
<vbox flex="1">
<label value="&fileTypes.label;" control="appList"/>
<hbox flex="1">
<tree id="appList" flex="1" seltype="single" hidecolumnpicker="true"
datasources="rdf:null" ref="urn:mimetypes"
flags="dont-build-content"
onselect="selectApplication();">
<treecols>
<treecol sort="?value" sortActive="true" sortDirection="ascending"
flex="1" hideheader="true"/>
</treecols>
<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>
<treechildren>
<treeitem uri="?type">
<treerow>
<treecell label="?value"/>
</treerow>
</treeitem>
</treechildren>
</action>
</rule>
</template>
</tree>
<vbox>
<button id="newTypeButton"
label="&newTypeButton.label;" accesskey="&newTypeButton.accesskey;"
oncommand="newType();"/>
<button id="editButton"
label="&editButton.label;" accesskey="&editButton.accesskey;"
oncommand="editType();"/>
<button id="removeButton"
label="&removeButton.label;" accesskey="&removeButton.accesskey;"
oncommand="removeType();"/>
</vbox>
</hbox>
<groupbox orient="horizontal">
<caption label="&file;"/>
<hbox flex="1">
<vbox style="width: 40px; height: 40px;" pack="center" align="center">
<image id="contentTypeImage"/>
</vbox>
<grid flex="1">
<columns>
<column/>
<column flex="1"/>
</columns>
<rows>
<row align="center">
<label value="&mimeDesc;"/>
<label id="mimeDesc" crop="right" flex="1"/>
</row>
<row align="center">
<label value="&exten;"/>
<label id="extension" crop="right"/>
</row>
<row align="center">
<label value="&handle;" accesskey="&handle.accesskey;" control="handler"/>
<textbox id="handler" readonly="true" flex="1"/>
</row>
</rows>
</grid>
</hbox>
</groupbox>
</vbox>
</groupbox>
<groupbox id="pluginFinderBox">
<caption label="&plugins.label;"/>
<vbox>
<checkbox id="useNSPluginFinder" label="&pluginFinder.label;"
accesskey="&pluginFinder.accesskey;"
prefstring="application.use_ns_plugin_finder"/>
<description>&pluginFinderDesc.label;</description>
</vbox>
</groupbox>
</page>

View File

@ -1,80 +0,0 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
*/
const nsIFilePicker = Components.interfaces.nsIFilePicker;
const nsILocalFile = Components.interfaces.nsILocalFile;
const nsIProperties = Components.interfaces.nsIProperties;
const kCacheParentDirPref = "browser.cache.disk.parent_directory";
var gFolderField;
var gCacheParentDirectory;
function Startup()
{
var prefWindow = parent.hPrefWindow;
gFolderField = document.getElementById("browserCacheDiskCacheFolder");
gCacheParentDirectory = prefWindow.getPref("localfile", kCacheParentDirPref);
if (gCacheParentDirectory == "!/!ERROR_UNDEFINED_PREF!/!")
{
try
{
// no disk cache folder pref set; default to profile directory
var dirSvc = Components.classes["@mozilla.org/file/directory_service;1"]
.getService(nsIProperties);
if (dirSvc.has("ProfLD"))
gCacheParentDirectory = dirSvc.get("ProfLD", nsILocalFile);
else
gCacheParentDirectory = dirSvc.get("ProfD", nsILocalFile);
}
catch (ex)
{
gCacheParentDirectory = null;
}
}
// if both pref and dir svc fail leave this field blank else show directory
if (gCacheParentDirectory)
gFolderField.value = (/Mac/.test(navigator.platform)) ? gCacheParentDirectory.leafName : gCacheParentDirectory.path;
document.getElementById("chooseDiskCacheFolder").disabled =
prefWindow.getPrefIsLocked(kCacheParentDirPref);
}
function prefCacheSelectFolder()
{
var fp = Components.classes["@mozilla.org/filepicker;1"]
.createInstance(nsIFilePicker);
var prefWindow = parent.hPrefWindow;
var prefutilitiesBundle = document.getElementById("bundle_prefutilities");
var title = prefutilitiesBundle.getString("cachefolder");
fp.init(window, title, nsIFilePicker.modeGetFolder);
fp.displayDirectory = gCacheParentDirectory;
fp.appendFilters(nsIFilePicker.filterAll);
var ret = fp.show();
if (ret == nsIFilePicker.returnOK) {
var localFile = fp.file.QueryInterface(nsILocalFile);
prefWindow.setPref("localfile", kCacheParentDirPref, localFile);
gFolderField.value = (/Mac/.test(navigator.platform)) ? fp.file.leafName : fp.file.path;
gCacheParentDirectory = fp.file;
}
}
function prefClearCache(aType)
{
var classID = Components.classes["@mozilla.org/network/cache-service;1"];
var cacheService = classID.getService(Components.interfaces.nsICacheService);
cacheService.evictEntries(aType);
}
function prefClearDiskAndMemCache()
{
prefClearCache(Components.interfaces.nsICache.STORE_ANYWHERE);
}

View File

@ -1,125 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Diego Biurrun <diego@biurrun.de>
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE page [
<!ENTITY % brandDTD SYSTEM "chrome://branding/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="&pref.cache.title;">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["browserCacheDiskCache", "browserCacheCheckDocFrequency", "enablePrefetch"];
function GetFields(pageData) {
// because the cache is in kilobytes, and the UI is in megabytes.
pageData.browserCacheDiskCache.value <<= 10;
return null;
}
function SetFields(pageData) {
pageData.browserCacheDiskCache.value >>= 10;
return true;
}
]]>
</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="&pref.cache.caption;"/>
<description>&cachePara;</description>
<hbox align="center">
<label value="&diskCache.label;" accesskey="&diskCache.accesskey;" control="browserCacheDiskCache"/>
<textbox id="browserCacheDiskCache" size="5" preftype="int"
prefstring="browser.cache.disk.capacity" prefattribute="value"/>
<label value="&mbytes;"/>
<button label="&clearDiskCache.label;" accesskey="&clearDiskCache.accesskey;"
oncommand="prefClearDiskAndMemCache();"
id="clearDiskCache"
prefstring="pref.advanced.cache.disable_button.clear_disk"/>
</hbox>
<vbox>
<label value="&diskCacheFolder.label;"/>
<hbox align="center">
<textbox id="browserCacheDiskCacheFolder" flex="1" readonly="true" class="uri-element"/>
<button label="&chooseDiskCacheFolder.label;" accesskey="&chooseDiskCacheFolder.accesskey;"
oncommand="prefCacheSelectFolder();" id="chooseDiskCacheFolder"/>
</hbox>
</vbox>
<description>&diskCacheFolderExplanation;</description>
<separator class="thin"/>
<description>&docCache;</description>
<hbox align="start">
<radiogroup id="browserCacheCheckDocFrequency" orient="horizontal" prefstring="browser.cache.check_doc_frequency">
<vbox flex="1">
<radio value="1" label="&everyTimeRadio.label;" accesskey="&everyTimeRadio.accesskey;"/>
<radio value="3" label="&autoRadio.label;" accesskey="&autoRadio.accesskey;"/>
</vbox>
<vbox flex="1">
<radio value="0" label="&oncePsessionRadio.label;" accesskey="&oncePsessionRadio.accesskey;"/>
<radio value="2" label="&neverRadio.label;" accesskey="&neverRadio.accesskey;"/>
</vbox>
</radiogroup>
</hbox>
</groupbox>
<groupbox id="prefetch">
<caption id="prefetchLabel" label="&prefetchTitle.label;"/>
<vbox id="prefetchBox" align="start">
<checkbox id="enablePrefetch" label="&enablePrefetch.label;" accesskey="&enablePrefetch.accesskey;"
prefstring="network.prefetch-next" />
<!-- <vbox class="indent" flex="1">
<description>&prefetchDesc.label;</description>
</vbox> -->
</vbox>
</groupbox>
</page>

View File

@ -1,346 +0,0 @@
//get prefInt services
var availCharsetDict = [];
var prefBranch = null; //Preferences Interface
var pref_string_title = "";
var pref_string_object = null;
var pref_string_content = "";
function Init()
{
var applicationArea = "";
if ("arguments" in window && window.arguments[0])
applicationArea = window.arguments[0];
try {
prefBranch = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch(null);
} catch (e) {}
if (prefBranch) {
if (applicationArea == "mailedit") {
pref_string_title = "intl.charsetmenu.mailedit";
} else {
//default is the browser
pref_string_title = "intl.charsetmenu.browser.static";
}
pref_string_object = prefBranch.getComplexValue(pref_string_title, Components.interfaces.nsIPrefLocalizedString);
pref_string_content = pref_string_object.data;
AddRemoveLatin1('add');
}
if (applicationArea == "mailedit") { // mailedit
LoadAvailableCharSets("NC:EncodersRoot");
} else { // browser, mailview, composer
LoadAvailableCharSets("NC:DecodersRoot");
}
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(converterRoot)
{
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(converterRoot);
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"].createInstance(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 (prefBranch) {
pref_string_object.data = pref_string_content;
prefBranch.setComplexValue(pref_string_title, Components.interfaces.nsIPrefLocalizedString, pref_string_object);
}
}
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);
}

View File

@ -1,107 +0,0 @@
<?xml version="1.0"?> <!-- -*- Mode: SGML; indent-tabs-mode: nil; -*- -->
<!--
***** 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
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/sidebar/customize.css" type="text/css"?>
<!DOCTYPE dialog SYSTEM "chrome://communicator/locale/pref/pref-charset.dtd" >
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="customizeCharacterEncoding"
title="&charset.customize.title.label;"
onload="Init();"
ondialogaccept="return Save();"
persist="width height screenX screenY"
headertitle="&charset.customize.left.header;"
style="width: 44em; height: 33em;">
<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;" control="available_charsets"/>
<!-- 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;" control="active_charsets"/>
<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"
label="&charset.customize.moveUp.label;"
accesskey="&charset.customize.moveUp.accesskey;"
oncommand="MoveUp();"/>
<button id="down_button" class="down small" disabled="true"
label="&charset.customize.moveDown.label;"
accesskey="&charset.customize.moveDown.accesskey;"
oncommand="MoveDown();"/>
<spacer flex="1"/>
</vbox>
</hbox>
</dialog>

View File

@ -1,115 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Ben Goodger <ben@netscape.com>
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xul-overlay href="chrome://communicator/content/pref/platformPrefOverlay.xul"?>
<!DOCTYPE page 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="&pref.colors.title;">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["foregroundText", "background", "browserUseSystemColors", "unvisitedLinks", "activeLinks", "visitedLinks", "browserUnderlineAnchors", "browserUseDocumentColors"];
]]>
</script>
<hbox>
<groupbox flex="1" id="pageColours">
<caption label="&color;"/>
<hbox align="center">
<label control="foregroundText" value="&textColor.label;"
accesskey="&textColor.accesskey;" flex="1"/>
<colorpicker type="button" id="foregroundText" palettename="standard"
prefstring="browser.display.foreground_color"/>
</hbox>
<hbox align="center" style="margin-top: 5px">
<label control="background" value="&backgroundColor.label;"
accesskey="&backgroundColor.accesskey;" flex="1"/>
<colorpicker type="button" id="background" palettename="standard"
prefstring="browser.display.background_color"/>
</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 control="unvisitedLinks" value="&linkColor.label;"
accesskey="&linkColor.accesskey;" flex="1"/>
<colorpicker type="button" id="unvisitedLinks" palettename="standard"
prefstring="browser.anchor_color"/>
</hbox>
<hbox align="center" style="margin-top: 5px">
<label control="activeLinks" value="&activeLinkColor.label;"
accesskey="&activeLinkColor.accesskey;" flex="1"/>
<colorpicker type="button" id="activeLinks" palettename="standard"
prefstring="browser.active_color"/>
</hbox>
<hbox align="center" style="margin-top: 5px">
<label control="visitedLinks" value="&visitedLinkColor.label;"
accesskey="&visitedLinkColor.accesskey;" flex="1"/>
<colorpicker type="button" id="visitedLinks" palettename="standard"
prefstring="browser.visited_color"/>
</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>
</page>

View File

@ -1,163 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Håkan Waara <hwaara@chello.se>
Peter Annema <disttsc@bart.nl>
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 ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE page SYSTEM "chrome://communicator/locale/pref/pref-cookies.dtd">
<page id="cookiesPanel" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="init();"
headertitle="&pref.cookies.title;">
<script type="application/x-javascript" src="chrome://communicator/content/permissions/permissionsOverlay.js"/>
<script type="application/x-javascript">
<![CDATA[
var panel = "chrome://communicator/content/pref/pref-cookies.xul";
var _elementIDs = ["networkCookieBehavior", "networkCookieLifetime",
"alwaysAcceptSession", "lifetimeDays"];
function init()
{
parent.initPanel('chrome://communicator/content/pref/pref-cookies.xul');
setDisables(false);
const NS_COOKIECONSENT_CONTRACTID = '@mozilla.org/cookie-consent;1';
if (NS_COOKIECONSENT_CONTRACTID in Components.classes) {
var p3pRadioButton = document.getElementById("p3pRadioButton");
p3pRadioButton.removeAttribute("hidden");
}
}
const cookies_disabled = "2";
const cookies_no_third_party = "1";
const cookies_p3p = "3";
const cookies_enabled = "0";
const accept_normally = "0";
const accept_session = "2";
const accept_for_n_days = "3";
const ask_before_accepting = "1";
function setDisables(setFocus)
{
var cookieBehavior = document.getElementById("networkCookieBehavior");
var p3pButton = document.getElementById("p3pDialog");
p3pButton.disabled = (cookieBehavior.value != cookies_p3p);
if (parent.hPrefWindow.getPrefIsLocked(p3pButton.getAttribute("prefstring")) )
p3pButton.disabled = true;
var cookieLifetime = document.getElementById("networkCookieLifetime");
var lifetimeDays = document.getElementById("lifetimeDays");
var alwaysAcceptSession = document.getElementById("alwaysAcceptSession");
var cookiesDisabled = (cookieBehavior.value == cookies_disabled);
cookieLifetime.disabled = cookiesDisabled;
lifetimeDays.disabled = cookiesDisabled || (cookieLifetime.value != accept_for_n_days);
alwaysAcceptSession.disabled = cookiesDisabled || (cookieLifetime.value != ask_before_accepting);
if (parent.hPrefWindow.getPrefIsLocked(alwaysAcceptSession.getAttribute("prefstring")) )
alwaysAcceptSession.disabled = true;
if (parent.hPrefWindow.getPrefIsLocked(lifetimeDays.getAttribute("prefstring")) )
lifetimeDays.disabled = true;
if (parent.hPrefWindow.getPrefIsLocked(cookieLifetime.getAttribute("prefstring")) )
cookieLifetime.disabled = true;
if (!lifetimeDays.disabled && setFocus)
lifetimeDays.focus();
}
]]>
</script>
<groupbox id="networkCookieAcceptPolicy">
<caption label="&cookiePolicy.label;"/>
<radiogroup id="networkCookieBehavior"
prefstring="network.cookie.cookieBehavior">
<radio value="2" label="&disableCookies.label;"
accesskey="&disableCookies.accesskey;" oncommand="setDisables(false);"/>
<radio value="1" label="&accOrgCookiesRadio.label;"
accesskey="&accOrgCookiesRadio.accesskey;" oncommand="setDisables(false);"/>
<hbox id="p3pRadioButton" hidden="true">
<radio value="3" label="&accP3PCookiesRadio.label;"
accesskey="&accP3PCookiesRadio.accesskey;" oncommand="setDisables(false);"/>
<button label="&viewP3P.label;" accesskey="&viewP3P.accesskey;" oncommand="viewP3P();"
id="p3pDialog"
prefstring="pref.advanced.cookies.disable_button.more_info"/>
</hbox>
<radio value="0" label="&accAllCookiesRadio.label;"
accesskey="&accAllCookiesRadio.accesskey;" oncommand="setDisables(false);"/>
</radiogroup>
</groupbox>
<groupbox id="networkCookieLifetimePolicy">
<caption label="&cookieRetentionPolicy.label;"/>
<radiogroup id="networkCookieLifetime"
prefstring="network.cookie.lifetimePolicy">
<radio value="0" label="&acceptNormally.label;" accesskey="&acceptNormally.accesskey;" oncommand="setDisables(false);"/>
<radio value="2" label="&acceptForSession.label;" accesskey="&acceptForSession.accesskey;" oncommand="setDisables(false);"/>
<hbox align="center">
<radio value="3" accesskey="&acceptforNDays.accesskey;" label="&acceptforNDays.label;"
oncommand="setDisables(true);"/>
<textbox id="lifetimeDays" pref="true" size="4"
preftype="int" prefstring="network.cookie.lifetime.days"/>
<label value="&days.label;" control="lifetimeDays"/>
</hbox>
<hbox>
<radio value="1" label="&warnAboutCookies.label;"
accesskey="&warnAboutCookies.accesskey;" oncommand="setDisables(false);"/>
<checkbox id="alwaysAcceptSession" label="&forCurrentSession.label;"
accesskey="&forCurrentSession.accesskey;"
prefstring="network.cookie.alwaysAcceptSessionCookies"/>
</hbox>
</radiogroup>
</groupbox>
<groupbox id="manageCookiesAndSites">
<caption label="&manageCookies.label;"/>
<description>&manageCookiesDescription.label;</description>
<hbox pack="end">
<button label="&viewCookies.label;" accesskey="&viewCookies.accesskey;" oncommand="viewCookies();"
id="viewCookieButton"
prefstring="pref.advanced.cookies.disable_button.view_cookies"/>
</hbox>
</groupbox>
</page>

View File

@ -1,118 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE page 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 = ["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"/>
</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"
accesskey="&acceleratorKey.accesskey;" control="acceleratorKeyValue"/>
<textbox id="acceleratorKeyValue" preftype="int"
prefstring="ui.key.accelKey" size="5"/>
<label value="&menuAccessKey.label;" accesskey="&menuAccessKey.accesskey;" control="menuAccessKeyValue"/>
<textbox id="menuAccessKeyValue" preftype="int"
prefstring="ui.key.menuAccessKey" size="5"/>
</row>
</rows>
</grid>
</groupbox>
</page>

View File

@ -1,93 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE page 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>

View File

@ -1,90 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE page 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>

View File

@ -1,181 +0,0 @@
const nsIFilePicker = Components.interfaces.nsIFilePicker;
const nsILocalFile = Components.interfaces.nsILocalFile;
const nsIProperties = Components.interfaces.nsIProperties;
const nsIIOService = Components.interfaces.nsIIOService;
const nsIFileHandler = Components.interfaces.nsIFileProtocolHandler;
const nsIURIFixup = Components.interfaces.nsIURIFixup;
const kDownloadDirPref = "browser.download.dir";
var gPrompt;
var gLocation;
var gChooseButton;
var gFolderField;
var gFinishedSound;
var gChooseButtonLocked;
var gPromptLocked;
var gFinishedSoundLocked;
var gIOService;
var gSound = null;
function Startup()
{
gIOService = Components.classes["@mozilla.org/network/io-service;1"]
.getService(nsIIOService);
gPrompt = document.getElementById("autoDownload");
gLocation = document.getElementById("downloadLocation");
gChooseButton = document.getElementById("chooseDownloadFolder");
gFolderField = document.getElementById("downloadFolder");
gFinishedSound = document.getElementById("finishedSoundUrl");
var prefWindow = parent.hPrefWindow;
gChooseButtonLocked = prefWindow.getPrefIsLocked(kDownloadDirPref);
gPromptLocked = prefWindow.getPrefIsLocked("browser.download.autoDownload");
gFinishedSoundLocked = prefWindow.getPrefIsLocked("browser.download.finished_sound_url");
var dir = prefWindow.getPref("localfile", kDownloadDirPref);
if (dir == "!/!ERROR_UNDEFINED_PREF!/!")
dir = null;
if (!dir)
{
try
{
// no default_dir folder found; default to profile directory
var dirSvc = Components.classes["@mozilla.org/file/directory_service;1"]
.getService(nsIProperties);
dir = dirSvc.get("ProfD", nsILocalFile);
// now remember the new assumption
prefWindow.setPref("localfile", kDownloadDirPref, dir);
}
catch (ex)
{
}
}
// if both pref and dir svc fail leave this field blank else show path
if (dir)
gFolderField.value = (/Mac/.test(navigator.platform)) ? dir.leafName : dir.path;
setPrefDLElements();
// Make sure sound_url setting is actually a URL
try {
var URIFixup = Components.classes["@mozilla.org/docshell/urifixup;1"]
.getService(nsIURIFixup);
gFinishedSound.value = URIFixup.createFixupURI(gFinishedSound.value, nsIURIFixup.FIXUP_FLAG_NONE).spec;
} catch (ex) { }
PlaySoundCheck();
// if we don't have the alert service, hide the pref UI for using alerts to notify on download completion
// see bug #158711
var downloadDoneNotificationAlertUI = document.getElementById("finishedNotificationAlert");
downloadDoneNotificationAlertUI.hidden = !("@mozilla.org/alerts-service;1" in Components.classes);
}
function setPrefDLElements()
{
if (!gPromptLocked)
gLocation.disabled = (gPrompt.value == "true");
gFolderField.disabled = gChooseButtonLocked;
gChooseButton.disabled = gChooseButtonLocked;
}
function prefDownloadSelectFolder()
{
var prefWindow = parent.hPrefWindow;
var initialDir = prefWindow.getPref("localfile", kDownloadDirPref);
// file picker will open at default location if no pref set
if (initialDir == "!/!ERROR_UNDEFINED_PREF!/!")
initialDir = null;
var fpParams = {
fp: makeFilePicker(),
fptitle: "downloadfolder",
fpdir: initialDir,
fpmode: nsIFilePicker.modeGetFolder,
fpfiletype: null,
fpext: null,
fpfilters: nsIFilePicker.filterAll
};
var ret = poseFilePicker(fpParams);
if (ret == nsIFilePicker.returnOK) {
var localFile = fpParams.fp.file.QueryInterface(nsILocalFile);
prefWindow.setPref("localfile", kDownloadDirPref, localFile);
gFolderField.value = (/Mac/.test(navigator.platform)) ? fpParams.fp.file.leafName : fpParams.fp.file.path;
}
}
function makeFilePicker()
{
return Components.classes["@mozilla.org/filepicker;1"]
.createInstance(nsIFilePicker);
}
function poseFilePicker(aFpP)
{
var prefutilitiesBundle = document.getElementById("bundle_prefutilities");
var title = prefutilitiesBundle.getString(aFpP.fptitle);
var fp = aFpP.fp; // simply for smaller readable code
fp.init(window, title, aFpP.fpmode);
if (aFpP.fpdir)
fp.displayDirectory = aFpP.fpdir;
if (aFpP.fpfiletype) {
var filetype = prefutilitiesBundle.getString(aFpP.fpfiletype);
fp.appendFilter(filetype, aFpP.fpext);
}
if (aFpP.fpfilters)
fp.appendFilters(aFpP.fpfilters);
return fp.show();
}
function PlaySoundCheck()
{
var disableCustomUI = !document.getElementById("finishedNotificationSound").checked;
gFinishedSound.disabled = disableCustomUI || gFinishedSoundLocked;
document.getElementById("preview").disabled = disableCustomUI;
document.getElementById("browse").disabled = disableCustomUI || gFinishedSoundLocked;
}
function Browse()
{
var initialDir = null;
if (gFinishedSound.value != "") {
var fileHandler = gIOService.getProtocolHandler("file")
.QueryInterface(nsIFileHandler);
initialDir = fileHandler.getFileFromURLSpec(gFinishedSound.value)
.parent.QueryInterface(nsILocalFile);
}
var fpParams = {
fp: makeFilePicker(),
fptitle: "choosesound",
fpdir: initialDir,
fpmode: nsIFilePicker.modeOpen,
fpfiletype: "SoundFiles",
fpext: "*.wav; *.wave",
fpfilters: nsIFilePicker.filterAll
};
var ret = poseFilePicker(fpParams);
if (ret == nsIFilePicker.returnOK) {
// convert the nsILocalFile into a nsIFile url
gFinishedSound.value = fpParams.fp.fileURL.spec;
}
}
function PreviewSound()
{
if (!gSound)
gSound = Components.classes["@mozilla.org/sound;1"].createInstance(Components.interfaces.nsISound);
if (gFinishedSound.value != "")
gSound.play(gIOService.newURI(gFinishedSound.value, null, null));
else
gSound.beep();
}

View File

@ -1,118 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xul-overlay href="chrome://communicator/content/communicatorOverlay.xul"?>
<!DOCTYPE page 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="&pref.download.title;">
<stringbundle id="bundle_prefutilities"
src="chrome://communicator/locale/pref/prefutilities.properties"/>
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-download.js"/>
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["downloadBehavior", "autoDownload", "downloadLocation",
"finishedNotificationAlert", "finishedNotificationSound", "finishedSoundUrl"];
]]>
</script>
<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>
<groupbox>
<caption label="&downloadLocation.label;"/>
<radiogroup id="autoDownload" oncommand="setPrefDLElements();"
preftype="bool" prefstring="browser.download.autoDownload">
<radio value="false" label="&promptDownload.label;" accesskey="&promptDownload.accesskey;"/>
<radiogroup id="downloadLocation" class="indent"
preftype="bool" prefstring="browser.download.lastLocation">
<radio value="true" label="&lastLocation.label;" accesskey="&lastLocation.accesskey;"/>
<radio value="false" label="&specifiedLocation.label;" accesskey="&specifiedLocation.accesskey;"/>
</radiogroup>
<radio value="true" label="&autoDownload.label;" accesskey="&autoDownload.accesskey;"/>
</radiogroup>
<separator class="thin"/>
<vbox>
<label value="&downloadFolder.label;"/>
<hbox align="center">
<textbox id="downloadFolder" flex="1" readonly="true" class="uri-element"/>
<button label="&chooseDownloadFolder.label;" accesskey="&chooseDownloadFolder.accesskey;"
oncommand="prefDownloadSelectFolder();" id="chooseDownloadFolder"/>
</hbox>
</vbox>
</groupbox>
<groupbox>
<caption label="&finishedBehavior.label;"/>
<hbox align="center">
<checkbox id="finishedNotificationSound" label="&playSound.label;"
prefstring="browser.download.finished_download_sound"
accesskey="&playSound.accesskey;"
oncommand="PlaySoundCheck()"/>
<checkbox id="finishedNotificationAlert" label="&showAlert.label;"
prefstring="browser.download.finished_download_alert"
accesskey="&showAlert.accesskey;"/>
</hbox>
<hbox align="center" class="indent">
<textbox readonly="true" flex="1" id="finishedSoundUrl" preftype="string"
prefstring="browser.download.finished_sound_url"/>
<hbox align="center">
<button id="browse" label="&browse.label;"
accesskey="&browse.accesskey;" oncommand="Browse()"/>
<button id="preview" label="&preview.label;"
accesskey="&preview.accesskey;" oncommand="PreviewSound()"/>
</hbox>
</hbox>
</groupbox>
</page>

View File

@ -1,500 +0,0 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is 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>
* Stefan Borggraefe <Stefan.Borggraefe@gmx.de>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
var fontEnumerator = null;
var globalFonts = null;
var fontTypes = ["serif", "sans-serif", "cursive", "fantasy", "monospace"];
var defaultFont, 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
if( !( "dataEls" in dataObject ) )
dataObject.dataEls = [];
dataObject.dataEls[ "selectLangs" ] = [];
dataObject.dataEls[ "selectLangs" ].value = document.getElementById( "selectLangs" ).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 element = document.getElementById( "selectLangs" );
if( "dataEls" in aDataObject )
{
element.selectedItem = element.getElementsByAttribute( "value", aDataObject.dataEls[ "selectLangs" ].value )[0];
}
else
{
var prefstring = element.getAttribute( "prefstring" );
var preftype = element.getAttribute( "preftype" );
if( prefstring && preftype )
{
var prefvalue = parent.hPrefWindow.getPref( preftype, prefstring );
element.selectedItem = element.getElementsByAttribute( "value", prefvalue )[0];
}
}
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()
{
defaultFont = document.getElementById( "proportionalFont" );
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();
// 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 getFontEnumerator()
{
if (!fontEnumerator)
{
fontEnumerator = Components.classes["@mozilla.org/gfx/fontenumerator;1"]
.createInstance()
.QueryInterface(Components.interfaces.nsIFontEnumerator);
}
return fontEnumerator;
}
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 );
},
appendFontNames:
function ( aLanguage, aFontType )
{
var i;
var defaultFont = null;
var count = { value: 0 };
var fonts = getFontEnumerator().EnumerateFonts( aLanguage, aFontType, count );
if (fonts.length > 0)
{
defaultFont = getFontEnumerator().getDefaultFont( aLanguage, aFontType );
}
else
{
// if no specific fonts, relax 'aFontType' and try to get other
// fonts for this language so that we can group them on top
fonts = getFontEnumerator().EnumerateFonts( aLanguage, "", count );
if (fonts.length > 0)
{
defaultFont = getFontEnumerator().getDefaultFont( aLanguage, "" );
}
}
var itemNode = null;
var separatorNode = null;
var popupNode = document.createElement( "menupopup" );
if (fonts.length > 0)
{
// always put the default font at the front of the list
if (defaultFont)
{
var label = gPrefutilitiesBundle
.getString("labelDefaultFont")
.replace(/%font_family%/, defaultFont);
itemNode = document.createElement( "menuitem" );
itemNode.setAttribute( "label", label );
itemNode.setAttribute( "value", "" ); // special blank value
popupNode.appendChild( itemNode );
separatorNode = document.createElement( "menuseparator" );
popupNode.appendChild( separatorNode );
}
for (i = 0; i < fonts.length; i++)
{
itemNode = document.createElement( "menuitem" );
itemNode.setAttribute( "value", fonts[i] );
itemNode.setAttribute( "label", fonts[i] );
popupNode.appendChild( itemNode );
}
}
// get all the fonts to complete the font lists
if (!globalFonts)
{
globalFonts = getFontEnumerator().EnumerateAllFonts( count );
}
// since the lists are sorted, we can get unique entries by just walking
// both lists linearly side-by-side, skipping those values already in
// the popup list
if (globalFonts.length > fonts.length)
{
var menuItem = separatorNode ? separatorNode.nextSibling : popupNode.firstChild;
var menuValue = menuItem ? menuItem.getAttribute( "value" ) : null;
separatorNode = document.createElement( "menuseparator" );
popupNode.appendChild( separatorNode );
for (i = 0; i < globalFonts.length; i++)
{
if (globalFonts[i] != menuValue)
{
itemNode = document.createElement( "menuitem" );
itemNode.setAttribute( "value", globalFonts[i] );
itemNode.setAttribute( "label", globalFonts[i] );
popupNode.appendChild( itemNode );
}
else
{
menuItem = menuItem.nextSibling;
menuValue = menuItem ? menuItem.getAttribute( "value" ) : null;
}
}
}
this.listElement.appendChild( popupNode );
return popupNode.firstChild;
}
};
function lazyAppendFontNames( i )
{
// schedule the build of the next font list
if (i+1 < fontTypes.length)
{
window.setTimeout(lazyAppendFontNames, 100, i+1);
}
// now build and populate the fonts for the requested font type
var defaultItem;
var selectElement = new listElement( fontTypes[i] );
selectElement.clearList();
try
{
defaultItem = selectElement.appendFontNames( languageList.value, fontTypes[i] );
}
catch(e) {
dump("pref-fonts.js: " + e + "\nFailed to build the font list for " + fontTypes[i] + "\n");
return;
}
// now set the selected font item for the drop down list
if (!defaultItem)
return; // nothing to select, so no need to bother
// the item returned by default is our last resort fall-back
var selectedItem = defaultItem;
var dataEls;
if( languageList.value in languageData )
{
// data exists for this language, pre-select items based on this information
var dataVal = languageData[languageList.value].types[fontTypes[i]];
if (dataVal.length) // else: special blank means the default
dataEls = selectElement.listElement.getElementsByAttribute("value", dataVal);
}
else
{
try
{
var fontPrefString = "font.name." + fontTypes[i] + "." + languageList.value;
var selectVal = parent.hPrefWindow.pref.getComplexValue( fontPrefString, Components.interfaces.nsISupportsString ).data;
dataEls = selectElement.listElement.getElementsByAttribute("value", selectVal);
// we need to honor name-list in case name is unavailable
if (!dataEls.item(0)) {
var fontListPrefString = "font.name-list." + fontTypes[i] + "." + languageList.value;
var nameList = parent.hPrefWindow.pref.getComplexValue( fontListPrefString, Components.interfaces.nsISupportsString ).data;
var fontNames = nameList.split(",");
for (j = 0; j < fontNames.length; j++) {
selectVal = fontNames[j].replace(/^\s+|\s+$/, "");
dataEls = selectElement.listElement.getElementsByAttribute("value", selectVal);
if (dataEls.item(0))
break; // exit loop if we find one
}
}
}
catch(e) {
}
}
if (dataEls && dataEls.item(0))
selectedItem = dataEls[0];
selectElement.listElement.selectedItem = selectedItem;
selectElement.listElement.removeAttribute( "disabled" );
}
function saveFontPrefs()
{
// 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.getComplexValue( fontPrefString, Components.interfaces.nsISupportsString ).data;
}
catch(e)
{
}
var dataValue = dataObject.languageData[language].types[type];
if( currValue != dataValue )
{
if (dataValue)
{
parent.hPrefWindow.setPref( "string", fontPrefString, dataValue );
}
else
{
// A font name can't be blank. The special blank means the default.
// Unset the pref entirely, letting Gfx to decide. GfxXft will use what
// Xft says, whereas GfxWin and others will use the built-in settings
// that are shipped for font.name and font.name-list.
try
{
// ClearUserPref throws an exception...
pref.clearUserPref( fontPrefString );
}
catch(e)
{
}
}
}
}
var defaultFontPref = "font.default." + language;
var variableSizePref = "font.size.variable." + language;
var fixedSizePref = "font.size.fixed." + language;
var minSizePref = "font.minimum-size." + language;
var currDefaultFont = "serif", currVariableSize = 12, currFixedSize = 12, minSizeVal = 0;
try
{
currDefaultFont = parent.hPrefWindow.getPref( "string", defaultFontPref );
currVariableSize = pref.getIntPref( variableSizePref );
currFixedSize = pref.getIntPref( fixedSizePref );
minSizeVal = pref.getIntPref( minSizePref );
}
catch(e)
{
}
if( currDefaultFont != dataObject.languageData[language].defaultFont )
parent.hPrefWindow.setPref( "string", defaultFontPref, dataObject.languageData[language].defaultFont );
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 documentFonts = dataObject.useDocFonts;
var defaultFont = dataObject.defaultFont;
try
{
var currFonts = pref.getIntPref( "browser.display.use_document_fonts" );
}
catch(e)
{
}
if( currFonts != documentFonts )
pref.setIntPref( "browser.display.use_document_fonts", documentFonts );
}
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].defaultFont = defaultFont.value;
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.item(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;
else if( currentLanguage == languageList.value )
return; // same as before, nothing changed
// lazily populate the successive font lists at 100ms intervals.
// (Note: the third parameter to setTimeout() is going to be
// passed as argument to the callback function.)
window.setTimeout(lazyAppendFontNames, 100, 0);
// in the meantime, disable the menu lists
for( var i = 0; i < fontTypes.length; i++ )
{
var listElement = document.getElementById( fontTypes[i] );
listElement.setAttribute( "value", "" );
listElement.setAttribute( "label", "" );
listElement.setAttribute( "disabled", "true" );
}
// and set the default font type and the font sizes
try
{
defaultFont.value = parent.hPrefWindow.getPref("string", "font.default." + languageList.value);
var variableSizePref = "font.size.variable." + languageList.value;
var sizeVarVal = parent.hPrefWindow.pref.getIntPref( variableSizePref );
variableSize.selectedItem = variableSize.getElementsByAttribute( "value", sizeVarVal )[0];
var fixedSizePref = "font.size.fixed." + languageList.value;
var sizeFixedVal = parent.hPrefWindow.pref.getIntPref( fixedSizePref );
fixedSize.selectedItem = fixedSize.getElementsByAttribute( "value", sizeFixedVal )[0];
}
catch(e) { } // font size lists can simply default to the first entry
var minSizeVal = 0;
try
{
var minSizePref = "font.minimum-size." + languageList.value;
minSizeVal = parent.hPrefWindow.pref.getIntPref( minSizePref );
}
catch(e) { }
minSizeSelect( minSizeVal );
currentLanguage = languageList.value;
}
// disable font items, but not the browserUseDocumentFonts checkbox
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;
}
}

View File

@ -1,296 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-2000
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/prefpanels.css" type="text/css"?>
<!DOCTYPE page 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="&pref.fonts.title;">
<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="zh-HK" label="&font.langGroup.trad-chinese-hk;"/>
<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="th" label="&font.langGroup.thai;"/>
<menuitem value="he" label="&font.langGroup.hebrew;"/>
<menuitem value="ar" label="&font.langGroup.arabic;"/>
<menuitem value="x-devanagari" label="&font.langGroup.devanagari;"/>
<menuitem value="x-tamil" label="&font.langGroup.tamil;"/>
<menuitem value="x-armn" label="&font.langGroup.armenian;"/>
<menuitem value="x-beng" label="&font.langGroup.bengali;"/>
<menuitem value="x-cans" label="&font.langGroup.canadian;"/>
<menuitem value="x-ethi" label="&font.langGroup.ethiopic;"/>
<menuitem value="x-geor" label="&font.langGroup.georgian;"/>
<menuitem value="x-gujr" label="&font.langGroup.gujarati;"/>
<menuitem value="x-guru" label="&font.langGroup.gurmukhi;"/>
<menuitem value="x-khmr" label="&font.langGroup.khmer;"/>
<menuitem value="x-mlym" label="&font.langGroup.malayalam;"/>
<menuitem value="x-unicode" label="&font.langGroup.unicode;"/>
<menuitem value="x-user-def" label="&font.langGroup.user-def;"/>
</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;">
<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="17" label="17"/>
<menuitem value="18" label="18"/>
<menuitem value="20" label="20"/>
<menuitem value="22" label="22"/>
<menuitem value="24" label="24"/>
<menuitem value="26" label="26"/>
<menuitem value="28" label="28"/>
<menuitem value="30" label="30"/>
<menuitem value="32" label="32"/>
<menuitem value="34" label="34"/>
<menuitem value="36" label="36"/>
<menuitem value="40" label="40"/>
<menuitem value="44" label="44"/>
<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" class="prefpanel-font-list">
<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" class="prefpanel-font-list">
<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" class="prefpanel-font-list">
<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" class="prefpanel-font-list">
<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" class="prefpanel-font-list">
<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="17" label="17"/>
<menuitem value="18" label="18"/>
<menuitem value="20" label="20"/>
<menuitem value="22" label="22"/>
<menuitem value="24" label="24"/>
<menuitem value="26" label="26"/>
<menuitem value="28" label="28"/>
<menuitem value="30" label="30"/>
<menuitem value="32" label="32"/>
<menuitem value="34" label="34"/>
<menuitem value="36" label="36"/>
<menuitem value="40" label="40"/>
<menuitem value="44" label="44"/>
<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="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="17" label="17"/>
<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>
</page>

View File

@ -1,67 +0,0 @@
// 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://communicator/content/pref/pref-locales.xul": "appearance_pref_locales",
"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/pref-character_encoding.xul": "mail_prefs_character_encoding",
"chrome://messenger/content/pref-notifications.xul": "mail_prefs_notifications",
"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://messenger/content/pref-offline.xul": "mail_prefs_offline",
"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://editor/content/pref-toolbars.xul": "composer_prefs_toolbars",
"chrome://communicator/content/pref/pref-security.xul": "sec_gen",
"chrome://communicator/content/pref/pref-cookies.xul": "cookies_prefs",
"chrome://communicator/content/pref/pref-images.xul": "images_prefs",
"chrome://communicator/content/pref/pref-popups.xul": "pop_up_blocking",
"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",
"chrome://communicator/content/pref/pref-keynav.xul": "advanced_pref_keyboard_nav",
"chrome://sroaming/content/prefs/top.xul": "profile-help-roaming-prefs",
"chrome://sroaming/content/prefs/files.xul": "profile-help-roaming-item-selection"
}
function doHelpButton() {
var subsrc = document.getElementById("panelFrame").getAttribute("src");
if ( fm[subsrc] ) {
openHelp(fm[subsrc]);
} else {
openHelp('prefs');
}
}

View File

@ -1,134 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Jason Eager <jce2@po.cwru.edu>
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE page 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="&pref.history.title;">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["histDay"];
function Startup()
{
var urlbarHistButton = document.getElementById("ClearUrlBarHistoryButton");
try {
var RDF = Components.classes["@mozilla.org/rdf/rdf-service;1"]
.getService(Components.interfaces.nsIRDFService);
var localStore = RDF.GetDataSource("rdf:local-store");
var RDFC = Components.classes["@mozilla.org/rdf/container-utils;1"]
.getService(Components.interfaces.nsIRDFContainerUtils);
var urlBarHist = RDFC.MakeSeq(localStore, RDF.GetResource("nc:urlbar-history"));
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.nsISupportsString).data;
urlbarHistButton.disabled = ( urlBarHist.GetCount() == 0 && !lastUrl ) || isBtnLocked ;
}
catch(ex) {
}
var globalHistButton = document.getElementById("browserClearHistory");
var globalHistory = Components.classes["@mozilla.org/browser/global-history;2"]
.getService(Components.interfaces.nsIBrowserHistory);
if (globalHistory.count == 0)
globalHistButton.disabled = true;
}
function prefClearGlobalHistory()
{
var globalHistory = Components.classes["@mozilla.org/browser/global-history;2"]
.getService(Components.interfaces.nsIBrowserHistory);
globalHistory.removeAllPages();
}
function prefClearUrlbarHistory()
{
var pref = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
pref.setCharPref("general.open_location.last_url", "");
var RDF = Components.classes["@mozilla.org/rdf/rdf-service;1"]
.getService(Components.interfaces.nsIRDFService);
var localStore = RDF.GetDataSource("rdf:local-store");
var RDFC = Components.classes["@mozilla.org/rdf/container-utils;1"]
.getService(Components.interfaces.nsIRDFContainerUtils);
var urlBarHist = RDFC.MakeSeq(localStore, RDF.GetResource("nc:urlbar-history"));
for (var i = urlBarHist.GetCount(); i > 0; --i)
urlBarHist.RemoveElementAt(i, true);
}
]]>
</script>
<groupbox>
<caption label="&pref.history.caption;"/>
<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.caption;"/>
<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>

View File

@ -1,69 +0,0 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is 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 prefString = enablePipelining.getAttribute("prefstring");
var isLocked = parent.hPrefWindow.getPrefIsLocked(prefString);
var doDisable = !(enableHTTP11.selected && enableKeepAlive.checked) || isLocked;
enablePipelining.disabled = doDisable;
} catch(e) {}
}
function checkPipeliningProxy()
{
try {
var enableHTTP11 = document.getElementById("httpVersion11Proxy");
var enableKeepAlive = document.getElementById("enableKeepAliveProxy");
var enablePipelining = document.getElementById("enablePipeliningProxy");
var prefString = enablePipelining.getAttribute("prefstring");
var isLocked = parent.hPrefWindow.getPrefIsLocked(prefString);
var doDisable = !(enableHTTP11.selected && enableKeepAlive.checked) || isLocked;
enablePipelining.disabled = doDisable;
} catch(e) {}
}

View File

@ -1,113 +0,0 @@
<?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 page 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="&pref.http.title;">
<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>

View File

@ -1,104 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Håkan Waara <hwaara@chello.se>
Peter Annema <disttsc@bart.nl>
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 ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE page [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
%brandDTD;
<!ENTITY % prefImagesDTD SYSTEM "chrome://communicator/locale/pref/pref-images.dtd" >
%prefImagesDTD;
]>
<page id="imagesPanel" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="init();"
headertitle="&pref.images.title;">
<script type="application/x-javascript" src="chrome://communicator/content/permissions/permissionsOverlay.js"/>
<script type="application/x-javascript">
<![CDATA[
var panel = "chrome://communicator/content/pref/pref-images.xul";
var _elementIDs = ["networkImageBehaviour", "imageLooping"];
function init()
{
parent.initPanel('chrome://communicator/content/pref/pref-images.xul');
}
]]>
</script>
<groupbox id="imagesArea">
<caption label="&imageBlocking.label;"/>
<description>&imageDetails;</description>
<radiogroup id="networkImageBehaviour"
prefstring="permissions.default.image">
<radio value="2" label="&disableImages.label;"
accesskey="&disableImages.accesskey;"/>
<radio value="3" label="&accOrgImagesRadio.label;"
accesskey="&accOrgImagesRadio.accesskey;"/>
<radio value="1" label="&accAllImagesRadio.label;"
accesskey="&accAllImagesRadio.accesskey;"/>
</radiogroup>
<hbox pack="end">
<button id="viewImages" label="&viewImages.label;"
accesskey="&viewImages.accesskey;" oncommand="viewImages();"
prefstring="pref.advanced.images.disable_button.view_image"/>
</hbox>
</groupbox>
<groupbox>
<caption label="&animLoopingTitle.label;"/>
<radiogroup id="imageLooping"
preftype="string" prefstring="image.animation_mode">
<radio value="normal" label="&animLoopAsSpecified.label;"
accesskey="&animLoopAsSpecified.accesskey;"/>
<radio value="once" label="&animLoopOnce.label;"
accesskey="&animLoopOnce.accesskey;"/>
<radio value="none" label="&animLoopNever.label;"
accesskey="&animLoopNever.accesskey;"/>
</radiogroup>
</groupbox>
</page>

View File

@ -1,83 +0,0 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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
* Aaron Leventhal.
* Portions created by the Initial Developer are Copyright (C) 2003
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Aaron Leventhal
* Asaf Romano
* Ian Neal
*
* 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 kTabToLinks = 4
const kTabToForms = 2;
var gData;
function Startup()
{
gData = parent.hPrefWindow.wsm.dataManager.pageData["chrome://communicator/content/pref/pref-keynav.xul"];
if (!/Mac/.test(navigator.platform)) {
parent.hPrefWindow.registerOKCallbackFunc(saveKeyNavPrefs);
if (!("tabNavPref" in gData)) {
// Textboxes are always part of the tab order
gData.tabNavPref = parent.hPrefWindow.getPref('int', 'accessibility.tabfocus') | 1;
gData.tabNavLocked = parent.hPrefWindow.getPrefIsLocked('accessibility.tabfocus');
}
var tabNavigationLinks = document.getElementById('tabNavigationLinks');
tabNavigationLinks.checked = ((gData.tabNavPref & kTabToLinks) != 0);
tabNavigationLinks.disabled = gData.tabNavLocked;
var tabNavigationForms = document.getElementById('tabNavigationForms');
tabNavigationForms.checked = ((gData.tabNavPref & kTabToForms) != 0);
tabNavigationForms.disabled = gData.tabNavLocked;
}
else
document.getElementById('tabNavigationPrefs').setAttribute("hidden", true);
setLinksOnlyDisabled();
}
function setLinksOnlyDisabled()
{
try {
document.getElementById('findAsYouTypeAutoWhat').disabled =
(!document.getElementById('findAsYouTypeEnableAuto').checked ||
parent.hPrefWindow.getPrefIsLocked('accessibility.typeaheadfind.linksonly'));
}
catch(e) {}
}
function saveKeyNavPrefs()
{
var data = parent.hPrefWindow.wsm.dataManager
.pageData["chrome://communicator/content/pref/pref-keynav.xul"];
parent.hPrefWindow.setPref("int", "accessibility.tabfocus", data.tabNavPref);
}

View File

@ -1,95 +0,0 @@
<?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
- Netscape Communications Corporation.
- Portions created by the Initial Developer are Copyright (C) 2003
- the Initial Developer. All Rights Reserved.
-
- Contributor(s): Aaron Leventhal
- Ian Neal
-
- 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 page SYSTEM "chrome://communicator/locale/pref/pref-keynav.dtd" >
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://communicator/content/pref/pref-keynav.xul');"
headertitle="&pref.keyNav.title;">
<script type="application/x-javascript"
src="chrome://communicator/content/pref/pref-keynav.js"/>
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["findAsYouTypeEnableAuto", "findAsYouTypeAutoWhat",
"findAsYouTypeSound", "findAsYouTypeTimeout"];
]]>
</script>
<groupbox id="tabNavigationPrefs" align="start">
<caption label="&tabNavigationBehavior.label;"/>
<description value="&tabNavigationDesc.label;"/>
<!-- gData var and kTabTo* consts are declared in pref-keynav.js -->
<checkbox id="tabNavigationLinks" label="&tabNavigationLinks.label;"
accesskey="&tabNavigationLinks.accesskey;"
oncommand="gData.tabNavPref ^= kTabToLinks;"/>
<checkbox id="tabNavigationForms" label="&tabNavigationForms.label;"
accesskey="&tabNavigationForms.accesskey;"
oncommand="gData.tabNavPref ^= kTabToForms;"/>
<description value="&tabNavigationTextboxes.label;"/>
</groupbox>
<groupbox align="start">
<caption label="&findAsYouTypeBehavior.label;"/>
<checkbox id="findAsYouTypeEnableAuto" label="&findAsYouTypeEnableAuto.label;"
prefstring="accessibility.typeaheadfind.autostart"
oncommand="setLinksOnlyDisabled();"/>
<radiogroup id="findAsYouTypeAutoWhat" class="indent"
preftype="bool" prefstring="accessibility.typeaheadfind.linksonly">
<radio value="false" label="&findAsYouTypeAutoText.label;"
accesskey="&findAsYouTypeAutoText.accesskey;"/>
<radio value="true" label="&findAsYouTypeAutoLinks.label;"
accesskey="&findAsYouTypeAutoLinks.accesskey;"/>
</radiogroup>
<description>&findAsYouTypeTip.label;</description>
<vbox class="box-padded" align="start">
<separator class="thin" />
<checkbox id="findAsYouTypeSound" label="&findAsYouTypeSound.label;"
accesskey="&findAsYouTypeSound.accesskey;"
prefstring="accessibility.typeaheadfind.enablesound"/>
<checkbox id="findAsYouTypeTimeout" label="&findAsYouTypeTimeout.label;"
accesskey="&findAsYouTypeTimeout.accesskey;"
prefstring="accessibility.typeaheadfind.enabletimeout"/>
</vbox>
</groupbox>
</page>

View File

@ -1,71 +0,0 @@
<?xml version="1.0"?> <!-- -*- Mode: SGML; indent-tabs-mode: nil; -*- -->
<!--
***** 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
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Adrian Havill <havill@redhat.com>
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE dialog 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: 28em;">
<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;"
accesskey="&languages.customize.others.accesskey;"
control="languages.other"/>
<textbox id="languages.other" size="6" flex="1"/>
<label value="&languages.customize.others.examples;" control="languages.other"/>
</hbox>
</dialog>

View File

@ -1,631 +0,0 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Adrian Havill <havill@redhat.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 ***** */
//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://gre/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,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;
var language;
var region;
var use_region_format = false;
try {
language = languagesBundle.GetStringFromName(stringLangRegion[0]);
}
catch (ex) {
language = "";
}
if (stringLangRegion.length > 1) {
try {
region = regionsBundle.GetStringFromName(stringLangRegion[1]);
use_region_format = true;
}
catch (ex) {
}
}
if (use_region_format) {
tit = prefLangBundle.formatStringFromName("languageRegionCodeFormat",
[language, region, str], 3);
} else {
tit = prefLangBundle.formatStringFromName("languageCodeFormat",
[language, str], 2);
}
} //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 compareFn(a, b) {
return a[0].localeCompare(b[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) {
/* reject bogus lang strings, INCLUDING those with HTTP "q"
values kludged on the end of them
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 > 8) 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();
var addThese = new Array();
var addTheseNames = new Array();
var invalidLangs = new Array();
//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)) {
addThese[nodeIndex] = Languageid;
addTheseNames[nodeIndex] = Languagename;
}
}
//user-defined languages
var otherField = document.getElementById( "languages.other" );
var selCount = addThese.length;
if (otherField.value) {
var LanguageidsString = otherField.value.replace(/\s/g,"").toLowerCase();
var Languageids = LanguageidsString.split(separatorRe);
for (var i = 0; i < Languageids.length; i++) {
Languageid = Languageids[i];
if (IsRFC1766LangTag(Languageid)) {
if (!LangAlreadySelected(Languageid)) {
if (!LangAlreadyActive(Languageid)) {
Languagename = GetLanguageTitle(Languageid);
if (!Languagename)
Languagename = '[' + Languageid + ']';
addThese[i+selCount] = Languageid;
addTheseNames[i+selCount] = Languagename;
}
}
}
else {
invalidLangs[invalidLangs.length] = Languageid;
}
}
if (invalidLangs.length > 0) {
var errorMsg = prefLangBundle.GetStringFromName("illegalOtherLanguage") + " " +
invalidLangs.join(", ");
var errorTitle = prefLangBundle.GetStringFromName("illegalOtherLanguageTitle");
var prompter = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
.getService(Components.interfaces.nsIPromptService);
prompter.alert(this.window, errorTitle, errorMsg);
otherField.focus();
return false;
}
}
for (i = 0; i < addThese.length; i++) {
AddListItem(window.opener.document, active_languages, addThese[i], addTheseNames[i]);
}
available_languages.clearSelection();
return true;
}
function LangAlreadySelected(langid) {
var found = false;
for (var i = 0; i < available_languages.selectedItems.length; i++) {
var currentLang = available_languages.selectedItems[i];
var Languageid = currentLang.getAttribute('id');
if (Languageid == langid)
return true;
}
return false;
}
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

View File

@ -1,114 +0,0 @@
<?xml version="1.0"?> <!-- -*- Mode: SGML; indent-tabs-mode: nil; -*- -->
<!--
***** 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
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE page 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"
prefattribute="value"
prefstring="intl.accept_languages"/>
<groupbox flex="1">
<caption label="&langtitle.label;"/>
<description>&languages.customize.prefLangDescript;</description>
<label control="active_languages">&languages.customize.active.label;</label>
<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;"
accesskey="&languages.customize.addButton.accesskey;"
oncommand="AddLanguage();"
prefstring="pref.browser.language.disable_button.add"/>
<button id="remove" disabled="true"
label="&languages.customize.deleteButton.label;"
accesskey="&languages.customize.deleteButton.accesskey;"
oncommand="RemoveActiveLanguage();"
prefstring="pref.browser.language.disable_button.remove"/>
</vbox>
</hbox>
</groupbox>
<groupbox align="start">
<caption label="&languages.customize.Charset.grouplabel;"/>
<hbox align="center">
<label value="&languages.customize.DefaultCharset.label;" accesskey="&languages.customize.DefaultCharset.accesskey;" 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>
</hbox>
</groupbox>
</page>

View File

@ -1,313 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
bryner@brianryner.com
sspitzer@netscape.com
Peter Weilbacher <mozilla@weilbacher.org>
Ian Neal <bugzilla@arlen.demon.co.uk>
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE page [
<!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="&pref.mouseWheel.title;">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["mousewheelWithNoKeyAction", "mousewheelWithNoKeyNumlines", "mousewheelWithNoKeySysNumlines",
"mousewheelWithAltKeyAction", "mousewheelWithAltKeyNumlines", "mousewheelWithAltKeySysNumlines",
"mousewheelWithCtrlKeyAction", "mousewheelWithCtrlKeyNumlines", "mousewheelWithCtrlKeySysNumlines",
"mousewheelWithShiftKeyAction", "mousewheelWithShiftKeyNumlines", "mousewheelWithShiftKeySysNumlines",
"mousewheelHorizWithNoKeyAction", "mousewheelWithNoKeyNumchars", "mousewheelWithNoKeySysNumchars",
"mousewheelHorizWithAltKeyAction", "mousewheelWithAltKeyNumchars", "mousewheelWithAltKeySysNumchars",
"mousewheelHorizWithCtrlKeyAction", "mousewheelWithCtrlKeyNumchars", "mousewheelWithCtrlKeySysNumchars",
"mousewheelHorizWithShiftKeyAction", "mousewheelWithShiftKeyNumchars", "mousewheelWithShiftKeySysNumchars"];
function switchPage( aElement )
{
var deck = document.getElementById( "modifierDeck" );
deck.setAttribute( "selectedIndex", aElement.selectedItem.value );
}
function Startup()
{
var fields = ["mousewheelWithNoKeyNumlines", "mousewheelWithAltKeyNumlines", "mousewheelWithCtrlKeyNumlines", "mousewheelWithShiftKeyNumlines",
"mousewheelWithNoKeyNumchars", "mousewheelWithAltKeyNumchars", "mousewheelWithCtrlKeyNumchars", "mousewheelWithShiftKeyNumchars"];
var checkboxes = ["mousewheelWithNoKeySysNumlines", "mousewheelWithAltKeySysNumlines", "mousewheelWithCtrlKeySysNumlines", "mousewheelWithShiftKeySysNumlines",
"mousewheelWithNoKeySysNumchars", "mousewheelWithAltKeySysNumchars", "mousewheelWithCtrlKeySysNumchars", "mousewheelWithShiftKeySysNumchars"];
for (var i = 0; i < checkboxes.length; i++)
enableField(document.getElementById(checkboxes[i]), fields[i], false);
}
function enableField(aCheckbox, aNodeID, setFocus)
{
var el = document.getElementById(aNodeID);
el.disabled = aCheckbox.checked || parent.hPrefWindow.getPrefIsLocked(el.getAttribute("prefstring"));
if (!el.disabled && setFocus)
el.focus();
}
]]>
</script>
<description>&mouseWheelPanel.label;</description>
<separator class="thin"/>
<tabbox class="indent">
<tabs>
<tab label="&usingJustTheWheel.label;"/>
<tab label="&usingWheelAndAlt.label;"/>
<tab label="&usingWheelAndCtrl.label;"/>
<tab label="&usingWheelAndShft.label;"/>
</tabs>
<tabpanels>
<!-- no key modifiers -->
<vbox>
<groupbox>
<caption label="&mousewheelGroup.label;"/>
<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', true);"/>
</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>
</groupbox>
<groupbox>
<caption label="&mousewheelHorizGroup.label;"/>
<radiogroup id="mousewheelHorizWithNoKeyAction"
prefstring="mousewheel.horizscroll.withnokey.action">
<hbox align="start">
<radio value="0" label="&scroll.label;" accesskey="&scrollHoriz.accesskey;"/>
<vbox align="start">
<hbox align="center">
<textbox id="mousewheelWithNoKeyNumchars" size="3"
preftype="int" prefstring="mousewheel.horizscroll.withnokey.numlines"
prefattribute="value"/>
<label value="&scrollChars.label;"/>
</hbox>
<checkbox id="mousewheelWithNoKeySysNumchars" label="&useSystemDefault.label;"
accesskey="&useSystemDefaultHoriz.accesskey;"
prefstring="mousewheel.horizscroll.withnokey.sysnumlines"
oncommand="enableField(this, 'mousewheelWithNoKeyNumchars', true);"/>
</vbox>
</hbox>
<radio value="1" label="&scrollPgLtPgRt.label;" accesskey="&scrollPgLtPgRt.accesskey;"/>
<radio value="2" label="&history.label;" accesskey="&historyHoriz.accesskey;"/>
<radio value="3" label="&textsize.label;" accesskey="&textsizeHoriz.accesskey;"/>
</radiogroup>
</groupbox>
</vbox>
<!-- alt modifiers -->
<vbox>
<groupbox>
<caption label="&mousewheelGroup.label;"/>
<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', true);"/>
</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>
</groupbox>
<groupbox>
<caption label="&mousewheelHorizGroup.label;"/>
<radiogroup id="mousewheelHorizWithAltKeyAction"
prefstring="mousewheel.horizscroll.withaltkey.action">
<hbox align="start">
<radio value="0" label="&scroll.label;" accesskey="&scrollHoriz.accesskey;"/>
<vbox align="start">
<hbox align="center">
<textbox id="mousewheelWithAltKeyNumchars" size="3"
preftype="int" prefstring="mousewheel.horizscroll.withaltkey.numlines"/>
<label value="&scrollChars.label;"/>
</hbox>
<checkbox id="mousewheelWithAltKeySysNumchars" label="&useSystemDefault.label;"
accesskey="&useSystemDefaultHoriz.accesskey;"
prefstring="mousewheel.horizscroll.withaltkey.sysnumlines"
oncommand="enableField(this, 'mousewheelWithAltKeyNumchars', true);"/>
</vbox>
</hbox>
<radio value="1" label="&scrollPgLtPgRt.label;" accesskey="&scrollPgLtPgRt.accesskey;"/>
<radio value="2" label="&history.label;" accesskey="&historyHoriz.accesskey;"/>
<radio value="3" label="&textsize.label;" accesskey="&textsizeHoriz.accesskey;"/>
</radiogroup>
</groupbox>
</vbox>
<!-- ctrl modifiers -->
<vbox>
<groupbox>
<caption label="&mousewheelGroup.label;"/>
<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', true);"/>
</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>
</groupbox>
<groupbox>
<caption label="&mousewheelHorizGroup.label;"/>
<radiogroup id="mousewheelHorizWithCtrlKeyAction"
prefstring="mousewheel.horizscroll.withcontrolkey.action" >
<hbox align="start">
<radio value="0" label="&scroll.label;" accesskey="&scrollHoriz.accesskey;"/>
<vbox align="start">
<hbox align="center">
<textbox id="mousewheelWithCtrlKeyNumchars" size="3"
preftype="int" prefstring="mousewheel.horizscroll.withcontrolkey.numlines"/>
<label value="&scrollChars.label;"/>
</hbox>
<checkbox id="mousewheelWithCtrlKeySysNumchars" label="&useSystemDefault.label;"
accesskey="&useSystemDefaultHoriz.accesskey;"
prefstring="mousewheel.horizscroll.withcontrolkey.sysnumlines"
oncommand="enableField(this, 'mousewheelWithCtrlKeyNumchars', true);"/>
</vbox>
</hbox>
<radio value="1" label="&scrollPgLtPgRt.label;" accesskey="&scrollPgLtPgRt.accesskey;"/>
<radio value="2" label="&history.label;" accesskey="&historyHoriz.accesskey;"/>
<radio value="3" label="&textsize.label;" accesskey="&textsizeHoriz.accesskey;"/>
</radiogroup>
</groupbox>
</vbox>
<!-- shift modifiers -->
<vbox>
<groupbox>
<caption label="&mousewheelGroup.label;"/>
<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', true);"/>
</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>
</groupbox>
<groupbox>
<caption label="&mousewheelHorizGroup.label;"/>
<radiogroup id="mousewheelHorizWithShiftKeyAction"
prefstring="mousewheel.horizscroll.withshiftkey.action">
<hbox align="start">
<radio value="0" label="&scroll.label;" accesskey="&scrollHoriz.accesskey;"/>
<vbox align="start">
<hbox align="center">
<textbox id="mousewheelWithShiftKeyNumchars" size="3"
preftype="int" prefstring="mousewheel.horizscroll.withshiftkey.numlines"/>
<label value="&scrollChars.label;"/>
</hbox>
<checkbox id="mousewheelWithShiftKeySysNumchars" label="&useSystemDefault.label;"
accesskey="&useSystemDefaultHoriz.accesskey;"
prefstring="mousewheel.horizscroll.withshiftkey.sysnumlines"
oncommand="enableField(this, 'mousewheelWithShiftKeyNumchars', true);"/>
</vbox>
</hbox>
<radio value="1" label="&scrollPgLtPgRt.label;" accesskey="&scrollPgLtPgRt.accesskey;"/>
<radio value="2" label="&history.label;" accesskey="&historyHoriz.accesskey;"/>
<radio value="3" label="&textsize.label;" accesskey="&textsizeHoriz.accesskey;"/>
</radiogroup>
</groupbox>
</vbox>
</tabpanels>
</tabbox>
</page>

View File

@ -1,319 +0,0 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Ben Goodger <ben@netscape.com>
* Alec Flett <alecf@netscape.com>
* Stephen Walker <walk84@yahoo.com>
* Christopher A. Aillon <christopher@aillon.com>
* Ian Neal <ian@arlen.demon.co.uk>
*
* 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 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";
var gDefaultPage;
var gData;
function setHomePageValue(value)
{
var homePageField = document.getElementById("browserStartupHomepage");
homePageField.value = value;
}
function getGroupIsSetMessage()
{
var prefUtilitiesBundle = document.getElementById("bundle_prefutilities");
return prefUtilitiesBundle.getString("groupIsSet");
}
function getMostRecentBrowser()
{
var windowManager = Components.classes[WINDOWMEDIATOR_CONTRACTID]
.getService(nsIWindowMediator);
var browserWindow = windowManager.getMostRecentWindow("navigator:browser");
if (browserWindow)
return browserWindow.document.getElementById("content");
return null;
}
function getCurrentPage()
{
var url;
var tabbrowser = getMostRecentBrowser();
if (tabbrowser)
url = tabbrowser.currentURI.spec;
return url;
}
function getCurrentPageGroup()
{
var URIs = [];
var tabbrowser = getMostRecentBrowser();
if (tabbrowser) {
var browsers = tabbrowser.browsers;
for (var i = 0; i < browsers.length; ++i)
URIs[i] = browsers[i].currentURI.spec;
}
return URIs;
}
function getDefaultPage()
{
var prefService = Components.classes[PREFSERVICE_CONTRACTID]
.getService(nsIPrefService);
var pref = prefService.getDefaultBranch(null);
return pref.getComplexValue("browser.startup.homepage",
nsIPrefLocalizedString).data;
}
function updateHomePageButtons()
{
var homepage = document.getElementById("browserStartupHomepage").value;
// disable the "current page" button if the current page
// is already the homepage
var currentPageButton = document.getElementById("browserUseCurrent");
currentPageButton.disabled = homepage == getCurrentPage();
// disable the "default page" button if the default page
// is already the homepage
var defaultPageButton = document.getElementById("browserUseDefault");
defaultPageButton.disabled = (homepage == gDefaultPage);
// homePages.length == 1 if:
// - we're called from startup and there's one homepage
// - we're called from "current page" or "choose file"
// - the user typed something in the location field
// in those cases we only want to enable the button if:
// - there's more than one tab in the most recent browser
// otherwise we have a group of homepages:
// - we're called from startup and there's a group of homepages
// - we're called from "current group"
// in those cases we only want to enable the button if:
// - there's more than one tab in the most recent browser and
// the current group doesn't match the group of homepages
var enabled = false;
var homePages = gData.navigatorData.homePages;
if (homePages.length == 1) {
var browser = getMostRecentBrowser();
enabled = browser && browser.browsers.length > 1;
} else {
var currentURIs = getCurrentPageGroup();
if (currentURIs.length == homePages.length) {
for (var i = 0; !enabled && i < homePages.length; ++i) {
if (homePages[i] != currentURIs[i])
enabled = true;
}
} else if (currentURIs.length > 1) {
enabled = true;
}
}
var currentPageGroupButton = document.getElementById("browserUseCurrentGroup");
currentPageGroupButton.disabled = !enabled;
}
function locationInputHandler()
{
var navigatorData = gData.navigatorData;
var homePage = document.getElementById("browserStartupHomepage");
navigatorData.homePages = [ homePage.value ];
updateHomePageButtons();
}
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;
var url = fp.fileURL.spec;
setHomePageValue(url);
gData.navigatorData.homePages = [ url ];
updateHomePageButtons();
}
}
function setHomePageToCurrentPage()
{
var url = getCurrentPage();
if (url) {
setHomePageValue(url);
gData.navigatorData.homePages = [ url ];
updateHomePageButtons();
}
}
function setHomePageToCurrentGroup()
{
var URIs = getCurrentPageGroup();
if (URIs.length > 0) {
setHomePageValue(gData.navigatorData.groupIsSet);
gData.navigatorData.homePages = URIs;
updateHomePageButtons();
}
}
function setHomePageToDefaultPage()
{
setHomePageValue(gDefaultPage);
gData.navigatorData.homePages = [ gDefaultPage ];
updateHomePageButtons();
}
function init()
{
var prefWindow = parent.hPrefWindow;
gData = prefWindow.wsm.dataManager
.pageData["chrome://communicator/content/pref/pref-navigator.xul"]
gDefaultPage = getDefaultPage();
if ("navigatorData" in gData)
return;
var navigatorData = {};
navigatorData.groupIsSet = getGroupIsSetMessage();
var URIs = [];
try {
URIs[0] = prefWindow.getPref("localizedstring",
"browser.startup.homepage");
var count = prefWindow.getPref("int",
"browser.startup.homepage.count");
for (var i = 1; i < count; ++i) {
URIs[i] = prefWindow.getPref("localizedstring",
"browser.startup.homepage."+i);
}
navigatorData.homePages = URIs;
} catch(e) {
}
gData.navigatorData = navigatorData;
prefWindow.registerOKCallbackFunc(doOnOk);
}
function Startup()
{
init();
var navigatorData = gData.navigatorData;
var homePages = navigatorData.homePages;
if (homePages.length == 1)
setHomePageValue(homePages[0]);
else
setHomePageValue(navigatorData.groupIsSet);
updateHomePageButtons();
setPageAccessKeys(document.getElementById("behaviourDeck").firstChild);
}
function doOnOk()
{
var prefWindow = parent.hPrefWindow;
// OK could have been hit from another panel, so we need to
// get at navigatorData the long but safer way
var navigatorData = prefWindow.wsm.dataManager
.pageData["chrome://communicator/content/pref/pref-navigator.xul"]
.navigatorData;
var URIs = navigatorData.homePages;
prefWindow.setPref("string", "browser.startup.homepage", URIs[0]);
var i = 1;
for (; i < URIs.length; ++i)
prefWindow.setPref("string", "browser.startup.homepage."+i, URIs[i]);
const countPref = "browser.startup.homepage.count";
// remove the old user prefs values that we didn't overwrite
var oldCount = prefWindow.getPref("int", countPref);
for (; i < oldCount; ++i)
prefWindow.pref.clearUserPref("browser.startup.homepage."+i);
prefWindow.setPref("int", countPref, URIs.length);
}
function setPageAccessKeys(group)
{
var nodes = group.childNodes;
for (var i = 0; i < nodes.length; ++i)
nodes[i].accessKey = nodes[i].getAttribute("ak");
}
function removePageAccessKeys(group)
{
var nodes = group.childNodes;
for (var i = 0; i < nodes.length; ++i)
nodes[i].accessKey = '';
}
function switchPage(index)
{
var deck = document.getElementById("behaviourDeck");
removePageAccessKeys(deck.selectedPanel);
deck.selectedIndex = index;
setPageAccessKeys(deck.selectedPanel);
}

View File

@ -1,164 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Ian Neal <ian@arlen.demon.co.uk>
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?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 page 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="&pref.navigator.title;">
<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", "newWinPage", "newTabPage",
"bookmarksButton", "goButton", "homeButton",
"printButton", "searchButton" ];
]]>
</script>
<hbox id="pref-nav-platform-extensions">
<!-- navigator startup / new window / new tab behaviour -->
<groupbox flex="1">
<caption align="center">
<label value="&navRadio;" control="selectDisplayOn"/>
<menulist id="selectDisplayOn" oncommand="switchPage(this.selectedIndex);">
<menupopup>
<menuitem label="&navStartPageMenu.label;"/>
<menuitem label="&newWinPageMenu.label;"/>
<menuitem label="&newTabPageMenu.label;"/>
</menupopup>
</menulist>
</caption>
<deck id="behaviourDeck" flex="1">
<radiogroup id="startupPage" prefstring="browser.startup.page">
<radio value="0" label="&blankPageRadio.label;" ak="&blankPageRadio.accesskey;"/>
<radio value="1" label="&homePageRadio.label;" ak="&homePageRadio.accesskey;"/>
<radio value="2" label="&lastPageRadio.label;" ak="&lastPageRadio.accesskey;"/>
</radiogroup>
<radiogroup id="newWinPage" prefstring="browser.windows.loadOnNewWindow">
<radio value="0" label="&blankPageRadio.label;" ak="&blankPageRadio.accesskey;"/>
<radio value="1" label="&homePageRadio.label;" ak="&homePageRadio.accesskey;"/>
<radio value="2" label="&lastPageRadio.label;" ak="&lastPageRadio.accesskey;"/>
</radiogroup>
<radiogroup id="newTabPage" prefstring="browser.tabs.loadOnNewTab">
<radio value="0" label="&blankPageRadio.label;" ak="&blankPageRadio.accesskey;"/>
<radio value="1" label="&homePageRadio.label;" ak="&homePageRadio.accesskey;"/>
<radio value="2" label="&lastPageRadio.label;" ak="&lastPageRadio.accesskey;"/>
</radiogroup>
</deck>
</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" class="uri-element"
searchSessions="history" timeout="50" maxrows="6"
oninput="locationInputHandler();"/>
<button label="&browseFile.label;" accesskey="&browseFile.accesskey;"
oncommand="selectFile();"
id="browserChooseFile"
prefstring="pref.browser.homepage.disable_button.select_file"/>
</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="&useCurrentGroup.label;" accesskey="&useCurrentGroup.accesskey;"
oncommand="setHomePageToCurrentGroup();"
id="browserUseCurrentGroup"
prefstring="pref.browser.homepage.disable_button.current_group"/>
<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 -->
<description value="&toolbarIntro.label;"/>
<hbox id="prefShowButtons" flex="1" equalsize="true">
<groupbox id="prefShowButtonsBox1" flex="1">
<caption label="&navToolbarIntro.label;"/>
<checkbox id="goButton"
label="&goButton.label;"
accesskey="&goButton.accesskey;"
prefstring="browser.toolbars.showbutton.go"/>
<checkbox id="searchButton"
label="&searchButton.label;"
accesskey="&searchButton.accesskey;"
prefstring="browser.toolbars.showbutton.search"/>
<checkbox id="printButton"
label="&printButton.label;"
accesskey="&printButton.accesskey;"
prefstring="browser.toolbars.showbutton.print"/>
</groupbox>
<groupbox id="prefShowButtonsBox" flex="1">
<caption label="&persToolbarIntro.label;"/>
<checkbox id="homeButton"
label="&homeButton.label;"
accesskey="&homeButton.accesskey;"
prefstring="browser.toolbars.showbutton.home"/>
<checkbox id="bookmarksButton"
label="&bookmarksButton.label;"
accesskey="&bookmarksButton.accesskey;"
prefstring="browser.toolbars.showbutton.bookmarks"/>
</groupbox>
<vbox id="prefShowButtonBox"/>
</hbox>
</page>

View File

@ -1,71 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Mohan Bhamidipati (mohanb@netscape.com)
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE page [
<!ENTITY % brandDTD SYSTEM "chrome://branding/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"];
]]>
</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> -->
</groupbox>
</page>

View File

@ -1,76 +0,0 @@
<?xml version="1.0"?> <?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE page [
<!ENTITY % brandDTD SYSTEM "chrome://branding/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="&pref.policies.title;">
<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>

View File

@ -1,250 +0,0 @@
<?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
- Netscape Communications Corporation.
- Portions created by the Initial Developer are Copyright (C) 2002
- 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"?>
<!DOCTYPE page [
<!ENTITY % prefPopupsDTD SYSTEM "chrome://communicator/locale/pref/pref-popups.dtd" >
%prefPopupsDTD;
]>
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="popupsPanel"
onload="parent.initPanel('chrome://communicator/content/pref/pref-popups.xul');"
headertitle="&pref.popups.title;">
<script type="application/x-javascript" src="chrome://communicator/content/permissions/permissionsOverlay.js"/>
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["popupPolicy","playSound","playSoundUrl","displayIcon","removeBlacklist","prefillWhitelist"];
const nsIPermissionManager = Components.interfaces.nsIPermissionManager;
const popupType = "popup";
var gPolicyCheckbox;
var gSoundCheckbox;
var gSoundUrlBox;
var gSoundUrlButton;
var gPreviewSoundButton;
var gIconCheckbox;
var permissionManager;
var ioService;
function Startup() {
permissionManager = Components.classes["@mozilla.org/permissionmanager;1"]
.getService(nsIPermissionManager);
ioService = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
gPolicyCheckbox = document.getElementById("popupPolicy");
gSoundCheckbox = document.getElementById("playSound");
gSoundUrlBox = document.getElementById("playSoundUrl");
gSoundUrlButton = document.getElementById("selectSound");
gPreviewSoundButton = document.getElementById("previewSound");
gIconCheckbox = document.getElementById("displayIcon");
var removeBlacklist = (document.getElementById("removeBlacklist").getAttribute("value") == "true");
if (removeBlacklist) {
clearBlacklist();
document.getElementById("removeBlacklist").setAttribute("value", false);
}
var prefillWhitelist = (document.getElementById("prefillWhitelist").getAttribute("value") == "true");
if (prefillWhitelist) {
loadWhitelist();
document.getElementById("prefillWhitelist").setAttribute("value", false);
}
if (parent.queuedTag == "chrome://communicator/content/pref/pref-popups.xul") {
// opened from About Popups menuitem
gPolicyCheckbox.checked = true;
parent.queuedTag = null;
}
setButtons();
}
function clearBlacklist() {
var enumerator = permissionManager.enumerator;
var hosts = [];
while (enumerator.hasMoreElements()) {
var permission = enumerator.getNext();
if (permission) {
permission = permission.QueryInterface(Components.interfaces.nsIPermission);
if ((permission.type == popupType) && (permission.capability == nsIPermissionManager.DENY_ACTION))
hosts[hosts.length] = permission.host;
}
}
for (var i in hosts) {
permissionManager.remove(hosts[i], popupType);
}
}
function loadWhitelist() {
try {
var whitelist = parent.hPrefWindow.getPref("localizedstring",
"privacy.popups.default_whitelist");
var hosts = whitelist.split(",");
for (var i in hosts) {
var host = hosts[i];
host = "http://" + host;
var uri = ioService.newURI(host, null, null);
permissionManager.add(uri, popupType, true);
}
}
catch (ex) { }
}
function setButtons() {
var exceptionsButton = document.getElementById("exceptionsButton");
exceptionsButton.disabled = !gPolicyCheckbox.checked;
if (!gPolicyCheckbox.checked) {
gSoundCheckbox.disabled = true;
gSoundUrlBox.disabled = true;
gSoundUrlButton.disabled = true;
gPreviewSoundButton.disabled = true;
gIconCheckbox.disabled = true;
}
else {
gSoundCheckbox.disabled = false;
gSoundUrlBox.disabled = false;
gSoundUrlButton.disabled = false;
gPreviewSoundButton.disabled = false;
gIconCheckbox.disabled = false;
enableSoundUrl(gSoundCheckbox.checked);
}
}
function selectSound() {
var nsIFilePicker = Components.interfaces.nsIFilePicker;
var filepicker = Components.classes["@mozilla.org/filepicker;1"]
.createInstance(nsIFilePicker);
filepicker.init(window, document.getElementById("selectSound").getAttribute("filepickertitle"), nsIFilePicker.modeOpen);
filepicker.appendFilters(nsIFilePicker.filterAll);
var ret = filepicker.show();
if (ret == nsIFilePicker.returnOK)
gSoundUrlBox.value = filepicker.file.path;
onSoundInput();
}
function previewSound() {
var soundUrl = gSoundUrlBox.value;
var sound = Components.classes["@mozilla.org/sound;1"]
.createInstance(Components.interfaces.nsISound);
if (soundUrl.indexOf("file://") == -1) {
sound.playSystemSound(soundUrl);
}
else {
var url = Components.classes["@mozilla.org/network/standard-url;1"]
.createInstance(Components.interfaces.nsIURL);
url.spec = soundUrl;
sound.play(url)
}
}
function enableSoundUrl(soundChecked) {
gSoundUrlBox.disabled = !soundChecked;
gSoundUrlButton.disabled = !soundChecked;
if (soundChecked && gSoundUrlBox.value) {
gPreviewSoundButton.disabled = false;
}
else
gPreviewSoundButton.disabled = true;
}
function onSoundInput() {
gPreviewSoundButton.disabled = gSoundUrlBox.value == "";
}
]]>
</script>
<groupbox id="popupsArea">
<caption label="&pref.popups.caption;"/>
<hbox align="center">
<checkbox id="popupPolicy" label="&popupBlock.label;" accesskey="&popupBlock.accesskey;"
oncommand="setButtons()"
preftype="bool" prefstring="dom.disable_open_during_load"
prefattribute="checked"/>
<spacer flex="1"/>
<button id="exceptionsButton" label="&popupExceptions.label;"
accesskey="&popupExceptions.accesskey;"
oncommand="viewPopups('');"/>
</hbox>
<separator class="thin"/>
<description id="whenBlock">&whenBlock.description;</description>
<hbox align="center">
<checkbox id="playSound" label="&playSound.label;"
oncommand="enableSoundUrl(this.checked);"
preftype="bool" prefstring="privacy.popups.sound_enabled"
prefattribute="checked"/>
</hbox>
<hbox align="center">
<textbox flex="1" id="playSoundUrl"
prefstring="privacy.popups.sound_url" oninput="onSoundInput()"/>
<button id="selectSound" label="&selectSound.label;" accesskey="&selectSound.accesskey;"
filepickertitle="&selectSound.title;" oncommand="selectSound();"/>
<button id="previewSound" label="&previewSound.label;" accesskey="&previewSound.accesskey;"
oncommand="previewSound();"/>
</hbox>
<hbox align="center">
<checkbox id="displayIcon" label="&displayIcon.label;"
preftype="bool" prefstring="privacy.popups.statusbar_icon_enabled"
prefattribute="checked"/>
</hbox>
<separator class="thin"/>
<description>&popupNote.description;</description>
<data id="prefillWhitelist" preftype="bool" prefattribute="value" prefstring="privacy.popups.prefill_whitelist"/>
<data id="removeBlacklist" preftype="bool" prefattribute="value" prefstring="privacy.popups.remove_blacklist"/>
</groupbox>
</page>

View File

@ -1,148 +0,0 @@
var httpParent;
var httpPortParent;
var sslParent;
var sslPortParent;
var ftpParent;
var ftpPortParent;
var gopherParent;
var gopherPortParent;
var socksParent;
var socksPortParent;
var socksVersionParent;
var socksRemoteDNSParent;
var shareSettingsParent;
var http;
var httpPort;
var ssl;
var sslPort;
var ftp;
var ftpPort;
var gopher;
var gopherPort;
var socks;
var socksPort;
var socksVersion;
var socksRemoteDNS;
var shareSettings;
var settings;
var parentSettings;
function onLoad()
{
initElementVars();
receiveSettingsFromProxyPanel();
DoEnabling();
}
function initElementVars()
{
httpParent = opener.document.getElementById("networkProxyHTTP");
httpPortParent = opener.document.getElementById("networkProxyHTTP_Port");
sslParent = opener.document.getElementById("networkProxySSL");
sslPortParent = opener.document.getElementById("networkProxySSL_Port");
ftpParent = opener.document.getElementById("networkProxyFTP");
ftpPortParent = opener.document.getElementById("networkProxyFTP_Port");
gopherParent = opener.document.getElementById("networkProxyGopher");
gopherPortParent = opener.document.getElementById("networkProxyGopher_Port");
socksParent = opener.document.getElementById("networkProxySOCKS");
socksPortParent = opener.document.getElementById("networkProxySOCKS_Port");
socksVersionParent = opener.document.getElementById("networkProxySOCKSVersion");
socksRemoteDNSParent = opener.document.getElementById("networkProxySOCKSRemoteDNS");
shareSettingsParent = opener.document.getElementById("networkProxyShareSettings");
http = document.getElementById("networkProxyHTTP");
httpPort = document.getElementById("networkProxyHTTP_Port");
ssl = document.getElementById("networkProxySSL");
sslPort = document.getElementById("networkProxySSL_Port");
ftp = document.getElementById("networkProxyFTP");
ftpPort = document.getElementById("networkProxyFTP_Port");
gopher = document.getElementById("networkProxyGopher");
gopherPort = document.getElementById("networkProxyGopher_Port");
socks = document.getElementById("networkProxySOCKS");
socksPort = document.getElementById("networkProxySOCKS_Port");
socksVersion = document.getElementById("networkProxySOCKSVersion");
socksRemoteDNS = document.getElementById("networkProxySOCKSRemoteDNS");
shareSettings = document.getElementById("networkProxyShareSettings");
// Convenience Arrays
settings = [http, httpPort, ssl, sslPort, ftp, ftpPort, gopher, gopherPort,
socks, socksPort, socksVersion, socksRemoteDNS, shareSettings];
parentSettings = [httpParent, httpPortParent, sslParent, sslPortParent,
ftpParent, ftpPortParent, gopherParent, gopherPortParent,
socksParent, socksPortParent, socksVersionParent,
socksRemoteDNSParent, shareSettingsParent];
}
// Use "" instead of "0" as the default for the port number.
// "0" doesn't make sense as a port number.
function replaceZero(value)
{
return (value == "0") ? "" : value;
}
function receiveSettingsFromProxyPanel()
{
// <textbox>es do have a "value" property ...
http.value = httpParent.value;
httpPort.value = httpPortParent.value;
// ... <data> elements only a "value" attribute.
ssl.value = sslParent.getAttribute("value");
sslPort.value = replaceZero(sslPortParent.getAttribute("value"));
ftp.value = ftpParent.getAttribute("value");
ftpPort.value = replaceZero(ftpPortParent.getAttribute("value"));
gopher.value = gopherParent.getAttribute("value");
gopherPort.value = replaceZero(gopherPortParent.getAttribute("value"));
socks.value = socksParent.getAttribute("value");
socksPort.value = replaceZero(socksPortParent.getAttribute("value"));
socksVersion.value = socksVersionParent.getAttribute("value");
socksRemoteDNS.checked = (socksRemoteDNSParent.getAttribute("value") == "true");
shareSettings.checked = (shareSettingsParent.getAttribute("value") == "true");
}
function sendSettingsToProxyPanel()
{
// <textbox>es do have a "value" property ...
httpParent.value = http.value;
httpPortParent.value = httpPort.value;
// ... <data> elements only a "value" attribute.
sslParent.setAttribute("value", ssl.value);
sslPortParent.setAttribute("value", sslPort.value);
ftpParent.setAttribute("value", ftp.value);
ftpPortParent.setAttribute("value", ftpPort.value);
gopherParent.setAttribute("value", gopher.value);
gopherPortParent.setAttribute("value", gopherPort.value);
socksParent.setAttribute("value", socks.value);
socksPortParent.setAttribute("value", socksPort.value);
socksVersionParent.setAttribute("value", socksVersion.value);
socksRemoteDNSParent.setAttribute("value", socksRemoteDNS.checked);
shareSettingsParent.setAttribute("value", shareSettings.checked);
}
function DoProxyCopy()
{
if (shareSettings.checked)
{
ftp.value = gopher.value = ssl.value = http.value;
ftpPort.value = gopherPort.value = sslPort.value = httpPort.value;
}
}
function DoEnabling()
{
ftp.disabled = gopher.disabled = ssl.disabled =
ftpPort.disabled = gopherPort.disabled = sslPort.disabled =
shareSettings.checked;
disableLockedElements();
}
function disableLockedElements()
{
for (var i = 0; i < parentSettings.length; i++)
if (parentSettings[i].getAttribute("disabled") == "true")
settings[i].disabled = true;
}

View File

@ -1,202 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Stefan Borggraefe <Stefan.Borggraefe@gmx.de>
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE dialog SYSTEM "chrome://communicator/locale/pref/pref-proxies-advanced.dtd" >
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="advancedProxyPreferences"
title="&pref.proxies.advanced.title;"
onload="onLoad();"
buttons="accept,cancel,help"
ondialogaccept="return sendSettingsToProxyPanel();"
ondialoghelp="openHelp('nav-prefs-advanced-proxy-advanced');"
style="width: 33em;"
persist="screenX,screenY">
<script type="application/x-javascript"
src="chrome://help/content/contextHelp.js"/>
<script type="application/x-javascript"
src="chrome://communicator/content/pref/pref-proxies-advanced.js"/>
<groupbox>
<caption label="&protocols.caption;"/>
<description>&protocols.description;</description>
<grid>
<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" class="uri-element" oninput="DoProxyCopy();"/>
<label value="&port.label;" accesskey="&HTTPport.accesskey;"
control="networkProxyHTTP_Port"/>
<textbox id="networkProxyHTTP_Port" preftype="int"
prefstring="network.proxy.http_port"
size="5" oninput="DoProxyCopy();"/>
</hbox>
</row>
<row>
<spacer/>
<hbox align="left">
<checkbox id="networkProxyShareSettings" label="&reuseProxy.label;"
accesskey="&reuseProxy.accesskey;"
oncommand="DoEnabling(); DoProxyCopy();"/>
</hbox>
</row>
<separator class="thin"/>
<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" class="uri-element"/>
<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"
class="uri-element"/>
<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" class="uri-element"/>
<label value="&port.label;" control="networkProxyGopher_Port"/>
<textbox id="networkProxyGopher_Port" preftype="int"
prefstring="network.proxy.gopher_port"
prefattribute="value" size="5"/>
</hbox>
</row>
</rows>
</grid>
</groupbox>
<groupbox>
<caption label="&socks.caption;"/>
<description>&socks.description;</description>
<grid>
<columns>
<column/>
<column flex="1"/>
</columns>
<rows>
<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" class="uri-element"/>
<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>
<spacer/>
<hbox align="left">
<checkbox id="networkProxySOCKSRemoteDNS"
label="&socksRemoteDNS.label;"
accesskey="&socksRemoteDNS.accesskey;"/>
</hbox>
</row>
</rows>
</grid>
</groupbox>
</dialog>

View File

@ -1,156 +0,0 @@
var http;
var httpPort;
var noProxy;
var ssl;
var sslPort;
var ftp;
var ftpPort;
var gopher;
var gopherPort;
var socks;
var socksPort;
var socksVersion;
var socksRemoteDNS;
var advancedButton;
var autoURL;
var autoReload;
var radiogroup;
var shareSettings;
function Startup()
{
initElementVars();
// Calculate a sane default for network.proxy.share_proxy_settings.
if (shareSettings.getAttribute("value") == "")
shareSettings.setAttribute("value", defaultForShareSettingsPref());
DoEnabling();
// Use "" instead of "0" as the default for the port number.
// "0" doesn't make sense as a port number.
if (httpPort.value == "0")
httpPort.setAttribute("value", "");
// The pref value 3 for network.proxy.type is unused to maintain
// backwards compatibility. Treat 3 equally to 0. See bug 115720.
if (radiogroup.value == 3)
radiogroup.selectedIndex = 0;
}
function initElementVars()
{
http = document.getElementById("networkProxyHTTP");
httpPort = document.getElementById("networkProxyHTTP_Port");
ssl = document.getElementById("networkProxySSL");
sslPort = document.getElementById("networkProxySSL_Port");
ftp = document.getElementById("networkProxyFTP");
ftpPort = document.getElementById("networkProxyFTP_Port");
gopher = document.getElementById("networkProxyGopher");
gopherPort = document.getElementById("networkProxyGopher_Port");
socks = document.getElementById("networkProxySOCKS");
socksPort = document.getElementById("networkProxySOCKS_Port");
socksVersion = document.getElementById("networkProxySOCKSVersion");
socksRemoteDNS = document.getElementById("networkProxySOCKSRemoteDNS");
noProxy = document.getElementById("networkProxyNone");
advancedButton = document.getElementById("advancedButton");
autoURL = document.getElementById("networkProxyAutoconfigURL");
autoReload = document.getElementById("autoReload");
radiogroup = document.getElementById("networkProxyType");
shareSettings = document.getElementById("networkProxyShareSettings");
}
// Returns true if all protocol specific proxies and all their
// ports are set to the same value, false otherwise.
function defaultForShareSettingsPref()
{
return http.value == ftp.getAttribute("value") &&
http.value == gopher.getAttribute("value") &&
http.value == ssl.getAttribute("value") &&
httpPort.value == ftpPort.getAttribute("value") &&
httpPort.value == sslPort.getAttribute("value") &&
httpPort.value == gopherPort.getAttribute("value");
}
function DoEnabling()
{
// convenience arrays
var manual = [ftp, ftpPort, gopher, gopherPort, http, httpPort, socks,
socksPort, socksVersion, socksRemoteDNS, ssl, sslPort, noProxy,
advancedButton, shareSettings];
var auto = [autoURL, autoReload];
switch (radiogroup.value)
{
case "0":
case "4":
disable(manual);
disable(auto);
break;
case "1":
disable(auto);
if (!radiogroup.disabled)
enableUnlockedElements(manual);
break;
case "2":
default:
disable(manual);
if (!radiogroup.disabled)
enableUnlockedElements(auto);
break;
}
}
function disable(elements)
{
for (var i = 0; i < elements.length; i++)
elements[i].setAttribute("disabled", "true");
}
function enableUnlockedElements(elements)
{
for (var i = 0; i < elements.length; i++) {
var prefstring = elements[i].getAttribute("prefstring");
if (!parent.hPrefWindow.getPrefIsLocked(prefstring))
elements[i].removeAttribute("disabled");
}
}
function ReloadPAC() {
// XXX(darin): This reloads the PAC URL stored in preferences, which may
// differ from what the user may have typed in the UI.
Components.classes["@mozilla.org/network/protocol-proxy-service;1"].
getService().reloadPAC();
}
function FixProxyURL()
{
const nsIURIFixup = Components.interfaces.nsIURIFixup;
try {
var URIFixup = Components.classes["@mozilla.org/docshell/urifixup;1"]
.getService(nsIURIFixup);
autoURL.value = URIFixup.createFixupURI(autoURL.value,
nsIURIFixup.FIXUP_FLAG_NONE).spec;
} catch (e) {}
}
function openAdvancedDialog()
{
openDialog("chrome://communicator/content/pref/pref-proxies-advanced.xul",
"AdvancedProxyPreferences",
"chrome,titlebar,centerscreen,resizable=no,modal");
}
function DoProxyCopy()
{
if (shareSettings.getAttribute("value") != "true")
return;
ftp.setAttribute("value", http.value);
ssl.setAttribute("value", http.value);
gopher.setAttribute("value", http.value);
ftpPort.setAttribute("value", httpPort.value);
sslPort.setAttribute("value", httpPort.value);
gopherPort.setAttribute("value", httpPort.value);
}

View File

@ -1,161 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Stefan Borggraefe <Stefan.Borggraefe@gmx.de>
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE page 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="&pref.proxies.title;">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["networkProxyType", "networkProxyShareSettings",
"networkProxyFTP", "networkProxyFTP_Port",
"networkProxyGopher", "networkProxyGopher_Port",
"networkProxyHTTP", "networkProxyHTTP_Port",
"networkProxySOCKS", "networkProxySOCKS_Port",
"networkProxySOCKSVersion", "networkProxySOCKSRemoteDNS",
"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"/>
<description>&pref.proxies.desc;</description>
<groupbox>
<caption label="&proxyTitle.label;"/>
<radiogroup id="networkProxyType" prefstring="network.proxy.type" align="stretch">
<vbox align="left">
<radio value="0" label="&directTypeRadio.label;"
accesskey="&directTypeRadio.accesskey;"
oncommand="DoEnabling();"/>
<radio value="4" label="&wpadTypeRadio.label;"
accesskey="&wpadTypeRadio.accesskey;"
oncommand="DoEnabling();"/>
<radio value="2" label="&autoTypeRadio.label;"
accesskey="&autoTypeRadio.accesskey;"
oncommand="DoEnabling();"/>
</vbox>
<hbox class="indent" flex="1" align="center">
<textbox id="networkProxyAutoconfigURL" flex="1" preftype="string" class="uri-element"
prefstring="network.proxy.autoconfig_url" onchange="FixProxyURL();"/>
<button id="autoReload" label="&reload.label;" accesskey="&reload.accesskey;"
oncommand="ReloadPAC();"
prefstring="pref.advanced.proxies.disable_button.reload"/>
</hbox>
<vbox align="left">
<radio value="1" label="&manualTypeRadio.label;"
accesskey="&manualTypeRadio.accesskey;"
oncommand="DoEnabling();"/>
</vbox>
<grid class="indent">
<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" class="uri-element" onchange="DoProxyCopy();"/>
<label value="&port.label;" accesskey="&HTTPport.accesskey;" control="networkProxyHTTP_Port"/>
<textbox id="networkProxyHTTP_Port" preftype="int" prefstring="network.proxy.http_port"
size="5" onchange="DoProxyCopy();"/>
<button id="advancedButton" label="&advanced.label;"
accesskey="&advanced.accesskey;"
oncommand="openAdvancedDialog();"/>
</hbox>
</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" class="uri-element"/>
</row>
<row>
<spacer/>
<label value="&noproxyExplain.label;" control="networkProxyNone"/>
</row>
</rows>
</grid>
</radiogroup>
</groupbox>
<!-- Data elements for data transfer to and from the "Advanced" dialog. -->
<data id="networkProxySSL" prefattribute="value"
preftype="string" prefstring="network.proxy.ssl"/>
<data id="networkProxySSL_Port" prefattribute="value"
preftype="int" prefstring="network.proxy.ssl_port"/>
<data id="networkProxyFTP" prefattribute="value"
preftype="string" prefstring="network.proxy.ftp"/>
<data id="networkProxyFTP_Port" prefattribute="value"
preftype="int" prefstring="network.proxy.ftp_port"/>
<data id="networkProxyGopher" prefattribute="value"
preftype="string" prefstring="network.proxy.gopher"/>
<data id="networkProxyGopher_Port" prefattribute="value"
preftype="int" prefstring="network.proxy.gopher_port"/>
<data id="networkProxySOCKS" prefattribute="value"
preftype="string" prefstring="network.proxy.socks"/>
<data id="networkProxySOCKS_Port" prefattribute="value"
preftype="int" prefstring="network.proxy.socks_port"/>
<data id="networkProxySOCKSVersion" prefattribute="value"
preftype="int" prefstring="network.proxy.socks_version"/>
<data id="networkProxySOCKSRemoteDNS" prefattribute="value"
preftype="bool" prefstring="network.proxy.socks_remote_dns"/>
<data id="networkProxyShareSettings" prefattribute="value"
preftype="bool" prefdefval=""
prefstring="network.proxy.share_proxy_settings"/>
</page>

View File

@ -1,81 +0,0 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* ***** 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):
* Jonas Jørgensen <jonasj@jonasj.dk>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
function setDisableState(id, state) {
var component = document.getElementById(id);
var prefString = component.getAttribute("prefstring");
var isLocked = parent.hPrefWindow.getPrefIsLocked(prefString);
component.disabled = isLocked || state;
}
function changeDisabledState(state){
//Set the states of the groupbox children state based on the "javascript enabled" checkbox value
setDisableState("allowScripts", state);
setDisableState("allowWindowMoveResize", state);
setDisableState("allowImageSrcChange", state);
setDisableState("allowWindowStatusChange", state);
setDisableState("allowWindowFlip", state);
setDisableState("allowHideStatusBar", state);
setDisableState("allowContextmenuDisable", 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 Startup(){
//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();
}

View File

@ -1,99 +0,0 @@
<?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 page 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="&pref.scripts.title;">
<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",
"allowWindowMoveResize",
"allowWindowFlip",
"allowWindowStatusChange",
"allowImageSrcChange",
"allowContextmenuDisable",
"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" accesskey="&allowScripts.accesskey;" control="AllowList" value="&allowScripts.label;"/>
<listbox id="AllowList" flex="1">
<listitem type="checkbox" id="allowWindowMoveResize" label="&allowWindowMoveResize.label;"
reversed="true" prefstring="dom.disable_window_move_resize"/>
<listitem type="checkbox" id="allowWindowFlip" label="&allowWindowFlip.label;"
reversed="true" prefstring="dom.disable_window_flip"/>
<listitem type="checkbox" id="allowHideStatusBar" label="&allowHideStatusBar.label;"
reversed="true" prefstring="dom.disable_window_open_feature.status"/>
<listitem type="checkbox" id="allowWindowStatusChange" label="&allowWindowStatusChange.label;"
reversed="true" prefstring="dom.disable_window_status_change"/>
<listitem type="checkbox" id="allowImageSrcChange" label="&allowWindowImageSrcChange.label;"
reversed="true" prefstring="dom.disable_image_src_set"/>
<listitem type="checkbox" id="allowContextmenuDisable" label="&allowContextmenuDisable.label;"
prefstring="dom.event.contextmenu.enabled"/>
</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>

View File

@ -1,77 +0,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 Communicator client code, released
* March 31, 1998.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998-1999
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Robert John Churchill <rjc@netscape.com>
* Mark Olson <maolson@earthlink.net>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
function checkEngine()
{
var engineList = document.getElementById("engineList");
var engineValue = engineList.label;
//nothing is selected
if (!engineValue)
{
try
{
var strDefaultSearchEngineName = parent.hPrefWindow.getPref("localizedstring", "browser.search.defaultenginename");
var engineListSelection = engineList.getElementsByAttribute( "label", strDefaultSearchEngineName );
var selectedItem = engineListSelection.item(0);
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;
}
}
}

View File

@ -1,89 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Robert John Churchill (rjc@netscape.com)
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE page 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="&pref.search.title;">
<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;"/>
<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>

View File

@ -1,55 +0,0 @@
<?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
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 2001
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Terry Hayes <thayes@netscape.com>
-
- Alternatively, the contents of this file may be used under the terms of
- either of the GNU General Public License Version 2 or later (the "GPL"),
- or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE page 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="&pref.security.title;">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = [];
]]>
</script>
<description> &rContent1;</description>
<description> &rContent2;</description>
<!-- Overlays add UI here -->
</page>

View File

@ -1,142 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Joe Hewitt <hewitt@netscape.com>
Ian Neal <bugzilla@arlen.demon.co.uk>
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<!DOCTYPE dialog 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;"
buttons="accept,cancel,help"
ondialogaccept="return onAccept();"
ondialoghelp="doHelpButton();"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript" src="chrome://help/content/contextHelp.js"/>
<script type="application/x-javascript"><![CDATA[
var gShowSearchLocked;
window.onload = function()
{
setCheck("cbxAutoFill", window.arguments[0], window.arguments[4]);
setCheck("cbxShowPopup", window.arguments[1], window.arguments[5]);
setCheck("cbxShowSearch", window.arguments[2], window.arguments[6]);
setCheck("cbxMatchOnlyTyped", window.arguments[3], window.arguments[7]);
gShowSearchLocked = (window.arguments[6] == "true");
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, aDisabled)
{
document.getElementById(aName).checked = (aTruth == "true");
document.getElementById(aName).disabled = (aDisabled == "true");
}
function updateImage(aImg)
{
var img = document.getElementById("img"+aImg);
var checked = document.getElementById("cbx"+aImg).checked;
if (aImg == "AutoFill") {
img.setAttribute("src", "chrome://communicator/locale/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 || gShowSearchLocked;
}
function doHelpButton() {
openHelp('navigator_pref_autocomplete-adv');
}
]]></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/locale/pref/autocomplete-showpopup.gif"/>
<image id="imgShowSearch" src="chrome://communicator/locale/pref/autocomplete-showsearch.gif"/>
</vbox>
</dialogheader>
</dialog>

View File

@ -1,84 +0,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 Communicator client code, released
* August 15, 2001.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Diego Biurrun <diego@biurrun.de>
* Ian Neal <bugzilla@arlen.demon.co.uk>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
function moreInfo()
{
var browserURL = null;
var regionBundle = document.getElementById("bundle_region");
var smartBrowsingURL = regionBundle.getString("smartBrowsingURL");
if (smartBrowsingURL) {
try {
browserURL = parent.hPrefWindow.getPref("string", "browser.chromeURL");
} 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"),
document.getElementById("browserUrlbarAutoFill").getAttribute("disabled"),
document.getElementById("browserUrlbarShowPopup").getAttribute("disabled"),
document.getElementById("browserUrlbarShowSearch").getAttribute("disabled"),
document.getElementById("browserUrlbarMatchOnlyTyped").getAttribute("disabled"));
}
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;
}

View File

@ -1,114 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Blake Ross <blakeross@telocity.com>
Diego Biurrun <diego@biurrun.de>
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/prefpanels.css" type="text/css"?>
<!DOCTYPE page [
<!ENTITY % brandDTD SYSTEM "chrome://branding/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="&pref.smartBrowsing.title;">
<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", "domainGuessingEnabled"];
]]>
</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"
accesskey="&autoCompleteAdvanced.accesskey;"/>
<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>
<groupbox>
<caption label="&domainGuessingHeader.label;"/>
<checkbox id="domainGuessingEnabled"
label="&domainGuessingEnabled.label;"
accesskey="&domainGuessingEnabled.accesskey;"
prefstring="browser.fixup.alternate.enabled"/>
</groupbox>
</page>

View File

@ -1,104 +0,0 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE page 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');"
headertitle="&pref.smartUpdate.title;">
<script type="application/x-javascript" src="chrome://communicator/content/permissions/permissionsOverlay.js"/>
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["XPInstallEnabled", "updateNotificationsEnabled",
"updateFrequency"];
function Startup()
{
toggleFrequency();
}
function toggleFrequency()
{
document.getElementById("updateFrequency").disabled =
!document.getElementById("updateNotificationsEnabled").checked ||
parent.hPrefWindow.getPrefIsLocked("update_notifications.provider.0.frequency");
}
]]>
</script>
<groupbox>
<caption label="&smartTitle.label;"/>
<hbox align="center">
<checkbox id="XPInstallEnabled" label="&enableSU.label;" accesskey="&enableSU.accesskey;"
flex="1" prefstring="xpinstall.enabled"/>
<button id="allowedSitesButton" label="&allowedSites.label;" permissiontype="install"
accesskey="&allowedSites.accesskey;" oncommand="viewInstalls('');"/>
</hbox>
</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>

View File

@ -1,123 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Peter Weilbacher <mozilla@Weilbacher.org>
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE page [
<!ENTITY % platformCommunicationDTD SYSTEM "chrome://communicator-platform/locale/pref/platformPrefOverlay.dtd">
%platformCommunicationDTD;
<!ENTITY % tabsDTD SYSTEM "chrome://communicator/locale/pref/pref-tabs.dtd">
%tabsDTD;
]>
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://communicator/content/pref/pref-tabs.xul');"
headertitle="&tabHeader.label;">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["tabStrip", "tabBackground", "middleClick", "urlBar", "loadGroup",
"newWindowGroup", "externalGroup"];
]]>
</script>
<groupbox id="generalTabPreferences" align="start">
<caption label="&tabDisplay.label;"/>
<checkbox id="tabStrip"
label="&autoHide.label;"
accesskey="&autoHide.accesskey;"
prefstring="browser.tabs.autoHide"/>
<checkbox id="tabBackground"
label="&background.label;"
accesskey="&background.accesskey;"
prefstring="browser.tabs.loadInBackground"
reversed="true"/>
</groupbox>
<groupbox id="loadGroupPreferences" align="start">
<caption label="&loadGroup.label;"/>
<radiogroup id="loadGroup" orient="horizontal" prefstring="browser.tabs.loadGroup">
<radio value="0" label="&loadGroupAppend.label;"
accesskey="&loadGroupAppend.accesskey;"/>
<radio value="1" label="&loadGroupReplace.label;"
accesskey="&loadGroupReplace.accesskey;"/>
</radiogroup>
</groupbox>
<groupbox id="useTabPreferences" align="start">
<caption label="&openTabs.label;"/>
<checkbox id="middleClick"
label="&middleClick.label;"
accesskey="&middleClick.accesskey;"
prefstring="browser.tabs.opentabfor.middleclick"/>
<checkbox id="urlBar"
label="&urlbar.label;"
accesskey="&urlbar.accesskey;"
prefstring="browser.tabs.opentabfor.urlbar"/>
</groupbox>
<hbox equalsize="always">
<groupbox flex="1">
<caption label="&newWindow.label;"/>
<description>&newWindowDescription.label;</description>
<radiogroup id="newWindowGroup" prefstring="browser.link.open_newwindow">
<radio value="1" label="&openCurrent.label;"
accesskey="&newWindowGroupCurrent.accesskey;"/>
<radio value="3" label="&openTab.label;"
accesskey="&newWindowGroupTab.accesskey;"/>
<radio value="2" label="&openWindow.label;"
accesskey="&newWindowGroupWindow.accesskey;"/>
</radiogroup>
</groupbox>
<groupbox flex="1">
<caption label="&external.label;"/>
<description>&externalDescription.label;</description>
<radiogroup id="externalGroup" prefstring="browser.link.open_external">
<radio value="1" label="&openCurrent.label;"
accesskey="&externalGroupCurrent.accesskey;"/>
<radio value="3" label="&openTab.label;"
accesskey="&externalGroupTab.accesskey;"/>
<radio value="2" label="&openWindow.label;"
accesskey="&externalGroupWindow.accesskey;"/>
</radiogroup>
</groupbox>
</hbox>
</page>

View File

@ -1,230 +0,0 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* ***** 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):
* 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 of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
var gShowDescription = true;
var gData;
try {
var chromeRegistry = Components.classes["@mozilla.org/chrome/chrome-registry;1"].
getService(Components.interfaces.nsIChromeRegistrySea);
}
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 );
var theme = null;
try {
theme = parent.hPrefWindow.pref.getComplexValue("general.skins.selectedSkin", Components.interfaces.nsISupportsString).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 (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;
var theme = null;
try {
theme = parent.hPrefWindow.pref.getComplexValue("general.skins.selectedSkin", Components.interfaces.nsISupportsString).data;
} catch (e) {
}
if (theme == data.name) return;
try {
var reg = Components.classes["@mozilla.org/chrome/chrome-registry;1"].
getService(Components.interfaces.nsIChromeRegistrySea);
}
catch(e) {}
var inUse = reg.isSkinSelected(data.name, true);
if (!theme && inUse == Components.interfaces.nsIChromeRegistry.FULL) return;
parent.hPrefWindow.setPref("string", "general.skins.selectedSkin", data.name);
// shut down quicklaunch so the next launch will have the new skin
var appStartup = Components.classes["@mozilla.org/toolkit/app-startup;1"]
.getService(Components.interfaces.nsIAppStartup);
try {
appStartup.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://branding/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");
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 {
selectedSkin = parent.hPrefWindow.pref.getComplexValue("general.skins.selectedSkin", Components.interfaces.nsISupportsString).data;
}
catch (e) {
}
if (!oldTheme) {
if( gShowDescription )
description.appendChild(descText);
var locType = selectedItem.getAttribute("loctype");
uninstallButton.disabled = (selectedSkin == skinName) || (locType == "install");
}
else {
var brandbundle = document.getElementById("bundle_brand");
uninstallButton.disabled = selectedSkin == skinName;
var newText = prefbundle.getString("oldTheme");
newText = newText.replace(/%brand%/g, brandbundle.getString("brandShortName"));
if( gShowDescription ) {
descText = document.createTextNode(newText);
description.appendChild(descText);
}
}
}
else {
uninstallButton.disabled = true;
gData.name = null;
}
}

View File

@ -1,111 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/prefpanels.css" type="text/css"?>
<!DOCTYPE page [
<!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');"
headertitle="&pref.themes.title;">
<stringbundle id="bundle_prefutilities"
src="chrome://communicator/locale/pref/prefutilities.properties"/>
<stringbundle id="bundle_brand"
src="chrome://branding/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>
<label control="skinsList">&installedThemes.label;</label>
<listbox id="skinsList" datasources="rdf:chrome"
onselect="themeSelect();"
ref="urn:mozilla:skin:root" rows="5"
sortResource="http://www.mozilla.org/rdf/chrome#displayName"
sortDirection="ascending">
<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>
</vbox>
<vbox>
<button id="uninstallSkin" label="&uninstallSkin.label;" oncommand="uninstallSkin();"
accesskey="&uninstallSkin.accesskey;"/>
</vbox>
</hbox>
<vbox class="inset" style="overflow: auto;" flex="1">
<label id="description"/>
</vbox>
<label class="small-margin"><html:a href="&getNewThemesURL;" id="themesLink"
class="themesLink" target="_blank">&getNewThemes.label;</html:a></label>
</page>

View File

@ -1,164 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Bill Law <law@netscape.com>
* Aaron Kaluszka <ask@swva.net>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
// 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 {
// 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 = "settings" in parent.winHooks ? parent.winHooks.settings : null;
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;
}
}
}

View File

@ -1,93 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Bill Law <law@netscape.com>
Aaron Kaluszka <ask@swva.net>
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE page [
<!ENTITY % brandDTD SYSTEM "chrome://branding/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="&pref.winHooks.title;">
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-winhooks.js"/>
<!-- File types -->
<label class="indent" value="&files.label;" control="fileTypes"/>
<listbox class="indent" id="fileTypes" style="width: 0px; height: 0px;" flex="2">
<listitem type="checkbox" id="isHandlingHTML" label="&html.label;"/>
<listitem type="checkbox" id="isHandlingJPEG" label="&jpeg.label;"/>
<listitem type="checkbox" id="isHandlingGIF" label="&gif.label;"/>
<listitem type="checkbox" id="isHandlingPNG" label="&png.label;"/>
<listitem type="checkbox" id="isHandlingXBM" label="&xbm.label;"/>
<listitem type="checkbox" id="isHandlingBMP" label="&bmp.label;"/>
<listitem type="checkbox" id="isHandlingICO" label="&ico.label;"/>
<listitem type="checkbox" id="isHandlingXML" label="&xml.label;"/>
<listitem type="checkbox" id="isHandlingXHTML" label="&xhtml.label;"/>
<listitem type="checkbox" id="isHandlingXUL" label="&xul.label;"/>
</listbox>
<separator/>
<!-- Protocols -->
<label class="indent" control="protocols" value="&protocols.label;"/>
<listbox class="indent" id="protocols" style="width: 0px; height: 0px;" flex="2">
<listitem type="checkbox" id="isHandlingHTTP" label="&http.label;"/>
<listitem type="checkbox" id="isHandlingHTTPS" label="&https.label;"/>
<listitem type="checkbox" id="isHandlingFTP" label="&ftp.label;"/>
<listitem type="checkbox" id="isHandlingCHROME" label="&chrome.label;"/>
<listitem type="checkbox" id="isHandlingGOPHER" label="&gopher.label;"/>
</listbox>
<separator/>
<!-- Misc -->
<hbox align="center">
<checkbox id="showDialog" label="&showDialog.label;" accesskey="&showDialog.accesskey;"/>
</hbox>
<spacer flex="1"/>
</page>

View File

@ -1,59 +0,0 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xul-overlay href="chrome://communicator/content/pref/preftree.xul"?>
<!DOCTYPE dialog [
<!ENTITY % dtd1 SYSTEM "chrome://communicator/locale/pref/pref.dtd" > %dtd1;
<!ENTITY % dtd2 SYSTEM "chrome://communicator-platform/locale/pref/platformPrefOverlay.dtd" > %dtd2;
]>
<!-- 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="onLoad();"
ondialogaccept="return hPrefWindow.onAccept();"
ondialogcancel="return hPrefWindow.onCancel();"
ondialoghelp="doHelpButton();"
persist="screenX screenY">
<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">
<vbox>
<label value="&categoryHeader;" control="prefsTree"/>
<!-- tree sidebar -->
<tree id="prefsTree" style="width: 13em;" flex="1"/>
</vbox>
<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>
</dialog>

View File

@ -1,217 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Ben Goodger <ben@netscape.com>
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xul-overlay href="chrome://communicator/content/pref/platformPrefOverlay.xul"?>
<!DOCTYPE overlay 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" flex="1" primary="true" hideheader="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>
<treerow>
<treecell url="chrome://communicator/content/pref/pref-themes.xul" label="&themes.label;"/>
</treerow>
</treeitem>
<treeitem>
<treerow>
<treecell url="chrome://communicator/content/pref/pref-locales.xul" label="&locales.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-keynav.xul" label="&keynav.label;"/>
</treerow>
</treeitem>
<treeitem>
<treerow>
<treecell url="chrome://communicator/content/pref/pref-cache.xul" label="&cache.label;"/>
</treerow>
</treeitem>
<treeitem id="proxiesItem">
<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>
<!-- commented out until bug 82487 is fixed -->
<!--
<treeitem id="offlineItem">
<treerow>
<treecell url="chrome://communicator/content/pref/pref-offline.xul" label="&offline.label;"/>
</treerow>
</treeitem>
-->
</treechildren>
</tree>
</overlay>

View File

@ -1,48 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Ben Goodger <ben@netscape.com>
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<!DOCTYPE overlay SYSTEM "chrome://communicator-platform/locale/pref/platformPrefOverlay.dtd">
<overlay id="platformPreferencesOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
</overlay>

View File

@ -1,226 +0,0 @@
<?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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Ben Goodger <ben@netscape.com>
Bill Law <law@netscape.com>
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<!DOCTYPE overlay [
<!ENTITY % brandDTD SYSTEM "chrome://branding/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;"
disabled="true"/>
<spacer flex="1"/>
</hbox>
</vbox>
<vbox flex="1">
<description pack="start">&defaultPendingText;</description>
<hbox>
<spacer flex="1"/>
<button label="&defaultBrowserButton.label;"
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>

View File

@ -1 +0,0 @@
Makefile

Binary file not shown.

Before

Width:  |  Height:  |  Size: 619 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 743 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 723 B

View File

@ -1,13 +0,0 @@
<!ENTITY urlbar.label "&#8984;+Return in the Location bar">
<!ENTITY urlbar.accesskey "L">
<!ENTITY middleClick.label "Middle-click, &#8984;+click or &#8984;+Return on links in a Web page">
<!ENTITY middleClick.accesskey "M">
<!-- LOCALIZATION NOTE : this is part of an inline-style attribute on the
preference dialog's <window> node, which specifies the width and height
in em units of the dialog. Localizers ONLY can increase these widths
if they are having difficulty getting panel content to fit. 1em = the
width of the letter 'm' in the selected font.
XUL/FE DEVELOPERS: DO NOT MODIFY THIS VALUE. It represents the correct
size of this window for en-US. -->
<!ENTITY prefWindow.size "width: 58em; height: 41em;">

View File

@ -1,3 +0,0 @@
<!ENTITY cookies.label "Cookies">
<!ENTITY images.label "Images">
<!ENTITY popups.label "Popup Windows">

View File

@ -1,24 +0,0 @@
<!--LOCALIZATION NOTE : FILE 'Advanced' prefs settings -->
<!ENTITY pref.advanced.title "Advanced">
<!ENTITY prefEnableJava.caption "Features that help interpret web pages">
<!ENTITY enbJavaCheck.label "Enable Java">
<!ENTITY enbJavaCheck.accesskey "J">
<!ENTITY prefTurbo.caption "Quick Launch">
<!ENTITY enableTurbo.label "Keep &brandShortName; in memory to improve startup performance">
<!ENTITY enableTurboCheck.accesskey "K">
<!ENTITY prefTurbo.desc "If you check this item, part of &brandShortName; will stay in memory when not in use, allowing it to start up more quickly.">
<!ENTITY prefJvmConf.caption "Select Java version (change requires restart)">
<!ENTITY jvm.name "Version">
<!ENTITY jvm.home "Path">
<!ENTITY systemPref.caption "System Preferences">
<!ENTITY systemPrefCheck.label "Use Preferences from System">
<!ENTITY systemPrefCheck.accesskey "U">
<!ENTITY systemPref.desc "Check this item to inherit preferences from the system. The system settings will override the &brandShortName; preferences">

View File

@ -1,43 +0,0 @@
<!-- extracted from content/pref-appearance.xul -->
<!--LOCALIZATION NOTE : FILE The Appearance prefs dialog. -->
<!ENTITY pref.appearance.title "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">
<!--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 "S">
<!ENTITY enableAutomaticImageResizing.label "Resize large images to fit in the browser window">
<!ENTITY enableAutomaticImageResizing.accesskey "R">
<!ENTITY useSmoothScroll.label "Use smooth scrolling">
<!ENTITY useSmoothScroll.accesskey "U">
<!--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;:">

View File

@ -1,24 +0,0 @@
<!ENTITY editType.label "Edit Type">
<!ENTITY newType.label "New Type">
<!ENTITY extension.label "Extension:">
<!ENTITY extension.accesskey "E">
<!--LOCALIZATION NOTE (mimeType): 'MIME' should not be translated -->
<!ENTITY mimetype.label "MIME Type:">
<!ENTITY mimetype.accesskey "m">
<!ENTITY description.label "Description:">
<!ENTITY description.accesskey "d">
<!ENTITY handling.label "When a file of this type is encountered">
<!ENTITY useDefault.label "Open it using the default application">
<!ENTITY useDefault.accesskey "o">
<!ENTITY saveToDisk.label "Save it to Disk">
<!ENTITY saveToDisk.accesskey "s">
<!ENTITY application.label "Open it with:">
<!ENTITY application.accesskey "w">
<!ENTITY browse.label "Choose...">
<!ENTITY browse.accesskey "c">
<!ENTITY askBeforeOpen.label "Always ask me before handling files of this type">
<!ENTITY askBeforeOpen.accesskey "k">

View File

@ -1,23 +0,0 @@
<!-- extracted from content/pref-applications.xul -->
<!--LOCALIZATION NOTE : FILE The Applications prefs dialog -->
<!ENTITY pref.applications.title "Helper Applications">
<!ENTITY pref.applications.caption "Specify how to handle files of 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(s):">
<!ENTITY mimeDesc "Description:">
<!ENTITY handle "When encountered:">
<!ENTITY handle.accesskey "W">
<!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 pluginFinder.accesskey "A">
<!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.">

View File

@ -1,21 +0,0 @@
# foo
saveToDisk=Save these files to disk
useSystemDefault=Open these files using the default application
useHelperApp=Open these files with %S
handleInternally=Display files of this type in the browser
chooseHandler=Choose Helper Application
programsFilter=Programs
canHandleInternallyTitle=Warning
canHandleInternally=%brand% can handle this type internally. For such types, a Helper Application will only be invoked if the server requests external handling.
canHandleInternallyContinue=&Proceed anyway
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?

View File

@ -1,38 +0,0 @@
<!-- extracted from content/pref-BidiOptions.xul -->
<!--LOCALIZATION NOTE : FILE Bidi Options prefs dialog -->
<!ENTITY pref.bidi.title "Bidi Options">
<!ENTITY pref.bidi.desc "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 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">

View File

@ -1,29 +0,0 @@
<!-- extracted from content/pref-cache.xul -->
<!--LOCALIZATION NOTE : FILE Cache prefs dialog -->
<!ENTITY pref.cache.title "Cache">
<!ENTITY pref.cache.caption "Set Cache Options">
<!ENTITY cachePara "The cache keeps copies of frequently visited web pages on your hard disk. (Clicking Reload always shows you the latest version of a page.)">
<!ENTITY diskCache.label "Size:">
<!ENTITY diskCache.accesskey "S">
<!ENTITY mbytes "MB">
<!ENTITY diskCacheFolder.label "Cache Folder Location:">
<!ENTITY clearDiskCache.label "Clear Cache">
<!ENTITY clearDiskCache.accesskey "C">
<!ENTITY chooseDiskCacheFolder.label "Choose Folder...">
<!ENTITY chooseDiskCacheFolder.accesskey "F">
<!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 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">
<!ENTITY prefetchTitle.label "Link Prefetching">
<!ENTITY enablePrefetch.label "Prefetch web pages when idle, so that links in web pages designed for prefetching can load more quickly.">
<!ENTITY enablePrefetch.accesskey "P">
<!-- <!ENTITY prefetchDesc.label "If you check this item, &brandShortName; will follow special directives from websites to prefetch content while the browser is idle. Websites designed to take advantage of this feature will appear to load quicker."> -->

View File

@ -1,57 +0,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 Communicator.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Stephen Lamm <slamm@netscape.com>
-
- Alternatively, the contents of this file may be used under the terms of
- either of the GNU General Public License Version 2 or later (the "GPL"),
- or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<!-- extracted from ./pref-charset.xul -->
<!-- LOCALIZATION NOTE Character Encoding Preferences Dialog: Do NOT localize the term "Character Encoding" -->
<!ENTITY charset.customize.title.label "Customize Character Encoding">
<!ENTITY charset.customize.left.header "Character Encoding">
<!ENTITY charset.customize.right.header "Select Supported Character Encodings">
<!ENTITY charset.customize.current.label "Active Character Encodings:">
<!ENTITY charset.customize.reorder.label "Reorder">
<!ENTITY charset.customize.remove.label "Remove">
<!ENTITY charset.customize.additional.label "Available Character Encodings:">
<!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 "Move Up">
<!ENTITY charset.customize.moveUp.accesskey "U">
<!ENTITY charset.customize.moveDown.label "Move Down">
<!ENTITY charset.customize.moveDown.accesskey "D">

View File

@ -1,29 +0,0 @@
<!-- extracted from content/pref-colors.xul -->
<!-- LOCALIZATION NOTE : FILE Color management prefs -->
<!ENTITY pref.colors.title "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 activeLinkColor.label "Active Links:">
<!ENTITY activeLinkColor.accesskey "c">
<!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 "m">

View File

@ -1,43 +0,0 @@
<!ENTITY pref.cookies.title "Cookies">
<!-- cookies -->
<!ENTITY cookiePolicy.label "Cookie Acceptance Policy">
<!ENTITY accAllCookiesRadio.label "Allow all cookies">
<!ENTITY accAllCookiesRadio.accesskey "c">
<!ENTITY accOrgCookiesRadio.label "Allow cookies for the originating website only">
<!ENTITY accOrgCookiesRadio.accesskey "o">
<!ENTITY accP3PCookiesRadio.label "Allow cookies based on privacy settings">
<!ENTITY accP3PCookiesRadio.accesskey "p">
<!ENTITY disableCookies.label "Block cookies">
<!ENTITY disableCookies.accesskey "B">
<!ENTITY cookieRetentionPolicy.label "Cookie Retention Policy">
<!ENTITY acceptNormally.label "Accept cookies normally">
<!ENTITY acceptNormally.accesskey "n">
<!ENTITY acceptForSession.label "Accept for current session only">
<!ENTITY acceptForSession.accesskey "s">
<!ENTITY acceptforNDays.label "Accept cookies for">
<!ENTITY acceptforNDays.accesskey "f">
<!ENTITY days.label "days">
<!ENTITY warnAboutCookies.label "Ask for each cookie">
<!ENTITY warnAboutCookies.accesskey "A">
<!ENTITY forCurrentSession.label "except for session cookies">
<!ENTITY forCurrentSession.accesskey "e">
<!ENTITY manageCookies.label "Manage Cookies and Sites">
<!ENTITY manageCookiesDescription.label "Allows you to view and manage stored cookies and per-site settings for accepting and rejecting cookies. Per-site settings will override the settings above.">
<!ENTITY viewCookies.label "Cookie Manager">
<!ENTITY viewCookies.accesskey "M">
<!ENTITY viewP3P.label "View Privacy Settings">
<!ENTITY viewP3P.accesskey "V">

View File

@ -1,27 +0,0 @@
<!-- 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 chrome JavaScript errors and warnings">
<!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 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 acceleratorKey.accesskey "A">
<!ENTITY menuAccessKey.label "Menu access key:">
<!ENTITY menuAccessKey.accesskey "M">

View File

@ -1,21 +0,0 @@
<!-- 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">

View File

@ -1,20 +0,0 @@
<!-- 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">

View File

@ -1,31 +0,0 @@
<!ENTITY pref.download.title "Downloads">
<!ENTITY downloadBehavior.label "When starting a download">
<!ENTITY downloadLocation.label "When saving a file">
<!ENTITY finishedBehavior.label "When a download completes">
<!ENTITY openDM.label "Open the download manager">
<!ENTITY openDM.accesskey "m">
<!ENTITY openProgressDialog.label "Open a progress dialog">
<!ENTITY openProgressDialog.accesskey "O">
<!ENTITY doNothing.label "Don't open anything">
<!ENTITY doNothing.accesskey "D">
<!ENTITY promptDownload.label "Prompt for download location and default to">
<!ENTITY promptDownload.accesskey "P">
<!ENTITY lastLocation.label "Last download folder">
<!ENTITY lastLocation.accesskey "L">
<!ENTITY specifiedLocation.label "Specified download folder">
<!ENTITY specifiedLocation.accesskey "e">
<!ENTITY autoDownload.label "Automatically download files to specified download folder">
<!ENTITY autoDownload.accesskey "A">
<!ENTITY downloadFolder.label "Current Download Folder:">
<!ENTITY chooseDownloadFolder.label "Choose Folder...">
<!ENTITY chooseDownloadFolder.accesskey "C">
<!ENTITY playSound.label "Play a sound">
<!ENTITY playSound.accesskey "s">
<!ENTITY showAlert.label "Show an alert">
<!ENTITY showAlert.accesskey "n">
<!ENTITY browse.label "Browse...">
<!ENTITY browse.accesskey "B">
<!ENTITY preview.label "Preview">
<!ENTITY preview.accesskey "v">
<!ENTITY soundURL.label "Sound URL:">
<!ENTITY soundURL.accesskey "U">

View File

@ -1,80 +0,0 @@
<!-- extracted from content/pref-fonts.xul -->
<!-- LOCALIZATION NOTE : FILE 'Fonts' prefs dialog -->
<!ENTITY pref.fonts.title "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(Taiwan)">
<!ENTITY font.langGroup.simpl-chinese "Simplified Chinese">
<!ENTITY font.langGroup.trad-chinese-hk "Traditional Chinese(Hong Kong)">
<!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 "Other Languages">
<!ENTITY font.langGroup.user-def "User Defined">
<!ENTITY font.langGroup.thai "Thai">
<!ENTITY font.langGroup.hebrew "Hebrew">
<!ENTITY font.langGroup.arabic "Arabic">
<!ENTITY font.langGroup.devanagari "Devanagari">
<!ENTITY font.langGroup.tamil "Tamil">
<!ENTITY font.langGroup.armenian "Armenian">
<!ENTITY font.langGroup.bengali "Bengali">
<!ENTITY font.langGroup.canadian "Unified Canadian Syllabary">
<!ENTITY font.langGroup.ethiopic "Ethiopic">
<!ENTITY font.langGroup.georgian "Georgian">
<!ENTITY font.langGroup.gujarati "Gujarati">
<!ENTITY font.langGroup.gurmukhi "Gurmukhi">
<!ENTITY font.langGroup.khmer "Khmer">
<!ENTITY font.langGroup.malayalam "Malayalam">
<!-- 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">

View File

@ -1,15 +0,0 @@
<!ENTITY pref.history.title "History">
<!ENTITY pref.history.caption "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 "a">
<!ENTITY days.label "days">
<!ENTITY clearHistory.label "Clear History">
<!ENTITY clearHistory.accesskey "r">
<!ENTITY locationBarHistory.caption "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">

View File

@ -1,19 +0,0 @@
<!ENTITY pref.http.title "HTTP Networking">
<!-- 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 "E">
<!ENTITY prefEnableHTTP11Proxy.accesskey "T">
<!ENTITY prefEnableKeepAlive.label "Enable Keep-Alive">
<!ENTITY prefEnableKeepAlive.accesskey "K">
<!ENTITY prefEnableKeepAliveProxy.accesskey "A">
<!ENTITY prefEnablePipelining.label "Enable Pipelining">
<!ENTITY prefEnablePipelining.accesskey "P">
<!ENTITY prefEnablePipeliningProxy.accesskey "N">
<!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.">

View File

@ -1,26 +0,0 @@
<!ENTITY pref.images.title "Images">
<!ENTITY imageBlocking.label "Image Acceptance Policy">
<!--LOCALIZATION NOTE (onStartLegend.label): Don't translate "&brandShortName;".
Place "&brandShortName;" in the phrase where the name of the application should
appear
-->
<!ENTITY imageDetails "Specify how &brandShortName; handles images.">
<!ENTITY accAllImagesRadio.label "Accept all images">
<!ENTITY accAllImagesRadio.accesskey "A">
<!ENTITY accOrgImagesRadio.label "Accept images that come from the originating server only">
<!ENTITY accOrgImagesRadio.accesskey "r">
<!ENTITY disableImages.label "Do not load any images">
<!ENTITY disableImages.accesskey "n">
<!ENTITY viewImagesExplanation.label "View list of sites about which image acceptance information is stored">
<!ENTITY viewImages.label "Manage Image Permissions">
<!ENTITY viewImages.accesskey "P">
<!ENTITY animLoopingTitle.label "Animated images should loop">
<!ENTITY animLoopAsSpecified.label "As many times as the image specifies">
<!ENTITY animLoopAsSpecified.accesskey "m">
<!ENTITY animLoopOnce.label "Once">
<!ENTITY animLoopOnce.accesskey "O">
<!ENTITY animLoopNever.label "Never">
<!ENTITY animLoopNever.accesskey "v">

View File

@ -1,21 +0,0 @@
<!ENTITY pref.keyNav.title "Keyboard Navigation">
<!ENTITY tabNavigationBehavior.label "Tab Key Navigation">
<!ENTITY tabNavigationLinks.label "Links">
<!ENTITY tabNavigationLinks.accesskey "L">
<!ENTITY tabNavigationForms.label "Buttons, radio buttons, checkboxes, and selection lists">
<!ENTITY tabNavigationForms.accesskey "B">
<!ENTITY tabNavigationTextboxes.label "Note: text boxes and scrollable regions are always part of the tabbing order.">
<!ENTITY tabNavigationDesc.label "When Tab or Shift+Tab is pressed, move between:">
<!ENTITY findAsYouTypeBehavior.label "Find As You Type">
<!ENTITY findAsYouTypeTip.label "Tip: To manually start Find As You Type, type / to find text or ' to find links, followed by the text you want to find.">
<!ENTITY findAsYouTypeTimeout.label "Clear the current search after a few seconds of inactivity">
<!ENTITY findAsYouTypeTimeout.accesskey "C">
<!ENTITY findAsYouTypeSound.label "Play a sound when typed text isn't found">
<!ENTITY findAsYouTypeSound.accesskey "P">
<!ENTITY findAsYouTypeEnableAuto.label "Find automatically when typing within a web page:">
<!ENTITY findAsYouTypeEnableAuto.accesskey "a">
<!ENTITY findAsYouTypeAutoText.label "Any text in the page">
<!ENTITY findAsYouTypeAutoText.accesskey "A">
<!ENTITY findAsYouTypeAutoLinks.label "Links only">
<!ENTITY findAsYouTypeAutoLinks.accesskey "o">

View File

@ -1,39 +0,0 @@
<!-- 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.addButton.accesskey "A">
<!ENTITY languages.customize.deleteButton.label "Remove">
<!ENTITY languages.customize.deleteButton.accesskey "R">
<!ENTITY languages.customize.title.label "Customize Languages">
<!ENTITY languages.customize.add.title.label "Add Languages">
<!ENTITY languages.customize.left.header "Character Encoding">
<!ENTITY charset.customize.right.header "Select Supported Character Encodings">
<!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.others.accesskey "O">
<!ENTITY languages.customize.Charset.grouplabel "Character Encoding">
<!ENTITY languages.customize.DefaultCharset.label "Default Character Encoding:">
<!ENTITY languages.customize.DefaultCharset.accesskey "C">
<!-- LOCALIZATION NOTE Character Encoding 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">

View File

@ -1,9 +0,0 @@
illegalOtherLanguage=The following entries were not valid language codes:
illegalOtherLanguageTitle=Invalid language code(s)
# LOCALIZATION NOTE: Next two strings are for language name representations with
# and without the region.
# e.g. languageRegionCodeFormat : "French/Canada [fr-ca]" languageCodeFormat : "French [fr]"
# %1$S = language name, %2$S = region name, %3$S = language-region code
languageRegionCodeFormat=%1$S/%2$S [%3$S]
# %1$S = language name, %2$S = language-region code
languageCodeFormat=%1$S [%2$S]

View File

@ -1,29 +0,0 @@
<!-- LOCALIZATION NOTE : FILE Mouse-wheel management prefs, for those lucky OSes that support mouse wheels -->
<!ENTITY pref.mouseWheel.title "Mouse Wheel">
<!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 mousewheelGroup.label "Vertical scrolling">
<!ENTITY mousewheelHorizGroup.label "Horizontal scrolling">
<!ENTITY scroll.label "Scroll the document by ">
<!ENTITY scroll.accesskey "S">
<!ENTITY scrollHoriz.accesskey "c">
<!ENTITY scrollLines.label " lines. ">
<!ENTITY scrollChars.label " characters. ">
<!ENTITY useSystemDefault.label "Use system default">
<!ENTITY useSystemDefault.accesskey "U">
<!ENTITY useSystemDefaultHoriz.accesskey "d">
<!ENTITY scrollPgUpPgDn.label "Scroll a page up or a page down">
<!ENTITY scrollPgUpPgDn.accesskey "c">
<!ENTITY scrollPgLtPgRt.label "Scroll a page left or a page right">
<!ENTITY scrollPgLtPgRt.accesskey "o">
<!ENTITY history.label "Move back and forward in the browsing history">
<!ENTITY history.accesskey "M">
<!ENTITY historyHoriz.accesskey "b">
<!ENTITY textsize.label "Make the text larger or smaller">
<!ENTITY textsize.accesskey "t">
<!ENTITY textsizeHoriz.accesskey "e">

View File

@ -1,42 +0,0 @@
<!ENTITY pref.navigator.title "Navigator">
<!ENTITY navRadio "Display on">
<!ENTITY navStartPageMenu.label "Navigator Startup">
<!ENTITY newWinPageMenu.label "New Window">
<!ENTITY newTabPageMenu.label "New Tab">
<!ENTITY blankPageRadio.label "Blank page">
<!ENTITY blankPageRadio.accesskey "B">
<!ENTITY homePageRadio.label "Home page">
<!ENTITY homePageRadio.accesskey "m">
<!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 or group of pages.">
<!ENTITY location.label "Location:">
<!ENTITY location.accesskey "a">
<!ENTITY useCurrent.label "Use Current Page">
<!ENTITY useCurrent.accesskey "U">
<!ENTITY useCurrentGroup.label "Use Current Group">
<!ENTITY useCurrentGroup.accesskey "G">
<!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 navToolbarIntro.label "Navigation Toolbar">
<!ENTITY goButton.label "Go">
<!ENTITY goButton.accesskey "o">
<!ENTITY searchButton.label "Search">
<!ENTITY searchButton.accesskey "S">
<!ENTITY printButton.label "Print">
<!ENTITY printButton.accesskey "P">
<!ENTITY persToolbarIntro.label "Personal Toolbar">
<!ENTITY homeButton.label "Home">
<!ENTITY homeButton.accesskey "e">
<!ENTITY bookmarksButton.label "Bookmarks">
<!ENTITY bookmarksButton.accesskey "k">

View File

@ -1,13 +0,0 @@
<!-- extracted from content/pref-offline.xul -->
<!--LOCALIZATION NOTE : FILE The 'Offline' preferences dialog -->
<!ENTITY window.title "Offline">
<!ENTITY boxHeader "Offline">
<!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">

View File

@ -1,19 +0,0 @@
<!ENTITY pref.policies.title "Security Policies">
<!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:">

View File

@ -1,25 +0,0 @@
<!ENTITY pref.popups.title "Popup Windows">
<!ENTITY pref.popups.caption "Popup Windows">
<!ENTITY popupDesc.label "Specify how to handle popup windows that appear on top of or under the current Navigator window:">
<!ENTITY popupBlock.label "Block unrequested popup windows">
<!ENTITY popupBlock.accesskey "B">
<!ENTITY popupExceptions.label "Allowed Sites...">
<!ENTITY popupExceptions.accesskey "A">
<!ENTITY whenBlock.description "When a popup window has been blocked:">
<!ENTITY playSound.label "Play a sound:">
<!ENTITY selectSound.label "Select...">
<!ENTITY selectSound.accesskey "e">
<!ENTITY previewSound.label "Preview">
<!ENTITY previewSound.accesskey "r">
<!ENTITY selectSound.title "Select Popup Block Sound">
<!ENTITY displayIcon.label "Display an icon in the Navigator status bar">
<!ENTITY popupNote.description "Note: Blocking all popups may prevent important features of some websites from working, such as login windows for banks and shopping sites. For details of how to allow specific sites to use popups while blocking all others, click Help. Even if blocked, sites may use other methods to show popups.">

View File

@ -1,30 +0,0 @@
<!--LOCALIZATION NOTE : FILE The Advanced Proxy Preferences dialog -->
<!ENTITY pref.proxies.advanced.title "Advanced Proxy Preferences">
<!ENTITY protocols.caption "Protocol-Specific Proxies">
<!ENTITY protocols.description "Normally the same proxy can handle all protocols listed here.">
<!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 "T">
<!ENTITY reuseProxy.label "Use HTTP Proxy settings for all protocols">
<!ENTITY reuseProxy.accesskey "U">
<!ENTITY ssl.label "SSL Proxy:">
<!ENTITY ssl.accesskey "S">
<!ENTITY socks.caption "Generic Proxy">
<!ENTITY socks.description "A SOCKS proxy is a generic proxy sometimes used in corporate or similar environments.">
<!ENTITY socks.label "SOCKS Proxy:">
<!ENTITY socks.accesskey "O">
<!ENTITY socks4.label "SOCKS v4">
<!ENTITY socks4.accesskey "C">
<!ENTITY socks5.label "SOCKS v5">
<!ENTITY socks5.accesskey "K">
<!ENTITY socksRemoteDNS.label "Use for resolving hostnames (recommended for SOCKS v5)">
<!ENTITY socksRemoteDNS.accesskey "e">
<!ENTITY port.label "Port:">
<!ENTITY HTTPport.accesskey "P">
<!ENTITY SSLport.accesskey "o">
<!ENTITY FTPport.accesskey "r">
<!-- No accesskey for gopher (':' doesn't go well) -->
<!ENTITY SOCKSport.accesskey "t">

Some files were not shown because too many files have changed in this diff Show More