Bug 652376: Migrate XPInstall dialog into the extensions directory. r=robstrong

--HG--
rename : toolkit/locales/en-US/chrome/mozapps/xpinstall/xpinstallConfirm.dtd => toolkit/locales/en-US/chrome/mozapps/extensions/xpinstallConfirm.dtd
rename : toolkit/locales/en-US/chrome/mozapps/xpinstall/xpinstallConfirm.properties => toolkit/locales/en-US/chrome/mozapps/extensions/xpinstallConfirm.properties
rename : toolkit/mozapps/xpinstall/content/xpinstallConfirm.css => toolkit/mozapps/extensions/content/xpinstallConfirm.css
rename : toolkit/mozapps/xpinstall/content/xpinstallConfirm.js => toolkit/mozapps/extensions/content/xpinstallConfirm.js
rename : toolkit/mozapps/xpinstall/content/xpinstallConfirm.xul => toolkit/mozapps/extensions/content/xpinstallConfirm.xul
rename : toolkit/mozapps/xpinstall/content/xpinstallItem.xml => toolkit/mozapps/extensions/content/xpinstallItem.xml
rename : toolkit/themes/pinstripe/mozapps/xpinstall/xpinstallConfirm.css => toolkit/themes/pinstripe/mozapps/extensions/xpinstallConfirm.css
rename : toolkit/themes/winstripe/mozapps/xpinstall/xpinstallConfirm.css => toolkit/themes/winstripe/mozapps/extensions/xpinstallConfirm.css
This commit is contained in:
Dave Townsend 2011-11-23 15:04:56 -08:00
Родитель 1c6682c9c8
Коммит 0eaaa1e2e0
17 изменённых файлов: 10 добавлений и 327 удалений

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

@ -56,7 +56,6 @@ PARALLEL_DIRS = \
mozapps/plugins \
mozapps/shared \
mozapps/update \
mozapps/xpinstall \
mozapps/webapps \
obsolete \
profile \

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

@ -102,8 +102,8 @@
locale/@AB_CD@/mozapps/update/updates.dtd (%chrome/mozapps/update/updates.dtd)
locale/@AB_CD@/mozapps/update/updates.properties (%chrome/mozapps/update/updates.properties)
locale/@AB_CD@/mozapps/update/history.dtd (%chrome/mozapps/update/history.dtd)
locale/@AB_CD@/mozapps/xpinstall/xpinstallConfirm.dtd (%chrome/mozapps/xpinstall/xpinstallConfirm.dtd)
locale/@AB_CD@/mozapps/xpinstall/xpinstallConfirm.properties (%chrome/mozapps/xpinstall/xpinstallConfirm.properties)
locale/@AB_CD@/mozapps/xpinstall/xpinstallConfirm.dtd (%chrome/mozapps/extensions/xpinstallConfirm.dtd)
locale/@AB_CD@/mozapps/xpinstall/xpinstallConfirm.properties (%chrome/mozapps/extensions/xpinstallConfirm.properties)
% locale alerts @AB_CD@ %locale/@AB_CD@/alerts/
locale/@AB_CD@/alerts/notificationNames.properties (%chrome/alerts/notificationNames.properties)
% locale cookie @AB_CD@ %locale/@AB_CD@/cookie/

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

@ -25,3 +25,8 @@ toolkit.jar:
content/mozapps/extensions/newaddon.xul (content/newaddon.xul)
content/mozapps/extensions/newaddon.js (content/newaddon.js)
content/mozapps/extensions/setting.xml (content/setting.xml)
* content/mozapps/xpinstall/xpinstallConfirm.xul (content/xpinstallConfirm.xul)
* content/mozapps/xpinstall/xpinstallConfirm.js (content/xpinstallConfirm.js)
content/mozapps/xpinstall/xpinstallConfirm.css (content/xpinstallConfirm.css)
* content/mozapps/xpinstall/xpinstallItem.xml (content/xpinstallItem.xml)

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

@ -1,46 +0,0 @@
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either 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

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

