Landing the Aviary Branch (Toolkit sections excluding toolkit/content).

git-svn-id: svn://10.0.0.236/trunk@165963 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ben%bengoodger.com 2004-11-30 22:54:13 +00:00
parent fceb486381
commit ce38ceb5f6
219 changed files with 6957 additions and 2518 deletions

View File

@ -1,4 +1,3 @@
toolkit.jar:
* content/global/alerts/alert.xul (resources/content/alert.xul)
* content/global/alerts/alert.js (resources/content/alert.js)

View File

@ -32,7 +32,7 @@ Rights Reserved.
<hbox id="alertBox" class="alertBox">
<hbox class="alertImageBox" align="center" valign="center">
<image id="alertImage"/>
<image id="alertImage" autostretch="never"/>
</hbox>
<vbox id="alertTextBox" class="alertTextBox">

View File

@ -3,7 +3,3 @@ toolkit.jar:
*+ content/global/console.xul (content/console.xul)
+ content/global/console.css (content/console.css)
+ content/global/consoleBindings.xml (content/consoleBindings.xml)
en-US.jar:
*+ locale/en-US/global/console.dtd (locale/console.dtd)
+ locale/en-US/global/console.properties (locale/console.properties)

View File

@ -1647,8 +1647,8 @@ nsDownloadsDataSource::GetTarget(nsIRDFResource* aSource, nsIRDFResource* aPrope
fph->GetURLSpecFromFile(lf, fileURL);
nsAutoString iconURL(NS_LITERAL_STRING("moz-icon://"));
AppendUTF8toUTF16(fileURL, iconURL);
iconURL.AppendLiteral("?size=32");
nsAutoString pathTemp; pathTemp.AssignWithConversion(fileURL);
iconURL += pathTemp + NS_LITERAL_STRING("?size=32");
nsCOMPtr<nsIRDFResource> result;
gRDFService->GetUnicodeResource(iconURL, getter_AddRefs(result));

View File

@ -20,7 +20,7 @@
# Contributor(s):
# Stuart Parmenter <pavlov@netscape.com>
# Brian Ryner <bryner@brianryner.com>
# Jan Varga <varga@ku.sk>
# Jan Varga <varga@nixcorp.com>
# Peter Annema <disttsc@bart.nl>
# Johann Petrak <johann@ai.univie.ac.at>
# Akkana Peck <akkana@netscape.com>
@ -72,7 +72,7 @@ function filepickerLoad() {
const filterTypes = o.filters.types;
const numFilters = filterTitles.length;
document.title = title;
window.title = title;
if (initialText) {
textInput.value = initialText;

View File

@ -19,7 +19,7 @@
# Contributor(s):
# Stuart Parmenter <pavlov@netscape.com>
# Brian Ryner <bryner@brianryner.com>
# Jan Varga <varga@ku.sk>
# Jan Varga <varga@nixcorp.com>
# Peter Annema <disttsc@bart.nl>
# Johann Petrak <johann@ai.univie.ac.at>
@ -52,7 +52,7 @@
<hbox flex="1">
<deck id="errorShower" flex="1">
<tree id="directoryTree" flex="1" seltype="single"
<tree id="directoryTree" flex="1" class="focusring" seltype="single"
onclick="onClick(event);"
ondblclick="onDblClick(event);"
onkeypress="onKeypress(event);"

View File

@ -2,6 +2,3 @@ toolkit.jar:
* content/global/filepicker.xul (content/filepicker.xul)
* content/global/filepicker.js (content/filepicker.js)
en-US.jar:
locale/en-US/global/filepicker.dtd (locale/filepicker.dtd)
locale/en-US/global/filepicker.properties (locale/filepicker.properties)

View File

@ -45,5 +45,12 @@ DIRS += helpOnHelp
include $(DEPTH)/config/autoconf.mk
# Use Qute on non-Mac non-Phoenix apps
ifeq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
ifndef MOZ_PHOENIX
DIRS += skin
endif
endif
include $(topsrcdir)/config/rules.mk

View File

@ -39,6 +39,7 @@
# Global Variables
var helpBrowser;
var helpWindow;
var helpSearchPanel;
var emptySearch;
var emptySearchText
@ -116,12 +117,15 @@ function displayTopic(topic) {
# Initialize the Help window
function init() {
// Cache panel references.
helpWindow = document.getElementById("help");
helpSearchPanel = document.getElementById("help-search-panel");
helpTocPanel = document.getElementById("help-toc-panel");
helpIndexPanel = document.getElementById("help-index-panel");
helpGlossaryPanel = document.getElementById("help-glossary-panel");
helpBrowser = document.getElementById("help-content");
initFindBar();
// Get the content pack, base URL, and help topic
var helpTopic = defaultTopic;
if ("arguments" in window
@ -182,7 +186,8 @@ function loadHelpRDF() {
log("Help file: " + helpFileURI + " was not found.");
}
try {
document.title = getAttribute(helpFileDS, RDF_ROOT, NC_TITLE, "");
helpWindow.setAttribute("title",
getAttribute(helpFileDS, RDF_ROOT, NC_TITLE, ""));
helpBaseURI = getAttribute(helpFileDS, RDF_ROOT, NC_BASE, helpBaseURI);
defaultTopic = getAttribute(helpFileDS,
RDF_ROOT, NC_DEFAULTTOPIC, "welcome");
@ -303,6 +308,10 @@ function getHelpFileURI() {
return helpFileURI;
}
function getBrowser() {
return helpBrowser;
}
function getWebNavigation() {
try {
return helpBrowser.webNavigation;

View File

@ -39,6 +39,7 @@
<?xml-stylesheet href="chrome://help/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://help/skin/sidebar.css" type="text/css"?>
<?xml-stylesheet href="chrome://global/skin/findBar.css" type="text/css"?>
<?xul-overlay href="chrome://help/content/helpContextOverlay.xul"?>
<!DOCTYPE window [
@ -46,6 +47,10 @@
%brandDTD;
<!ENTITY % helpDTD SYSTEM "chrome://help/locale/help.dtd">
%helpDTD;
<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd" >
%browserDTD;
<!ENTITY % findDTD SYSTEM "chrome://global/locale/finddialog.dtd" >
%findDTD;
]>
<window id="help"
@ -55,15 +60,17 @@
height="550"
persist="width height screenX screenY"
onload="init();"
onunload="window.XULBrowserWindow.destroy();">
onunload="uninitFindBar(); window.XULBrowserWindow.destroy();">
<script type="application/x-javascript" src="chrome://help/content/toolbarCustomization.js"/>
<script type="application/x-javascript" src="chrome://help/content/help.js"/>
<script type="application/x-javascript" src="chrome://browser/content/sessionHistoryUI.js"/>
<script type="application/x-javascript" src="chrome://global/content/findUtils.js"/>
<script type="application/x-javascript" src="chrome://global/content/findBar.js"/>
<script type="application/x-javascript" src="chrome://global/content/viewZoomOverlay.js"/>
<script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>
<stringbundle id="bundle_findBar" src="chrome://browser/locale/browser.properties"/>
<menupopup id="backMenu" position="after_start"
onpopupshowing="return createBackMenu(event);"
oncommand="gotoHistoryIndex(event);"/>
@ -86,14 +93,14 @@
<command id="Help:Home" oncommand="goHome();"/>
<command id="Help:Back" oncommand="goBack();" observes="canGoBack"/>
<command id="Help:Forward" oncommand="goForward();" observes="canGoForward"/>
<command id="Help:Find" oncommand="helpBrowser.find();"/>
<command id="Help:FindAgain" oncommand="helpBrowser.findAgain();"/>
<command id="Help:FindPrevious" oncommand="helpBrowser.findPrevious();"/>
<command id="Help:ToggleSidebar" oncommand="toggleSidebar();"/>
<command id="cmd_closeWindow" oncommand="close();"/>
<command id="cmd_textZoomReduce" oncommand="ZoomManager.prototype.getInstance().reduce();"/>
<command id="cmd_textZoomEnlarge" oncommand="ZoomManager.prototype.getInstance().enlarge();"/>
<command id="cmd_CustomizeToolbars" oncommand="CustomizeToolbar('help-toolbox');"/>
<command id="cmd_find" oncommand="onFindCmd();"/>
<command id="cmd_findAgain" oncommand="onFindAgainCmd();"/>
<command id="cmd_findPrevious" oncommand="onFindPreviousCmd();"/>
</commandset>
<keyset id="keys">
<key id="goHome" keycode="VK_HOME" command="Help:Home" modifiers="alt"/>
@ -108,14 +115,11 @@
#endif
<key id="printKb" key="&printCmd.commandkey;" oncommand="print();"
modifiers="accel"/>
<key id="key_find" key="&findOnCmd.commandkey;"
command="Help:Find" modifiers="accel"/>
<key id="key_findAgain" key="&findAgainCmd.commandkey;"
command="Help:FindAgain" modifiers="accel"/>
<key id="key_findPrevious" key="&findAgainCmd.commandkey;"
command="Help:FindPrevious" modifiers="accel,shift"/>
<key keycode="VK_F3" command="Help:FindAgain"/>
<key keycode="VK_F3" command="Help:FindPrevious" modifiers="shift"/>
<key id="key_find" key="&findOnCmd.commandkey;" command="cmd_find" modifiers="accel"/>
<key id="key_findAgain" key="&findAgainCmd.commandkey;" command="cmd_findAgain" modifiers="accel"/>
<key id="key_findPrevious" key="&findAgainCmd.commandkey;" command="cmd_findPrevious" modifiers="accel,shift"/>
<key keycode="&findAgainCmd.commandkey2;" command="cmd_findAgain"/>
<key keycode="&findAgainCmd.commandkey2;" command="cmd_findPrevious" modifiers="shift"/>
<key keycode="VK_F5" oncommand="reload();"/>
<key id="key_closeWindow" key="&closeWindow.commandkey;"
command="cmd_closeWindow" modifiers="accel"/>
@ -175,7 +179,7 @@
command="Help:Home"/>
<toolbarbutton id="help-find-button"
class="toolbarbutton-1" label="&findBtn.label;"
command="Help:Find"/>
command="cmd_find"/>
<toolbarbutton id="help-zoom-small-button"
class="toolbarbutton-1" label="&textZoomReduceBtn.label;"
tooltiptext="&textZoomReduceBtn.tooltip;"
@ -409,14 +413,12 @@
</splitter>
<vbox id="appcontent" flex="3">
<!-- this box is temporary, pending XBLified <browser> -->
<hbox id="browser" flex="1">
<!-- type attribute is used by frame construction to locate
iframes intended to hold (html) content -->
<browser context="contentAreaContextMenu"
type="content-primary" id="help-content"
src="about:blank" flex="1"/>
</hbox>
#include ../../typeaheadfind/content/findBar.inc
</vbox>
</hbox>
</vbox>

View File

@ -83,11 +83,13 @@
# is a web browser).
#ifndef MOZ_THUNDERBIRD
#ifndef XP_UNIX
#ifndef XP_OS2
<menuitem label="&helpForIEUsers.label;"
position="2"
accesskey="&helpForIEUsers.accesskey;"
oncommand="openHelp('ieusers');"/>
#endif
#endif
#endif
</menupopup>
</overlay>

View File

@ -8,15 +8,12 @@
</RDF:Seq>
<!-- Package Information -->
<RDF:Description RDF:about="urn:mozilla:locale:en-US">
<RDF:Description RDF:about="urn:mozilla:locale:en-US"
chrome:name="en-US">
<chrome:packages>
<RDF:Seq RDF:about="urn:mozilla:locale:en-US:packages">
<RDF:li RDF:resource="urn:mozilla:locale:en-US:help"/>
</RDF:Seq>
</chrome:packages>
</RDF:Description>
<!-- Version Information -->
<RDF:Description RDF:about="urn:mozilla:locale:en-US:help"
chrome:localeVersion="0.6"/>
</RDF:RDF>

View File

@ -0,0 +1,46 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the Mozilla Browser 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):
# Jeff Walden <Jswalden86@netzero.net>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the 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 *****
DEPTH = ../../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -0,0 +1,13 @@
help.jar:
skin/help/contents.rdf (../contents.rdf)
skin/help/sidebar.css (../sidebar.css)
skin/help/sbtab-twisty.gif (../sbtab-twisty.gif)
skin/help/help.css (../help.css)
skin/help/helpFileLayout.css (../helpFileLayout.css)
skin/help/Toolbar.png (Toolbar.png)
skin/help/sbtab-twisty-open.gif (../sbtab-twisty-open.gif)
skin/help/throbber.png (../throbber.png)
skin/help/throbber-busy.gif (../throbber-busy.gif)
skin/help/sidebarBindings.xml (../sidebarBindings.xml)
skin/help/Weblink.png (../Weblink.png)
skin/help/zoomImg.png (../zoomImg.png)

View File

@ -639,7 +639,7 @@ nsPasswordManager::ReadPasswords(nsIFile* aPasswordFile)
if (NS_FAILED(rv))
return NS_OK;
if (!utf8Buffer.Equals(NS_LITERAL_CSTRING("#2c"))) {
if (!utf8Buffer.Equals("#2c")) {
NS_ERROR("Unexpected version header in signon file");
return NS_OK;
}
@ -1059,13 +1059,13 @@ nsPasswordManager::Notify(nsIContent* aFormNode,
userFieldElement->GetAttribute(NS_LITERAL_STRING("autocomplete"),
autocomplete);
if (autocomplete.LowerCaseEqualsLiteral("off"))
if (autocomplete.EqualsIgnoreCase("off"))
return NS_OK;
}
nsCOMPtr<nsIDOMElement> formDOMEl = do_QueryInterface(aFormNode);
formDOMEl->GetAttribute(NS_LITERAL_STRING("autocomplete"), autocomplete);
if (autocomplete.LowerCaseEqualsLiteral("off"))
if (autocomplete.EqualsIgnoreCase("off"))
return NS_OK;
nsCOMPtr<nsIDOMElement> passFieldElement = do_QueryInterface(passFields.ObjectAt(0));
@ -1919,7 +1919,7 @@ nsPasswordManager::GetPasswordRealm(nsIURI* aURI, nsACString& aRealm)
aURI->GetScheme(buffer);
aRealm.Append(buffer);
aRealm.AppendLiteral("://");
aRealm.Append(NS_LITERAL_CSTRING("://"));
aURI->GetHostPort(buffer);
if (buffer.IsEmpty()) {

View File

@ -323,9 +323,9 @@ var rejectsTreeView = {
isSorted: function() { return false; },
isContainer : function(index) {return false;},
cycleHeader : function(column) {},
getRowProperties : function(row,prop) {},
getColumnProperties : function(column,prop) {},
getCellProperties : function(row,column,prop) {}
getRowProperties : function(row,prop){},
getColumnProperties : function(column,prop){},
getCellProperties : function(row,column,prop){}
};
var rejectsTree;

View File

@ -2,8 +2,3 @@ toolkit.jar:
content/passwordmgr/contents.rdf (content/contents.rdf)
* content/passwordmgr/passwordManager.xul (content/passwordManager.xul)
* content/passwordmgr/passwordManager.js (content/passwordManager.js)
en-US.jar:
locale/en-US/passwordmgr/contents.rdf (locale/contents.rdf)
* locale/en-US/passwordmgr/passwordmgr.properties (locale/passwordmgr.properties)
* locale/en-US/passwordmgr/passwordManager.dtd (locale/passwordManager.dtd)

View File

@ -102,9 +102,7 @@ var progressListener = {
QueryInterface: function (iid)
{
if (iid.equals(Components.interfaces.nsIWebProgressListener) ||
iid.equals(Components.interfaces.nsISupportsWeakReference) ||
iid.equals(Components.interfaces.nsISupports))
if (iid.equals(Components.interfaces.nsIWebProgressListener) || iid.equals(Components.interfaces.nsISupportsWeakReference))
return this;
throw Components.results.NS_NOINTERFACE;
}

View File

@ -45,7 +45,6 @@ var printOptions = null;
var gOriginalNumCopies = 1;
var paramBlock;
var gPrefs = null;
var gPrintSettings = null;
var gWebBrowserPrint = null;
var default_file = "mozilla.ps";
@ -59,7 +58,6 @@ function initDialog()
dialog = new Object;
dialog.propertiesButton = document.getElementById("properties");
dialog.descText = document.getElementById("descText");
dialog.destGroup = document.getElementById("destGroup");
dialog.fileRadio = document.getElementById("fileRadio");
@ -134,20 +132,6 @@ function doEnablePrintToFile(value)
}
}
//---------------------------------------------------
function getPrinterDescription(printerName)
{
var s = "";
try {
/* This may not work with non-ASCII test (see bug 235763 comment #16) */
s = gPrefs.getCharPref("print.printer_" + printerName + ".printer_description")
} catch(e) {
}
return s;
}
//---------------------------------------------------
function listElement(aListElement)
{
@ -160,16 +144,13 @@ listElement.prototype =
function ()
{
// remove the menupopup node child of the menulist.
var popup = this.listElement.firstChild;
if (popup) {
this.listElement.removeChild(popup);
}
this.listElement.removeChild(this.listElement.firstChild);
},
appendPrinterNames:
function (aDataObject)
{
var list = document.getElementById("printerList");
var popupNode = document.createElement("menupopup");
var strDefaultPrinterName = "";
var printerName;
@ -180,8 +161,10 @@ listElement.prototype =
var printerNameStr = printerName.toString();
if (strDefaultPrinterName == "")
strDefaultPrinterName = printerNameStr;
list.appendItem(printerNameStr, printerNameStr, getPrinterDescription(printerNameStr));
var itemNode = document.createElement("menuitem");
itemNode.setAttribute("value", printerNameStr);
itemNode.setAttribute("label", printerNameStr);
popupNode.appendChild(itemNode);
}
if (strDefaultPrinterName != "") {
this.listElement.removeAttribute("disabled");
@ -201,6 +184,7 @@ listElement.prototype =
doEnablePrintToFile(false);
}
this.listElement.appendChild(popupNode);
return strDefaultPrinterName;
}
};
@ -227,8 +211,6 @@ function setPrinterDefaultsForSelectedPrinter()
{
gPrintSettings.printerName = dialog.printerList.value;
dialog.descText.value = getPrinterDescription(gPrintSettings.printerName);
// First get any defaults from the printer
printService.initPrintSettingsFromPrinter(gPrintSettings.printerName, gPrintSettings);
@ -283,8 +265,6 @@ function loadDialog()
var print_tofile = "";
try {
gPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
printService = Components.classes["@mozilla.org/gfx/printsettings-service;1"];
if (printService) {
printService = printService.getService();
@ -405,7 +385,7 @@ function onLoad()
function onAccept()
{
if (gPrintSettings != null) {
if (gPrintSettings) {
var print_howToEnableUI = gPrintSetInterface.kFrameEnableNone;
var stringBundle = srGetStrBundle("chrome://global/locale/printing.properties");
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
@ -479,23 +459,14 @@ function onAccept()
}
}
var saveToPrefs = false;
saveToPrefs = gPrefs.getBoolPref("print.save_print_settings");
if (saveToPrefs && printService != null) {
if (printService) {
var flags = gPrintSetInterface.kInitSavePaperSizeType |
gPrintSetInterface.kInitSavePaperSizeUnit |
gPrintSetInterface.kInitSavePaperWidth |
gPrintSetInterface.kInitSavePaperHeight |
gPrintSetInterface.kInitSavePaperName |
gPrintSetInterface.kInitSaveColorSpace |
gPrintSetInterface.kInitSaveInColor |
gPrintSetInterface.kInitSaveResolutionName |
gPrintSetInterface.kInitSaveDownloadFonts |
gPrintSetInterface.kInitSavePrintCommand |
gPrintSetInterface.kInitSaveShrinkToFit |
gPrintSetInterface.kInitSaveScaling;
gPrintSetInterface.kInitSavePrintCommand;
printService.savePrintSettingsToPrefs(gPrintSettings, true, flags);
}

View File

@ -68,15 +68,20 @@
<rows>
<row align="center">
<hbox align="center" pack="end">
<label id="descTextLabel" control="descText" value="&descText.label;"/>
<label value="&printTo.label;"/>
</hbox>
<label id="descText" flex="1" value="-" />
<radiogroup id="destGroup" orient="horizontal">
<radio id="printerRadio" label="&printerRadio.label;" oncommand="if (!this.disabled) doEnablePrintToFile(false);"/>
<radio id="fileRadio" label="&fileRadio.label;" oncommand="if (!this.disabled) doEnablePrintToFile(true);"/>
</radiogroup>
</row>
<row align="center">
<hbox align="center" pack="end">
<label id="printerLabel" value="&printerInput.label;"/>
</hbox>
<menulist id="printerList" flex="1" type="description" oncommand="setPrinterDefaultsForSelectedPrinter();"/>
<menulist id="printerList" flex="1" oncommand="setPrinterDefaultsForSelectedPrinter();">
<menupopup/>
</menulist>
<button id="properties" label="&propertiesButton.label;" oncommand="displayPropertiesDialog();"/>
</row>
<row align="center">
@ -86,15 +91,6 @@
<textbox id="fileInput" flex="1" onblur="stripTrailingWhitespace(this)"/>
<button id="chooseFile" label="&chooseButton.label;" oncommand="onChooseFile()"/>
</row>
<row align="center">
<hbox align="center" pack="end">
<label value="&printTo.label;"/>
</hbox>
<radiogroup id="destGroup" orient="horizontal">
<radio id="printerRadio" label="&printerRadio.label;" oncommand="if (!this.disabled) doEnablePrintToFile(false);"/>
<radio id="fileRadio" label="&fileRadio.label;" oncommand="if (!this.disabled) doEnablePrintToFile(true);"/>
</radiogroup>
</row>
</rows>
</grid>

View File

@ -46,8 +46,6 @@ var gStringBundle = null;
var gPrintSettingsInterface = Components.interfaces.nsIPrintSettings;
var gPaperArray;
var gPlexArray;
var gResolutionArray;
var gColorSpaceArray;
var gPrefs;
var default_command = "lpr";
@ -104,28 +102,14 @@ function initDialog()
dialog.plexList = document.getElementById("plexList");
dialog.plexGroup = document.getElementById("plexGroup");
dialog.resolutionList = document.getElementById("resolutionList");
dialog.resolutionGroup = document.getElementById("resolutionGroup");
dialog.jobTitleLabel = document.getElementById("jobTitleLabel");
dialog.jobTitleGroup = document.getElementById("jobTitleGroup");
dialog.jobTitleInput = document.getElementById("jobTitleInput");
dialog.cmdLabel = document.getElementById("cmdLabel");
dialog.cmdGroup = document.getElementById("cmdGroup");
dialog.cmdInput = document.getElementById("cmdInput");
dialog.colorspaceList = document.getElementById("colorspaceList");
dialog.colorspaceGroup = document.getElementById("colorspaceGroup");
dialog.colorGroup = document.getElementById("colorGroup");
dialog.colorRadioGroup = document.getElementById("colorRadioGroup");
dialog.colorRadio = document.getElementById("colorRadio");
dialog.grayRadio = document.getElementById("grayRadio");
dialog.fontsGroup = document.getElementById("fontsGroup");
dialog.downloadFonts = document.getElementById("downloadFonts");
dialog.topInput = document.getElementById("topInput");
dialog.bottomInput = document.getElementById("bottomInput");
dialog.leftInput = document.getElementById("leftInput");
@ -273,7 +257,7 @@ function createPaperArray()
//---------------------------------------------------
function createPaperSizeList(selectedInx)
{
gStringBundle = srGetStrBundle("chrome://global/locale/printPageSetup.properties");
gStringBundle = srGetStrBundle("chrome://global/locale/printjoboptions.properties");
var selectElement = new paperListElement(dialog.paperList);
selectElement.clearPaperList();
@ -384,7 +368,7 @@ function createPlexArray()
//---------------------------------------------------
function createPlexNameList(selectedInx)
{
gStringBundle = srGetStrBundle("chrome://global/locale/printPageSetup.properties");
gStringBundle = srGetStrBundle("chrome://global/locale/printjoboptions.properties");
var selectElement = new plexListElement(dialog.plexList);
selectElement.clearPlexList();
@ -398,227 +382,6 @@ function createPlexNameList(selectedInx)
//dialog.plexList = selectElement;
}
//---------------------------------------------------
function resolutionListElement(aResolutionListElement)
{
this.resolutionListElement = aResolutionListElement;
}
resolutionListElement.prototype =
{
clearResolutionList:
function ()
{
// remove the menupopup node child of the menulist.
this.resolutionListElement.removeChild(this.resolutionListElement.firstChild);
},
appendResolutionNames:
function (aDataObject)
{
var popupNode = document.createElement("menupopup");
for (var i=0;i<aDataObject.length;i++) {
var resolutionObj = aDataObject[i];
var itemNode = document.createElement("menuitem");
var label;
try {
label = gStringBundle.GetStringFromName(resolutionObj.name)
}
catch (e) {
/* No name in string bundle ? Then build one manually (this
* usually happens when gResolutionArray was build by createResolutionArrayFromPrinterFeatures() ...) */
label = resolutionObj.name;
}
itemNode.setAttribute("label", label);
itemNode.setAttribute("value", i);
popupNode.appendChild(itemNode);
}
this.resolutionListElement.appendChild(popupNode);
}
};
//---------------------------------------------------
function createResolutionArrayFromDefaults()
{
var resolutionNames = ["default"];
gResolutionArray = new Array();
for (var i=0;i<resolutionNames.length;i++) {
var obj = new Object();
obj.name = resolutionNames[i];
gResolutionArray[i] = obj;
}
}
//---------------------------------------------------
function createResolutionArrayFromPrinterFeatures()
{
var printername = gPrintSettings.printerName;
if (doDebug) {
dump("createResolutionArrayFromPrinterFeatures for " + printername + ".\n");
}
gResolutionArray = new Array();
var numResolutions = gPrefs.getIntPref("print.tmp.printerfeatures." + printername + ".resolution.count");
if (doDebug) {
dump("processing " + numResolutions + " entries...\n");
}
for ( var i=0 ; i < numResolutions ; i++ ) {
var obj = new Object();
obj.name = gPrefs.getCharPref("print.tmp.printerfeatures." + printername + ".resolution." + i + ".name");
gResolutionArray[i] = obj;
if (doDebug) {
dump("resolution index=" + i + ", name='" + obj.name + "'.\n");
}
}
}
//---------------------------------------------------
function createResolutionArray()
{
if (isListOfPrinterFeaturesAvailable()) {
createResolutionArrayFromPrinterFeatures();
}
else {
createResolutionArrayFromDefaults();
}
}
//---------------------------------------------------
function createResolutionNameList(selectedInx)
{
gStringBundle = srGetStrBundle("chrome://global/locale/printPageSetup.properties");
var selectElement = new resolutionListElement(dialog.resolutionList);
selectElement.clearResolutionList();
selectElement.appendResolutionNames(gResolutionArray);
if (selectedInx > -1) {
selectElement.resolutionListElement.selectedIndex = selectedInx;
}
//dialog.resolutionList = selectElement;
}
//---------------------------------------------------
function colorspaceListElement(aColorspaceListElement)
{
this.colorspaceListElement = aColorspaceListElement;
}
colorspaceListElement.prototype =
{
clearColorspaceList:
function ()
{
// remove the menupopup node child of the menulist.
this.colorspaceListElement.removeChild(this.colorspaceListElement.firstChild);
},
appendColorspaceNames:
function (aDataObject)
{
var popupNode = document.createElement("menupopup");
for (var i=0;i<aDataObject.length;i++) {
var colorspaceObj = aDataObject[i];
var itemNode = document.createElement("menuitem");
var label;
try {
label = gStringBundle.GetStringFromName(colorspaceObj.name)
}
catch (e) {
/* No name in string bundle ? Then build one manually (this
* usually happens when gColorspaceArray was build by createColorspaceArrayFromPrinterFeatures() ...) */
label = colorspaceObj.name;
}
itemNode.setAttribute("label", label);
itemNode.setAttribute("value", i);
popupNode.appendChild(itemNode);
}
this.colorspaceListElement.appendChild(popupNode);
}
};
//---------------------------------------------------
function createColorspaceArrayFromDefaults()
{
var colorspaceNames = ["default"];
gColorspaceArray = new Array();
for (var i=0;i<colorspaceNames.length;i++) {
var obj = new Object();
obj.name = colorspaceNames[i];
gColorspaceArray[i] = obj;
}
}
//---------------------------------------------------
function createColorspaceArrayFromPrinterFeatures()
{
var printername = gPrintSettings.printerName;
if (doDebug) {
dump("createColorspaceArrayFromPrinterFeatures for " + printername + ".\n");
}
gColorspaceArray = new Array();
var numColorspaces = gPrefs.getIntPref("print.tmp.printerfeatures." + printername + ".colorspace.count");
if (doDebug) {
dump("processing " + numColorspaces + " entries...\n");
}
for ( var i=0 ; i < numColorspaces ; i++ ) {
var obj = new Object();
obj.name = gPrefs.getCharPref("print.tmp.printerfeatures." + printername + ".colorspace." + i + ".name");
gColorspaceArray[i] = obj;
if (doDebug) {
dump("colorspace index=" + i + ", name='" + obj.name + "'.\n");
}
}
}
//---------------------------------------------------
function createColorspaceArray()
{
if (isListOfPrinterFeaturesAvailable()) {
createColorspaceArrayFromPrinterFeatures();
}
else {
createColorspaceArrayFromDefaults();
}
}
//---------------------------------------------------
function createColorspaceNameList(selectedInx)
{
gStringBundle = srGetStrBundle("chrome://global/locale/printPageSetup.properties");
var selectElement = new colorspaceListElement(dialog.colorspaceList);
selectElement.clearColorspaceList();
selectElement.appendColorspaceNames(gColorspaceArray);
if (selectedInx > -1) {
selectElement.colorspaceListElement.selectedIndex = selectedInx;
}
//dialog.colorspaceList = selectElement;
}
//---------------------------------------------------
function loadDialog()
@ -629,12 +392,8 @@ function loadDialog()
var print_paper_height = 0.0;
var print_paper_name = "";
var print_plex_name = "";
var print_resolution_name = "";
var print_colorspace = "";
var print_color = true;
var print_downloadfonts = true;
var print_command = default_command;
var print_jobtitle = "";
gPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
@ -645,12 +404,8 @@ function loadDialog()
print_paper_height = gPrintSettings.paperHeight;
print_paper_name = gPrintSettings.paperName;
print_plex_name = gPrintSettings.plexName;
print_resolution_name = gPrintSettings.resolutionName;
print_colorspace = gPrintSettings.colorspace;
print_color = gPrintSettings.printInColor;
print_downloadfonts = gPrintSettings.downloadFonts;
print_command = gPrintSettings.printCommand;
print_jobtitle = gPrintSettings.title;
}
if (doDebug) {
@ -660,12 +415,8 @@ function loadDialog()
dump("paperHeight "+print_paper_height+"\n");
dump("paperName "+print_paper_name+"\n");
dump("plexName "+print_plex_name+"\n");
dump("resolutionName "+print_resolution_name+"\n");
dump("colorspace "+print_colorspace+"\n");
dump("print_color "+print_color+"\n");
dump("print_downloadfonts "+print_downloadfonts+"\n");
dump("print_command "+print_command+"\n");
dump("print_jobtitle "+print_jobtitle+"\n");
dump("printInColor "+print_color+"\n");
dump("printCommand "+print_command+"\n");
}
createPaperArray();
@ -688,6 +439,7 @@ function loadDialog()
createPaperSizeList(paperSelectedInx);
createPlexArray();
var plexSelectedInx = 0;
for (var i=0;i<gPlexArray.length;i++) {
if (print_plex_name == gPlexArray[i].name) {
@ -703,61 +455,18 @@ function loadDialog()
dump("loadDialog: found plex '"+gPlexArray[plexSelectedInx].name+"'.\n");
}
createResolutionArray();
var resolutionSelectedInx = 0;
for (var i=0;i<gResolutionArray.length;i++) {
if (print_resolution_name == gResolutionArray[i].name) {
resolutionSelectedInx = i;
break;
}
}
if (doDebug) {
if (i == gResolutionArray.length)
dump("loadDialog: No resolution found.\n");
else
dump("loadDialog: found resolution '"+gResolutionArray[resolutionSelectedInx].name+"'.\n");
}
createColorspaceArray();
var colorspaceSelectedInx = 0;
for (var i=0;i<gColorspaceArray.length;i++) {
if (print_colorspace == gColorspaceArray[i].name) {
colorspaceSelectedInx = i;
break;
}
}
if (doDebug) {
if (i == gColorspaceArray.length)
dump("loadDialog: No colorspace found.\n");
else
dump("loadDialog: found colorspace '"+gColorspaceArray[colorspaceSelectedInx].name+"'.\n");
}
createPlexNameList(plexSelectedInx);
createResolutionNameList(resolutionSelectedInx);
createColorspaceNameList(colorspaceSelectedInx);
/* Enable/disable and/or hide/unhide widgets based in the information
* whether the selected printer and/or print module supports the matching
* feature or not */
if (isListOfPrinterFeaturesAvailable()) {
// job title
if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".can_change_jobtitle"))
dialog.jobTitleInput.removeAttribute("disabled");
else
dialog.jobTitleInput.setAttribute("disabled","true");
if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".supports_jobtitle_change"))
dialog.jobTitleGroup.removeAttribute("hidden");
else
dialog.jobTitleGroup.setAttribute("hidden","true");
// spooler command
if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".can_change_spoolercommand"))
dialog.cmdInput.removeAttribute("disabled");
else
dialog.cmdInput.setAttribute("disabled","true");
if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".supports_spoolercommand_change"))
dialog.cmdGroup.removeAttribute("hidden");
else
@ -768,6 +477,7 @@ function loadDialog()
dialog.paperList.removeAttribute("disabled");
else
dialog.paperList.setAttribute("disabled","true");
if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".supports_paper_size_change"))
dialog.paperGroup.removeAttribute("hidden");
else
@ -778,50 +488,11 @@ function loadDialog()
dialog.plexList.removeAttribute("disabled");
else
dialog.plexList.setAttribute("disabled","true");
if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".supports_plex_change"))
dialog.plexGroup.removeAttribute("hidden");
else
dialog.plexGroup.setAttribute("hidden","true");
// resolution
if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".can_change_resolution"))
dialog.resolutionList.removeAttribute("disabled");
else
dialog.resolutionList.setAttribute("disabled","true");
if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".supports_resolution_change"))
dialog.resolutionGroup.removeAttribute("hidden");
else
dialog.resolutionGroup.setAttribute("hidden","true");
// color/grayscale radio
if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".can_change_printincolor"))
dialog.colorRadioGroup.removeAttribute("disabled");
else
dialog.colorRadioGroup.setAttribute("disabled","true");
if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".supports_printincolor_change"))
dialog.colorGroup.removeAttribute("hidden");
else
dialog.colorGroup.setAttribute("hidden","true");
// colorspace
if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".can_change_colorspace"))
dialog.colorspaceList.removeAttribute("disabled");
else
dialog.colorspaceList.setAttribute("disabled","true");
if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".supports_colorspace_change"))
dialog.colorspaceGroup.removeAttribute("hidden");
else
dialog.colorspaceGroup.setAttribute("hidden","true");
// font download
if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".can_change_downloadfonts"))
dialog.downloadFonts.removeAttribute("disabled");
else
dialog.downloadFonts.setAttribute("disabled","true");
if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".supports_downloadfonts_change"))
dialog.fontsGroup.removeAttribute("hidden");
else
dialog.fontsGroup.setAttribute("hidden","true");
}
if (print_command == "") {
@ -829,15 +500,12 @@ function loadDialog()
}
if (print_color) {
dialog.colorRadioGroup.selectedItem = dialog.colorRadio;
dialog.colorGroup.selectedItem = dialog.colorRadio;
} else {
dialog.colorRadioGroup.selectedItem = dialog.grayRadio;
dialog.colorGroup.selectedItem = dialog.grayRadio;
}
dialog.downloadFonts.checked = print_downloadfonts;
dialog.cmdInput.value = print_command;
dialog.jobTitleInput.value = print_jobtitle;
/* First initalize with the hardcoded defaults... */
dialog.topInput.value = "0.04";
@ -890,14 +558,10 @@ function onAccept()
var print_paper_height = 0.0;
var print_paper_name = "";
var print_plex_name = "";
var print_resolution_name = "";
var print_colorspace = "";
if (gPrintSettings != null) {
var paperSelectedInx = dialog.paperList.selectedIndex;
var plexSelectedInx = dialog.plexList.selectedIndex;
var resolutionSelectedInx = dialog.resolutionList.selectedIndex;
var colorspaceSelectedInx = dialog.colorspaceList.selectedIndex;
if (gPaperArray[paperSelectedInx].inches) {
print_paper_unit = gPrintSettingsInterface.kPaperSizeInches;
} else {
@ -907,24 +571,18 @@ function onAccept()
print_paper_height = gPaperArray[paperSelectedInx].height;
print_paper_name = gPaperArray[paperSelectedInx].name;
print_plex_name = gPlexArray[plexSelectedInx].name;
print_resolution_name = gResolutionArray[resolutionSelectedInx].name;
print_colorspace = gColorspaceArray[colorspaceSelectedInx].name;
gPrintSettings.paperSize = gPaperArray[paperSelectedInx].paperSize; // deprecated
gPrintSettings.paperSizeType = print_paper_type;
gPrintSettings.paperSizeUnit = print_paper_unit;
gPrintSettings.paperWidth = print_paper_width;
gPrintSettings.paperHeight = print_paper_height;
gPrintSettings.paperName = print_paper_name;
gPrintSettings.plexName = print_plex_name;
gPrintSettings.resolutionName = print_resolution_name;
gPrintSettings.colorspace = print_colorspace;
// save these out so they can be picked up by the device spec
gPrintSettings.printInColor = dialog.colorRadio.selected;
gPrintSettings.downloadFonts = dialog.downloadFonts.checked;
gPrintSettings.printCommand = dialog.cmdInput.value;
gPrintSettings.title = dialog.jobTitleInput.value;
//
try {
@ -952,11 +610,8 @@ function onAccept()
dump("paperHeight "+print_paper_height+"\n");
dump("paperName '"+print_paper_name+"'\n");
dump("plexName '"+print_plex_name+"'\n");
dump("resolutionName '"+print_resolution_name+"'\n");
dump("colorspace '"+print_colorspace+"'\n");
dump("printInColor "+gPrintSettings.printInColor+"\n");
dump("downloadFonts "+gPrintSettings.downloadFonts+"\n");
dump("printCommand '"+gPrintSettings.printCommand+"'\n");
}
} else {

View File

@ -40,7 +40,7 @@
# the terms of any one of the NPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
#
#ifdef XP_UNIX
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
@ -55,6 +55,7 @@
<script type="application/x-javascript" src="chrome://global/content/printjoboptions.js"/>
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
<grid>
<columns>
<column/>
@ -62,13 +63,6 @@
</columns>
<rows>
<row id="jobTitleGroup">
<hbox align="center" pack="end">
<label id="jobTitleLabel" value="&jobTitleInput.label;"/>
</hbox>
<textbox id="jobTitleInput" flex="1"/>
</row>
<row id="paperGroup">
<hbox align="center" pack="end">
<label id="paperLabel" value="&paperInput.label;"/>
@ -87,45 +81,21 @@
</menulist>
</row>
<row id="resolutionGroup">
<hbox align="center" pack="end">
<label id="resolutionLabel" value="&resolutionInput.label;"/>
</hbox>
<menulist id="resolutionList" flex="1">
<menupopup/>
</menulist>
</row>
<row id="colorspaceGroup">
<hbox align="center" pack="end">
<label id="colorspaceLabel" value="&colorspaceInput.label;"/>
</hbox>
<menulist id="colorspaceList" flex="1">
<menupopup/>
</menulist>
</row>
<row id="cmdGroup">
<label id="cmdLabel" value="&cmdInput.label;"/>
<textbox id="cmdInput" flex="1"/>
</row>
<row id="colorGroup">
<row>
<hbox align="center" pack="end">
<label value="&colorGroup.label;"/>
</hbox>
<radiogroup id="colorRadioGroup" orient="horizontal">
<radiogroup id="colorGroup" orient="horizontal">
<radio id="grayRadio" label="&grayRadio.label;"/>
<radio id="colorRadio" label="&colorRadio.label;"/>
</radiogroup>
</row>
<row id="fontsGroup">
<hbox align="center" pack="end">
<label value="&fontsGroup.label;"/>
</hbox>
<checkbox id="downloadFonts" label="&downloadFonts.label;" />
</row>
</rows>
</grid>

View File

@ -11,12 +11,3 @@ toolkit.jar:
*+ content/global/printProgress.js (content/printProgress.js)
*+ content/global/printProgress.xul (content/printProgress.xul)
*+ content/global/printUtils.js (content/printUtils.js)
en-US.jar:
+ locale/en-US/global/printdialog.dtd (locale/printdialog.dtd)
+ locale/en-US/global/printjoboptions.dtd (locale/printjoboptions.dtd)
+ locale/en-US/global/printjoboptions.properties (locale/printjoboptions.properties)
+ locale/en-US/global/printPageSetup.dtd (locale/printPageSetup.dtd)
+ locale/en-US/global/printPreview.dtd (locale/printPreview.dtd)
+ locale/en-US/global/printPreviewProgress.dtd (locale/printPreviewProgress.dtd)
+ locale/en-US/global/printProgress.dtd (locale/printProgress.dtd)

View File

@ -37,7 +37,7 @@
#include "nsISupports.idl"
[scriptable, uuid(48E227EC-1897-418f-A40B-C15EA18BBC4A)]
[scriptable, uuid(fa5a871d-29f5-489e-aaa4-c266def52b79)]
interface nsIFormHistory : nsISupports
{
/**
@ -80,6 +80,11 @@ interface nsIFormHistory : nsISupports
*/
void removeAllEntries();
/**
* Returns true if there is no entry that is paired with a name.
*/
boolean nameExists(in AString name);
/**
* Gets whether a name and value pair exists in the form history.
*/

View File

@ -46,7 +46,6 @@
#include "nsIServiceManager.h"
#include "nsIInterfaceRequestor.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsIDocument.h"
#include "nsIDocShellTreeItem.h"
#include "nsIChromeEventHandler.h"
#include "nsPIDOMWindow.h"
@ -57,6 +56,7 @@
#include "nsIDOMDocument.h"
#include "nsIDOMElement.h"
#include "nsIDOMNSHTMLInputElement.h"
#include "nsIDocument.h"
#include "nsIScriptGlobalObject.h"
#include "nsIContent.h"
#include "nsIPresShell.h"
@ -130,7 +130,7 @@ GetScreenOrigin(nsIDOMElement* aElement)
nsIPresShell* presShell = doc->GetShellAt(0);
if (presShell) {
nsPresContext *presContext = presShell->GetPresContext();
nsPresContext* presContext = presShell->GetPresContext();
if (presContext) {
// Get the scale from that Presentation Context
@ -522,15 +522,15 @@ nsFormFillController::Focus(nsIDOMEvent* aEvent)
nsAutoString autocomplete;
input->GetAttribute(NS_LITERAL_STRING("autocomplete"), autocomplete);
if (type.EqualsLiteral("text") && !isReadOnly &&
!autocomplete.LowerCaseEqualsLiteral("off")) {
if (type.Equals(NS_LITERAL_STRING("text")) && !isReadOnly &&
!autocomplete.EqualsIgnoreCase("off")) {
nsCOMPtr<nsIDOMHTMLFormElement> form;
input->GetForm(getter_AddRefs(form));
if (form)
form->GetAttribute(NS_LITERAL_STRING("autocomplete"), autocomplete);
if (!form || !autocomplete.LowerCaseEqualsLiteral("off"))
if (!form || !autocomplete.EqualsIgnoreCase("off"))
StartControllingInput(input);
}
@ -664,7 +664,7 @@ nsFormFillController::Select(nsIDOMEvent* aEvent)
NS_IMETHODIMP
nsFormFillController::Input(nsIDOMEvent* aEvent)
{
if (mSuppressOnInput || !mController || !mFocusedInput)
if (mSuppressOnInput || !mController)
return NS_OK;
return mController->HandleText(PR_FALSE);
@ -817,7 +817,7 @@ nsFormFillController::AddWindowListeners(nsIDOMWindow *aWindow)
return;
nsCOMPtr<nsPIDOMWindow> privateDOMWindow(do_QueryInterface(aWindow));
nsIChromeEventHandler *chromeEventHandler = nsnull;
nsIChromeEventHandler* chromeEventHandler = nsnull;
if (privateDOMWindow)
chromeEventHandler = privateDOMWindow->GetChromeEventHandler();
@ -860,7 +860,7 @@ nsFormFillController::RemoveWindowListeners(nsIDOMWindow *aWindow)
StopControllingInput();
nsCOMPtr<nsPIDOMWindow> privateDOMWindow(do_QueryInterface(aWindow));
nsIChromeEventHandler *chromeEventHandler = nsnull;
nsIChromeEventHandler* chromeEventHandler;
if (privateDOMWindow)
chromeEventHandler = privateDOMWindow->GetChromeEventHandler();

View File

@ -224,6 +224,9 @@ nsFormHistory::GetValueAt(PRUint32 aIndex, nsAString &aValue)
NS_IMETHODIMP
nsFormHistory::AddEntry(const nsAString &aName, const nsAString &aValue)
{
if (!FormHistoryEnabled())
return NS_OK;
nsresult rv = OpenDatabase(); // lazily ensure that the database is open
NS_ENSURE_SUCCESS(rv, rv);
@ -239,99 +242,31 @@ nsFormHistory::RemoveEntryAt(PRUint32 index)
}
NS_IMETHODIMP
nsFormHistory::RemoveEntriesForName(const nsAString & name)
nsFormHistory::EntryExists(const nsAString &aName, const nsAString &aValue, PRBool *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
return EntriesExistInternal(&aName, &aValue, _retval);
}
NS_IMETHODIMP
nsFormHistory::NameExists(const nsAString &aName, PRBool *_retval)
{
return EntriesExistInternal(&aName, nsnull, _retval);
}
NS_IMETHODIMP
nsFormHistory::RemoveEntriesForName(const nsAString &aName)
{
return RemoveEntriesInternal(&aName);
}
NS_IMETHODIMP
nsFormHistory::RemoveAllEntries()
{
nsresult rv = OpenDatabase(); // lazily ensure that the database is open
NS_ENSURE_SUCCESS(rv, rv);
nsresult rv = RemoveEntriesInternal(nsnull);
if (!mTable) return NS_OK;
rv |= Flush();
mdb_err err;
mdb_count count;
err = mTable->GetCount(mEnv, &count);
if (err != 0) return NS_ERROR_FAILURE;
// Begin the batch.
int marker;
err = mTable->StartBatchChangeHint(mEnv, &marker);
NS_ASSERTION(err == 0, "unable to start batch");
if (err != 0) return NS_ERROR_FAILURE;
// XXX from here until end batch, no early returns!
for (mdb_pos pos = count - 1; pos >= 0; --pos) {
nsCOMPtr<nsIMdbRow> row;
err = mTable->PosToRow(mEnv, pos, getter_AddRefs(row));
NS_ASSERTION(err == 0, "unable to get row");
if (err != 0)
break;
NS_ASSERTION(row != nsnull, "no row");
if (! row)
continue;
// Officially cut the row *now*, before notifying any observers:
// that way, any re-entrant calls won't find the row.
err = mTable->CutRow(mEnv, row);
NS_ASSERTION(err == 0, "couldn't cut row");
if (err != 0)
continue;
// possibly avoid leakage
err = row->CutAllColumns(mEnv);
NS_ASSERTION(err == 0, "couldn't cut all columns");
// we'll notify regardless of whether we could successfully
// CutAllColumns or not.
}
// Finish the batch.
err = mTable->EndBatchChangeHint(mEnv, &marker);
NS_ASSERTION(err == 0, "error ending batch");
return (err == 0) ? NS_OK : NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsFormHistory::EntryExists(const nsAString &aName, const nsAString &aValue, PRBool *_retval)
{
// Unfortunately we have to do a brute force search through the database
// because mork didn't bother to implement any indexing functionality
*_retval = PR_FALSE;
nsresult rv = OpenDatabase(); // lazily ensure that the database is open
NS_ENSURE_SUCCESS(rv, rv);
// Get a cursor to iterate through all rows in the database
nsCOMPtr<nsIMdbTableRowCursor> rowCursor;
mdb_err err = mTable->GetTableRowCursor(mEnv, -1, getter_AddRefs(rowCursor));
NS_ENSURE_TRUE(!err, NS_ERROR_FAILURE);
nsCOMPtr<nsIMdbRow> row;
mdb_pos pos;
do {
rowCursor->NextRow(mEnv, getter_AddRefs(row), &pos);
NS_ENSURE_TRUE(row != nsnull, NS_ERROR_FAILURE);
// Check if the name and value combination match this row
nsAutoString name;
GetRowValue(row, kToken_NameColumn, name);
if (Compare(name, aName, nsCaseInsensitiveStringComparator()) == 0) {
nsAutoString value;
GetRowValue(row, kToken_ValueColumn, value);
if (Compare(value, aValue, nsCaseInsensitiveStringComparator()) == 0) {
*_retval = PR_TRUE;
break;
}
}
} while (row);
return NS_OK;
return rv;
}
////////////////////////////////////////////////////////////////////////
@ -400,6 +335,65 @@ nsFormHistory::Notify(nsIContent* aFormNode, nsIDOMWindowInternal* aWindow, nsIU
////////////////////////////////////////////////////////////////////////
//// Database I/O
class SatchelErrorHook : public nsIMdbErrorHook
{
public:
NS_DECL_ISUPPORTS
// nsIMdbErrorHook
NS_IMETHOD OnErrorString(nsIMdbEnv* ev, const char* inAscii);
NS_IMETHOD OnErrorYarn(nsIMdbEnv* ev, const mdbYarn* inYarn);
NS_IMETHOD OnWarningString(nsIMdbEnv* ev, const char* inAscii);
NS_IMETHOD OnWarningYarn(nsIMdbEnv* ev, const mdbYarn* inYarn);
NS_IMETHOD OnAbortHintString(nsIMdbEnv* ev, const char* inAscii);
NS_IMETHOD OnAbortHintYarn(nsIMdbEnv* ev, const mdbYarn* inYarn);
};
// nsIMdbErrorHook has no IID!
NS_IMPL_ISUPPORTS0(SatchelErrorHook)
NS_IMETHODIMP
SatchelErrorHook::OnErrorString(nsIMdbEnv *ev, const char *inAscii)
{
printf("mork error: %s\n", inAscii);
return NS_OK;
}
NS_IMETHODIMP
SatchelErrorHook::OnErrorYarn(nsIMdbEnv *ev, const mdbYarn* inYarn)
{
printf("mork error yarn: %p\n", inYarn);
return NS_OK;
}
NS_IMETHODIMP
SatchelErrorHook::OnWarningString(nsIMdbEnv *ev, const char *inAscii)
{
printf("mork warning: %s\n", inAscii);
return NS_OK;
}
NS_IMETHODIMP
SatchelErrorHook::OnWarningYarn(nsIMdbEnv *ev, const mdbYarn *inYarn)
{
printf("mork warning yarn: %p\n", inYarn);
return NS_OK;
}
NS_IMETHODIMP
SatchelErrorHook::OnAbortHintString(nsIMdbEnv *ev, const char *inAscii)
{
printf("mork abort: %s\n", inAscii);
return NS_OK;
}
NS_IMETHODIMP
SatchelErrorHook::OnAbortHintYarn(nsIMdbEnv *ev, const mdbYarn *inYarn)
{
printf("mork abort yarn: %p\n", inYarn);
return NS_OK;
}
nsresult
nsFormHistory::OpenDatabase()
{
@ -414,8 +408,7 @@ nsFormHistory::OpenDatabase()
// Get an Mdb Factory
static NS_DEFINE_CID(kMorkCID, NS_MORK_CID);
nsCOMPtr<nsIMdbFactoryFactory> mdbFactory =
do_CreateInstance(kMorkCID, &rv);
nsCOMPtr<nsIMdbFactoryFactory> mdbFactory = do_CreateInstance(kMorkCID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
rv = mdbFactory->GetMdbFactory(getter_AddRefs(mMdbFactory));
NS_ENSURE_SUCCESS(rv, rv);
@ -425,6 +418,7 @@ nsFormHistory::OpenDatabase()
NS_ASSERTION(err == 0, "ERROR: Unable to create Form History mdb");
mEnv->SetAutoClear(PR_TRUE);
NS_ENSURE_TRUE(!err, NS_ERROR_FAILURE);
mEnv->SetErrorHook(new SatchelErrorHook());
nsCAutoString filePath;
historyFile->GetNativePath(filePath);
@ -444,9 +438,9 @@ nsFormHistory::OpenDatabase()
/* // TESTING: Add a row to the database
nsAutoString foopy;
foopy.AssignLiteral("foopy");
foopy.AssignWithConversion("foopy");
nsAutoString oogly;
oogly.AssignLiteral("oogly");
oogly.AssignWithConversion("oogly");
AppendRow(foopy, oogly, nsnull);
Flush(); */
@ -539,7 +533,7 @@ nsFormHistory::CreateNewFile(const char *aPath)
// Force a commit now to get it written out.
nsCOMPtr<nsIMdbThumb> thumb;
err = mStore->LargeCommit(mEnv, getter_AddRefs(thumb));
err = mStore->CompressCommit(mEnv, getter_AddRefs(thumb));
NS_ENSURE_TRUE(!err, NS_ERROR_FAILURE);
PRBool done;
@ -601,7 +595,7 @@ nsFormHistory::Flush()
mdb_err err;
nsCOMPtr<nsIMdbThumb> thumb;
err = mStore->LargeCommit(mEnv, getter_AddRefs(thumb));
err = mStore->CompressCommit(mEnv, getter_AddRefs(thumb));
if (err == 0)
err = UseThumb(thumb, nsnull);
@ -847,3 +841,103 @@ nsFormHistory::RowMatch(nsIMdbRow *aRow, const nsAString &aInputName, const nsAS
return PR_FALSE;
}
nsresult
nsFormHistory::EntriesExistInternal(const nsAString *aName, const nsAString *aValue, PRBool *_retval)
{
// Unfortunately we have to do a brute force search through the database
// because mork didn't bother to implement any indexing functionality
*_retval = PR_FALSE;
nsresult rv = OpenDatabase(); // lazily ensure that the database is open
NS_ENSURE_SUCCESS(rv, rv);
// Get a cursor to iterate through all rows in the database
nsCOMPtr<nsIMdbTableRowCursor> rowCursor;
mdb_err err = mTable->GetTableRowCursor(mEnv, -1, getter_AddRefs(rowCursor));
NS_ENSURE_TRUE(!err, NS_ERROR_FAILURE);
nsCOMPtr<nsIMdbRow> row;
mdb_pos pos;
do {
rowCursor->NextRow(mEnv, getter_AddRefs(row), &pos);
if (!row)
break;
// Check if the name and value combination match this row
nsAutoString name;
GetRowValue(row, kToken_NameColumn, name);
if (Compare(name, *aName, nsCaseInsensitiveStringComparator()) == 0) {
nsAutoString value;
GetRowValue(row, kToken_ValueColumn, value);
if (!aValue || Compare(value, *aValue, nsCaseInsensitiveStringComparator()) == 0) {
*_retval = PR_TRUE;
break;
}
}
} while (1);
return NS_OK;
}
nsresult
nsFormHistory::RemoveEntriesInternal(const nsAString *aName)
{
nsresult rv = OpenDatabase(); // lazily ensure that the database is open
NS_ENSURE_SUCCESS(rv, rv);
if (!mTable) return NS_OK;
mdb_err err;
mdb_count count;
nsAutoString name;
err = mTable->GetCount(mEnv, &count);
if (err != 0) return NS_ERROR_FAILURE;
// Begin the batch.
int marker;
err = mTable->StartBatchChangeHint(mEnv, &marker);
NS_ASSERTION(err == 0, "unable to start batch");
if (err != 0) return NS_ERROR_FAILURE;
for (mdb_pos pos = count - 1; pos >= 0; --pos) {
nsCOMPtr<nsIMdbRow> row;
err = mTable->PosToRow(mEnv, pos, getter_AddRefs(row));
NS_ASSERTION(err == 0, "unable to get row");
if (err != 0)
break;
NS_ASSERTION(row != nsnull, "no row");
if (! row)
continue;
// Check if the name matches this row
GetRowValue(row, kToken_NameColumn, name);
if (!aName || Compare(name, *aName, nsCaseInsensitiveStringComparator()) == 0) {
// Officially cut the row *now*, before notifying any observers:
// that way, any re-entrant calls won't find the row.
err = mTable->CutRow(mEnv, row);
NS_ASSERTION(err == 0, "couldn't cut row");
if (err != 0)
continue;
// possibly avoid leakage
err = row->CutAllColumns(mEnv);
NS_ASSERTION(err == 0, "couldn't cut all columns");
// we'll notify regardless of whether we could successfully
// CutAllColumns or not.
}
}
// Finish the batch.
err = mTable->EndBatchChangeHint(mEnv, &marker);
NS_ASSERTION(err == 0, "error ending batch");
return (err == 0) ? NS_OK : NS_ERROR_FAILURE;
}

View File

@ -94,6 +94,10 @@ protected:
PR_STATIC_CALLBACK(int) SortComparison(const void *v1, const void *v2, void *closureVoid);
nsresult EntriesExistInternal(const nsAString *aName, const nsAString *aValue, PRBool *_retval);
nsresult RemoveEntriesInternal(const nsAString *aName);
static PRBool FormHistoryEnabled();
static nsFormHistory *gFormHistory;

View File

@ -82,9 +82,9 @@ var view = {
if (!(index in gPrefView))
return "";
var value = gPrefView[index][col.id];
var value = gPrefView[index][col];
switch (col.id) {
switch (col) {
case "lockCol":
return gLockStrs[value];
case "typeCol":
@ -98,26 +98,27 @@ var view = {
if (index in gPrefView)
prop.AppendElement(gLockAtoms[gPrefView[index].lockCol]);
},
getColumnProperties : function(col, prop) {},
getColumnProperties : function(col, elt, prop) {},
treebox : null,
selection : null,
isContainer : function(index) { return false; },
isContainerOpen : function(index) { return false; },
isContainerEmpty : function(index) { return false; },
isSorted : function() { return true; },
canDrop : function(index, orientation) { return false; },
drop : function(row, orientation) {},
canDropOn : function(index) { return false; },
canDropBeforeAfter : function(index, before) { return false; },
drop : function(row,orientation) {},
setTree : function(out) { this.treebox = out; },
getParentIndex: function(rowIndex) { return -1; },
hasNextSibling: function(rowIndex, afterIndex) { return false; },
getLevel: function(index) { return 1; },
getImageSrc: function(row, col) { return ""; },
getImageSrc: function(row, colID) { return ""; },
toggleOpenState : function(index) {},
cycleHeader: function(col) {
cycleHeader: function(colID, elt) {
var index = this.selection.currentIndex;
if (col.id == gSortedColumn)
if (colID == gSortedColumn)
gSortDirection = -gSortDirection;
if (col.id == gSortedColumn && gFastIndex == gPrefArray.length) {
if (colID == gSortedColumn && gFastIndex == gPrefArray.length) {
gPrefArray.reverse();
if (gPrefView != gPrefArray)
gPrefView.reverse();
@ -134,18 +135,18 @@ var view = {
}
var old = document.getElementById(gSortedColumn);
old.setAttribute("sortDirection", "");
gPrefArray.sort(gSortFunction = gSortFunctions[col.id]);
gPrefArray.sort(gSortFunction = gSortFunctions[colID]);
if (gPrefView != gPrefArray) {
if (col.id == gSortedColumn)
if (colID == gSortedColumn)
gPrefView.reverse();
else
gPrefView.sort(gSortFunction);
}
gSortedColumn = col.id;
gSortedColumn = colID;
if (pref)
index = getIndexOfPref(pref);
}
col.element.setAttribute("sortDirection", gSortDirection > 0 ? "ascending" : "descending");
elt.setAttribute("sortDirection", gSortDirection > 0 ? "ascending" : "descending");
this.treebox.invalidate();
if (index >= 0) {
this.selection.select(index);
@ -154,13 +155,12 @@ var view = {
gFastIndex = gPrefArray.length;
},
selectionChanged : function() {},
cycleCell: function(row, col) {},
isEditable: function(row, col) {return false; },
setCellValue: function(row, col, value) {},
setCellText: function(row, col, value) {},
cycleCell: function(row, colID) {},
isEditable: function(row, colID) {return false; },
setCellText: function(row, colID, value) {},
performAction: function(action) {},
performActionOnRow: function(action, row) {},
performActionOnCell: function(action, row, col) {},
performActionOnCell: function(action, row, colID) {},
isSeparator: function(index) {return false; }
};
@ -335,13 +335,13 @@ function onConfigLoad()
}
var descending = document.getElementsByAttribute("sortDirection", "descending");
if (descending.item(0)) {
if (descending.length) {
gSortedColumn = descending[0].id;
gSortDirection = -1;
}
else {
var ascending = document.getElementsByAttribute("sortDirection", "ascending");
if (ascending.item(0))
if (ascending.length)
gSortedColumn = ascending[0].id;
else
document.getElementById(gSortedColumn).setAttribute("sortDirection", "ascending");

View File

@ -1,7 +1,3 @@
toolkit.jar:
*+ content/global/config.xul (content/config.xul)
*+ content/global/config.js (content/config.js)
en-US.jar:
*+ locale/en-US/global/config.properties (locale/config.properties)
*+ locale/en-US/global/config.dtd (locale/config.dtd)

View File

@ -75,6 +75,8 @@ function onLoadViewPartialSource()
document.getElementById("menu_highlightSyntax").setAttribute("hidden", "true");
}
initFindBar();
// disable menu items that don't work since the selection is munged and
// the editor doesn't work for MathML
document.getElementById('cmd_savePage').setAttribute('disabled', 'true');
@ -89,6 +91,11 @@ function onLoadViewPartialSource()
window._content.focus();
}
function onUnloadViewPartialSource()
{
uninitFindBar();
}
////////////////////////////////////////////////////////////////////////////////
// view-source of a selection with the special effect of remapping the selection
// to the underlying view-source output

View File

@ -24,6 +24,7 @@
# Doron Rosenberg <doronr@naboonline.com>
# Roger B. Sidje <rbs@maths.uq.edu.au>
# Pierre Chanial <p_ch@verizon.net>
# Blake Ross <blake@cs.stanford.edu>
#
# 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
@ -41,6 +42,7 @@
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://global/content/viewSource.css" type="text/css"?>
<?xml-stylesheet href="chrome://global/skin/findBar.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
<?xul-overlay href="chrome://global/content/charsetOverlay.xul"?>
@ -49,11 +51,17 @@
%brandDTD;
<!ENTITY % sourceDTD SYSTEM "chrome://global/locale/viewSource.dtd" >
%sourceDTD;
<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd" >
%browserDTD;
<!ENTITY % findDTD SYSTEM "chrome://global/locale/finddialog.dtd" >
%findDTD;
]>
<window id="main-window"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="onLoadViewPartialSource();"
onunload="onUnloadViewPartialSource();"
contenttitlesetting="false"
title="&mainWindow.title;"
titlemodifier="&mainWindow.titlemodifier;"
@ -65,13 +73,13 @@
persist="screenX screenY width height sizemode">
<script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>
<script type="application/x-javascript" src="chrome://global/content/findUtils.js"/>
<script type="application/x-javascript" src="chrome://global/content/findBar.js"/>
<script type="application/x-javascript" src="chrome://global/content/printUtils.js"/>
<script type="application/x-javascript" src="chrome://global/content/viewSource.js"/>
<script type="application/x-javascript" src="chrome://global/content/viewPartialSource.js"/>
<script type="application/x-javascript" src="chrome://global/content/viewZoomOverlay.js"/>
<stringbundle id="findBundle" src="chrome://global/locale/finddialog.properties"/>
<stringbundle id="bundle_findBar" src="chrome://browser/locale/browser.properties"/>
<command id="cmd_savePage" disabled="true" oncommand="ViewSourceSavePage();"/>
<command id="cmd_print" oncommand="PrintUtils.print();"/>
@ -79,9 +87,9 @@
<command id="cmd_pagesetup" oncommand="PrintUtils.showPageSetup();"/>
<command id="cmd_close" oncommand="window.close();"/>
<commandset id="editMenuCommands"/>
<command id="cmd_find" oncommand="getBrowser().find();"/>
<command id="cmd_findAgain" oncommand="getBrowser().findAgain()"/>
<command id="cmd_findPrevious" oncommand="getBrowser().findPrevious()"/>
<command id="cmd_find" oncommand="onFindCmd();"/>
<command id="cmd_findAgain" oncommand="onFindAgainCmd();"/>
<command id="cmd_findPrevious" oncommand="onFindPreviousCmd();"/>
<command id="cmd_goToLine" oncommand="ViewSourceGoToLine();" disabled="true"/>
<command id="cmd_highlightSyntax" oncommand="highlightSyntax();"/>
<command id="cmd_wrapLongLines" oncommand="wrapLongLines()"/>
@ -96,6 +104,7 @@
<key keycode="VK_ESCAPE" command="cmd_close"/>
<key id="key_textZoomEnlarge" key="&textEnlarge.commandkey;" command="cmd_textZoomEnlarge" modifiers="accel"/>
<key id="key_textZoomEnlarge2" key="&textEnlarge.commandkey2;" command="cmd_textZoomEnlarge" modifiers="accel"/>
<key id="key_textZoomReduce" key="&textReduce.commandkey;" command="cmd_textZoomReduce" modifiers="accel"/>
<key id="key_textZoomReset" key="&textReset.commandkey;" oncommand="ZoomManager.prototype.getInstance().reset();" modifiers="accel"/>
</keyset>
@ -112,7 +121,7 @@
<toolbox id="viewSource-toolbox">
<menubar id="viewSource-main-menubar">
<menu id="file_menu" label="&fileMenu.label;" accesskey="&fileMenu.accesskey;">
<menu label="&fileMenu.label;" accesskey="&fileMenu.accesskey;">
<menupopup id="filemenu-popup">
<menuitem key="key_savePage" command="cmd_savePage"
label="&savePageCmd.label;" accesskey="&savePageCmd.accesskey;"/>
@ -129,7 +138,7 @@
</menu>
<menu id="menu_edit">
<menupopup id="editmenu-popup">
<menupopup>
<menuitem id="menu_undo"/>
<menuitem id="menu_redo"/>
<menuseparator/>
@ -145,8 +154,8 @@
</menupopup>
</menu>
<menu id="menu_view" label="&viewMenu.label;" accesskey="&viewMenu.accesskey;">
<menupopup id="viewmenu-popup">
<menu label="&viewMenu.label;" accesskey="&viewMenu.accesskey;">
<menupopup>
<menuitem id="menu_textEnlarge" command="cmd_textZoomEnlarge"
label="&menu_textEnlarge.label;" accesskey="&menu_textEnlarge.accesskey;"
key="key_textZoomEnlarge"/>
@ -170,6 +179,8 @@
<browser id="content" type="content-primary" name="content" src="about:blank" flex="1"
context="viewSourceContextMenu"/>
#include ../../typeaheadfind/content/findBar.inc
</vbox>
</window>

View File

@ -52,6 +52,16 @@ function onLoadViewSource()
{
viewSource(window.arguments[0]);
document.commandDispatcher.focusedWindow = content;
#ifdef MOZ_PHOENIX
initFindBar();
#endif
}
function onUnloadViewSource()
{
#ifdef MOZ_PHOENIX
uninitFindBar();
#endif
}
function getBrowser()
@ -136,7 +146,7 @@ function viewSource(url)
// This allows the content to be fetched from the cache (if
// possible) rather than the network...
//
PageLoader.loadPage(arg, pageLoaderIface.DISPLAY_AS_SOURCE);
PageLoader.LoadPage(arg, pageLoaderIface.DISPLAY_AS_SOURCE);
// The content was successfully loaded from the page cookie.
loadFromURL = false;
}
@ -558,24 +568,24 @@ function highlightSyntax()
gPrefs.setBoolPref("view_source.syntax_highlight", highlightSyntax);
var PageLoader = getBrowser().webNavigation.QueryInterface(pageLoaderIface);
PageLoader.loadPage(PageLoader.currentDescriptor, pageLoaderIface.DISPLAY_NORMAL);
PageLoader.LoadPage(PageLoader.currentDescriptor, pageLoaderIface.DISPLAY_NORMAL);
}
// Fix for bug 136322: this function overrides the function in
// browser.js to call PageLoader.loadPage() instead of BrowserReloadWithFlags()
// browser.js to call PageLoader.LoadPage() instead of BrowserReloadWithFlags()
function BrowserSetForcedCharacterSet(aCharset)
{
var docCharset = getBrowser().docShell.QueryInterface(
Components.interfaces.nsIDocCharset);
docCharset.charset = aCharset;
var PageLoader = getBrowser().webNavigation.QueryInterface(pageLoaderIface);
PageLoader.loadPage(PageLoader.currentDescriptor, pageLoaderIface.DISPLAY_NORMAL);
PageLoader.LoadPage(PageLoader.currentDescriptor, pageLoaderIface.DISPLAY_NORMAL);
}
// fix for bug #229503
// we need to define BrowserSetForcedDetector() so that we can
// change auto-detect options in the "View | Character Encoding" menu.
// As with BrowserSetForcedCharacterSet(), call PageLoader.loadPage()
// As with BrowserSetForcedCharacterSet(), call PageLoader.LoadPage()
// instead of BrowserReloadWithFlags()
function BrowserSetForcedDetector(doReload)
{
@ -583,7 +593,7 @@ function BrowserSetForcedDetector(doReload)
if (doReload)
{
var PageLoader = getBrowser().webNavigation.QueryInterface(pageLoaderIface);
PageLoader.loadPage(PageLoader.currentDescriptor, pageLoaderIface.DISPLAY_NORMAL);
PageLoader.LoadPage(PageLoader.currentDescriptor, pageLoaderIface.DISPLAY_NORMAL);
}
}

View File

@ -24,6 +24,7 @@
# Doron Rosenberg <doronr@naboonline.com>
# Roger B. Sidje <rbs@maths.uq.edu.au>
# Pierre Chanial <p_ch@verizon.net>
# Blake Ross <blake@cs.stanford.edu>
#
# 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
@ -41,6 +42,7 @@
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://global/content/viewSource.css" type="text/css"?>
<?xml-stylesheet href="chrome://global/skin/findBar.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
<?xul-overlay href="chrome://global/content/charsetOverlay.xul"?>
@ -49,11 +51,18 @@
%brandDTD;
<!ENTITY % sourceDTD SYSTEM "chrome://global/locale/viewSource.dtd" >
%sourceDTD;
#ifdef MOZ_PHOENIX
<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd" >
%browserDTD;
#endif
<!ENTITY % findDTD SYSTEM "chrome://global/locale/finddialog.dtd" >
%findDTD;
]>
<window id="main-window"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="onLoadViewSource();"
onunload="onUnloadViewSource();"
contenttitlesetting="true"
title="&mainWindow.title;"
titlemodifier="&mainWindow.titlemodifier;"
@ -65,23 +74,35 @@
persist="screenX screenY width height sizemode">
<script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>
<script type="application/x-javascript" src="chrome://global/content/findUtils.js"/>
<script type="application/x-javascript" src="chrome://global/content/printUtils.js"/>
<script type="application/x-javascript" src="chrome://global/content/viewSource.js"/>
<script type="application/x-javascript" src="chrome://global/content/viewZoomOverlay.js"/>
<stringbundle id="findBundle" src="chrome://global/locale/finddialog.properties"/>
#ifdef MOZ_PHOENIX
<script type="application/x-javascript" src="chrome://global/content/findBar.js"/>
<script type="application/x-javascript" src="chrome://browser/content/contentAreaUtils.js"/>
<stringbundle id="bundle_findBar" src="chrome://browser/locale/browser.properties"/>
#else
<script type="application/x-javascript" src="chrome://global/content/findUtils.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaUtils.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/utilityOverlay.js"/>
#endif
<stringbundle id="viewSourceBundle" src="chrome://global/locale/viewSource.properties"/>
<command id="cmd_savePage" disabled="true" oncommand="ViewSourceSavePage();"/>
<command id="cmd_savePage" oncommand="ViewSourceSavePage();"/>
<command id="cmd_print" oncommand="PrintUtils.print();"/>
<command id="cmd_printpreview" oncommand="PrintUtils.printPreview(onEnterPP, onExitPP);"/>
<command id="cmd_pagesetup" oncommand="PrintUtils.showPageSetup();"/>
<command id="cmd_close" oncommand="window.close();"/>
<commandset id="editMenuCommands"/>
#ifdef MOZ_PHOENIX
<command id="cmd_find" oncommand="onFindCmd();"/>
<command id="cmd_findAgain" oncommand="onFindAgainCmd();"/>
<command id="cmd_findPrevious" oncommand="onFindPreviousCmd();"/>
#else
<command id="cmd_find" oncommand="getBrowser().find();"/>
<command id="cmd_findAgain" oncommand="getBrowser().findAgain()"/>
<command id="cmd_findPrevious" oncommand="getBrowser().findPrevious()"/>
#endif
<command id="cmd_goToLine" oncommand="ViewSourceGoToLine();" disabled="true"/>
<command id="cmd_highlightSyntax" oncommand="highlightSyntax();"/>
<command id="cmd_wrapLongLines" oncommand="wrapLongLines()"/>
@ -99,6 +120,13 @@
<key id="key_textZoomEnlarge2" key="&textEnlarge.commandkey2;" command="cmd_textZoomEnlarge" modifiers="accel"/>
<key id="key_textZoomReduce" key="&textReduce.commandkey;" command="cmd_textZoomReduce" modifiers="accel"/>
<key id="key_textZoomReset" key="&textReset.commandkey;" oncommand="ZoomManager.prototype.getInstance().reset();" modifiers="accel"/>
#ifdef MOZ_PHOENIX
<key id="key_find" key="&findOnCmd.commandkey;" command="cmd_find" modifiers="accel"/>
<key id="key_findAgain" key="&findAgainCmd.commandkey;" command="cmd_findAgain" modifiers="accel"/>
<key id="key_findPrevious" key="&findAgainCmd.commandkey;" command="cmd_findPrevious" modifiers="accel,shift"/>
<key keycode="&findAgainCmd.commandkey2;" command="cmd_findAgain"/>
<key keycode="&findAgainCmd.commandkey2;" command="cmd_findPrevious" modifiers="shift"/>
#endif
</keyset>
<popup id="viewSourceContextMenu">
@ -113,7 +141,7 @@
<toolbox id="viewSource-toolbox">
<menubar id="viewSource-main-menubar">
<menu id="menu_file" label="&fileMenu.label;" accesskey="&fileMenu.accesskey;">
<menu label="&fileMenu.label;" accesskey="&fileMenu.accesskey;">
<menupopup id="filemenu-popup">
<menuitem key="key_savePage" command="cmd_savePage"
label="&savePageCmd.label;" accesskey="&savePageCmd.accesskey;"/>
@ -130,7 +158,7 @@
</menu>
<menu id="menu_edit">
<menupopup id="editmenu-popup">
<menupopup>
<menuitem id="menu_undo"/>
<menuitem id="menu_redo"/>
<menuseparator/>
@ -149,8 +177,8 @@
</menupopup>
</menu>
<menu id="menu_view" label="&viewMenu.label;" accesskey="&viewMenu.accesskey;">
<menupopup id="viewmenu-popup">
<menu label="&viewMenu.label;" accesskey="&viewMenu.accesskey;">
<menupopup>
<menuitem id="menu_textEnlarge" command="cmd_textZoomEnlarge"
label="&menu_textEnlarge.label;" accesskey="&menu_textEnlarge.accesskey;"
key="key_textZoomEnlarge"/>
@ -173,6 +201,9 @@
<browser id="content" type="content-primary" name="content" src="about:blank" flex="1"
context="viewSourceContextMenu"/>
#ifdef MOZ_PHOENIX
#include ../../typeaheadfind/content/findBar.inc
#endif
</vbox>

View File

@ -4,7 +4,3 @@ toolkit.jar:
* content/global/viewSource.xul (content/viewSource.xul)
* content/global/viewPartialSource.js (content/viewPartialSource.js)
* content/global/viewPartialSource.xul (content/viewPartialSource.xul)
en-US.jar:
locale/en-US/global/viewSource.dtd (locale/viewSource.dtd)
locale/en-US/global/viewSource.properties (locale/viewSource.properties)

View File

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
%brandDTD;
<!ENTITY % licenseDTD SYSTEM "chrome://global/locale/license.dtd" >
%licenseDTD;
]>
<!--
- The contents of this file are subject to the Netscape Public
- License Version 1.1 (the "License"); you may not use this file
- except in compliance with the License. You may obtain a copy of
- the License at http://www.mozilla.org/NPL/
-
- Software distributed under the License is distributed on an "AS
- IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- implied. See the License for the specific language governing
- rights and limitations under the License.
-
- The Original Code is Mozilla Communicator client code, released
- March 31, 1998.
-
- The Initial Developer of the Original Code is Netscape
- Communications Corporation. Portions created by Netscape are
- Copyright (C) 1998-1999 Netscape Communications Corporation. All
- Rights Reserved.
-
- Contributor(s):
- Henrik Gemal <mozilla@gemal.dk>
- Daniel Veditz <dveditz@netscape.com>
- Alexey Chernyak <alexeyc@bigfoot.com>
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>About:</title>
<style type="text/css">
table {
margin: auto;
text-align: center;
}
img {
border: 0;
}
p {
font-size: smaller;
}
h1 {
margin: 0;
}
:link {
color: #00e;
}
:visited {
color: #551a8b;
}
:link:active, :visited:active {
color: #f00;
}
</style>
</head>
<body>
<div id="mozinfo" align="center">
<a href="http://www.mozilla.org/">
<img src="chrome://browser/content/about.png" alt="&brandShortName;"/></a>
<h1>
#expand <a id="mozlink" href="&releaseURL;">&brandShortName; __MOZ_APP_VERSION__</a>
</h1>
<script type="application/x-javascript">
// using try..catch to handle empty useragents and other cases where the regex fails to apply
try {
document.getElementById("mozinfo").appendChild(document.createTextNode(navigator.userAgent));
}
catch (e) {}
</script>
</div>
<hr />
<ul>
<li>Copyright &copy; 1998-2004 &license.part1; <a href="about:credits">&license.contrib;</a>
&license.part2;
<a href="chrome://global/content/MPL-1.1.html">Mozilla Public License</a>
&license.and; <a href="chrome://global/content/NPL-1.1.html">Netscape Public License</a>&license.part3;
</li>
<li>Portions of this software are copyright &copy; 1994 The Regents of the
University of California. All Rights Reserved.</li>
<li>This software may contain portions that are copyright &copy; 1998-2002
<a href="http://www.supportsoft.com/">SupportSoft, Inc.</a> All Rights Reserved.
</li>
</ul>
<p>
U.S. GOVERNMENT END USERS. The Software is a &quot;commercial
item,&quot; as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting
of &quot;commercial computer software&quot; and &quot;commercial computer software
documentation,&quot; as such terms are used in 48 C.F.R. 12.212 (Sept. 1995).
Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4
(June 1995), all U.S. Government End Users acquire the Software with only
those rights set forth herein.
</p>
</body>
</html>

View File

@ -0,0 +1,18 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!-- list all the packages being supplied by this jar -->
<RDF:Seq about="urn:mozilla:package:root">
<RDF:li resource="urn:mozilla:package:global-platform"/>
</RDF:Seq>
<!-- package information -->
<RDF:Description about="urn:mozilla:package:global-platform"
chrome:displayName="Platform Specific"
chrome:author="mozilla.org"
chrome:name="global-platform"
#expand chrome:localeVersion="__MOZILLA_LOCALE_VERSION__"
chrome:platformPackage="true">
</RDF:Description>
</RDF:RDF>

View File

@ -0,0 +1,18 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!-- list all the packages being supplied by this jar -->
<RDF:Seq about="urn:mozilla:package:root">
<RDF:li resource="urn:mozilla:package:global-region"/>
</RDF:Seq>
<!-- package information -->
<RDF:Description about="urn:mozilla:package:global-region"
chrome:displayName="US Regional Contents"
chrome:author="mozilla.org"
chrome:name="global-region"
#expand chrome:localeVersion="__MOZILLA_REGION_VERSION__">
</RDF:Description>
</RDF:RDF>

View File

@ -0,0 +1,18 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!-- list all the packages being supplied by this jar -->
<RDF:Seq about="urn:mozilla:package:root">
<RDF:li resource="urn:mozilla:package:global"/>
</RDF:Seq>
<!-- package information -->
<RDF:Description about="urn:mozilla:package:global"
chrome:displayName="Toolkit"
chrome:author="mozilla.org"
chrome:name="global"
#expand chrome:localeVersion="__MOZILLA_LOCALE_VERSION__"
chrome:skinVersion="1.5">
</RDF:Description>
</RDF:RDF>

View File

@ -46,7 +46,7 @@ include $(DEPTH)/config/autoconf.mk
# you don't understand what this means, talk to bsmedberg before
# altering this makefile.
AB_CD = en-US
AB_CD = $(MOZ_UI_LOCALE)
DEFINES += -DAB_CD=$(AB_CD)

View File

@ -0,0 +1,30 @@
ast-ES
ca-AD
cs-CZ
da-DK
de-DE
el-GR
en-GB
es-AR
es-ES
fi-FI
fr-FR
ga-IE
he-IL
hu-HU
it-IT
ko-KR
ja-JP
ja-JPM
nb-NO
nl-NL
pl-PL
pt-BR
ro-RO
ru-RU
sl-SI
sq-AL
sv-SE
tr-TR
zh-CN
zh-TW

View File

@ -0,0 +1,11 @@
jump = Jump
press = Press
check = Check
uncheck = Uncheck
select = Select
open = Open
close = Close
switch = Switch
click = Click
collapse= Collapse
expand = Expand

View File

@ -0,0 +1,40 @@
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
malformedURI=The URL is not valid and cannot be loaded.
fileNotFound=The file %S cannot be found. Please check the location and try again.
dnsNotFound=%S could not be found. Please check the name and try again.
protocolNotFound=%S is not a registered protocol.
connectionFailure=The connection was refused when attempting to contact %S.
netInterrupt=The connection to %S has terminated unexpectedly. Some data may have been transferred.
netTimeout=The operation timed out when attempting to contact %S.
redirectLoop=Redirection limit for this URL exceeded. Unable to load the requested page. This may be caused by cookies that are blocked.
repost=The page you are trying to view contains POSTDATA that has expired from cache. If you resend the data, any action the form carried out (such as a search or online purchase) will be repeated. To resend the data, click OK. Otherwise, click Cancel.
repostConfirm=The page you are trying to view contains POSTDATA. If you resend the data, any action the form carried out (such as a search or online purchase) will be repeated. To resend the data, click OK. Otherwise, click Cancel.
unknownSocketType=This document cannot be displayed unless you install the Personal Security Manager (PSM). Download and install PSM and try again, or contact your system administrator.
netReset=The document contains no data.
netOffline=This document cannot be displayed while offline. To go online, uncheck Work Offline from the File menu.
isprinting=The document cannot change while Printing or in Print Preview.
deniedPortAccess=Access to the port number given has been disabled for security reasons.
proxyResolveFailure=The proxy server you have configured could not be found. Please check your proxy settings and try again.
proxyConnectFailure=The connection was refused when attempting to contact the proxy server you have configured. Please check your proxy settings and try again.
externalProtocolTitle=External Protocol Request
externalProtocolPrompt=An external application must be launched to handle %1$S: links. Requested link:\n\n\n%2$S\n\n\nIf you were not expecting this request it may be an attempt to exploit a weakness in that other program. Cancel this request unless you are sure it is not malicious.\n
externalProtocolChkMsg=Remember my choice for all links of this type.
externalProtocolLaunchBtn=Launch application

View File

@ -0,0 +1,130 @@
##
## The contents of this file are subject to the Netscape Public
## License Version 1.1 (the "License"); you may not use this file
## except in compliance with the License. You may obtain a copy of
## the License at http://www.mozilla.org/NPL/
##
## Software distributed under the License is distributed on an "AS
## IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
## implied. See the License for the specific language governing
## rights and limitations under the License.
##
## The Original Code is mozilla.org code.
##
## The Initial Developer of the Original Code is Netscape
## Communications Corporation. Portions created by Netscape are
## Copyright (C) 1999 Netscape Communications Corporation. All
## Rights Reserved.
##
## Contributor(s):
## Rule of this file:
## 1. key should always be in lower case ascii so we can do case insensitive
## comparison in the code faster.
## Format of this file:
## charset_name.title = a_title - specifies the human readable title for
## this charset
us-ascii.title = English (US-ASCII)
iso-8859-1.title = Western (ISO-8859-1)
iso-8859-2.title = Central European (ISO-8859-2)
iso-8859-3.title = South European (ISO-8859-3)
iso-8859-4.title = Baltic (ISO-8859-4)
iso-8859-9.title = Turkish (ISO-8859-9)
iso-8859-10.title = Nordic (ISO-8859-10)
iso-8859-13.title = Baltic (ISO-8859-13)
iso-8859-14.title = Celtic (ISO-8859-14)
iso-8859-15.title = Western (ISO-8859-15)
iso-8859-16.title = Romanian (ISO-8859-16)
windows-1250.title = Central European (Windows-1250)
windows-1252.title = Western (Windows-1252)
windows-1254.title = Turkish (Windows-1254)
windows-1257.title = Baltic (Windows-1257)
x-mac-roman.title = Western (MacRoman)
x-mac-ce.title = Central European (MacCE)
x-mac-turkish.title = Turkish (MacTurkish)
x-mac-croatian.title = Croatian (MacCroatian)
x-mac-romanian.title = Romanian (MacRomanian)
x-mac-icelandic.title = Icelandic (MacIcelandic)
iso-2022-jp.title = Japanese (ISO-2022-JP)
shift_jis.title = Japanese (Shift_JIS)
euc-jp.title = Japanese (EUC-JP)
big5.title = Chinese Traditional (Big5)
big5-hkscs.title = Chinese Traditional (Big5-HKSCS)
x-euc-tw.title = Chinese Traditional (EUC-TW)
gb2312.title = Chinese Simplified (GB2312)
hz-gb-2312.title = Chinese Simplified (HZ)
x-gbk.title = Chinese Simplified (GBK)
iso-2022-cn.title = Chinese Simplified (ISO-2022-CN)
euc-kr.title = Korean (EUC-KR)
x-johab.title = Korean (JOHAB)
x-windows-949.title = Korean (UHC)
iso-2022-kr.title = Korean (ISO-2022-KR)
utf-7.title = Unicode (UTF-7)
utf-8.title = Unicode (UTF-8)
utf-16.title = Unicode (UTF-16)
utf-16le.title = Unicode (UTF-16 Little Endian)
utf-16be.title = Unicode (UTF-16 Big Endian)
utf-32le.title = Unicode (UTF-32 Little Endian)
utf-32be.title = Unicode (UTF-32 Big Endian)
iso-8859-5.title = Cyrillic (ISO-8859-5)
iso-ir-111.title = Cyrillic (ISO-IR-111)
windows-1251.title = Cyrillic (Windows-1251)
x-mac-cyrillic.title = Cyrillic (MacCyrillic)
x-mac-ukrainian.title = Cyrillic/Ukrainian (MacUkrainian)
koi8-r.title = Cyrillic (KOI8-R)
koi8-u.title = Cyrillic/Ukrainian (KOI8-U)
iso-8859-7.title = Greek (ISO-8859-7)
windows-1253.title = Greek (Windows-1253)
x-mac-greek.title = Greek (MacGreek)
windows-1258.title = Vietnamese (Windows-1258)
x-viet-tcvn5712.title = Vietnamese (TCVN)
viscii.title = Vietnamese (VISCII)
x-viet-vps.title = Vietnamese (VPS)
geostd8.title = Georgian (GEOSTD8)
tis-620.title = Thai (TIS-620)
iso-8859-11.title = Thai (ISO-8859-11)
windows-874.title = Thai (Windows-874)
ibm874.title = Thai (IBM-874)
armscii-8.title = Armenian (ARMSCII-8)
iso-8859-6.title = Arabic (ISO-8859-6)
iso-8859-6-i.title = Arabic (ISO-8859-6-I)
iso-8859-6-e.title = Arabic (ISO-8859-6-E)
iso-8859-8.title = Hebrew Visual (ISO-8859-8)
iso-8859-8-i.title = Hebrew (ISO-8859-8-I)
iso-8859-8-e.title = Hebrew (ISO-8859-8-E)
windows-1255.title = Hebrew (Windows-1255)
windows-1256.title = Arabic (Windows-1256)
x-user-defined.title = User Defined
ibm866.title = Cyrillic/Russian (CP-866)
ibm850.title = Western (IBM-850)
ibm852.title = Central European (IBM-852)
ibm855.title = Cyrillic (IBM-855)
ibm857.title = Turkish (IBM-857)
ibm862.title = Hebrew (IBM-862)
ibm864.title = Arabic (IBM-864)
ibm864i.title = Arabic (IBM-864-I)
gb18030.title = Chinese Simplified (GB18030)
x-mac-arabic.title = Arabic (MacArabic)
x-iso-8859-6-8-x.title = Arabic (Langbox ISO-8859-6.8x)
x-iso-8859-6-16.title = Arabic (Langbox ISO-8859-6.16)
x-mac-farsi.title = Farsi (MacFarsi)
x-mac-hebrew.title = Hebrew (MacHebrew)
x-mac-devanagari.title = Hindi (MacDevanagari)
x-mac-gujarati.title = Gujarati (MacGujarati)
x-mac-gurmukhi.title = Gurmukhi (MacGurmukhi)
x-sun-unicode-india-0.title = Hindi (SunDevanagari)
chardet.off.title = (Off)
chardet.alis_charset_detector.title = All
chardet.universal_charset_detector.title = Universal
chardet.ja_parallel_state_machine.title = Japanese
chardet.ko_parallel_state_machine.title = Korean
chardet.zhtw_parallel_state_machine.title = Traditional Chinese
chardet.zhcn_parallel_state_machine.title = Simplified Chinese
chardet.zh_parallel_state_machine.title = Chinese
chardet.cjk_parallel_state_machine.title = East Asian
chardet.ruprob.title = Russian
chardet.ukprob.title = Ukrainian

View File

@ -0,0 +1,38 @@
# ***** 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 css.properties.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by the Initial Developer are Copyright
# (C) 2002 Netscape Communications Corporation. All Rights Reserved.
#
# Contributor(s):
# L. David Baron <dbaron@dbaron.org> (original author)
#
# 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 *****
MimeNotCss=The stylesheet %1$S was not loaded because its MIME type, "%2$S", is not "text/css".
MimeNotCssWarn=The stylesheet %1$S was loaded as CSS even though its MIME type, "%2$S", is not "text/css".

View File

@ -0,0 +1,6 @@
JSURLLoadBlockedWarning=Attempt to load a javascript: URL from one host\nin a window displaying content from another host\nwas blocked by the security manager.
WindowCloseBlockedWarning=Scripts may not close windows that were not opened by script.
OnBeforeUnloadPreMessage=Are you sure you want to navigate away from this page?
OnBeforeUnloadPostMessage=Press OK to continue, or Cancel to stay on the current page.
DocumentAllUsed=Non-standard document.all property was used. Use W3C standard document.getElementById() instead.
GlobalScopeElementReference=Element referenced by ID/NAME in the global scope. Use W3C standard document.getElementById() instead.

View File

@ -0,0 +1,19 @@
# 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 The Mozilla Foundation.
# Portions created by the Foundation are Copyright (C) 1998-2003
# The Mozilla Foundation. All Rights Reserved.
#
# Contributor(s):
16389=An unknown error has occurred (%1$S)

View File

@ -0,0 +1,26 @@
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
Reset=Reset
Submit=Submit Query
Browse=Browse...
FileUpload=File Upload
IsIndexPrompt=This is a searchable index. Enter search keywords:
ForgotPostWarning=Form contains enctype=%S, but does not contain method=post. Submitting normally with method=GET and no enctype instead.
ForgotFileEnctypeWarning=Form contains a file input, but is missing method=POST and enctype=multipart/form-data on the form. The file will not be sent.

View File

@ -0,0 +1,39 @@
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Blake Ross <blakeross@telocity.com> (Original Author)
# Morten Nilsen <morten@nilsen.com>
# Christian Biesinger <cbiesinger@web.de>
#LOCALIZATION NOTE (ImageTitleWithDimensionsAndFile): first %S is filename, second %S is type, third %S is width and fourth %S is height
#LOCALIZATION NOTE (ImageTitleWithoutDimensions): first %S is filename, second %S is type
#LOCALIZATION NOTE (ImageTitleWithDimensions): first %S is type, second %S is width and third %S is height
#LOCALIZATION NOTE (ImageTitleWithNeitherDimensionsNorFile): first %S is type
#LOCALIZATION NOTE (MediaTitleWithFile): first %S is filename, second %S is type
#LOCALIZATION NOTE (MediaTitleWithNoInfo): first %S is type
ImageTitleWithDimensionsAndFile=%S (%S Image, %Sx%S pixels)
ImageTitleWithoutDimensions=%S (%S Image)
ImageTitleWithDimensions=(%S Image, %Sx%S pixels)
ImageTitleWithNeitherDimensionsNorFile=(%S Image)
MediaTitleWithFile=%S (%S Object)
MediaTitleWithNoInfo=(%S Object)
InvalidImage=The image \u201c%S\u201d cannot be displayed, because it contains errors.
ScaledImage=Scaled (%S%%)
TitleWithStatus=%S - %S

View File

@ -0,0 +1,53 @@
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 2001 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
# Map Expat error codes to error strings
1 = out of memory
2 = syntax error
3 = no element found
4 = not well-formed
5 = unclosed token
6 = unclosed token
7 = mismatched tag
8 = duplicate attribute
9 = junk after document element
10 = illegal parameter entity reference
11 = undefined entity
12 = recursive entity reference
13 = asynchronous entity
14 = reference to invalid character number
15 = reference to binary entity
16 = reference to external entity in attribute
17 = xml processing instruction not at start of external entity
18 = unknown encoding
19 = encoding specified in XML declaration is incorrect
20 = unclosed CDATA section
21 = error in processing external entity reference
22 = document is not standalone
# %1$S is replaced by the Expat error string, may be followed by Expected (see below)
# %2$S is replaced by URL
# %3$d is replaced by line number
# %4$d is replaced by column number
XMLParsingError = XML Parsing Error: %1$S\nLocation: %2$S\nLine Number %3$d, Column %4$d:
# %S is replaced by a tag name.
# This gets appended to the error string if the error is mismatched tag.
Expected = . Expected: </%S>.

View File

@ -0,0 +1,65 @@
# ***** 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 TransforMiiX XSLT Processor.
#
# 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):
# Peter Van der Beken <peterv@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 *****
1 = Parsing an XSLT stylesheet failed.
2 = Parsing an XPath expression failed.
4 = XSLT transformation failed.
5 = Invalid XSLT/XPath function.
6 = XSLT Stylesheet (possibly) contains a recursion.
7 = Attribute value illegal in XSLT 1.0.
8 = An XPath expression was expected to return a NodeSet.
9 = XSLT transformation was terminated by <xsl:message>.
10 = A network error occured loading an XSLT stylesheet:
11 = An XSLT stylesheet does not have an XML mimetype:
12 = An XSLT stylesheet directly or indirectly imports or includes itself:
13 = An XPath function was called with the wrong number of arguments.
14 = An unknown XPath extension function was called.
15 = XPath parse failure: ')' expected:
16 = XPath parse failure: invalid axis:
17 = XPath parse failure: Name or Nodetype test expected:
18 = XPath parse failure: ']' expected:
19 = XPath parse failure: invalid variable name:
20 = XPath parse failure: unexpected end of expression:
21 = XPath parse failure: operator expected:
22 = XPath parse failure: unclosed literal:
23 = XPath parse failure: ':' unexpected:
24 = XPath parse failure: '!' unexpected, negation is not():
25 = XPath parse failure: illegal character found:
26 = XPath parse failure: binary operator expected:
LoadingError = Error loading stylesheet: %S
TransformError = Error during XSLT transformation: %S

View File

@ -0,0 +1,38 @@
# ***** 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):
# Boris Zbarsky <bzbarsky@mit.edu> (original author)
#
# 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 *****
ImageMapRectBoundsError=The "coords" attribute of the <area shape="rect"> tag is not in the "left,top,right,bottom" format.

View File

@ -0,0 +1,37 @@
<!ENTITY loadError.label "Page load error">
<!ENTITY retry.label "Try again">
<!-- Specific error messages -->
<!ENTITY generic.longDesc "The page could not be loaded, possibly because it does not exist or the location is incorrect.<br/>Check that the address (URL) is valid and correctly formatted.">
<!ENTITY malformedURI.title "Invalid Address Error">
<!ENTITY malformedURI.longDesc "The address (URL) is not a valid format and cannot be read. A typical address will start with &quot;http://&quot;, followed by an address, (e.g. www.netscape.com), followed by a path to the content (or just &quot;/&quot;). A common cause for the problem is using backslashes(\) instead of forward slashes (/).">
<!ENTITY fileNotFound.title "File Not Found Error">
<!ENTITY fileNotFound.longDesc "The file specified by the address (URL) cannot be found. Check that the file exists and that you have sufficient permissions to view it.">
<!ENTITY dnsNotFound.title "Address Not Found Error">
<!ENTITY dnsNotFound.longDesc "The address (URL) does not correspond to a known site and could not be loaded. This could be due to a misspelling in the address or because the site does not exist. If the address is known to be valid, or if the problem occurs for many sites, it may be an issue with your proxy service (if you use one) or the directory name service lookup. In such cases you should consult your system documentation, administrator or Internet Service Provider (ISP) as appropriate for further assistance.">
<!ENTITY protocolNotFound.title "Protocol Not Known Error">
<!ENTITY protocolNotFound.longDesc "The address (URL) starts with a protocol that is not recognized by the browser. A protocol is the part at the front of the address, such as http: or ftp: which tells the browser how to connect to the site. In this instance, the protocol is unknown so loading cannot continue. Check that the address is correct before retrying.">
<!ENTITY connectionFailure.title "Connection Failure Error">
<!ENTITY connectionFailure.longDesc "The browser was unable to connect to the specified site, even though it exists. This may be because the site does not accept connections from your computer, the service may be down, or the site does not support the service or port that you tried to connect to.">
<!ENTITY netTimeout.title "Net Timeout Error">
<!ENTITY netTimeout.longDesc "The browser timed out while trying to connect to the specified site. The site may be experiencing high loads that are slowing it down, or network problems are preventing data from being received from it in a timely manner. If the site is likely to be busy, consider waiting a few moments before retrying the request.">
<!ENTITY redirectLoop.title "Redirect Loop Error">
<!ENTITY redirectLoop.longDesc "The browser has stopped a connection because the site is redirecting requests to itself in a manner which prevents it from ever completing.">
<!ENTITY unknownSocketType.title "Unknown Socket Error">
<!ENTITY unknownSocketType.longDesc "The site responded to the network request in an unexpected manner. This may be due to address (URL) using the wrong protocol for the specified port, or a non-standard configuration on the site which is running different services than expected.">
<!ENTITY netReset.title "Net Reset Error">
<!ENTITY netReset.longDesc "The link to the site was dropped unexpectedly while negotiating a connection or transferring data. This may be due to a network fault somewhere between the site and your computer. If the problem persists, consult your system documentation, administrator or Internet Service Provider (ISP) as appropriate for further assistance.">
<!ENTITY netOffline.title "Offline Error">
<!ENTITY netOffline.longDesc "The browser is currently offline and cannot connect to the requested site. Place your browser in online mode before trying again.">

View File

@ -0,0 +1,40 @@
<!ENTITY caption.label "Opening #1">
<!-- Localization note: The default intro text has 3 "inserts":
#1 - replaced with the descriptive text that describes the mime type
(e.g., "MSWord Document")
#2 - replaced with the mime type (e.g., "application/ms-word")
#3 - replaced with the filename (e.g., "manual.doc")
#4 - will be replaced by the brand name (e.g., "Mozilla")
If there is no descriptive text, then the alternative text is used which
has only insert #2.
-->
<!ENTITY intro.label "The file &quot;#3&quot; is of type #2 (#1), and #4 does not know how to handle this file type. This file is located at:">
<!ENTITY intro.noDesc.label "The file &quot;#3&quot; is of type #2, and #4 does not know how to handle this file type. This file is located at:">
<!ENTITY intro.attachment.label "The site has suggested that &quot;#3&quot; be handled as an attachment. It is of type #2 (#1) and located at:">
<!ENTITY intro.attachment.noDesc.label "The site has suggested that &quot;#3&quot; be handled as an attachment. It is of type #2 and located at:">
<!ENTITY prompt.label "What should #1 do with this file?">
<!ENTITY alwaysHandle.label "Always perform this action when handling files of this type">
<!ENTITY alwaysHandle.accesskey "a">
<!ENTITY saveToDisk.label "Save it to disk">
<!ENTITY saveToDisk.accesskey "s">
<!ENTITY useSystemDefault.label "Open it with the default application (#1)">
<!ENTITY useSystemDefault.noDesc.label "Open it with the default application">
<!ENTITY useSystemDefault.accesskey "o">
<!-- LOCALIZATION NOTE: do not localize "#1" -->
<!ENTITY openUsing.label "Open it with">
<!ENTITY openUsing.accesskey "w">
<!ENTITY chooseApp.label "Choose...">
<!ENTITY chooseApp.accesskey "c">
<!ENTITY chooseAppFilePickerTitle "Choose Helper Application">
<!ENTITY badApp "The application you specified (&quot;#1&quot;) could not be found. Check the file name or select another application.">
<!ENTITY badApp.title "Application not found">

View File

@ -0,0 +1 @@
saveDialogTitle=Enter name of file to save to...

View File

@ -0,0 +1,136 @@
<!-- ***** 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 Progress Dialog.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 2002
- 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 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 ***** -->
<!-- These strings are used on the download progress dialog.
See: http://lxr.mozilla.org/seamonkey/source/embedding/components/ui/progressDlg/nsProgressDialog.xul
-->
<!-- This is used prior to initializing with a proper title -->
<!ENTITY defaultTitle "Saving">
<!-- These are used when saving -->
<!ENTITY savingTitle "#2&#037; of #1 Saved">
<!ENTITY savingSource "Saving From:">
<!ENTITY savingTarget "To:">
<!-- These are used when opening (with an application) -->
<!ENTITY openingTitle "#2&#037; of #1 Completed">
<!ENTITY openingSource "Opening From:">
<!ENTITY openingTarget "With:">
<!-- This is used when the download percentage is unknown -->
<!ENTITY unknownSavingTitle "Saving #1">
<!ENTITY unknownOpeningTitle "Opening #1">
<!-- Labels on other fields -->
<!ENTITY status "Status:">
<!ENTITY timeElapsed "Time Elapsed:">
<!ENTITY timeLeft "Time Left:">
<!ENTITY progress "Progress:">
<!-- Label for the "keep dialog" checkbox -->
<!ENTITY keep "Keep this window open after the download is complete.">
<!-- Button labels -->
<!ENTITY cancel "Cancel">
<!ENTITY pause "Pause">
<!ENTITY resume "Resume">
<!ENTITY close "Close">
<!ENTITY reveal "Show File Location">
<!ENTITY launch "Launch File">
<!-- Status/progress messages -->
<!-- LOCALIZATION NOTE (pausedMsg):
This string is used to indicate that the download is paused -->
<!ENTITY pausedMsg "Download Paused">
<!-- LOCALIZATION NOTE (progressMsg):
This string is used to generate the status message used during
file download.
#1 will be replaced by the number of bytes downloaded thus far
#2 will be replaced by the total number of bytes to be downloaded
#3 will be replaced by the download rate (in KB per second) -->
<!ENTITY progressMsg "#1KB of #2KB (at #3KB/sec)">
<!-- LOCALIZATION NOTE (unknownTime):
This string is used when the time remaining is unknown. -->
<!ENTITY unknownTime "Unknown">
<!-- LOCALIZATION NOTE (longTimeFormat):
This string is used to format elapsed/remaining times when the
time exceeds 1 hour in length.
#1 will be replaced by the number of hours
#2 will be replaced by the number of minutes
#3 will be replaced by the number of seconds -->
<!ENTITY longTimeFormat "#1:#2:#3">
<!-- LOCALIZATION NOTE (shortTimeFormat):
This string is used to format elapsed/remaining times when the
time is less than 1 hour in length. Note that you can leave
"#1" out of this string to omit the leading "00:" if you so choose.
#1 will be replaced by the number of hours
#2 will be replaced by the number of minutes
#3 will be replaced by the number of seconds -->
<!ENTITY shortTimeFormat "#2:#3">
<!-- LOCALIZATION NOTE (completeMsg):
This string is displayed when the download is complete. The insert
"#1" is replaced by the elapsed time, formatted according to the
xxxTimeFormat strings defined above). You can omit "#1" if you don't
want the elapsed time in the message.
#1 will be replaced by the elapsed time
#2 will be replaced by the size of the file in Kilobytes -->
<!ENTITY completeMsg "Finished, #2 KB downloaded (elapsed time was #1)">
<!-- LOCALIZATION NOTE (percentMsg):
This string is used to format the text to the right of the progress
meter.
#1 will be replaced by the percentage of the file that has been saved -->
<!ENTITY percentMsg "#1&#037;">

View File

@ -0,0 +1,42 @@
# ***** 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 Progress Dialog.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corp.
# Portions created by the Initial Developer are Copyright (C) 2002
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Bill Law <law@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 *****
savingAlertTitle=Saving %S
openingAlertTitle=Opening %S
securityAlertMsg=Warning! Executable files may contain viruses or other malicious code that could harm your computer. Use caution when opening this file. Are you sure you want to launch %S?
dontAskAgain=Don't ask me again.

View File

@ -0,0 +1,46 @@
# ***** 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 Progress Dialog.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corp.
# Portions created by the Initial Developer are Copyright (C) 2002
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Bill Law <law@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 *****
readError=%S could not be saved, because the source file could not be read.\n\nTry again later, or contact the server administrator.
writeError=%S could not be saved, because an unknown error occurred.\n\nSorry about that. Try saving to a different location.
launchError=%S could not be opened, because an unknown error occurred.\n\nSorry about that. Try saving to disk first and then opening the file.
diskFull=There is not enough room on the disk to save %S.\n\nRemove unnecessary files from the disk and try again, or try saving in a different location.
readOnly=%S could not be saved, because the disk, folder, or file is write-protected.\n\nWrite-enable the disk and try again, or try saving in a different location.
accessError=%S could not be saved, because you cannot change the contents of that folder.\n\nChange the folder properties and try again, or try saving in a different location.
helperAppNotFound=%S could not be opened, because the associated helper application does not exist. Change the association in your preferences.
noMemory=There is not sufficient memory to complete the action you requested.\n\nQuit some applications and try again.
title=Downloading %S

View File

@ -0,0 +1,98 @@
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
#
# Page number formating
## @page_number The current page number
#LOCALIZATION NOTE (pageofpages): Do not translate %ld in the following line.
# Place the word %ld where the page number and number of pages should be
# The first %ld will receive the the page number
pagenumber=%1$d
# Page number formating
## @page_number The current page number
## @page_total The total number of pages
#LOCALIZATION NOTE (pageofpages): Do not translate %ld in the following line.
# Place the word %ld where the page number and number of pages should be
# The first %ld will receive the the page number
# the second %ld will receive the total number of pages
pageofpages=%1$d of %2$d
# Print font
# The name of the font to be used to print the headers and footers
fontname=serif
# Print font size
# The size of the font to be used to print the headers and footers
fontsize=10
noPrintFilename.title=Filename is missing
noPrintFilename.alert=You have selected "Print To: File", and the filename is empty!
# File confirm
fileConfirm.exists=%S already exists.\nDo you want to replace it?
# Print error codes
print_error_dialog_title=Printer Error
printpreview_error_dialog_title=Print Preview Error
NS_ERROR_GFX_PRINTER_CMD_NOT_FOUND=There was a problem printing. The printer doesn't support a printing command.
NS_ERROR_GFX_PRINTER_CMD_FAILURE=There was a problem printing. An instruction that was sent to the printer failed.
NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE=There was a problem printing. No printer could be found.
NS_ERROR_GFX_PRINTER_NAME_NOT_FOUND=There was a problem printing. The printer could not be found.
NS_ERROR_GFX_PRINTER_ACCESS_DENIED=There was a problem printing. Access to the printer was denied.
NS_ERROR_GFX_PRINTER_INVALID_ATTRIBUTE=There was a problem printing. Tried to set an invalid printer attribute.
NS_ERROR_GFX_PRINTER_PRINTER_NOT_READY=There was a problem printing. The printer not ready.
NS_ERROR_GFX_PRINTER_OUT_OF_PAPER=There was a problem printing. The printer is out of paper.
NS_ERROR_GFX_PRINTER_PRINTER_IO_ERROR=There was a problem printing. Printer I/O error.
NS_ERROR_GFX_PRINTER_COULD_NOT_OPEN_FILE=There was a problem printing. The output file could not be opened.
NS_ERROR_GFX_PRINTER_FILE_IO_ERROR=There was an error writing the printing output file.
NS_ERROR_GFX_PRINTER_PRINTPREVIEW=There must be at least one printer available to show Print Preview.
NS_ERROR_UNEXPECTED=There was an unexpected problem when printing.
NS_ERROR_OUT_OF_MEMORY=There was a problem printing. There is not enough free memory to print.
NS_ERROR_NOT_IMPLEMENTED=Some printing functionality is not implemented yet.
NS_ERROR_NOT_AVAILABLE=Not available
NS_ERROR_ABORT=The print job was aborted, or canceled.
NS_ERROR_FAILURE=An unknown error occurred while printing.
NS_ERROR_GFX_PRINTER_STARTDOC=Printing failed when starting the document.
NS_ERROR_GFX_PRINTER_ENDDOC=Printing failed when completing the document.
NS_ERROR_GFX_PRINTER_STARTPAGE=Printing failed when starting the page.
NS_ERROR_GFX_PRINTER_ENDPAGE=Printing failed when completing the page.
NS_ERROR_GFX_PRINTER_PRINT_WHILE_PREVIEW=You cannot print while in print preview.
NS_ERROR_GFX_PRINTER_PAPER_SIZE_NOT_SUPPORTED=There was a problem printing because the paper size you specified is not supported by your printer.
NS_ERROR_GFX_PRINTER_ORIENTATION_NOT_SUPPORTED=There was a problem printing because the page orientation you specified is not supported by your printer.
NS_ERROR_GFX_PRINTER_COLORSPACE_NOT_SUPPORTED=There was a problem printing because the print job requires color capabilities that your printer does not support.
NS_ERROR_GFX_PRINTER_TOO_MANY_COPIES=There was a problem printing because you requested too many copies.
NS_ERROR_GFX_PRINTER_DRIVER_CONFIGURATION_ERROR=There was a problem printing. The printer driver is not properly configured.
NS_ERROR_GFX_PRINTER_XPRINT_BROKEN_XPRT=A broken version of the X print server (Xprt) has been detected. Note that printing using this Xprt server may not work properly. Please contact the server vendor for a fixed version.
NS_ERROR_GFX_PRINTER_DOC_IS_BUSY_PP=The browser cannot print preview right now.\nPlease try again when the page has finished loading.
NS_ERROR_GFX_PRINTER_DOC_WAS_DESTORYED=The page was replaced while you were trying to print.\nPlease try again.
NS_ERROR_GFX_NO_PRINTDIALOG_IN_TOOLKIT=Either pluggable dialogs were not properly installed\nOr this GFX Toolkit no longer supports native Print Dialogs
NS_ERROR_GFX_NO_PRINTROMPTSERVICE=The Printing Prompt Service is missing.
NS_ERROR_GFX_PRINTER_XPRINT_NO_XPRINT_SERVERS_FOUND=There was a problem printing. No Xprint server(s) could be found.\nCheck whether the XPSERVERLIST environment variable contains any valid Xprint servers.\nFor further information see http://xprint.mozdev.org/ or http://www.mozilla.org/projects/xprint/
NS_ERROR_GFX_PRINTER_PLEX_NOT_SUPPORTED=There was a problem printing because the plex mode you specified is not supported by your printer.
NS_ERROR_GFX_PRINTER_DOC_IS_BUSY=The browser cannot print the document while it is being loaded.
NS_ERROR_GFX_PRINTING_NOT_IMPLEMENTED=Printing is not implemented.
NS_ERROR_GFX_COULD_NOT_LOAD_PRINT_MODULE=The requested print module cannot be loaded.
# No printers available
noprinter=No printers available.
PrintToFile=Print To File
# EOF.

View File

@ -0,0 +1,44 @@
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 2000 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Mitch Stoltz <mstoltz@netscape.com>
# Christopher A. Aillon <christopher@aillon.com>
#
Yes = Allow
No = Deny
Titleline = Internet Security
CheckMessage = Remember this decision
EnableCapabilityQuery = A script from "%S" is requesting enhanced abilities that are UNSAFE and could be used to compromise your machine or data:\n\n%S\n\nAllow these abilities only if you trust this source to be free of viruses or malicious programs.
EnableCapabilityDenied = A script from "%S" was denied %S privileges.
CheckLoadURIError = Security Error: Content at %S may not load or link to %S.
CheckSameOriginError = Security Error: Content at %S may not load data from %S.
GetPropertyDenied = Permission denied to get property %S.%S
SetPropertyDenied = Permission denied to set property %S.%S
CallMethodDenied = Permission denied to call method %S.%S
CreateWrapperDenied = Permission denied to create wrapper for object of class %S
ExtensionCapability = Unknown: %S
#
# The following descriptions are shown in the EnableCapabilityQuery dialog
#
capdesc.UniversalBrowserRead = Read private data from any site or window
capdesc.UniversalBrowserWrite = Modify any open window
capdesc.UniversalXPConnect = Run or install software on your machine
capdesc.UniversalFileRead = Read and upload local files
capdesc.CapabilityPreferencesAccess = By-pass core security settings
capdesc.UniversalPreferencesRead = Read program settings
capdesc.UniversalPreferencesWrite = Modify program settings

View File

@ -0,0 +1,45 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the SOAP security 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): Harish Dhurvasula <harishd@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 *****
UnsupportedNamespace = The namespace "%S" is not supported. Please use "http://www.mozilla.org/2002/soap/security".
UnknownRootElement = The root element "%S" is not recognized. Please use "webScriptAccess" element.
UnknownElement = The element "%S" is not recognized.
UnknownAttribute = The attribute "%S" is not recognized.
TooManyElements = There can be no more than one "%S" element.
ElementHasSibling = "%S" element cannot have "%S" sibiling.
ElementNotEmpty = The "%S" element should be empty.
SOAPFault = SOAP { %S } %S call resulted in fault: { %S } %S : %S.

View File

@ -0,0 +1,36 @@
# ***** 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 xbl.properties.
#
# The Initial Developer of the Original Code is Boris Zbarsky
# <bzbarsky@mit.edu>. Portions created by the Initial Developer are Copyright
# (C) 2003. 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 *****
UnexpectedElement=Unexpected <%1$S> element.

View File

@ -0,0 +1,37 @@
<!-- ***** 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.
-
- The Initial Developer of the Original Code is
- Vincent Béron.
- Portions created by the Initial Developer are Copyright (C) 2003
- the Initial Developer. All Rights Reserved.
-
- Contributor(s): Vincent Béron <vberon@hermes.usherb.ca>
-
- 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 ***** -->
<!ENTITY xml.nostylesheet "This XML file does not appear to have any style information associated with it. The document tree is shown below.">

View File

@ -0,0 +1,112 @@
# The contents of this file are subject to the Netscape Public License
# Version 1.1 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is Mozilla Communicator client code, released March
# 31, 1998.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are Copyright (C) 1998-1999
# Netscape Communications Corporation. All Rights Reserved.
#
# Contributors:
# Samir Gehani <sgehani@netscape.com>
# Daniel Veditz <dveditz@netscape.com>
#
# String resources for xpinstall user interface dialogs
#
#--------------------------------------------------------------------
# Install Actions
#--------------------------------------------------------------------
InstallFile=Installing: %s
InstallSharedFile=Installing Shared File: %s
ReplaceFile=Replacing: %s
ReplaceSharedFile=Replacing Shared File: %s
SkipFile=Skipping: %s
SkipSharedFile=Skipping Shared File: %s
DeleteFile=Deleting file: %s
DeleteComponent=Deleting component: %s
Execute=Executing: %s
ExecuteWithArgs=Executing: %s with argument: %s
CopyFile=Copy File: %s to %s
ExecuteFile=Execute File: %s
ExecuteFileWithArgs=Execute File: %s with argument: %s
MoveFile=Move File: %s to %s
RenameFile=Rename File: %s to %s
CreateFolder=Create Folder: %s
RemoveFolder=Remove Folder: %s
RenameFolder=Rename Folder: %s to %s
WindowsShortcut=Windows Shortcut: %s
MacAlias=Mac Alias: %s
WindowsRegisterServer=Windows Register Server: %s
UnknownFileOpCommand=Unknown file operation command!
Patch=Patching: %s
Uninstall=Uninstalling: %s
RegSkin=Register Skin: %s
RegLocale=Register Locale: %s
RegContent=Register Content: %s
RegPackage=Register Package: %s
#--------------------------------------------------------------------
# Dialog Messages
#--------------------------------------------------------------------
ApplyNowSkin=Use this theme
ApplyNowLocale=Use this locale
ConfirmSkin=Install the theme "%1$S" from %2$S?
ConfirmLocale=Install the locale "%1$S" from %2$S?
OK=Install
progress.queued=Queued
progress.downloading=Downloading...
progress.downloaded=Downloaded
progress.installing=Installing...
Unsigned=Unsigned
#--------------------------------------------------------------------
# Miscellaneous
#--------------------------------------------------------------------
ERROR=ERROR
error0=Success
error999=Restart to complete
error-202=Access denied
error-204=Install script not found
error-207=Not a valid install package
error-208=Invalid argument
error-210=User cancelled
error-214=Required file does not exist
error-215=Read only
error-218=AppleSingle extraction error
error-219=Invalid path
error-225=EXTRACTION_FAILED
error-227=Cancelled
error-228=Download error
error-229=Script error
error-230=Already exists
error-235=Out of space
error-239=Chrome registration failed
error-240=Unfinished install
error-260=Signing could not be verified.
error-299=Out of memory
# there are other error codes, either rare or obsolete,
# that are not worth translating at this time.
unknown.error=Unexpected error %S

View File

@ -1,83 +1,104 @@
#filter substitution
@AB_CD@.jar:
* locale/@AB_CD@/global/contents.rdf (generic/chrome/global/contents.rdf)
+ locale/@AB_CD@/global/accept2locale.properties (@AB_CD@/chrome/global/accept2locale.properties)
+ locale/@AB_CD@/global/charsetOverlay.dtd (@AB_CD@/chrome/global/charsetOverlay.dtd)
+ locale/@AB_CD@/global/commonDialog.dtd (@AB_CD@/chrome/global/commonDialog.dtd)
+ locale/@AB_CD@/global/commonDialogs.properties (@AB_CD@/chrome/global/commonDialogs.properties)
+ locale/@AB_CD@/global/config.dtd (@AB_CD@/chrome/global/config.dtd)
+ locale/@AB_CD@/global/config.properties (@AB_CD@/chrome/global/config.properties)
* locale/@AB_CD@/global/console.dtd (@AB_CD@/chrome/global/console.dtd)
+ locale/@AB_CD@/global/console.properties (@AB_CD@/chrome/global/console.properties)
* locale/@AB_CD@/global/customizeCharset.dtd (@AB_CD@/chrome/global/customizeCharset.dtd)
+ locale/@AB_CD@/global/customizeToolbar.dtd (@AB_CD@/chrome/global/customizeToolbar.dtd)
+ locale/@AB_CD@/global/customizeToolbar.properties (@AB_CD@/chrome/global/customizeToolbar.properties)
* locale/@AB_CD@/global/dialogOverlay.dtd (@AB_CD@/chrome/global/dialogOverlay.dtd)
locale/@AB_CD@/global/downloadProgress.properties (@AB_CD@/chrome/global/downloadProgress.properties)
+ locale/@AB_CD@/global/editMenuOverlay.dtd (@AB_CD@/chrome/global/editMenuOverlay.dtd)
locale/@AB_CD@/global/filepicker.dtd (@AB_CD@/chrome/global/filepicker.dtd)
locale/@AB_CD@/global/filepicker.properties (@AB_CD@/chrome/global/filepicker.properties)
+ locale/@AB_CD@/global/finddialog.dtd (@AB_CD@/chrome/global/finddialog.dtd)
+ locale/@AB_CD@/global/finddialog.properties (@AB_CD@/chrome/global/finddialog.properties)
+ locale/@AB_CD@/global/intl.css (@AB_CD@/chrome/global/intl.css)
+ locale/@AB_CD@/global/intl.properties (@AB_CD@/chrome/global/intl.properties)
+ locale/@AB_CD@/global/keys.properties (@AB_CD@/chrome/global/keys.properties)
+ locale/@AB_CD@/global/languageNames.properties (@AB_CD@/chrome/global/languageNames.properties)
locale/@AB_CD@/global/license.dtd (@AB_CD@/chrome/global/license.dtd)
locale/@AB_CD@/global/mozilla.dtd (@AB_CD@/chrome/global/mozilla.dtd)
+ locale/@AB_CD@/global/nsTreeSorting.properties (@AB_CD@/chrome/global/nsTreeSorting.properties)
locale/@AB_CD@/global/plugins.properties (@AB_CD@/chrome/global/plugins.properties)
locale/@AB_CD@/global/printdialog.properties (@AB_CD@/chrome/global/printdialog.properties)
+ locale/@AB_CD@/global/printdialog.dtd (@AB_CD@/chrome/global/printdialog.dtd)
+ locale/@AB_CD@/global/printjoboptions.dtd (@AB_CD@/chrome/global/printjoboptions.dtd)
+ locale/@AB_CD@/global/printjoboptions.properties (@AB_CD@/chrome/global/printjoboptions.properties)
+ locale/@AB_CD@/global/printPageSetup.dtd (@AB_CD@/chrome/global/printPageSetup.dtd)
+ locale/@AB_CD@/global/printPreview.dtd (@AB_CD@/chrome/global/printPreview.dtd)
+ locale/@AB_CD@/global/printPreviewProgress.dtd (@AB_CD@/chrome/global/printPreviewProgress.dtd)
+ locale/@AB_CD@/global/printProgress.dtd (@AB_CD@/chrome/global/printProgress.dtd)
+ locale/@AB_CD@/global/regionNames.properties (@AB_CD@/chrome/global/regionNames.properties)
+ locale/@AB_CD@/global/dialog.properties (@AB_CD@/chrome/global/dialog.properties)
+ locale/@AB_CD@/global/tabbrowser.dtd (@AB_CD@/chrome/global/tabbrowser.dtd)
+ locale/@AB_CD@/global/tabbrowser.properties (@AB_CD@/chrome/global/tabbrowser.properties)
+ locale/@AB_CD@/global/textcontext.dtd (@AB_CD@/chrome/global/textcontext.dtd)
+ locale/@AB_CD@/global/viewSource.dtd (@AB_CD@/chrome/global/viewSource.dtd)
+ locale/@AB_CD@/global/viewSource.properties (@AB_CD@/chrome/global/viewSource.properties)
+ locale/@AB_CD@/global/wizard.properties (@AB_CD@/chrome/global/wizard.properties)
locale/@AB_CD@/global/history/history.properties (@AB_CD@/chrome/global/history/history.properties)
* locale/@AB_CD@/global-region/contents.rdf (generic/chrome/global-region/contents.rdf)
+ locale/@AB_CD@/global-region/region.dtd (@AB_CD@/chrome/global-region/region.dtd)
+ locale/@AB_CD@/global-region/region.properties (@AB_CD@/chrome/global-region/region.properties)
+ locale/@AB_CD@/global-region/builtinURLs.rdf (@AB_CD@/chrome/global-region/builtinURLs.rdf)
* locale/@AB_CD@/global-platform/contents.rdf (generic/chrome/global-platform/contents.rdf)
locale/@AB_CD@/global-platform/mac/platformKeys.properties (@AB_CD@/chrome/global-platform/mac/platformKeys.properties)
locale/@AB_CD@/global-platform/unix/platformKeys.properties (@AB_CD@/chrome/global-platform/unix/platformKeys.properties)
locale/@AB_CD@/global-platform/win/platformKeys.properties (@AB_CD@/chrome/global-platform/win/platformKeys.properties)
locale/@AB_CD@/global-platform/mac/intl.properties (@AB_CD@/chrome/global-platform/mac/intl.properties)
locale/@AB_CD@/global-platform/unix/intl.properties (@AB_CD@/chrome/global-platform/unix/intl.properties)
locale/@AB_CD@/global-platform/win/intl.properties (@AB_CD@/chrome/global-platform/win/intl.properties)
* locale/@AB_CD@/mozapps/contents.rdf (generic/chrome/mozapps/contents.rdf)
* locale/@AB_CD@/mozapps/downloads/unknownContentType.properties (@AB_CD@/chrome/mozapps/downloads/unknownContentType.properties)
* locale/@AB_CD@/mozapps/downloads/unknownContentType.dtd (@AB_CD@/chrome/mozapps/downloads/unknownContentType.dtd)
locale/@AB_CD@/mozapps/downloads/pref-downloads.dtd (@AB_CD@/chrome/mozapps/downloads/pref-downloads.dtd)
locale/@AB_CD@/mozapps/downloads/editAction.dtd (@AB_CD@/chrome/mozapps/downloads/editAction.dtd)
locale/@AB_CD@/mozapps/downloads/downloads.dtd (@AB_CD@/chrome/mozapps/downloads/downloads.dtd)
locale/@AB_CD@/mozapps/downloads/downloads.properties (@AB_CD@/chrome/mozapps/downloads/downloads.properties)
locale/@AB_CD@/mozapps/downloads/downloadProperties.dtd (@AB_CD@/chrome/mozapps/downloads/downloadProperties.dtd)
locale/@AB_CD@/mozapps/extensions/extensions.dtd (@AB_CD@/chrome/mozapps/extensions/extensions.dtd)
locale/@AB_CD@/mozapps/extensions/extensions.properties (@AB_CD@/chrome/mozapps/extensions/extensions.properties)
locale/@AB_CD@/mozapps/extensions/about.dtd (@AB_CD@/chrome/mozapps/extensions/about.dtd)
locale/@AB_CD@/mozapps/extensions/finalize.dtd (@AB_CD@/chrome/mozapps/extensions/finalize.dtd)
locale/@AB_CD@/mozapps/plugins/plugins.dtd (@AB_CD@/chrome/mozapps/plugins/plugins.dtd)
locale/@AB_CD@/mozapps/plugins/plugins.properties (@AB_CD@/chrome/mozapps/plugins/plugins.properties)
locale/@AB_CD@/mozapps/profile/createProfileWizard.dtd (@AB_CD@/chrome/mozapps/profile/createProfileWizard.dtd)
locale/@AB_CD@/mozapps/profile/profileSelection.properties (@AB_CD@/chrome/mozapps/profile/profileSelection.properties)
locale/@AB_CD@/mozapps/profile/profileSelection.dtd (@AB_CD@/chrome/mozapps/profile/profileSelection.dtd)
locale/@AB_CD@/mozapps/update/update.dtd (@AB_CD@/chrome/mozapps/update/update.dtd)
locale/@AB_CD@/mozapps/update/update.properties (@AB_CD@/chrome/mozapps/update/update.properties)
locale/@AB_CD@/mozapps/update/errors.dtd (@AB_CD@/chrome/mozapps/update/errors.dtd)
locale/@AB_CD@/mozapps/xpinstall/xpinstallConfirm.dtd (@AB_CD@/chrome/mozapps/xpinstall/xpinstallConfirm.dtd)
locale/@AB_CD@/mozapps/xpinstall/xpinstallConfirm.properties (@AB_CD@/chrome/mozapps/xpinstall/xpinstallConfirm.properties)
* locale/@AB_CD@/passwordmgr/contents.rdf (generic/chrome/passwordmgr/contents.rdf)
* locale/@AB_CD@/passwordmgr/passwordmgr.properties (@AB_CD@/chrome/passwordmgr/passwordmgr.properties)
* locale/@AB_CD@/passwordmgr/passwordManager.dtd (@AB_CD@/chrome/passwordmgr/passwordManager.dtd)
* locale/global/contents.rdf (generic/chrome/global/contents.rdf)
+ locale/global/accept2locale.properties (@AB_CD@/chrome/global/accept2locale.properties)
locale/global/accessible.properties (@AB_CD@/chrome/global/accessible.properties)
locale/global/appstrings.properties (@AB_CD@/chrome/global/appstrings.properties)
+ locale/global/charsetOverlay.dtd (@AB_CD@/chrome/global/charsetOverlay.dtd)
locale/global/charsetTitles.properties (@AB_CD@/chrome/global/charsetTitles.properties)
+ locale/global/commonDialog.dtd (@AB_CD@/chrome/global/commonDialog.dtd)
+ locale/global/commonDialogs.properties (@AB_CD@/chrome/global/commonDialogs.properties)
+ locale/global/config.dtd (@AB_CD@/chrome/global/config.dtd)
+ locale/global/config.properties (@AB_CD@/chrome/global/config.properties)
* locale/global/console.dtd (@AB_CD@/chrome/global/console.dtd)
+ locale/global/console.properties (@AB_CD@/chrome/global/console.properties)
locale/global/css.properties (@AB_CD@/chrome/global/css.properties)
* locale/global/customizeCharset.dtd (@AB_CD@/chrome/global/customizeCharset.dtd)
+ locale/global/customizeToolbar.dtd (@AB_CD@/chrome/global/customizeToolbar.dtd)
+ locale/global/customizeToolbar.properties (@AB_CD@/chrome/global/customizeToolbar.properties)
* locale/global/dialogOverlay.dtd (@AB_CD@/chrome/global/dialogOverlay.dtd)
locale/global/downloadProgress.properties (@AB_CD@/chrome/global/downloadProgress.properties)
+ locale/global/editMenuOverlay.dtd (@AB_CD@/chrome/global/editMenuOverlay.dtd)
locale/global/filepicker.dtd (@AB_CD@/chrome/global/filepicker.dtd)
locale/global/filepicker.properties (@AB_CD@/chrome/global/filepicker.properties)
+ locale/global/finddialog.dtd (@AB_CD@/chrome/global/finddialog.dtd)
+ locale/global/finddialog.properties (@AB_CD@/chrome/global/finddialog.properties)
locale/global/global-strres.properties (@AB_CD@/chrome/global/global-strres.properties)
+ locale/global/intl.css (@AB_CD@/chrome/global/intl.css)
+ locale/global/intl.properties (@AB_CD@/chrome/global/intl.properties)
+ locale/global/keys.properties (@AB_CD@/chrome/global/keys.properties)
+ locale/global/languageNames.properties (@AB_CD@/chrome/global/languageNames.properties)
locale/global/layout_errors.properties (@AB_CD@/chrome/global/layout_errors.properties)
locale/global/license.dtd (@AB_CD@/chrome/global/license.dtd)
locale/global/mozilla.dtd (@AB_CD@/chrome/global/mozilla.dtd)
locale/global/netError.dtd (@AB_CD@/chrome/global/netError.dtd)
locale/global/nsHelperAppDlg.dtd (@AB_CD@/chrome/global/nsHelperAppDlg.dtd)
locale/global/nsHelperAppDlg.properties (@AB_CD@/chrome/global/nsHelperAppDlg.properties)
locale/global/nsProgressDialog.dtd (@AB_CD@/chrome/global/nsProgressDialog.dtd)
locale/global/nsProgressDialog.properties (@AB_CD@/chrome/global/nsProgressDialog.properties)
+ locale/global/nsTreeSorting.properties (@AB_CD@/chrome/global/nsTreeSorting.properties)
locale/global/plugins.properties (@AB_CD@/chrome/global/plugins.properties)
locale/global/printing.properties (@AB_CD@/chrome/global/printing.properties)
locale/global/printdialog.properties (@AB_CD@/chrome/global/printdialog.properties)
+ locale/global/printdialog.dtd (@AB_CD@/chrome/global/printdialog.dtd)
+ locale/global/printjoboptions.dtd (@AB_CD@/chrome/global/printjoboptions.dtd)
+ locale/global/printjoboptions.properties (@AB_CD@/chrome/global/printjoboptions.properties)
+ locale/global/printPageSetup.dtd (@AB_CD@/chrome/global/printPageSetup.dtd)
+ locale/global/printPreview.dtd (@AB_CD@/chrome/global/printPreview.dtd)
+ locale/global/printPreviewProgress.dtd (@AB_CD@/chrome/global/printPreviewProgress.dtd)
+ locale/global/printProgress.dtd (@AB_CD@/chrome/global/printProgress.dtd)
+ locale/global/regionNames.properties (@AB_CD@/chrome/global/regionNames.properties)
+ locale/global/dialog.properties (@AB_CD@/chrome/global/dialog.properties)
+ locale/global/tabbrowser.dtd (@AB_CD@/chrome/global/tabbrowser.dtd)
+ locale/global/tabbrowser.properties (@AB_CD@/chrome/global/tabbrowser.properties)
+ locale/global/textcontext.dtd (@AB_CD@/chrome/global/textcontext.dtd)
+ locale/global/viewSource.dtd (@AB_CD@/chrome/global/viewSource.dtd)
+ locale/global/viewSource.properties (@AB_CD@/chrome/global/viewSource.properties)
+ locale/global/wizard.properties (@AB_CD@/chrome/global/wizard.properties)
locale/global/dom/dom.properties (@AB_CD@/chrome/global/dom/dom.properties)
locale/global/history/history.properties (@AB_CD@/chrome/global/history/history.properties)
locale/global/layout/HtmlForm.properties (@AB_CD@/chrome/global/layout/HtmlForm.properties)
locale/global/layout/MediaDocument.properties (@AB_CD@/chrome/global/layout/MediaDocument.properties)
locale/global/layout/xmlparser.properties (@AB_CD@/chrome/global/layout/xmlparser.properties)
locale/global/layout/xslt.properties (@AB_CD@/chrome/global/layout/xslt.properties)
locale/global/security/caps.properties (@AB_CD@/chrome/global/security/caps.properties)
locale/global/webservices/security.properties (@AB_CD@/chrome/global/webservices/security.properties)
locale/global/xml/prettyprint.dtd (@AB_CD@/chrome/global/xml/prettyprint.dtd)
locale/global/xpinstall/xpinstall.properties (@AB_CD@/chrome/global/xpinstall/xpinstall.properties)
* locale/global-region/contents.rdf (generic/chrome/global-region/contents.rdf)
+ locale/global-region/region.dtd (@AB_CD@/chrome/global-region/region.dtd)
+ locale/global-region/region.properties (@AB_CD@/chrome/global-region/region.properties)
+ locale/global-region/builtinURLs.rdf (@AB_CD@/chrome/global-region/builtinURLs.rdf)
* locale/global-platform/contents.rdf (generic/chrome/global-platform/contents.rdf)
locale/global-platform/mac/platformKeys.properties (@AB_CD@/chrome/global-platform/mac/platformKeys.properties)
locale/global-platform/unix/platformKeys.properties (@AB_CD@/chrome/global-platform/unix/platformKeys.properties)
locale/global-platform/win/platformKeys.properties (@AB_CD@/chrome/global-platform/win/platformKeys.properties)
locale/global-platform/mac/intl.properties (@AB_CD@/chrome/global-platform/mac/intl.properties)
locale/global-platform/unix/intl.properties (@AB_CD@/chrome/global-platform/unix/intl.properties)
locale/global-platform/win/intl.properties (@AB_CD@/chrome/global-platform/win/intl.properties)
* locale/mozapps/contents.rdf (generic/chrome/mozapps/contents.rdf)
* locale/mozapps/downloads/unknownContentType.properties (@AB_CD@/chrome/mozapps/downloads/unknownContentType.properties)
* locale/mozapps/downloads/unknownContentType.dtd (@AB_CD@/chrome/mozapps/downloads/unknownContentType.dtd)
locale/mozapps/downloads/pref-downloads.dtd (@AB_CD@/chrome/mozapps/downloads/pref-downloads.dtd)
locale/mozapps/downloads/editAction.dtd (@AB_CD@/chrome/mozapps/downloads/editAction.dtd)
locale/mozapps/downloads/downloads.dtd (@AB_CD@/chrome/mozapps/downloads/downloads.dtd)
locale/mozapps/downloads/downloads.properties (@AB_CD@/chrome/mozapps/downloads/downloads.properties)
locale/mozapps/downloads/downloadProperties.dtd (@AB_CD@/chrome/mozapps/downloads/downloadProperties.dtd)
locale/mozapps/extensions/extensions.dtd (@AB_CD@/chrome/mozapps/extensions/extensions.dtd)
locale/mozapps/extensions/extensions.properties (@AB_CD@/chrome/mozapps/extensions/extensions.properties)
locale/mozapps/extensions/about.dtd (@AB_CD@/chrome/mozapps/extensions/about.dtd)
locale/mozapps/extensions/finalize.dtd (@AB_CD@/chrome/mozapps/extensions/finalize.dtd)
locale/mozapps/plugins/plugins.dtd (@AB_CD@/chrome/mozapps/plugins/plugins.dtd)
locale/mozapps/plugins/plugins.properties (@AB_CD@/chrome/mozapps/plugins/plugins.properties)
locale/mozapps/profile/createProfileWizard.dtd (@AB_CD@/chrome/mozapps/profile/createProfileWizard.dtd)
locale/mozapps/profile/profileSelection.properties (@AB_CD@/chrome/mozapps/profile/profileSelection.properties)
locale/mozapps/profile/profileSelection.dtd (@AB_CD@/chrome/mozapps/profile/profileSelection.dtd)
locale/mozapps/update/update.dtd (@AB_CD@/chrome/mozapps/update/update.dtd)
locale/mozapps/update/update.properties (@AB_CD@/chrome/mozapps/update/update.properties)
locale/mozapps/update/errors.dtd (@AB_CD@/chrome/mozapps/update/errors.dtd)
locale/mozapps/xpinstall/xpinstallConfirm.dtd (@AB_CD@/chrome/mozapps/xpinstall/xpinstallConfirm.dtd)
locale/mozapps/xpinstall/xpinstallConfirm.properties (@AB_CD@/chrome/mozapps/xpinstall/xpinstallConfirm.properties)
* locale/passwordmgr/contents.rdf (generic/chrome/passwordmgr/contents.rdf)
* locale/passwordmgr/passwordmgr.properties (@AB_CD@/chrome/passwordmgr/passwordmgr.properties)
* locale/passwordmgr/passwordManager.dtd (@AB_CD@/chrome/passwordmgr/passwordManager.dtd)

View File

@ -9,6 +9,10 @@ function DownloadProgressListener (aDocument, aStringBundle)
this._statusFormatKBMB = aStringBundle.getString("statusFormatKBMB");
this._statusFormatKBKB = aStringBundle.getString("statusFormatKBKB");
this._statusFormatMBMB = aStringBundle.getString("statusFormatMBMB");
this._statusFormatUnknownMB = aStringBundle.getString("statusFormatUnknownMB");
this._statusFormatUnknownKB = aStringBundle.getString("statusFormatUnknownKB");
this._remain = aStringBundle.getString("remain");
this._unknownFilesize = aStringBundle.getString("unknownFilesize");
this._longTimeFormat = aStringBundle.getString("longTimeFormat");
this._shortTimeFormat = aStringBundle.getString("shortTimeFormat");
@ -130,10 +134,10 @@ DownloadProgressListener.prototype =
var rem = (aMaxTotalProgress - aCurTotalProgress) / rate;
rem = parseInt(rem + .5);
status = this._replaceInsert(status, 3, this._formatSeconds(rem, this.doc));
status = this._replaceInsert(status, 3, this._formatSeconds(rem, this.doc) + " " + this._remain);
}
else
status = this._replaceInsert(status, 3, "???");
status = this._replaceInsert(status, 3, this._unknownFilesize);
if (download)
download.setAttribute("status", status);
@ -175,9 +179,8 @@ DownloadProgressListener.prototype =
var format = "";
if (!progressHasMB && !totalHasMB) {
format = this._statusFormatKBKB;
format = this._statusFormatUnknownKB;
format = this._replaceInsert(format, 1, aKBytes);
format = this._replaceInsert(format, 2, aTotalKBytes);
}
else if (progressHasMB && totalHasMB) {
format = this._statusFormatMBMB;
@ -189,6 +192,10 @@ DownloadProgressListener.prototype =
format = this._replaceInsert(format, 1, aKBytes);
format = this._replaceInsert(format, 2, (aTotalKBytes / 1000).toFixed(1));
}
else if (progressHasMB && !totalHasMB) {
format = this._statusFormatUnknownMB;
format = this._replaceInsert(format, 1, (aKBytes / 1000).toFixed(1));
}
else {
// This is an undefined state!
dump("*** huh?!\n");

View File

@ -41,6 +41,8 @@
<!DOCTYPE window [
<!ENTITY % downloadDTD SYSTEM "chrome://mozapps/locale/downloads/downloads.dtd" >
%downloadDTD;
<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd" >
%browserDTD;
]>
<bindings id="downloadBindings"
@ -523,6 +525,7 @@
<handler event="keypress" keycode="vk_right" modifiers="meta" action="this.selected = null"/>
<handler event="keypress" keycode="vk_delete" action="if (this.selected) this.selected.fireEvent('remove');"/>
<handler event="keypress" key=" " action="if (this.selected) { this.selected.pauseResume(); }"/>
<handler event="keypress" key="&newNavigatorCmd.key;" modifiers="control" action="parent.window.open('');"/>
</handlers>
</binding>

View File

@ -163,7 +163,7 @@ function downloadCompleted(aDownload)
gDownloadViewController.onCommandUpdate();
if (gActiveDownloads.length == 0)
document.title = document.documentElement.getAttribute("statictitle");
window.title = document.documentElement.getAttribute("statictitle");
}
catch (e) {
}
@ -410,7 +410,7 @@ function onUpdateProgress()
{
var numActiveDownloads = gActiveDownloads.length;
if (numActiveDownloads == 0) {
document.title = document.documentElement.getAttribute("statictitle");
window.title = document.documentElement.getAttribute("statictitle");
gLastComputedMean = 0;
return;
}
@ -430,7 +430,7 @@ function onUpdateProgress()
// mean progress will be zero but the last computed mean will be
// greater than zero.
if (mean == 0 && gLastComputedMean > 0) {
document.title = document.documentElement.getAttribute("statictitle");
window.title = document.documentElement.getAttribute("statictitle");
return;
}
if (mean != gLastComputedMean) {
@ -443,7 +443,7 @@ function onUpdateProgress()
else
title = strings.getFormattedString("downloadsTitle", [mean]);
document.title = title;
window.title = title;
}
}

View File

@ -37,6 +37,12 @@
#
# ***** END LICENSE BLOCK *****
#ifdef XP_UNIX
#ifndef XP_MACOSX
#define XP_GNOME 1
#endif
#endif
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://mozapps/content/downloads/downloads.css"?>
<?xml-stylesheet href="chrome://mozapps/skin/downloads/downloads.css"?>
@ -76,7 +82,11 @@
<keyset id="downloadKeys">
<key id="key_cleanUp" keycode="VK_DELETE" command="cmd_cleanUp" modifiers="accel,shift"/>
<key id="key_close" key="&cmd.close.commandKey;" oncommand="closeWindow(true);" modifiers="accel"/>
#ifdef XP_GNOME
<key id="key_close2" key="&cmd.close2Unix.commandKey;" oncommand="closeWindow(true);" modifiers="accel"/>
#else
<key id="key_close2" key="&cmd.close2.commandKey;" oncommand="closeWindow(true);" modifiers="accel"/>
#endif
<key keycode="VK_ESCAPE" oncommand="closeWindow(true);"/>
<key id="key_info" key="&cmd.info.commandKey;" oncommand="onDownloadShowInfo();" modifiers="accel"/>
</keyset>

View File

@ -63,10 +63,19 @@ function APP_URI(aType)
function ArrayEnumerator(aItems)
{
this._index = 0;
if (aItems) {
for (var i = 0; i < aItems.length; ++i) {
if (!aItems[i])
aItems.splice(i, 1);
}
}
this._contents = aItems || [];
this.push = function (aElement)
{
if (aElement)
this._contents.push(aElement);
};
@ -132,7 +141,7 @@ HelperApps.prototype = {
while (extEnumerator.hasMore()) {
entry.addExtension(extEnumerator.getNext());
}
entry.description = aMIMEInfo.description;
entry.description = aMIMEInfo.Description;
entry.appDisplayName = "";
}
@ -224,7 +233,7 @@ HelperApps.prototype = {
}
}
else if (aProperty.EqualsNode(this._fileTypeArc)) {
if (typeInfo.description == "") {
if (typeInfo.Description == "") {
try {
var literal = bundle.getFormattedString("fileEnding", [typeInfo.primaryExtension.toUpperCase()]);
return gRDF.GetLiteral(literal);
@ -235,7 +244,7 @@ HelperApps.prototype = {
return gRDF.GetLiteral(typeInfo.MIMEType);
}
}
return gRDF.GetLiteral(typeInfo.description);
return gRDF.GetLiteral(typeInfo.Description);
}
else if (aProperty.EqualsNode(this._fileHandlerArc)) {
var handler = this.GetTarget(aSource, this._handlerPropArc, true);

View File

@ -182,7 +182,7 @@ nsUnknownContentTypeDialog.prototype = {
var wildCardExtension = "*";
if (aSuggestedFileExtension) {
wildCardExtension += aSuggestedFileExtension;
picker.appendFilter(this.mLauncher.MIMEInfo.description, wildCardExtension);
picker.appendFilter(this.mLauncher.MIMEInfo.Description, wildCardExtension);
}
picker.appendFilters( nsIFilePicker.filterAll );
@ -265,6 +265,7 @@ nsUnknownContentTypeDialog.prototype = {
// initDialog: Fill various dialog fields with initial content.
initDialog : function() {
// Put file name in window title.
var win = this.dialogElement( "unknownContentType" );
var suggestedFileName = this.mLauncher.suggestedFileName;
// Some URIs do not implement nsIURL, so we can't just QI.
@ -287,7 +288,7 @@ nsUnknownContentTypeDialog.prototype = {
this.mTitle = this.dialogElement("strings").getFormattedString("title", [fname]);
this.mDialog.document.title = this.mTitle;
win.setAttribute( "title", this.mTitle );
// Put content type, filename and location into intro.
this.initIntro(url, fname);
@ -373,7 +374,7 @@ nsUnknownContentTypeDialog.prototype = {
var mimeInfo = this.mLauncher.MIMEInfo;
// 1. Try to use the pretty description of the type, if one is available.
var typeString = mimeInfo.description;
var typeString = mimeInfo.Description;
if (typeString == "") {
// 2. If there is none, use the extension to identify the file, e.g. "ZIP file"

View File

@ -49,6 +49,7 @@
<script type="application/x-javascript" src="chrome://mozapps/content/downloads/helperApps.js"/>
<script type="application/x-javascript" src="chrome://mozapps/content/downloads/pref-downloads.js"/>
<script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>
<groupbox>
<caption label="&askOnSave.label;"/>
@ -90,7 +91,7 @@
<tree id="fileHandlersList" flex="1" hidecolumnpicker="true"
datasources="rdf:null"
onselect="fileHandlerListSelectionChanged();"
ondblclick="editFileHandler();">
ondblclick="if (isValidLeftClick(event, 'treechildren')) editFileHandler();">
<template>
<rule>

View File

@ -95,13 +95,10 @@ nsUnknownContentTypeDialog.prototype = {
null,
"chrome,centerscreen,titlebar,dialog=yes,dependent",
null);
// Hook this object to the dialog.
this.mDialog.dialog = this;
// Hook up utility functions.
// XXXben these lines can disappear if we can get XULPP to run on stuff not
// thus referenced in jar.mns.
this.getSpecialFolderKey = this.mDialog.getSpecialFolderKey;
// Watch for error notifications.
@ -218,7 +215,7 @@ nsUnknownContentTypeDialog.prototype = {
var wildCardExtension = "*";
if (aSuggestedFileExtension) {
wildCardExtension += aSuggestedFileExtension;
picker.appendFilter(this.mLauncher.MIMEInfo.description, wildCardExtension);
picker.appendFilter(this.mLauncher.MIMEInfo.Description, wildCardExtension);
}
picker.appendFilters( nsIFilePicker.filterAll );
@ -255,11 +252,25 @@ nsUnknownContentTypeDialog.prototype = {
validateLeafName: function (aLocalFile, aLeafName, aFileExt)
{
try {
if (aLeafName == "")
aLeafName = "unnamed" + (aFileExt ? "." + aFileExt : "");
aLocalFile.append(aLeafName);
this.makeFileUnique(aLocalFile);
if (aLocalFile.isExecutable() && !this.mLauncher.targetFile.isExecutable()) {
var f = aLocalFile.clone();
aLocalFile.leafName = aLocalFile.leafName + "." + this.mLauncher.MIMEInfo.primaryExtension;
f.remove(false);
this.makeFileUnique(aLocalFile);
}
return aLocalFile;
},
makeFileUnique: function (aLocalFile)
{
try {
// Since we're automatically downloading, we don't get the file picker's
// logic to check for existing files, so we need to do that here.
//
@ -279,6 +290,7 @@ nsUnknownContentTypeDialog.prototype = {
aLocalFile.leafName = aLocalFile.leafName.replace(/\.|$/, "-1$&");
}
}
aLocalFile.create(Components.interfaces.nsIFile.NORMAL_FILE_TYPE, 0600);
}
catch (e) {
dump("*** exception in validateLeafName: " + e + "\n");
@ -288,7 +300,6 @@ nsUnknownContentTypeDialog.prototype = {
aLocalFile.createUnique(Components.interfaces.nsIFile.NORMAL_FILE_TYPE, 0600);
}
}
return aLocalFile;
},
// ---------- implementation methods ----------
@ -339,6 +350,7 @@ nsUnknownContentTypeDialog.prototype = {
// initDialog: Fill various dialog fields with initial content.
initDialog : function() {
// Put file name in window title.
var win = this.dialogElement( "unknownContentType" );
var suggestedFileName = this.mLauncher.suggestedFileName;
// Some URIs do not implement nsIURL, so we can't just QI.
@ -362,7 +374,7 @@ nsUnknownContentTypeDialog.prototype = {
var displayName = fname.replace(/ +/g, " ");
this.mTitle = this.dialogElement("strings").getFormattedString("title", [displayName]);
this.mDialog.document.title = this.mTitle;
win.setAttribute( "title", this.mTitle );
// Put content type, filename and location into intro.
this.initIntro(url, fname, displayName);
@ -460,7 +472,7 @@ nsUnknownContentTypeDialog.prototype = {
var mimeInfo = this.mLauncher.MIMEInfo;
// 1. Try to use the pretty description of the type, if one is available.
var typeString = mimeInfo.description;
var typeString = mimeInfo.Description;
if (typeString == "") {
// 2. If there is none, use the extension to identify the file, e.g. "ZIP file"
@ -754,6 +766,7 @@ nsUnknownContentTypeDialog.prototype = {
// for the file to be saved to to pass to |saveToDisk| - otherwise
// we must ask the user to pick a save name.
#if 0
var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
var targetFile = null;
try {
@ -766,6 +779,8 @@ nsUnknownContentTypeDialog.prototype = {
catch(e) { }
this.mLauncher.saveToDisk(targetFile, false);
#endif
this.mLauncher.saveToDisk(null, false);
}
else
this.mLauncher.launchWithApplication(null, false);

View File

@ -44,7 +44,7 @@ function init()
if (creator)
creator = creator.QueryInterface(Components.interfaces.nsIRDFLiteral).Value;
document.title = extensionsStrings.getFormattedString("aboutWindowTitle", [name]);
document.documentElement.setAttribute("title", extensionsStrings.getFormattedString("aboutWindowTitle", [name]));
var extensionName = document.getElementById("extensionName");
extensionName.setAttribute("value", name);
var extensionVersion = document.getElementById("extensionVersion");

View File

@ -13,18 +13,45 @@ var gGetMoreURL = "";
var gCurrentTheme = "";
var gDownloadManager = null;
var gObserverIndex = -1;
var gItemType = -1;
const PREF_APP_ID = "app.id";
const PREF_EXTENSIONS_GETMORETHEMESURL = "extensions.getMoreThemesURL";
const PREF_EXTENSIONS_GETMOREEXTENSIONSURL = "extensions.getMoreExtensionsURL";
const PREF_EXTENSIONS_DSS_ENABLED = "extensions.dss.enabled";
const PREF_EXTENSIONS_DSS_SWITCHPENDING = "extensions.dss.switchPending";
const PREF_EM_LAST_SELECTED_SKIN = "extensions.lastSelectedSkin";
const PREF_GENERAL_SKINS_SELECTEDSKIN = "general.skins.selectedSkin";
const KEY_DEFAULT_THEME = "classic/1.0";
///////////////////////////////////////////////////////////////////////////////
// Utility Functions
function stripPrefix(aResourceURI)
const PREFIX_EXTENSION = "urn:mozilla:extension:";
const PREFIX_THEME = "urn:mozilla:theme:";
function getItemPrefix(aItemType)
{
return aResourceURI.substr(gURIPrefix.length, aResourceURI.length);
var prefix = "";
if (aItemType & nsIUpdateItem.TYPE_EXTENSION)
prefix = PREFIX_EXTENSION;
else if (aItemType & nsIUpdateItem.TYPE_THEME)
prefix = PREFIX_THEME;
return prefix;
}
function stripPrefix(aURI, aItemType)
{
var val = aURI;
if (aItemType == nsIUpdateItem.TYPE_ADDON)
val = stripPrefix(aURI, getItemType(aURI));
else {
var prefix = getItemPrefix(aItemType);
if (prefix && aURI.substr(0, prefix.length) == prefix)
val = aURI.substr(prefix.length, aURI.length);
}
return val;
}
function openURL(aURL)
@ -51,6 +78,19 @@ function flushDataSource()
rds.Flush();
}
function setRestartMessage(aItem)
{
var sbs = Components.classes["@mozilla.org/intl/stringbundle;1"]
.getService(Components.interfaces.nsIStringBundleService);
var extensionStrings = sbs.createBundle("chrome://mozapps/locale/extensions/extensions.properties");
var brandStrings = sbs.createBundle("chrome://global/locale/brand.properties");
var brandShortName = brandStrings.GetStringFromName("brandShortName");
var themeName = aItem.getAttribute("name");
var restartMessage = extensionStrings.formatStringFromName("dssSwitchAfterRestart",
[brandShortName], 1);
aItem.setAttribute("creator", restartMessage);
}
///////////////////////////////////////////////////////////////////////////////
// Event Handlers
function onExtensionSelect(aEvent)
@ -70,6 +110,7 @@ function Startup()
var isExtensions = gWindowState == "extensions";
gURIPrefix = isExtensions ? "urn:mozilla:extension:" : "urn:mozilla:theme:";
gDSRoot = isExtensions ? "urn:mozilla:extension:root" : "urn:mozilla:theme:root";
gItemType = isExtensions ? nsIUpdateItem.TYPE_EXTENSION : nsIUpdateItem.TYPE_THEME;
document.documentElement.setAttribute("windowtype", document.documentElement.getAttribute("windowtype") + "-" + gWindowState);
@ -94,10 +135,30 @@ function Startup()
if (!isExtensions) {
gExtensionsView.addEventListener("richview-select", onThemeSelect, false);
if (pref.prefHasUserValue(PREF_GENERAL_SKINS_SELECTEDSKIN))
gCurrentTheme = pref.getCharPref(PREF_GENERAL_SKINS_SELECTEDSKIN);
else
gCurrentTheme = KEY_DEFAULT_THEME;
var useThemeButton = document.getElementById("useThemeButton");
useThemeButton.hidden = false;
var optionsButton = document.getElementById("optionsButton");
optionsButton.hidden = true;
var pref = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
if (!pref.getBoolPref(PREF_EXTENSIONS_DSS_ENABLED) &&
pref.getBoolPref(PREF_EXTENSIONS_DSS_SWITCHPENDING)) {
var lastSelectedSkin = pref.getCharPref(PREF_EM_LAST_SELECTED_SKIN);
for (var i = 0; i < gExtensionsView.childNodes.length; ++i) {
var item = gExtensionsView.childNodes[i];
if (item.getAttribute("internalName") == lastSelectedSkin) {
setRestartMessage(item);
break;
}
}
}
}
// Restore the last-selected extension
@ -110,7 +171,7 @@ function Startup()
gExtensionsView.selected = lastSelected;
var extensionsStrings = document.getElementById("extensionsStrings");
document.title = extensionsStrings.getString(gWindowState + "Title");
document.documentElement.setAttribute("title", extensionsStrings.getString(gWindowState + "Title"));
gExtensionsViewController.onCommandUpdate();
@ -238,7 +299,7 @@ XPInstallDownloadManager.prototype = {
// gExtensionManager.addDownload(displayName, url, iconURL, type);
var item = Components.classes["@mozilla.org/updates/item;1"]
.createInstance(Components.interfaces.nsIUpdateItem);
item.init(url, " ", "", "", displayName, -1, url, iconURL, "", "", type);
item.init(url, " ", "", "", displayName, -1, url, iconURL, "", type);
items.push(item);
// Advance the enumerator
@ -424,7 +485,8 @@ var gExtensionContextMenus = ["menuitem_options", "menuitem_homepage", "menuitem
"menuitem_enable", "menuitem_disable", "menuseparator_2",
"menuitem_moveTop", "menuitem_moveUp", "menuitem_moveDn"];
var gThemeContextMenus = ["menuitem_useTheme", "menuitem_homepage", "menuitem_about",
"menuseparator_1", "menuitem_uninstall", "menuitem_update"];
"menuseparator_1", "menuitem_uninstall", "menuitem_update",
"menuitem_enable"];
function buildContextMenu(aEvent)
{
@ -451,7 +513,7 @@ function buildContextMenu(aEvent)
menuitem_about.setAttribute("label", extensionsStrings.getFormattedString("aboutExtension", [name]));
if (isExtensions) {
var canEnable = gExtensionsViewController.isCommandEnabled("cmd_enable");
var canEnable = gExtensionsViewController.isCommandEnabled("cmd_reallyEnable");
var menuitemToShow, menuitemToHide;
if (canEnable) {
menuitemToShow = document.getElementById("menuitem_enable_clone");
@ -464,6 +526,17 @@ function buildContextMenu(aEvent)
menuitemToShow.hidden = false;
menuitemToHide.hidden = true;
}
else {
var enableMenu = document.getElementById("menuitem_enable_clone");
if (gExtensionsView.selected.getAttribute("compatible") == "false" ||
gExtensionsView.selected.disabled)
// don't let the user activate incompatible themes, but show a (disabled) Enable
// menuitem to give visual feedback; it's disabled because cmd_enable returns false
enableMenu.hidden = false;
else {
enableMenu.hidden = true;
}
}
return true;
}
@ -578,21 +651,51 @@ var gExtensionsViewController = {
case "cmd_close":
return true;
case "cmd_useTheme":
return selectedItem && gCurrentTheme != selectedItem.getAttribute("internalName");
return selectedItem &&
!selectedItem.disabled &&
selectedItem.getAttribute("toBeUninstalled") != "true" &&
gCurrentTheme != selectedItem.getAttribute("internalName");
case "cmd_options":
return selectedItem && !selectedItem.disabled && selectedItem.getAttribute("optionsURL") != "";
return selectedItem &&
!selectedItem.disabled &&
selectedItem.getAttribute("toBeUninstalled") != "true" &&
selectedItem.getAttribute("optionsURL") != "";
case "cmd_about":
return selectedItem && (selectedItem.disabled ? selectedItem.getAttribute("aboutURL") == "" : true);
case "cmd_homepage":
return selectedItem && selectedItem.getAttribute("homepageURL") != "";
case "cmd_uninstall":
return selectedItem && selectedItem.getAttribute("locked") != "true";
if (gWindowState != "extensions") {
// uninstall is only available if the selected item isn't the
// default theme.
return (selectedItem &&
selectedItem.getAttribute("internalName") != KEY_DEFAULT_THEME);
}
return selectedItem &&
selectedItem.getAttribute("toBeUninstalled") != "true" &&
selectedItem.getAttribute("locked") != "true";
case "cmd_update":
return true;
return !selectedItem ||
(selectedItem &&
selectedItem.getAttribute("toBeUninstalled") != "true" &&
selectedItem.getAttribute("toBeInstalled") != "true");
case "cmd_reallyEnable":
// controls whether to show Enable or Disable in extensions' context menu
return selectedItem &&
selectedItem.disabled &&
!gExtensionManager.inSafeMode;
case "cmd_enable":
return selectedItem && selectedItem.disabled && !gExtensionManager.inSafeMode;
//controls wheter the Enable/Disable menuitem is enabled
return selectedItem &&
selectedItem.disabled &&
!gExtensionManager.inSafeMode &&
selectedItem.getAttribute("toBeUninstalled") != "true" &&
selectedItem.getAttribute("compatible") != "false";
case "cmd_disable":
return selectedItem && selectedItem.getAttribute("locked") != "true" && !selectedItem.disabled;
return selectedItem &&
!selectedItem.disabled &&
selectedItem.getAttribute("toBeUninstalled") != "true" &&
selectedItem.getAttribute("locked") != "true";
case "cmd_movetop":
return selectedItem && (gExtensionsView.children[0] != selectedItem);
case "cmd_moveup":
@ -637,10 +740,21 @@ var gExtensionsViewController = {
var pref = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
gCurrentTheme = aSelectedItem.getAttribute("internalName");
// Set this pref so the user can reset the theme in safe mode
pref.setCharPref(PREF_EM_LAST_SELECTED_SKIN, gCurrentTheme);
if (pref.getBoolPref(PREF_EXTENSIONS_DSS_ENABLED)) {
pref.setCharPref(PREF_GENERAL_SKINS_SELECTEDSKIN, gCurrentTheme);
}
else {
// Theme change will happen on next startup, this flag tells
// the Theme Manager that it needs to show "This theme will
// be selected after a restart" text in the selected theme
// item.
pref.setBoolPref(PREF_EXTENSIONS_DSS_SWITCHPENDING, true);
// Update the view
setRestartMessage(aSelectedItem);
}
// disable the useThemeButton
gExtensionsViewController.onCommandUpdate();
@ -675,27 +789,27 @@ var gExtensionsViewController = {
cmd_movetop: function (aSelectedItem)
{
var movingID = aSelectedItem.id;
gExtensionManager.moveTop(stripPrefix(movingID));
gExtensionManager.moveTop(stripPrefix(movingID, gItemType));
gExtensionsView.selected = document.getElementById(movingID);
},
cmd_moveup: function (aSelectedItem)
{
var movingID = aSelectedItem.id;
gExtensionManager.moveUp(stripPrefix(movingID));
gExtensionManager.moveUp(stripPrefix(movingID, gItemType));
gExtensionsView.selected = document.getElementById(movingID);
},
cmd_movedn: function (aSelectedItem)
{
var movingID = aSelectedItem.id;
gExtensionManager.moveDown(stripPrefix(movingID));
gExtensionManager.moveDown(stripPrefix(movingID, gItemType));
gExtensionsView.selected = document.getElementById(movingID);
},
cmd_update: function (aSelectedItem)
{
var id = aSelectedItem ? stripPrefix(aSelectedItem.id) : null;
var id = aSelectedItem ? stripPrefix(aSelectedItem.id, gItemType) : null;
var itemType = gWindowState == "extensions" ? nsIUpdateItem.TYPE_EXTENSION : nsIUpdateItem.TYPE_THEME;
var items = gExtensionManager.getItemList(id, itemType, { });
var updates = Components.classes["@mozilla.org/updates/update-service;1"]
@ -732,21 +846,33 @@ var gExtensionsViewController = {
nextElement = nextElement.id;
if (gWindowState == "extensions")
gExtensionManager.uninstallExtension(stripPrefix(selectedID));
else if (gWindowState == "themes")
gExtensionManager.uninstallTheme(stripPrefix(selectedID));
gExtensionManager.uninstallExtension(stripPrefix(selectedID, gItemType));
else if (gWindowState == "themes") {
// If the theme being uninstalled is the current theme, we need to reselect
// the default.
var pref = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
var currentTheme = pref.getCharPref(PREF_GENERAL_SKINS_SELECTEDSKIN);
if (aSelectedItem.getAttribute("internalName") == currentTheme)
this.cmd_useTheme(document.getElementById("urn:mozilla:theme:{972ce4c6-7e08-4474-a285-3208198ce6fd}"));
gExtensionManager.uninstallTheme(stripPrefix(selectedID, gItemType));
}
gExtensionsView.selected = document.getElementById(nextElement);
},
cmd_disable: function (aSelectedItem)
{
gExtensionManager.disableExtension(stripPrefix(aSelectedItem.id));
gExtensionManager.disableExtension(stripPrefix(aSelectedItem.id, gItemType));
},
cmd_enable: function (aSelectedItem)
{
gExtensionManager.enableExtension(stripPrefix(aSelectedItem.id));
if (gWindowState == "extensions")
gExtensionManager.enableExtension(stripPrefix(aSelectedItem.id, gItemType));
else
gExtensionManager.enableTheme(stripPrefix(aSelectedItem.id, gItemType));
},
#ifdef MOZ_THUNDERBIRD
cmd_install: function(aSelectedItem)

View File

@ -65,49 +65,9 @@
<xul:label class="extension-item-version" xbl:inherits="value=version"/>
</xul:hbox>
<xul:label class="extension-item-description" xbl:inherits="value=description" crop="right"/>
<xul:label class="extension-item-creator" xbl:inherits="value=creator" crop="right"/>
</xul:vbox>
<xul:vbox pack="start">
<xul:image class="extension-button" anonid="options-button"
#ifdef XP_WIN
tooltiptext="&options.tooltip;"
#else
tooltiptext="&optionsUnix.tooltip;"
#endif
/>
<xul:image class="extension-button" anonid="about-button"
tooltiptext="&about.tooltip;" />
<xul:image class="extension-button" anonid="homepage-button"
tooltiptext="&homepage.tooltip;" />
</xul:vbox>
</xul:hbox>
</content>
<implementation>
<field name="eventPrefix">"extension-"</field>
</implementation>
<handlers>
<handler event="click">
<![CDATA[
switch (event.originalTarget.getAttribute("anonid")) {
case "options-button":
gExtensionsViewController.commands.cmd_options(this);
event.preventDefault();
event.stopPropagation();
break;
case "about-button":
gExtensionsViewController.commands.cmd_about(this);
event.preventDefault();
event.stopPropagation();
break;
case "homepage-button":
gExtensionsViewController.commands.cmd_homepage(this);
event.preventDefault();
event.stopPropagation();
break;
}
]]>
</handler>
</handlers>
</binding>
<binding id="extension-tobedisabled" extends="chrome://mozapps/content/shared/richview.xml#richview-item">

View File

@ -64,7 +64,7 @@
<stringbundleset id="extensionsSet">
<stringbundle id="brandStrings" src="chrome://global/locale/brand.properties"/>
<stringbundle id="extensionsStrings" src="chrome://mozapps/locale/extensions/extensions.properties"/>
<stringbundle id="xpinstallStrings" src="chrome://communicator/locale/xpinstall/xpinstall.properties"/>
<stringbundle id="xpinstallStrings" src="chrome://global/locale/xpinstall/xpinstall.properties"/>
</stringbundleset>
<keyset id="extensionsKeys">
@ -174,12 +174,18 @@
<binding subject="?extension"
predicate="http://www.mozilla.org/2004/em-rdf#disabled"
object="?disabled"/>
<binding subject="?extension"
predicate="http://www.mozilla.org/2004/em-rdf#compatible"
object="?compatible"/>
<binding subject="?extension"
predicate="http://www.mozilla.org/2004/em-rdf#homepageURL"
object="?homepage-url"/>
<binding subject="?extension"
predicate="http://www.mozilla.org/2004/em-rdf#description"
object="?description"/>
<binding subject="?extension"
predicate="http://www.mozilla.org/2004/em-rdf#displayDescription"
object="?displayDescription"/>
<binding subject="?extension"
predicate="http://www.mozilla.org/2004/em-rdf#locked"
object="?locked"/>
@ -219,8 +225,9 @@
here to make each element not be so heavy. -->
<extension uri="?extension"
image="?icon" name="?name" version="?version"
description="?description" creator="?creator"
description="?displayDescription" creator="?creator"
disabled="?disabled" locked="?locked"
compatible="?compatible"
optionsURL="?options-url" homepageURL="?homepage-url"
aboutURL="?about-url" updateURL="?update-url"
previewImage="?previewImage" internalName="?internalName"
@ -265,6 +272,9 @@
label="&cmd.update.label;" accesskey="&cmd.update.accesskey;" tooltiptext="&cmd.update.tooltip;"
command="cmd_update"/>
<separator class="commandBarSeparator"/>
<button id="optionsButton"
label="&cmd.options.label;" accesskey="&cmd.options.accesskey;" tooltiptext="&cmd.options.tooltip;"
command="cmd_options"/>
<button id="useThemeButton" hidden="true"
label="&cmd.useTheme.label;" accesskey="&cmd.useTheme.accesskey;" tooltiptext="&cmd.useTheme.tooltip;"
command="cmd_useTheme"/>

View File

@ -77,6 +77,8 @@ interface nsIExtensionManager : nsISupports
// Installing Themes
void installTheme(in nsIFile aJARFile, in unsigned long aFlags);
void uninstallTheme(in string aThemeID);
void enableTheme(in string aThemeID);
void disableTheme(in string aThemeID);
// Downloads
void addDownloads([array, size_is(aItemCount)] in nsIUpdateItem aItems,
@ -88,12 +90,9 @@ interface nsIExtensionManager : nsISupports
readonly attribute boolean inSafeMode;
// Updates
const unsigned long UPDATE_MODE_VERSION = 0x01;
const unsigned long UPDATE_MODE_NORMAL = 0x02;
void update([array, size_is(aItemCount)] in nsIUpdateItem aItems,
in unsigned long aItemCount,
in unsigned long aUpdateMode,
in boolean aWriteVersionUpdates);
in unsigned long aVersionUpdateOnly);
// Management
void getItemList(in string aItemID,
@ -113,8 +112,7 @@ interface nsIExtensionItemUpdater : nsISupports
{
void checkForUpdates([array, size_is(aItemCount)] in nsIUpdateItem aItems,
in unsigned long aItemCount,
in unsigned long aUpdateMode,
in boolean aWriteVersionUpdates);
in boolean aVersionUpdateOnly);
readonly attribute unsigned short sourceEvent;
readonly attribute unsigned short updateTypes;

View File

@ -77,6 +77,7 @@ public class VersionCheck
String aUserCookie,
String aSessionCookie)
{
System.out.println("*** getNewestExtension Called");
return getExtensionUpdates(aInstalledItem, aTargetApp, aTargetAppVersion, true);
}
@ -86,6 +87,7 @@ public class VersionCheck
String aUserCookie,
String aSessionCookie)
{
System.out.println("*** getVersionUpdate Called");
return getExtensionUpdates(aInstalledItem, aTargetApp, aTargetAppVersion, false);
}

View File

@ -0,0 +1,253 @@
<?php
/* -*- Mode: php; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Extension Update Service.
*
* The Initial Developer of the Original Code is Vladimir Vukicevic.
* Portions created by the Initial Developer are Copyright (C) 2004
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Vladimir Vukicevic <vladimir@pobox.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 ***** */
/// config bits:
$db_server = "";
$db_user = "";
$db_pass = "";
$db_name = "";
// error handling
function bail ($errstr) {
die("Error: " . $errstr);
}
// major.minor.release.build[+]
// make sure this is a valid version
function expandversion ($vstr) {
$v = explode('.', $vstr);
if ($vstr == '' || count($v) == 0 || count($v) > 4) {
bail ('Bogus version.');
}
$vlen = count($v);
$ret = array();
$hasplus = 0;
for ($i = 0; $i < 4; $i++) {
if ($i > $vlen-1) {
// this version chunk was not specified; give 0
$ret[] = 0;
} else {
$s = $v[$i];
if ($i == 3) {
// need to check for +
$slen = strlen($s);
if ($s{$slen-1} == '+') {
$s = substr($s, 0, $slen-1);
$hasplus = 1;
}
}
$ret[] = intval($s);
}
}
$ret[] = $hasplus;
return $ret;
}
function vercmp ($a, $b) {
if ($a == $b)
return 0;
$va = expandversion($a);
$vb = expandversion($b);
for ($i = 0; $i < 5; $i++)
if ($va[$i] != $vb[$i])
return ($vb[$i] - $va[$i]);
return 0;
}
//
// These are passed in the GET string
//
if (!array_key_exists('reqVersion', $_GET))
bail ("Invalid request.");
$reqVersion = $_GET['reqVersion'];
if ($reqVersion == 1) {
if (!array_key_exists('id', $_GET) ||
!array_key_exists('version', $_GET) ||
!array_key_exists('maxAppVersion', $_GET) ||
!array_key_exists('appID', $_GET) ||
!array_key_exists('appVersion', $_GET))
bail ("Invalid request.");
$reqItemGuid = $_GET['id'];
$reqItemVersion = $_GET['version'];
$reqItemMaxAppVersion = $_GET['maxAppVersion'];
$reqTargetAppGuid = $_GET['appID'];
$reqTargetAppVersion = $_GET['appVersion'];
} else {
// bail
bail ("Bad request version received");
}
// check args
if (empty($reqItemGuid) || empty($reqItemVersion) || empty($reqTargetAppGuid)) {
bail ("Invalid request.");
}
mysql_connect($db_server, $db_user, $db_pass)
|| bail ("Failed to connect to database.");
mysql_select_db ($db_name)
|| bail ("Failed to select database.");
// We need to fetch two things for the database:
// 1) The current extension version's info, for a possibly updated max version
// 2) The latest version available, if different from the above.
//
// We know:
// - $reqItemGuid
// - $reqItemVersion
// - $reqTargetAppGuid
// - $reqTargetAppVersion
//
// We need to get:
// - extension GUID
// - extension version
// - extension xpi link
// - app ID
// - app min version
// - app max version
$query = "SELECT t_main.guid AS extguid,
t_version.version AS extversion,
t_version.uri AS exturi,
t_version.minappver AS appminver,
t_version.maxappver AS appmaxver,
t_applications.guid AS appguid
FROM t_main, t_version, t_applications
WHERE t_main.guid = '" . mysql_real_escape_string($reqItemGuid) . "' AND
t_main.id = t_version.id AND
t_version.appid = t_applications.appid AND
t_applications.guid = '" . mysql_real_escape_string($reqTargetAppGuid) . "'";
$result = mysql_query ($query);
if (!$result) {
bail ('Query error: ' . mysql_error());
}
// info for this version
$thisVersionData = '';
// info for highest version
$highestVersion = '';
$highestVersionData = '';
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
// is this row for the current version?
if ($line['extversion'] == $reqItemVersion) {
// if so
$thisVersionData = $line;
} else if (vercmp ($reqItemVersion, $line['extversion']) > 0) {
// did we already see an update with a higher version than this?
if ($highestVersion != '' && vercmp ($highestVersion, $line['extversion']) < 0)
continue;
// does this update support my current app version?
if (vercmp($line['appmaxver'], $reqTargetAppVersion) > 0 ||
vercmp($reqTargetAppVersion, $line['appminver']) > 0)
continue;
$highestVersion = $line['extversion'];
$highestVersionData = $line;
}
}
mysql_free_result ($result);
//
// Now to spit out the RDF. We hand-generate because the data is pretty simple.
//
print "<?xml version=\"1.0\"?>\n";
print "<RDF:RDF xmlns:RDF=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:em=\"http://www.mozilla.org/2004/em-rdf#\">\n\n";
print "<RDF:Description about=\"urn:mozilla:extension:{$reqItemGuid}\">\n";
// output list of updates (just highest and this)
print " <em:updates><RDF:Seq>\n";
if (!empty($thisVersionData))
print " <RDF:li resource=\"urn:mozilla:extension:{$reqItemGuid}:{$thisVersionData['extversion']}\"/>\n";
if (!empty($highestVersionData))
print " <RDF:li resource=\"urn:mozilla:extension:{$reqItemGuid}:{$highestVersionData['extversion']}\"/>\n";
print " </RDF:Seq></em:updates>\n";
// output compat bits for firefox 0.9
if (!empty($highestVersionData)) {
print " <em:version>{$highestVersionData['extversion']}</em:version>\n";
print " <em:updateLink>{$highestVersionData['exturi']}</em:updateLink>\n";
}
print "</RDF:Description>\n\n";
function print_update ($data) {
print "<RDF:Description about=\"urn:mozilla:extension:{$reqItemGuid}:{$data['extversion']}\">\n";
print " <em:version>{$data['extversion']}</em:version>\n";
print " <em:targetApplication>\n";
print " <RDF:Description>\n";
print " <em:id>{$data['appguid']}</em:id>\n";
print " <em:minVersion>{$data['appminver']}</em:minVersion>\n";
print " <em:maxVersion>{$data['appmaxver']}</em:maxVersion>\n";
print " <em:updateLink>{$data['exturi']}</em:updateLink>\n";
print " </RDF:Description>\n";
print " </em:targetApplication>\n";
print "</RDF:Description>\n";
}
if (!empty($thisVersionData))
print_update ($thisVersionData);
if (!empty($highestVersionData))
print_update ($highestVersionData);
print "</RDF:RDF>\n";
?>

File diff suppressed because it is too large Load Diff

View File

@ -150,7 +150,6 @@ sub ParseInstallerCfg
while ($line = <fpInstallCfg>)
{
if (substr($line, -2, 2) eq "\r\n") {
$line = substr($line, 0, length($line) - 2) . "\n";
}
@ -204,6 +203,9 @@ sub ParseInstallerCfg
elsif ($prop eq "GREVersion") {
$ENV{WIZ_greVersion} = $value;
}
elsif ($prop eq "LicenseFile") {
$ENV{WIZ_licenseFile} = $value;
}
}
close(fpInstallCfg);

View File

@ -207,17 +207,20 @@ foreach $_ (@wizard_files) {
chmod $mode, "$gDirDistInstall/setup/$_";
}
foreach $_ ("config.ini", @extra_ini_files) {
foreach $_ ("config.ini", "install.ini") {
copy ("$gDirDistInstall/$_", "$gDirDistInstall/setup") ||
die "copy $gDirDistInstall/$_ $gDirDistInstall/setup: $!\n";
}
# copy license file for the installer
copy("$topsrcdir/LICENSE", "$gDirDistInstall/license.txt") ||
die "copy $topsrcdir/LICENSE $gDirDistInstall/license.txt: $!\n";
copy("$topsrcdir/LICENSE", "$gDirDistInstall/setup/license.txt") ||
die "copy $topsrcdir/LICENSE $gDirDistInstall/setup/license.txt: $!\n";
$licenseLocation = "$topsrcdir/LICENSE";
if ($ENV{WIZ_licenseFile} ne "") {
$licenseLocation = $ENV{WIZ_licenseFile};
}
copy("$topsrcdir/$licenseLocation", "$gDirDistInstall/license.txt") ||
die "copy $topsrcdir/$licenseLocation $gDirDistInstall/license.txt: $!\n";
copy("$topsrcdir/$licenseLocation", "$gDirDistInstall/setup/license.txt") ||
die "copy $licenseLocation $gDirDistInstall/setup/license.txt: $!\n";
BuildPlatformInstaller() && die;
@ -323,7 +326,7 @@ sub MakeConfigFile
{
# Make config.ini and other ini files
chdir($gDirDistInstall);
foreach $_ ("config.ini", @extra_ini_files) {
foreach $_ ("config.ini", "install.ini") {
$itFile = $_;
$itFile =~ s/\.ini$/\.it/;
copy("$inConfigFiles/$itFile", "$gDirDistInstall/$itFile") || die "copy $inConfigFiles/$itFile $gDirDistInstall/$itFile";
@ -387,7 +390,7 @@ sub VerifyComponents()
if($mComponent =~ /talkback/i)
{
print " place holder: $gDirStageProduct/$mComponent\n";
mkdir("$gDirStageProduct/$mComponent", 775);
mkdir("$gDirStageProduct/$mComponent", 0775);
}
elsif(-d "$gDirStageProduct/$mComponent")
{

View File

@ -293,7 +293,11 @@ sub OutputInstallSize()
my($installSize);
print " calculating size for $inPath\n";
$installSize = `$ENV{WIZ_distInstallPath}/ds32.exe /D /L0 /A /S /C 32768 $inPath`;
my ($inPathWin) = `cygpath -wa $inPath`;
chomp($inPathWin);
$inPathWin =~ s/\\/\\\\/g;
$installSize = `$ENV{WIZ_distInstallPath}/ds32.exe /D /L0 /A /S /C 32768 $inPathWin`;
$installSize += 32768; # take into account install.js
$installSize = int($installSize / 1024);
$installSize += 1;

View File

@ -76,11 +76,10 @@ $greUniqueID = $ENV{WIZ_greUniqueID};
$greVersion = $ENV{WIZ_greVersion};
# Get the name of the file replacing the .jst extension with a .js extension
@inJstFileSplit = split(/\./,$inJstFile);
$outJsFile = $inJstFileSplit[0];
$outJsFile .= ".js";
$outTempFile = $inJstFileSplit[0];
$outTempFile .= ".template";
$inJstFileBase = $inJstFile;
$inJstFileBase =~ s/\.jst//;
$outJsFile = "$inJstFileBase.js";
$outTempFile = "$inJstFileBase.template";
$foundLongFiles = 0;
print " copy \"$topsrcdir/xpinstall/packager/common/share.t\" $outTempFile\n";

View File

@ -0,0 +1,83 @@
# ***** 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 toolkit packaging scripts.
#
# The Initial Developer of the Original Code is
# Benjamin Smedberg <bsmedberg@covad.net>
#
# Portions created by the Initial Developer are Copyright (C) 2004
# 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 *****
ifndef AB_CD
AB_CD = $(MOZ_UI_LOCALE)
endif
ifndef MOZ_PKG_APPNAME
MOZ_PKG_APPNAME = $(MOZ_APP_NAME)
endif
ifndef MOZ_PKG_VERSION
MOZ_PKG_VERSION = $(MOZ_APP_VERSION)
endif
ifndef MOZ_PKG_PLATFORM
MOZ_PKG_PLATFORM := $(TARGET_OS)-$(TARGET_CPU)
# TARGET_OS/TARGET_CPU may be unintuitive, so we hardcode some special formats
ifeq ($(OS_ARCH),WINNT)
MOZ_PKG_PLATFORM := win$(MOZ_BITS)
endif
ifeq ($(OS_ARCH),Darwin)
MOZ_PKG_PLATFORM := mac
endif
ifeq ($(TARGET_OS),linux-gnu)
MOZ_PKG_PLATFORM := linux-$(TARGET_CPU)
endif
# GTK2 is the default, so we mark gtk1 builds
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk)
MOZ_PKG_PLATFORM := $(MOZ_PKG_PLATFORM)-gtk1
endif
ifdef MOZ_SVG
MOZ_PKG_PLATFORM := $(MOZ_PKG_PLATFORM)-svg
ifdef MOZ_SVG_RENDERER_GDIPLUG
MOZ_PKG_PLATFORM := $(MOZ_PKG_PLATFORM)-gdiplus
endif
ifdef MOZ_SVG_RENDERER_LIBART
MOZ_PKG_PLATFORM := $(MOZ_PKG_PLATFORM)-libart
endif
ifdef MOZ_SVG_RENDERER_CAIRO
MOZ_PKG_PLATFORM := $(MOZ_PKG_PLATFORM)-cairo
endif
endif #MOZ_SVG
endif #MOZ_PKG_PLATFORM
PKG_BASENAME := $(MOZ_PKG_APPNAME)-$(MOZ_PKG_VERSION).$(AB_CD).$(MOZ_PKG_PLATFORM)

View File

@ -0,0 +1,235 @@
# ***** 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
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Benjamin Smedberg <bsmedberg@covad.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 *****
include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk
# This is how we create the Unix binary packages we release to the public.
# Currently the only format is tar.gz (TGZ), but it should be fairly easy
# to add .rpm (RPM) and .deb (DEB) later.
ifndef MOZ_PKG_FORMAT
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
MOZ_PKG_FORMAT = DMG
else
ifeq (,$(filter-out OS2 WINNT, $(OS_ARCH)))
MOZ_PKG_FORMAT = ZIP
INSTALLER_DIR = windows
else
ifeq (,$(filter-out SunOS, $(OS_ARCH)))
MOZ_PKG_FORMAT = BZ2
else
MOZ_PKG_FORMAT = TGZ
endif
INSTALLER_DIR = unix
endif
endif
endif # MOZ_PKG_FORMAT
PACKAGE = $(PKG_BASENAME)$(PKG_SUFFIX)
MAKE_PACKAGE = $(error What is a $(MOZ_PKG_FORMAT) package format?);
TAR_CREATE_FLAGS = -cvhf
ifeq ($(OS_ARCH),BSD_OS)
TAR_CREATE_FLAGS = -cvLf
endif
CREATE_FINAL_TAR = tar -c --owner=0 --group=0 --numeric-owner --mode="go-w" -f
ifeq ($(MOZ_PKG_FORMAT),TAR)
PKG_SUFFIX = .tar
MAKE_PACKAGE = $(CREATE_FINAL_TAR) - $(MOZ_PKG_APPNAME) > $(PACKAGE)
endif
ifeq ($(MOZ_PKG_FORMAT),TGZ)
PKG_SUFFIX = .tar.gz
MAKE_PACKAGE = $(CREATE_FINAL_TAR) - $(MOZ_PKG_APPNAME) | gzip -vf9 > $(PACKAGE)
endif
ifeq ($(MOZ_PKG_FORMAT),BZ2)
PKG_SUFFIX = .tar.bz2
MAKE_PACKAGE = $(CREATE_FINAL_TAR) - $(MOZ_PKG_APPNAME) | bzip2 -vf > $(PACKAGE)
endif
ifeq ($(MOZ_PKG_FORMAT),ZIP)
PKG_SUFFIX = .zip
MAKE_PACKAGE = $(ZIP) -r9D $(PACKAGE) $(MOZ_PKG_APPNAME)
endif
ifeq ($(MOZ_PKG_FORMAT),DMG)
ifdef MOZ_DEBUG
_APPNAME = $(MOZ_APP_DISPLAYNAME)Debug.app
else
_APPNAME = $(MOZ_APP_DISPLAYNAME).app
endif
PKG_SUFFIX = .dmg.gz
_ABS_TOPSRCDIR = $(shell cd $(topsrcdir) && pwd)
MAKE_PACKAGE = $(_ABS_TOPSRCDIR)/build/package/mac_osx/make-diskimage $(PKG_BASENAME).dmg $(MOZ_PKG_APPNAME) $(MOZ_APP_DISPLAYNAME) && gzip -vf9 $(PKG_BASENAME).dmg
endif
# dummy macro if we don't have PSM built
SIGN_NSS =
ifndef CROSS_COMPILE
ifdef MOZ_PSM
SIGN_NSS = @echo signing nss libraries;
SIGN_ENV = LD_LIBRARY_PATH=$(DIST)/bin:${LD_LIBRARY_PATH} \
LD_LIBRARYN32_PATH=$(DIST)/bin:${LD_LIBRARYN32_PATH} \
LD_LIBRARYN64_PATH=$(DIST)/bin:${LD_LIBRARYN64_PATH} \
LD_LIBRARY_PATH_64=$(DIST)/bin:${LD_LIBRARY_PATH_64} \
SHLIB_PATH=$(DIST)/bin:${SHLIB_PATH} LIBPATH=$(DIST)/bin:${LIBPATH} \
DYLD_LIBRARY_PATH=$(DIST)/bin:${DYLD_LIBRARY_PATH} \
LIBRARY_PATH=$(DIST)/bin:${LIBRARY_PATH}
SIGN_CMD = cd $(DIST)/$(MOZ_PKG_APPNAME) && $(SIGN_ENV) $(DIST)/bin/shlibsign -v -i
SOFTOKN = $(DIST)/$(MOZ_PKG_APPNAME)/$(DLL_PREFIX)softokn3$(DLL_SUFFIX)
FREEBL_HYBRID = $(DIST)/$(MOZ_PKG_APPNAME)/$(DLL_PREFIX)freebl_hybrid_3$(DLL_SUFFIX)
FREEBL_PURE = $(DIST)/$(MOZ_PKG_APPNAME)/$(DLL_PREFIX)freebl_pure32_3$(DLL_SUFFIX)
SIGN_NSS += $(SIGN_CMD) $(SOFTOKN); \
if test -f $(FREEBL_HYBRID); then $(SIGN_CMD) $(FREEBL_HYBRID); fi; \
if test -f $(FREEBL_PURE); then $(SIGN_CMD) $(FREEBL_PURE); fi;
endif # MOZ_PSM
endif # !CROSS_COMPILE
NSPR_LDIR = $(findstring -L,$(NSPR_LIBS))
ifneq ($(NSPR_LDIR),)
NSPR_LDIR = $(subst -L,,$(word 1,$(NSPR_LIBS)))
endif
NO_PKG_FILES += \
core \
bsdecho \
gtscc \
jscpucfg \
nsinstall \
viewer \
TestGtkEmbed \
bloaturls.txt \
codesighs* \
elf-dynstr-gc \
mangle* \
maptsv* \
mfc* \
mkdepend* \
msdump* \
msmap* \
nm2tsv* \
nsinstall* \
rebasedlls* \
res/samples \
res/throbber \
shlibsign* \
winEmbed.exe \
chrome/chrome.rdf \
$(NULL)
libs:: $(PACKAGE)
GARBAGE += $(DIST)/$(PACKAGE) $(PACKAGE)
ifdef USE_SHORT_LIBNAME
MOZILLA_BIN = $(DIST)/bin/$(MOZ_PKG_APPNAME)$(BIN_SUFFIX)
else
MOZILLA_BIN = $(DIST)/bin/$(MOZ_PKG_APPNAME)-bin
endif
ifeq ($(OS_ARCH),IRIX)
STRIP_FLAGS = -f
endif
ifeq ($(OS_ARCH),BeOS)
STRIP_FLAGS = -g
PLATFORM_EXCLUDE_LIST = ! -name "*.stub" ! -name "$(MOZ_PKG_APPNAME)-bin"
endif
ifeq ($(OS_ARCH),OS2)
STRIP = $(srcdir)/os2/strip.cmd
STRIP_FLAGS =
TAR_CREATE_FLAGS = -cvf
PLATFORM_EXCLUDE_LIST = ! -name "*.ico"
endif
$(PACKAGE): $(MOZILLA_BIN)
@rm -rf $(DIST)/$(MOZ_PKG_APPNAME) $(DIST)/$(PKG_BASENAME).tar $(DIST)/$(PKG_BASENAME).dmg $(DIST)/$(PKG_BASENAME).dmg.gz $@ $(EXCLUDE_LIST)
# NOTE: this must be a tar now that dist links into the tree so that we
# do not strip the binaries actually in the tree.
@echo "Creating package directory..."
@mkdir $(DIST)/$(MOZ_PKG_APPNAME)
ifeq ($(MOZ_PKG_FORMAT),DMG)
@cd $(DIST) && rsync -auvL $(_APPNAME) $(MOZ_PKG_APPNAME)
else
@cd $(DIST)/bin && tar $(TAR_CREATE_FLAGS) - * | (cd ../$(MOZ_PKG_APPNAME); tar -xf -)
ifdef MOZ_NATIVE_NSPR
ifndef EXCLUDE_NSPR_LIBS
@echo "Copying NSPR libs..."
@cp -p $(NSPR_LDIR)/*$(DLL_SUFFIX) $(DIST)/$(MOZ_PKG_APPNAME)
@chmod 755 $(DIST)/$(MOZ_PKG_APPNAME)/*$(DLL_SUFFIX)
endif
endif
endif # DMG
@echo "Stripping package directory..."
@cd $(DIST)/$(MOZ_PKG_APPNAME); find . ! -type d \
! -name "*.js" \
! -name "*.xpt" \
! -name "*.gif" \
! -name "*.jpg" \
! -name "*.png" \
! -name "*.xpm" \
! -name "*.txt" \
! -name "*.rdf" \
! -name "*.sh" \
! -name "*.properties" \
! -name "*.dtd" \
! -name "*.html" \
! -name "*.xul" \
! -name "*.css" \
! -name "*.xml" \
! -name "*.jar" \
! -name "*.dat" \
! -name "*.tbl" \
! -name "*.src" \
! -name "*.reg" \
$(PLATFORM_EXCLUDE_LIST) \
-exec $(STRIP) $(STRIP_FLAGS) {} >/dev/null 2>&1 \;
$(SIGN_NSS)
@echo "Removing unpackaged files..."
ifeq ($(MOZ_PKG_FORMAT),DMG)
cd $(DIST)/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/MacOS; rm -rf $(NO_PKG_FILES)
else
cd $(DIST)/$(MOZ_PKG_APPNAME); rm -rf $(NO_PKG_FILES)
endif
@echo "Compressing..."
cd $(DIST); $(MAKE_PACKAGE)

View File

@ -10,11 +10,9 @@ $exe_suffix = '';
@wizard_files = (
"mozilla-installer",
"mozilla-installer-bin",
"installer.ini",
"watermark.png",
"header.png"
);
@extra_ini_files = ();
sub BuildPlatformInstaller
{
@ -37,8 +35,6 @@ sub BuildPlatformInstaller
rename ("$instRoot/mozilla-installer", "$instRoot/$mainExe-installer");
rename ("$instRoot/mozilla-installer-bin", "$instRoot/$mainExe-installer-bin");
system ("strip $instRoot/$mainExe-installer-bin");
system ("cd $gDirDistInstall/sea && tar -zcv --owner=0 --group=0 --numeric-owner --mode='go-w' -f $seiFileNameSpecific.tar.gz $mainExe-installer");
return 0;
}

View File

@ -60,10 +60,6 @@ LIBS = \
-lpthread \
$(NULL)
ifeq ($(OS_ARCH),SunOS)
LIBS += -lnsl
endif
EXTRA_DEPS = \
$(DIST)/lib/$(LIB_PREFIX)jar50_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)xpnet_s.$(LIB_SUFFIX) \
@ -79,7 +75,6 @@ LOCAL_INCLUDES = -I$(topsrcdir)/xpinstall/stub
WIZARD_FILES = \
mozilla-installer \
$(PROGRAM) \
installer.ini \
$(NULL)
libs:: $(WIZARD_FILES)

View File

@ -87,6 +87,8 @@ nsComponentsDlg::Parse(nsINIParser *aParser)
char *showDlg = NULL;
int bufsize = 0;
char *currSec = (char *) malloc(strlen(COMPONENT) + 3);
if (!currSec) return E_MEM;
XI_VERIFY(gCtx);
/* optional keys */
@ -110,11 +112,8 @@ nsComponentsDlg::Parse(nsINIParser *aParser)
if (bufsize == 0)
XI_IF_FREE(mTitle);
aParser->GetStringAlloc(DLG_COMPONENTS, SUBTITLE, &mSubTitle, &bufsize);
if (bufsize == 0)
XI_IF_FREE(mSubTitle);
BAIL:
XI_IF_FREE(currSec);
return err;
}
@ -143,6 +142,7 @@ nsComponentsDlg::Show(int aDirection)
mTable = gtk_table_new(5, 1, FALSE);
gtk_notebook_append_page(GTK_NOTEBOOK(gCtx->notebook), mTable, NULL);
mPageNum = gtk_notebook_get_current_page(GTK_NOTEBOOK(gCtx->notebook));
gtk_widget_show(mTable);
// 1st row: a label (msg0)
// insert a static text widget in the first row
@ -256,18 +256,8 @@ nsComponentsDlg::Show(int aDirection)
else
{
gtk_notebook_set_page(GTK_NOTEBOOK(gCtx->notebook), mPageNum);
}
// <b>title</b>\0
char *titleBuf = new char[strlen(mTitle) + 9];
sprintf(titleBuf, "<b>%s</b>", mTitle);
gtk_label_set_markup(GTK_LABEL(gCtx->header_title), titleBuf);
gtk_label_set_text(GTK_LABEL(gCtx->header_subtitle), mSubTitle);
delete[] titleBuf;
gtk_widget_show(mTable);
}
// signal connect the buttons
gCtx->backID = gtk_signal_connect(GTK_OBJECT(gCtx->back), "clicked",

View File

@ -33,7 +33,7 @@
#include "nsXIOptions.h"
#include "nsINIParser.h"
#define RES_FILE "installer"
#define RES_FILE "install"
#define RES_SECT "String Resources"
class nsXInstaller;

View File

@ -111,7 +111,7 @@ nsXInstaller::ParseConfig()
XI_ERR_BAIL(ParseGeneral(parser));
XI_ERR_BAIL(gCtx->ldlg->Parse(parser));
XI_ERR_BAIL(gCtx->wdlg->Parse(parser));
XI_ERR_BAIL(gCtx->cdlg->Parse(parser));
//XI_ERR_BAIL(gCtx->cdlg->Parse(parser)); // components before setup type
XI_ERR_BAIL(gCtx->sdlg->Parse(parser));
XI_ERR_BAIL(gCtx->idlg->Parse(parser));

View File

@ -107,7 +107,7 @@ if(-d "$DEPTH\\stage")
# The destination cannot be a sub directory of the source
# pkgcp.pl will get very unhappy
mkdir("$DEPTH\\stage", 775);
mkdir("$DEPTH\\stage", 0775);
system("perl $cwdPackager\\pkgcp.pl -s $cwdDistWin -d $DEPTH\\stage -f $inConfigFiles\\$ENV{WIZ_packagesFile} -o dos -v");

View File

@ -8,7 +8,6 @@ $exe_suffix = '.exe';
"setup.exe",
"setuprsc.dll"
);
@extra_ini_files = ("install.ini");
sub BuildPlatformInstaller
{

View File

@ -574,7 +574,7 @@ sub VerifyComponents()
if($mComponent =~ /talkback/i)
{
print " place holder: $gDirStageProduct/$mComponent\n";
mkdir("$gDirStageProduct/$mComponent", 775);
mkdir("$gDirStageProduct/$mComponent", 0775);
}
elsif(-d "$gDirStageProduct/$mComponent")
{

View File

@ -40,7 +40,7 @@ EXTRA_DSO_LIBS = \
xpnet_s \
$(NULL)
USE_STATIC_LIBS = 1
USE_NON_MT_LIBS = 1
CSRCS = \
dialogs.c \

View File

@ -47,6 +47,20 @@
// commdlg.h is needed to build with WIN32_LEAN_AND_MEAN
#include <commdlg.h>
// re-define PSH_WIZARD97 as per latest Platform SDK (below)
#ifdef PSH_WIZARD97
#undef PSH_WIZARD97
#endif
#if (_WIN32_IE >= 0x0400)
//----- New flags for wizard97 -----------
#if (_WIN32_IE < 0x0500)
#define PSH_WIZARD97 0x00002000
#else
#define PSH_WIZARD97 0x01000000
#endif
#endif
// Turn off default to safe upgrade for 0.8... until we can guarantee that we won't be deleting other files.
#define DEFAULT_SAFE_UPGRADE FALSE
@ -2342,3 +2356,8 @@ void InitPathDisplay (HWND aWindow, char* aPath, int aFolderIcon, int aFolderFie
}

View File

@ -1394,7 +1394,7 @@ DrawGaugeBorder(HWND hWnd)
ReleaseDC(hWnd, hDC);
}
// Draws the progress bar
// Draws the blue progress bar
static void
DrawProgressBar(HWND hWnd, int nBars)
{
@ -1415,7 +1415,7 @@ DrawProgressBar(HWND hWnd, int nBars)
else
{
// Draw the bars
hBrush = CreateSolidBrush(GetSysColor(COLOR_HIGHLIGHT));
hBrush = CreateSolidBrush(RGB(0, 0, 128));
rect.left = rect.top = BAR_LIBXPNET_MARGIN;
rect.bottom -= BAR_LIBXPNET_MARGIN;
rect.right = rect.left + BAR_LIBXPNET_WIDTH;

View File

@ -30,7 +30,7 @@ MODULE = setuprsc
LIBRARY_NAME = setuprsc
RESFILE = setuprsc.res
USE_STATIC_LIBS = 1
USE_NON_MT_LIBS = 1
NO_DIST_INSTALL = 1

View File

@ -31,7 +31,7 @@ PROGRAM = uninstall$(BIN_SUFFIX)
RESFILE = uninstall.res
REQUIRES = $(ZLIB_REQUIRES)
EXTRA_DSO_LIBS = mozz_s
USE_STATIC_LIBS = 1
USE_NON_MT_LIBS = 1
EXPORTS = logkeys.h

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