not part of the build; make buster start up twice as fast, r=sicking@bigfoot.com; thanx to sicking for XUL update of the search button

git-svn-id: svn://10.0.0.236/trunk@93259 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
axel%pike.org
2001-04-27 09:20:59 +00:00
parent 784ebbb218
commit c8b182b5fe

View File

@@ -68,22 +68,28 @@ var view = ({
this.selection.toggleSelect(index);
},
swallow : function(initial) {
var startt = new Date();
this.rowCount = initial.length;
this.content = initial;
this.success = new Array(this.rowCount);
this.names = new Array(this.rowCount);
this.purps = new Array(this.rowCount);
this.comms = new Array(this.rowCount);
for (k=0;k<this.rowCount;k++) {
var cur = initial.item(k);
this.names[k] = cur.getAttribute("file");
if (cur.childNodes.length>1)
this.purps[k] = cur.childNodes.item(1).firstChild.nodeValue;
if (cur.childNodes.length>3)
this.comms[k] = cur.childNodes.item(3).firstChild.nodeValue;
var cur = initial.item(0);
var k = 0;
while (cur.nextSibling) {
if (cur.nodeType==Node.ELEMENT_NODE) {
this.names[k] = cur.getAttribute("file");
if (cur.childNodes.length>1)
this.purps[k] = cur.childNodes.item(1).firstChild.nodeValue;
if (cur.childNodes.length>3)
this.comms[k] = cur.childNodes.item(3).firstChild.nodeValue;
k = k+1;
}
cur = cur.nextSibling;
}
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
this.outliner.rowCountChanged(0,this.rowCount);
//dump((new Date()-startt)/1000+" secs in swallow for "+k+" items\n");
},
remove : function(first,last){
last = Math.min(this.rowCount,last);
@@ -194,7 +200,7 @@ function hide_checked(yes){
function select(){
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var searchField = matchFieldTag.getAttribute("data");
var searchField = matchFieldTag.getAttribute("value");
var matchRE = new RegExp(matchNameTag.value);
for (k=0;k<view.rowCount;k++){
switch (searchField) {