diff --git a/mailnews/base/search/resources/content/SearchDialog.js b/mailnews/base/search/resources/content/SearchDialog.js
index e6250a1c6ec8..9bdc17b0cc99 100644
--- a/mailnews/base/search/resources/content/SearchDialog.js
+++ b/mailnews/base/search/resources/content/SearchDialog.js
@@ -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;
diff --git a/mailnews/base/search/resources/content/SearchDialog.xul b/mailnews/base/search/resources/content/SearchDialog.xul
index 2aafa3e21b1b..80b9e66546be 100644
--- a/mailnews/base/search/resources/content/SearchDialog.xul
+++ b/mailnews/base/search/resources/content/SearchDialog.xul
@@ -111,11 +111,12 @@
+
-
+
diff --git a/mailnews/base/search/resources/locale/en-US/SearchDialog.dtd b/mailnews/base/search/resources/locale/en-US/SearchDialog.dtd
index ec27a6a03bf7..debc74c5667b 100644
--- a/mailnews/base/search/resources/locale/en-US/SearchDialog.dtd
+++ b/mailnews/base/search/resources/locale/en-US/SearchDialog.dtd
@@ -4,6 +4,8 @@
+
+