From 384177cadd9721091797cc38d092f92e14b1a4b3 Mon Sep 17 00:00:00 2001 From: "bienvenu%nventure.com" Date: Fri, 19 Mar 2004 19:45:39 +0000 Subject: [PATCH] fix custom headers available operators, r/sr=mscott, a=chofmann, part of 224318 --- mailnews/base/search/src/nsMsgImapSearch.cpp | 4 ++++ mailnews/base/search/src/nsMsgSearchAdapter.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mailnews/base/search/src/nsMsgImapSearch.cpp b/mailnews/base/search/src/nsMsgImapSearch.cpp index dbdf9d280453..f54baa27aba2 100644 --- a/mailnews/base/search/src/nsMsgImapSearch.cpp +++ b/mailnews/base/search/src/nsMsgImapSearch.cpp @@ -615,8 +615,12 @@ nsMsgSearchValidityManager::InitOfflineMailFilterTable() m_offlineMailFilterTable->SetAvailable (nsMsgSearchAttrib::OtherHeader, nsMsgSearchOp::Contains, 1); m_offlineMailFilterTable->SetEnabled (nsMsgSearchAttrib::OtherHeader, nsMsgSearchOp::Contains, 1); + m_offlineMailFilterTable->SetAvailable (nsMsgSearchAttrib::OtherHeader, nsMsgSearchOp::DoesntContain, 1); + m_offlineMailFilterTable->SetEnabled (nsMsgSearchAttrib::OtherHeader, nsMsgSearchOp::DoesntContain, 1); m_offlineMailFilterTable->SetAvailable (nsMsgSearchAttrib::OtherHeader, nsMsgSearchOp::Is, 1); m_offlineMailFilterTable->SetEnabled (nsMsgSearchAttrib::OtherHeader, nsMsgSearchOp::Is, 1); + m_offlineMailFilterTable->SetAvailable (nsMsgSearchAttrib::OtherHeader, nsMsgSearchOp::Isnt, 1); + m_offlineMailFilterTable->SetEnabled (nsMsgSearchAttrib::OtherHeader, nsMsgSearchOp::Isnt, 1); m_offlineMailFilterTable->SetAvailable (nsMsgSearchAttrib::OtherHeader, nsMsgSearchOp::BeginsWith, 1); m_offlineMailFilterTable->SetEnabled (nsMsgSearchAttrib::OtherHeader, nsMsgSearchOp::BeginsWith, 1); m_offlineMailFilterTable->SetAvailable (nsMsgSearchAttrib::OtherHeader, nsMsgSearchOp::EndsWith, 1); diff --git a/mailnews/base/search/src/nsMsgSearchAdapter.cpp b/mailnews/base/search/src/nsMsgSearchAdapter.cpp index 3fd0042fbc4b..cb479ec689d1 100644 --- a/mailnews/base/search/src/nsMsgSearchAdapter.cpp +++ b/mailnews/base/search/src/nsMsgSearchAdapter.cpp @@ -971,7 +971,7 @@ nsMsgSearchValidityTable::GetAvailableOperators(nsMsgSearchAttribValue aAttribut if (aAttribute == nsMsgSearchAttrib::Default) attr = m_defaultAttrib; else - attr = aAttribute; + attr = PR_MIN(aAttribute, nsMsgSearchAttrib::OtherHeader); PRUint32 totalOperators=0; PRInt32 i;