@ -1,190 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla 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):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
var gManager;
var gBundle;
var gCanClose = false;
var gCancelled = false;
// implements nsIXPIProgressDialog
var progressHooks =
{
onStateChange: function( aIndex, aState, aValue )
{
const state = Components.interfaces.nsIXPIProgressDialog;
var status = document.getElementById("status"+aIndex);
var progress = document.getElementById("progress"+aIndex);
switch( aState ) {
case state.DOWNLOAD_START:
status.setAttribute("value",
gBundle.getString("progress.downloading"));
progress.setAttribute("value","0%");
break;
case state.DOWNLOAD_DONE:
status.setAttribute("value",
gBundle.getString("progress.downloaded"));
progress.setAttribute("value","100%");
break;
case state.INSTALL_START:
status.setAttribute("value",
gBundle.getString("progress.installing"));
progress.setAttribute("mode","undetermined");
break;
case state.INSTALL_DONE:
progress.setAttribute("mode","determined");
progress.hidden = true;
var msg;
try
{
msg = gBundle.getString("error"+aValue);
}
catch (e)
{
msg = gBundle.stringBundle.formatStringFromName(
"unknown.error", [aValue], 1 );
}
status.setAttribute("value",msg);
break;
case state.DIALOG_CLOSE:
// nsXPInstallManager is done with us, but we'll let users
// dismiss the dialog themselves so they can see the status
// (unless we're closing because the user cancelled)
document.getElementById("ok").disabled = false;
document.getElementById("cancel").disabled = true;
gCanClose = true;
if (gCancelled)
window.close();
break;
}
},
onProgress: function( aIndex, aValue, aMaxValue )
{
var percent = Math.round( 100 * (aValue/aMaxValue) );
var node = document.getElementById("progress"+aIndex);
node.setAttribute("value", percent);
},
QueryInterface: function( iid )
{
if (!iid.equals(Components.interfaces.nsISupports) &&
!iid.equals(Components.interfaces.nsIXPIProgressDialog))
throw Components.results.NS_ERROR_NO_INTERFACE;
return this;
}
}
function onLoad()
{
doSetOKCancel(dlgOK, dlgCancel);
document.getElementById("ok").disabled = true;
document.getElementById("cancel").focus();
gBundle = document.getElementById("xpinstallBundle");
var param = window.arguments[0].QueryInterface(
Components.interfaces.nsIDialogParamBlock );
if ( !param )
dump (" error getting param block interface \n");
var i = 0;
var row = 0;
var numElements = param.GetInt(1);
while ( i < numElements )
{
var moduleName = param.GetString(i++);
var URL = param.GetString(i++);
var certName = param.GetString(i++);
addTreeItem(row++, moduleName, URL);
}
gManager = window.arguments[1];
// inform nsXPInstallManager we're open for business
gManager.observe( progressHooks, "xpinstall-progress", "open" );
}
function addTreeItem(aRow, aName, aUrl)
{
// first column is the package name
var item = document.createElement("description");
item.setAttribute("class", "packageName");
item.setAttribute("id", "package"+aRow);
item.setAttribute("value", aName);
item.setAttribute("tooltiptext", aUrl);
// second column is the status
var status = document.createElement('description');
status.setAttribute("class", "packageStatus");
status.setAttribute("id", "status"+aRow);
status.setAttribute("value", gBundle.getString("progress.queued"));
// third row is a progress meter
var progress = document.createElement("progressmeter");
progress.setAttribute("class", "packageProgress");
progress.setAttribute("id", "progress"+aRow);
progress.setAttribute("value", "0%");
// create row and add it to the grid
var row = document.createElement("row");
row.appendChild(item);
row.appendChild(status);
row.appendChild(progress);
document.getElementById("xpirows").appendChild(row);
}
function dlgOK() { return true; }
function dlgCancel()
{
gCancelled = true;
if (gManager)
gManager.observe( progressHooks, "xpinstall-progress", "cancel");
// window is closed by native impl after cleanup
return gCanClose;
}

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

