From 34b4a939e1b5c87fe36ffd16beeed4d63a3e3615 Mon Sep 17 00:00:00 2001 From: "dbragg%netscape.com" Date: Tue, 14 Dec 1999 02:10:59 +0000 Subject: [PATCH] Fix for bug #21559 a=chofmann et al r=dveditz --- xpinstall/res/Makefile.in | 2 +- xpinstall/res/content/institems.js | 20 +++-- xpinstall/res/content/institems.xul | 105 ++++++++++++++------------ xpinstall/res/content/xpistatus.js | 13 +++- xpinstall/res/content/xpistatus.xul | 92 +++++++++++------------ xpinstall/res/makefile.win | 2 +- xpinstall/res/skin/MANIFEST | 1 + xpinstall/res/skin/Makefile.in | 38 ++++++++++ xpinstall/res/skin/Makefile.win | 32 ++++++++ xpinstall/res/skin/xpinstall.css | 110 ++++++++++++++++++++++++++++ 10 files changed, 311 insertions(+), 104 deletions(-) create mode 100644 xpinstall/res/skin/MANIFEST create mode 100644 xpinstall/res/skin/Makefile.in create mode 100644 xpinstall/res/skin/Makefile.win create mode 100644 xpinstall/res/skin/xpinstall.css diff --git a/xpinstall/res/Makefile.in b/xpinstall/res/Makefile.in index 38fe6b4d42e3..66b5862befd5 100644 --- a/xpinstall/res/Makefile.in +++ b/xpinstall/res/Makefile.in @@ -26,7 +26,7 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -DIRS = locale content +DIRS = locale content skin EXPORT_RESOURCE_XPINSTALL = \ $(srcdir)/progress.xul \ diff --git a/xpinstall/res/content/institems.js b/xpinstall/res/content/institems.js index 1ca9725debe0..e3271d93d46e 100644 --- a/xpinstall/res/content/institems.js +++ b/xpinstall/res/content/institems.js @@ -51,26 +51,30 @@ function addTreeItem(num, modName, url) function onLoad() { + var i = 0; + var row = 0; + var moduleName; + var URL; + var numberOfDialogTreeElements; + param = window.arguments[0].QueryInterface( Components.interfaces.nsIDialogParamBlock ); if( !param ) { dump( " error getting param block interface\n" ); return; } + param.SetInt(0, 1 ); /* Set the default return to Cancel */ - var i = 0; - var row = 0; - var moduleName; - var URL; - while (moduleName != "") + numberOfDialogTreeElements = param.GetInt(1); + + for (i=0; i < numberOfDialogTreeElements; i++) { - moduleName = param.GetString(i++); - URL = param.GetString(i++); + moduleName = param.GetString(i); + URL = param.GetString(++i); addTreeItem(row++, moduleName, URL); } } - function onOk() { // set the okay button in the param block diff --git a/xpinstall/res/content/institems.xul b/xpinstall/res/content/institems.xul index 57db5ca613ee..91dcaf4aa0c0 100644 --- a/xpinstall/res/content/institems.xul +++ b/xpinstall/res/content/institems.xul @@ -1,5 +1,28 @@ - + + + + + @@ -8,64 +31,56 @@ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="onLoad()" title="&items.label;" - align = "vertical" - flex = "100%" - class="dialog" - width="350" - height="300"> + class = "dialog" + align = "vertical" + height = "250" + width = "400" +> - - - - - &items.label; - - - - - - + + + &items.label; + + + - - - - - + + + &componentList.label; - + - - - - - + + + + + - - - - - - + + + + + + - - + + - + + + - - - - - - - - + + + + + diff --git a/xpinstall/res/content/xpistatus.js b/xpinstall/res/content/xpistatus.js index 374602541e1f..7224061959c2 100644 --- a/xpinstall/res/content/xpistatus.js +++ b/xpinstall/res/content/xpistatus.js @@ -32,26 +32,33 @@ function onLoad() var row = 0; var moduleName; var URL; + var numberOfDialogTreeElements; + + dump ("In onLoad handler \n"); param = window.arguments[0].QueryInterface( Components.interfaces.nsIDialogParamBlock ); if ( !param ) { dump (" error getting param block interface \n"); } + numberOfDialogTreeElements = param.GetInt(1); + dump(numberOfDialogTreeElements += "\n"); + manager = window.arguments[1]; - while (moduleName != "") + for (i = 0; i < numberOfDialogTreeElements; i++) { - moduleName = param.GetString(i++); + moduleName = param.GetString(i); URL = param.GetString(i++); addTreeItem(row++, moduleName, URL); } manager.DialogOpened(window); + } function addTreeItem(num, modName, url) { - dump("Adding element " + num + " : " + name + "\n"); + dump("Adding Progress element " + num + " : " + name + "\n"); var body = document.getElementById("theTreeBody"); var newitem = document.createElement('treeitem'); diff --git a/xpinstall/res/content/xpistatus.xul b/xpinstall/res/content/xpistatus.xul index beeb5de138b7..34a31bf6193e 100644 --- a/xpinstall/res/content/xpistatus.xul +++ b/xpinstall/res/content/xpistatus.xul @@ -1,5 +1,29 @@ - + + + + + @@ -11,39 +35,34 @@ align = "vertical" class = "dialog" width="350" - height="300"> + height="300" + > - - + - - - &progress.label; - - - - - + + + &progress.label; + + - + - ¤tlyProcessing.text; + - - - - - - - + + + + + - - + + @@ -53,29 +72,10 @@ - + - - - - - - - + + @@ -94,6 +94,6 @@ &dialogCancel.label; - + diff --git a/xpinstall/res/makefile.win b/xpinstall/res/makefile.win index 7f122d7714d7..fcb79c406f1f 100644 --- a/xpinstall/res/makefile.win +++ b/xpinstall/res/makefile.win @@ -21,7 +21,7 @@ DEPTH=..\.. -DIRS = locale content +DIRS = locale content skin include <$(DEPTH)\config\rules.mak> diff --git a/xpinstall/res/skin/MANIFEST b/xpinstall/res/skin/MANIFEST new file mode 100644 index 000000000000..3596b78f32e7 --- /dev/null +++ b/xpinstall/res/skin/MANIFEST @@ -0,0 +1 @@ +xpinstall.css diff --git a/xpinstall/res/skin/Makefile.in b/xpinstall/res/skin/Makefile.in new file mode 100644 index 000000000000..5aa3e71dd0c2 --- /dev/null +++ b/xpinstall/res/skin/Makefile.in @@ -0,0 +1,38 @@ +# +# The contents of this file are subject to the Netscape Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/NPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code is mozilla.org code. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# + +DEPTH = ../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + + +FILES = \ + xpinstall.css \ + $(NULL) + +include $(topsrcdir)/config/rules.mk + +install:: + $(INSTALL) $(addprefix $(srcdir)/, $(FILES)) $(DIST)/bin/chrome/xpinstall/skin/default + diff --git a/xpinstall/res/skin/Makefile.win b/xpinstall/res/skin/Makefile.win new file mode 100644 index 000000000000..eb7e8f595d93 --- /dev/null +++ b/xpinstall/res/skin/Makefile.win @@ -0,0 +1,32 @@ +#!nmake +# +# The contents of this file are subject to the Netscape Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/NPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code is mozilla.org code. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): + +DEPTH=..\..\.. + + +include <$(DEPTH)\config\rules.mak> + +install:: $(DLL) + $(MAKE_INSTALL) xpinstall.css $(DIST)\bin\chrome\xpinstall\skin\default + +clobber:: + rm -f $(DIST)\bin\chrome\xpinstall\skin\default\xpistall.css + diff --git a/xpinstall/res/skin/xpinstall.css b/xpinstall/res/skin/xpinstall.css new file mode 100644 index 000000000000..b1fe95942bb4 --- /dev/null +++ b/xpinstall/res/skin/xpinstall.css @@ -0,0 +1,110 @@ +/* + * 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. + * + * 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): + * Don Bragg (dbragg@netscape.com) 12/08/1999 + */ + +@import url(chrome://global/skin); + + +div.label { + margin : 3px; +} + +div#tree-housing { + height : 3em; +} + +box#mainBox{ + margin : 5px; +} + +box#okcancelBox{ + margin-left : 19em; + margin-top : 3px; + margin-bottom : 3px; +} + + +box#treeBox{ + height : 18ex; +} + + +div#interiorTitle { + font-size : 24px; + font-weight : bold; +} + +/* +#table-housing { + height: : 100%; +} +*/ + +tree#modulesTree { + background-color : transparent ! important; + height : 16ex; +} + +treecell#moduleName { + width : 50% +} + +treecell#moduleSource { + width : 50%; +} +tree > treechildren { + background-color : window ! important; +} + +tree#modulesTree > treehead > treerow > treecell { + padding-left : 1px; + padding-right : 1px; + border-left : none; + border-top : none; + border-right : none; + background-color : transparent ! important; + color : windowtext; +} + +titledbutton.graphic{ + list-style-image: url("chrome://global/skin/animthrob_single.gif"); +} + +spring#verticalSmallSpacer { + height : 1ex; +} + +spring#verticalLargeSpacer { + height : 20px; +} + +spring#verticalMediumSpacer { + height : 3ex; +} + +spring#horizontalSmallSpacer { + width : 2em; +} + +spring#horizontalLargeSpacer { + width : 10em; +} +