speed up initialization of the dialog by forwarding the scope into the initialization method for a searchterm

This commit is contained in:
alecf%netscape.com 2000-05-05 22:06:18 +00:00
Родитель a09d4ba3cf
Коммит 286197e18c
1 изменённых файлов: 11 добавлений и 7 удалений

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

@ -17,10 +17,13 @@
Components.classes['mozilla.mail.search.validityManager.1'].getService(Components.interfaces.nsIMsgSearchValidityManager);
]]>
</property>
<property name="searchScope">
<property name="searchScope" onget="return this.internalScope;">
<!-- scope ID - retrieve the table -->
<setter>
<![CDATA[
// if scope isn't changing this is a noop
if (this.internalScope == val) return;
this.internalScope = val;
this.refreshList();
var targets = this.targets;
@ -31,11 +34,6 @@
}
]]>
</setter>
<getter>
<![CDATA[
return this.internalScope;
]]>
</getter>
</property>
<property name="validityTable" readonly="true" onget="return this.validityManager.getTable(this.searchScope)"/>
@ -84,6 +82,7 @@
<method name="refreshList">
<body>
<![CDATA[
// dump("Refreshing " + this.tagName + " id=" + this.id + "\n");
var menuItemIds = this.valueIds;
var menuItemStrings = this.valueStrings;
@ -175,6 +174,7 @@
<property name="parentValue">
<setter>
<![CDATA[
if (this.searchAttribute == val) return;
this.searchAttribute = val;
this.refreshList();
]]>
@ -277,6 +277,7 @@
<method name="initialize">
<argument name="filter"/>
<argument name="termIndex"/>
<argument name="scope"/>
<body>
<![CDATA[
var attrib = new Object;
@ -290,7 +291,10 @@
var searchOperator=this.searchoperator;
var searchValue=this.searchvalue;
if (searchAttribute) searchAttribute.value = attrib.value;
if (searchAttribute) {
searchAttribute.searchScope = scope;
searchAttribute.value = attrib.value;
}
if (searchOperator) searchOperator.value = op.value;
if (searchValue) searchValue.value = value.value;
]]>