mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 21:35:39 +00:00
Bug #256545 --> Add a new quick search term for searching for To or Cc.
Patch by Mark Peek <mark@peek.org> sr=mscott
This commit is contained in:
parent
223a59ef98
commit
88f41b3c4c
@ -1196,7 +1196,7 @@
|
||||
#ifdef XP_UNIX
|
||||
#ifndef XP_MACOSX
|
||||
<menuitem id="menu_accountmgr" label="&accountManagerCmd.label;" accesskey="&accountManagerCmdUnix.accesskey;" oncommand="MsgAccountManager(null);"/>
|
||||
<menuitem id="menu_preferences" oncommand="openOptionsDialog('mailnews', 'chrome://messenger/content/pref-mailnews.xul','mailnews')"/>
|
||||
<menuitem id="menu_preferences" oncommand="openOptionsDialog()"/>
|
||||
#endif
|
||||
#endif
|
||||
</menupopup>
|
||||
@ -1667,12 +1667,12 @@
|
||||
#ifndef XP_UNIX
|
||||
<menuseparator id="prefSep"/>
|
||||
<menuitem id="menu_accountmgr" label="&accountManagerCmd.label;" accesskey="&accountManagerCmd.accesskey;" oncommand="MsgAccountManager(null);"/>
|
||||
<menuitem id="menu_preferences" oncommand="openOptionsDialog('mailnews', 'chrome://messenger/content/pref-mailnews.xul','mailnews')"/>
|
||||
<menuitem id="menu_preferences" oncommand="openOptionsDialog()"/>
|
||||
#else
|
||||
#ifdef XP_MACOSX
|
||||
<menuseparator id="prefSep"/>
|
||||
<menuitem id="menu_accountmgr" label="&accountManagerCmd.label;" accesskey="&accountManagerCmd.accesskey;" oncommand="MsgAccountManager(null);"/>
|
||||
<menuitem id="menu_preferences" oncommand="openOptionsDialog('mailnews', 'chrome://messenger/content/pref-mailnews.xul','mailnews')"/>
|
||||
<menuitem id="menu_preferences" oncommand="openOptionsDialog()"/>
|
||||
#endif
|
||||
#endif
|
||||
</menupopup>
|
||||
@ -1931,6 +1931,8 @@
|
||||
oncommand="changeQuickSearchMode(this)" />
|
||||
<menuitem value="2" label="&searchSubjectOrSenderMenu.label;" type="radio"
|
||||
checked="true" oncommand="changeQuickSearchMode(this)"/>
|
||||
<menuitem value="5" label="&searchRecipient.label;" type="radio"
|
||||
oncommand="changeQuickSearchMode(this)"/>
|
||||
<menuitem value="3" label="&searchMessageBody.label;" type="radio"
|
||||
oncommand="changeQuickSearchMode(this)"/>
|
||||
<menuitem value="4" label="&findInMessageMenu.label;" type="radio"
|
||||
|
@ -65,6 +65,7 @@ const kQuickSearchSender = 1;
|
||||
const kQuickSearchSenderOrSubject = 2;
|
||||
const kQuickSearchBody = 3;
|
||||
const kQuickSearchHighlight = 4;
|
||||
const kQuickSearchRecipient = 5;
|
||||
|
||||
var gFinder = Components.classes["@mozilla.org/embedcomp/rangefind;1"].createInstance()
|
||||
.QueryInterface(Components.interfaces.nsIFind);
|
||||
@ -470,6 +471,19 @@ function createSearchTerms()
|
||||
term.booleanAnd = false;
|
||||
searchTermsArray.AppendElement(term);
|
||||
}
|
||||
|
||||
// create, fill, and append the recipient
|
||||
if (gSearchInput.searchMode == kQuickSearchRecipient)
|
||||
{
|
||||
term = gSearchSession.createTerm();
|
||||
value = term.value;
|
||||
value.str = termList[i];
|
||||
term.value = value;
|
||||
term.attrib = nsMsgSearchAttrib.ToOrCC;
|
||||
term.op = nsMsgSearchOp.Contains;
|
||||
term.booleanAnd = false;
|
||||
searchTermsArray.AppendElement(term);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -508,7 +508,8 @@
|
||||
<!-- Quick Search Menu Bar -->
|
||||
<!ENTITY searchSubjectMenu.label "Subject">
|
||||
<!ENTITY searchSenderMenu.label "Sender">
|
||||
<!ENTITY searchSubjectOrSenderMenu.label "Subject Or Sender">
|
||||
<!ENTITY searchSubjectOrSenderMenu.label "Subject or Sender">
|
||||
<!ENTITY searchRecipient.label "To or Cc">
|
||||
<!ENTITY searchMessageBody.label "Entire Message">
|
||||
<!ENTITY findInMessageMenu.label "Find In Message">
|
||||
<!ENTITY saveAsVirtualFolderMenu.label "Save Search as a Folder...">
|
||||
|
Loading…
Reference in New Issue
Block a user