@ -1,80 +0,0 @@
<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is Mozilla Communicator client code.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-2002
the Initial Developer. All Rights Reserved.
Contributor(s):
Don Bragg (dbragg@netscape.com) 12/08/1999
Blake Ross (BlakeR1234@aol.com) 7/05/2000
Daniel Veditz <dveditz@netscape.com> 1/2002
Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/xpinstall/xpinstall.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/xpinstall/xpistatus.dtd" >
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&progressTitle.label;"
onload="onLoad()"
onclose="return gCanClose"
id="statusDlg"
class="dialog"
style="width: 50em"
>
<script src="chrome://communicator/content/xpinstall/xpistatus.js"/>
<keyset id="dialogKeys"/>
<stringbundle id="xpinstallBundle" src="chrome://communicator/locale/xpinstall/xpinstall.properties"/>
<vbox id="mainProgressBox" flex="1">
<groupbox id="progressGroup" orient="vertical" flex="1">
<caption id="progressCaption" label="&group.caption;"/>
<grid id="progressGrid" flex="1">
<columns>
<column id="xpiColumn" flex="3"/>
<column id="statusColumn" flex="2"/>
<column id="progressColumn"/>
</columns>
<rows id="xpirows">
</rows>
</grid>
</groupbox>
<separator class="thin"/>
<hbox id="okCancelButtonsRight"/>
</vbox>
</window>

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

@ -1,5 +0,0 @@
toolkit.jar:
* content/mozapps/xpinstall/xpinstallConfirm.xul (content/xpinstallConfirm.xul)
* content/mozapps/xpinstall/xpinstallConfirm.js (content/xpinstallConfirm.js)
content/mozapps/xpinstall/xpinstallConfirm.css (content/xpinstallConfirm.css)
* content/mozapps/xpinstall/xpinstallItem.xml (content/xpinstallItem.xml)

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

@ -72,7 +72,7 @@ toolkit.jar:
* skin/classic/mozapps/update/updates.css (update/updates.css)
skin/classic/mozapps/viewsource/viewsource.css (viewsource/viewsource.css)
skin/classic/mozapps/xpinstall/xpinstallItemGeneric.png (extensions/extensionGeneric.png)
skin/classic/mozapps/xpinstall/xpinstallConfirm.css (xpinstall/xpinstallConfirm.css)
skin/classic/mozapps/xpinstall/xpinstallConfirm.css (extensions/xpinstallConfirm.css)
#ifdef MOZ_PLACES
skin/classic/mozapps/places/defaultFavicon.png (places/defaultFavicon.png)
skin/classic/mozapps/places/tagContainerIcon.png (places/tagContainerIcon.png)

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

@ -76,7 +76,7 @@ toolkit.jar:
skin/classic/mozapps/update/downloadButtons.png (update/downloadButtons.png)
skin/classic/mozapps/update/updates.css (update/updates.css)
skin/classic/mozapps/viewsource/viewsource.css (viewsource/viewsource.css)
* skin/classic/mozapps/xpinstall/xpinstallConfirm.css (xpinstall/xpinstallConfirm.css)
* skin/classic/mozapps/xpinstall/xpinstallConfirm.css (extensions/xpinstallConfirm.css)
skin/classic/mozapps/xpinstall/xpinstallItemGeneric.png (extensions/extensionGeneric.png)
#ifdef XP_WIN
@ -156,6 +156,6 @@ toolkit.jar:
skin/classic/aero/mozapps/update/downloadButtons.png (update/downloadButtons-aero.png)
skin/classic/aero/mozapps/update/updates.css (update/updates.css)
skin/classic/aero/mozapps/viewsource/viewsource.css (viewsource/viewsource.css)
* skin/classic/aero/mozapps/xpinstall/xpinstallConfirm.css (xpinstall/xpinstallConfirm.css)
* skin/classic/aero/mozapps/xpinstall/xpinstallConfirm.css (extensions/xpinstallConfirm.css)
skin/classic/aero/mozapps/xpinstall/xpinstallItemGeneric.png (extensions/extensionGeneric-aero.png)
#endif