Bug 83968 Allow local searches even when online r=Mnyromyr sr=bienvenu a=asa

This commit is contained in:
neil%parkwaycc.co.uk 2005-07-05 08:42:13 +00:00
parent aabd02b15d
commit 2a9c9cdac6
3 changed files with 14 additions and 2 deletions

View File

@ -367,9 +367,17 @@ function updateSearchFolderPicker(folderURI)
gCurrentFolder =
RDF.GetResource(folderURI).QueryInterface(nsIMsgFolder);
var searchLocalSystem = document.getElementById("checkSearchLocalSystem");
if (searchLocalSystem)
searchLocalSystem.disabled = gCurrentFolder.server.searchScope == nsMsgSearchScope.offlineMail;
setSearchScope(GetScopeForFolder(gCurrentFolder));
}
function updateSearchLocalSystem()
{
setSearchScope(GetScopeForFolder(gCurrentFolder));
}
function UpdateAfterCustomHeaderChange()
{
updateSearchAttributes();
@ -510,7 +518,8 @@ function AddSubFoldersToURI(folder)
function GetScopeForFolder(folder)
{
return folder.server.searchScope;
var searchLocalSystem = document.getElementById("checkSearchLocalSystem");
return searchLocalSystem && searchLocalSystem.checked ? nsMsgSearchScope.offlineMail : folder.server.searchScope;
}
var nsMsgViewSortType = Components.interfaces.nsMsgViewSortType;

View File

@ -111,11 +111,12 @@
</hbox>
<hbox align="center">
<checkbox id="checkSearchSubFolders" label="&searchSubfolders.label;" checked="true" accesskey="&searchSubfolders.accesskey;"/>
<spacer flex="2"/>
<button label="&resetButton.label;" oncommand="onResetSearch(event);" accesskey="&resetButton.accesskey;"/>
</hbox>
<hbox align="center">
<checkbox id="checkSearchSubFolders" label="&searchSubfolders.label;" checked="true" accesskey="&searchSubfolders.accesskey;"/>
<checkbox id="checkSearchLocalSystem" label="&searchLocalSystem.label;" persist="checked" accesskey="&searchLocalSystem.accesskey;" oncommand="updateSearchLocalSystem();"/>
<spacer flex="2"/>
<button label="&helpButton.label;" align="end" oncommand="openHelp('search_messages');" accesskey="&helpButton.accesskey;"/>
</hbox>

View File

@ -4,6 +4,8 @@
<!ENTITY searchHeading.accesskey "h">
<!ENTITY searchSubfolders.label "Search subfolders">
<!ENTITY searchSubfolders.accesskey "e">
<!ENTITY searchLocalSystem.label "Search local system">
<!ENTITY searchLocalSystem.accesskey "y">
<!ENTITY resetButton.label "Clear">
<!ENTITY resetButton.accesskey "C">
<!ENTITY helpButton.label "Help">