зеркало из https://github.com/mozilla/pjs.git
Backing out Bug 413590 due to regressions.
This commit is contained in:
Родитель
f9b696c70d
Коммит
96be78740e
|
@ -947,8 +947,6 @@ nsresult nsMsgSearchTerm::MatchString (const char *stringToMatch,
|
||||||
PRBool *pResult)
|
PRBool *pResult)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(pResult);
|
NS_ENSURE_ARG_POINTER(pResult);
|
||||||
NS_ENSURE_ARG_POINTER(charset);
|
|
||||||
|
|
||||||
PRBool result = PR_FALSE;
|
PRBool result = PR_FALSE;
|
||||||
|
|
||||||
nsresult err = NS_OK;
|
nsresult err = NS_OK;
|
||||||
|
|
|
@ -154,7 +154,6 @@ NS_IMETHODIMP nsMsgBiffManager::Shutdown()
|
||||||
|
|
||||||
NS_IMETHODIMP nsMsgBiffManager::AddServerBiff(nsIMsgIncomingServer *server)
|
NS_IMETHODIMP nsMsgBiffManager::AddServerBiff(nsIMsgIncomingServer *server)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(server);
|
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
PRInt32 biffMinutes;
|
PRInt32 biffMinutes;
|
||||||
|
|
||||||
|
@ -212,7 +211,6 @@ NS_IMETHODIMP nsMsgBiffManager::ForceBiffAll()
|
||||||
|
|
||||||
NS_IMETHODIMP nsMsgBiffManager::OnServerLoaded(nsIMsgIncomingServer *server)
|
NS_IMETHODIMP nsMsgBiffManager::OnServerLoaded(nsIMsgIncomingServer *server)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(server);
|
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
PRBool doBiff = PR_FALSE;
|
PRBool doBiff = PR_FALSE;
|
||||||
|
|
||||||
|
|
|
@ -628,8 +628,6 @@ NS_IMETHODIMP nsMsgGroupView::GetCellProperties(PRInt32 aRow, nsITreeColumn *aCo
|
||||||
|
|
||||||
NS_IMETHODIMP nsMsgGroupView::GetCellText(PRInt32 aRow, nsITreeColumn* aCol, nsAString& aValue)
|
NS_IMETHODIMP nsMsgGroupView::GetCellText(PRInt32 aRow, nsITreeColumn* aCol, nsAString& aValue)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(aCol);
|
|
||||||
|
|
||||||
if (!IsValidIndex(aRow))
|
if (!IsValidIndex(aRow))
|
||||||
return NS_MSG_INVALID_DBVIEW_INDEX;
|
return NS_MSG_INVALID_DBVIEW_INDEX;
|
||||||
|
|
||||||
|
|
|
@ -128,7 +128,6 @@ NS_IMETHODIMP nsMsgSearchDBView::Close()
|
||||||
|
|
||||||
NS_IMETHODIMP nsMsgSearchDBView::GetCellText(PRInt32 aRow, nsITreeColumn* aCol, nsAString& aValue)
|
NS_IMETHODIMP nsMsgSearchDBView::GetCellText(PRInt32 aRow, nsITreeColumn* aCol, nsAString& aValue)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(aCol);
|
|
||||||
const PRUnichar* colID;
|
const PRUnichar* colID;
|
||||||
aCol->GetIdConst(&colID);
|
aCol->GetIdConst(&colID);
|
||||||
if (colID[0] == 'l' && colID[1] == 'o') // location, need to check for "lo" not just "l" to avoid "label" column
|
if (colID[0] == 'l' && colID[1] == 'o') // location, need to check for "lo" not just "l" to avoid "label" column
|
||||||
|
@ -168,9 +167,6 @@ nsresult nsMsgSearchDBView::GetMsgHdrForViewIndex(nsMsgViewIndex index, nsIMsgDB
|
||||||
|
|
||||||
NS_IMETHODIMP nsMsgSearchDBView::GetFolderForViewIndex(nsMsgViewIndex index, nsIMsgFolder **aFolder)
|
NS_IMETHODIMP nsMsgSearchDBView::GetFolderForViewIndex(nsMsgViewIndex index, nsIMsgFolder **aFolder)
|
||||||
{
|
{
|
||||||
if (!m_folders)
|
|
||||||
return NS_ERROR_FAILURE;
|
|
||||||
|
|
||||||
return m_folders->QueryElementAt(index, NS_GET_IID(nsIMsgFolder), (void **) aFolder);
|
return m_folders->QueryElementAt(index, NS_GET_IID(nsIMsgFolder), (void **) aFolder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,7 +249,6 @@ nsMsgSearchDBView::OnNewSearch()
|
||||||
|
|
||||||
m_dbToUseList.Clear();
|
m_dbToUseList.Clear();
|
||||||
|
|
||||||
if (m_folders)
|
|
||||||
m_folders->Clear();
|
m_folders->Clear();
|
||||||
m_keys.RemoveAll();
|
m_keys.RemoveAll();
|
||||||
m_levels.Clear();
|
m_levels.Clear();
|
||||||
|
@ -530,7 +525,6 @@ nsMsgSearchDBView::OnStopCopy(nsresult aStatus)
|
||||||
{
|
{
|
||||||
mCurIndex++;
|
mCurIndex++;
|
||||||
PRUint32 numFolders =0;
|
PRUint32 numFolders =0;
|
||||||
if (m_uniqueFoldersSelected)
|
|
||||||
rv = m_uniqueFoldersSelected->Count(&numFolders);
|
rv = m_uniqueFoldersSelected->Count(&numFolders);
|
||||||
if ( mCurIndex < (PRUint32) numFolders)
|
if ( mCurIndex < (PRUint32) numFolders)
|
||||||
{
|
{
|
||||||
|
|
|
@ -273,8 +273,6 @@ nsMsgXFVirtualFolderDBView::OnSearchHit(nsIMsgDBHdr* aMsgHdr, nsIMsgFolder *fold
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsMsgXFVirtualFolderDBView::OnSearchDone(nsresult status)
|
nsMsgXFVirtualFolderDBView::OnSearchDone(nsresult status)
|
||||||
{
|
{
|
||||||
if (!m_viewFolder)
|
|
||||||
return NS_ERROR_NOT_INITIALIZED;
|
|
||||||
// handle any non verified hits we haven't handled yet.
|
// handle any non verified hits we haven't handled yet.
|
||||||
UpdateCacheAndViewForPrevSearchedFolders(nsnull);
|
UpdateCacheAndViewForPrevSearchedFolders(nsnull);
|
||||||
|
|
||||||
|
@ -322,7 +320,6 @@ nsMsgXFVirtualFolderDBView::OnNewSearch()
|
||||||
|
|
||||||
m_doingSearch = PR_TRUE;
|
m_doingSearch = PR_TRUE;
|
||||||
|
|
||||||
if (m_folders)
|
|
||||||
m_folders->Clear();
|
m_folders->Clear();
|
||||||
m_keys.RemoveAll();
|
m_keys.RemoveAll();
|
||||||
m_levels.Clear();
|
m_levels.Clear();
|
||||||
|
@ -337,10 +334,9 @@ nsMsgXFVirtualFolderDBView::OnNewSearch()
|
||||||
// and for each folder, then open the db and pull out the cached hits, add them to the view.
|
// and for each folder, then open the db and pull out the cached hits, add them to the view.
|
||||||
// For each hit in a new folder, we'll then clean up the stale hits from the previous folder(s).
|
// For each hit in a new folder, we'll then clean up the stale hits from the previous folder(s).
|
||||||
|
|
||||||
PRInt32 scopeCount = 0;
|
PRInt32 scopeCount;
|
||||||
nsCOMPtr <nsIMsgSearchSession> searchSession = do_QueryReferent(m_searchSession);
|
nsCOMPtr <nsIMsgSearchSession> searchSession = do_QueryReferent(m_searchSession);
|
||||||
nsCOMPtr<nsIMsgDBService> msgDBService = do_GetService(NS_MSGDB_SERVICE_CONTRACTID);
|
nsCOMPtr<nsIMsgDBService> msgDBService = do_GetService(NS_MSGDB_SERVICE_CONTRACTID);
|
||||||
if (searchSession)
|
|
||||||
searchSession->CountSearchScopes(&scopeCount);
|
searchSession->CountSearchScopes(&scopeCount);
|
||||||
for (PRInt32 i = 0; i < scopeCount; i++)
|
for (PRInt32 i = 0; i < scopeCount; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1054,7 +1054,7 @@ private:
|
||||||
|
|
||||||
nsresult nsBayesianFilter::tokenizeMessage(const char* aMessageURI, nsIMsgWindow *aMsgWindow, TokenAnalyzer* aAnalyzer)
|
nsresult nsBayesianFilter::tokenizeMessage(const char* aMessageURI, nsIMsgWindow *aMsgWindow, TokenAnalyzer* aAnalyzer)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(aMessageURI);
|
|
||||||
nsCOMPtr <nsIMsgMessageService> msgService;
|
nsCOMPtr <nsIMsgMessageService> msgService;
|
||||||
nsresult rv = GetMessageServiceFromURI(nsDependentCString(aMessageURI), getter_AddRefs(msgService));
|
nsresult rv = GetMessageServiceFromURI(nsDependentCString(aMessageURI), getter_AddRefs(msgService));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
@ -1247,7 +1247,6 @@ NS_IMETHODIMP nsBayesianFilter::ClassifyMessage(const char *aMessageURL, nsIMsgW
|
||||||
/* void classifyMessages (in unsigned long aCount, [array, size_is (aCount)] in string aMsgURLs, in nsIJunkMailClassificationListener aListener); */
|
/* void classifyMessages (in unsigned long aCount, [array, size_is (aCount)] in string aMsgURLs, in nsIJunkMailClassificationListener aListener); */
|
||||||
NS_IMETHODIMP nsBayesianFilter::ClassifyMessages(PRUint32 aCount, const char **aMsgURLs, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aListener)
|
NS_IMETHODIMP nsBayesianFilter::ClassifyMessages(PRUint32 aCount, const char **aMsgURLs, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aListener)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(aMsgURLs);
|
|
||||||
TokenAnalyzer* analyzer = new MessageClassifier(this, aListener, aMsgWindow, aCount, aMsgURLs);
|
TokenAnalyzer* analyzer = new MessageClassifier(this, aListener, aMsgWindow, aCount, aMsgURLs);
|
||||||
if (!analyzer) return NS_ERROR_OUT_OF_MEMORY;
|
if (!analyzer) return NS_ERROR_OUT_OF_MEMORY;
|
||||||
TokenStreamListener *tokenListener = new TokenStreamListener(analyzer);
|
TokenStreamListener *tokenListener = new TokenStreamListener(analyzer);
|
||||||
|
|
|
@ -189,7 +189,6 @@ NS_IMETHODIMP nsMsgMailViewList::AddMailView(nsIMsgMailView * aMailView)
|
||||||
|
|
||||||
NS_IMETHODIMP nsMsgMailViewList::RemoveMailView(nsIMsgMailView * aMailView)
|
NS_IMETHODIMP nsMsgMailViewList::RemoveMailView(nsIMsgMailView * aMailView)
|
||||||
{
|
{
|
||||||
if (m_mailViews)
|
|
||||||
m_mailViews->RemoveElement(static_cast<nsISupports*>(aMailView));
|
m_mailViews->RemoveElement(static_cast<nsISupports*>(aMailView));
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -210,8 +209,7 @@ NS_IMETHODIMP nsMsgMailViewList::Save()
|
||||||
// brute force...remove all the old filters in our filter list, then we'll re-add our current
|
// brute force...remove all the old filters in our filter list, then we'll re-add our current
|
||||||
// list
|
// list
|
||||||
nsCOMPtr<nsIMsgFilter> msgFilter;
|
nsCOMPtr<nsIMsgFilter> msgFilter;
|
||||||
PRUint32 numFilters = 0;
|
PRUint32 numFilters;
|
||||||
if (mFilterList)
|
|
||||||
mFilterList->GetFilterCount(&numFilters);
|
mFilterList->GetFilterCount(&numFilters);
|
||||||
while (numFilters)
|
while (numFilters)
|
||||||
{
|
{
|
||||||
|
@ -223,13 +221,12 @@ NS_IMETHODIMP nsMsgMailViewList::Save()
|
||||||
ConvertMailViewListToFilterList();
|
ConvertMailViewListToFilterList();
|
||||||
|
|
||||||
// now save the filters to our file
|
// now save the filters to our file
|
||||||
return mFilterList ? mFilterList->SaveToDefaultFile() : NS_ERROR_FAILURE;
|
return mFilterList->SaveToDefaultFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult nsMsgMailViewList::ConvertMailViewListToFilterList()
|
nsresult nsMsgMailViewList::ConvertMailViewListToFilterList()
|
||||||
{
|
{
|
||||||
PRUint32 mailViewCount = 0;
|
PRUint32 mailViewCount = 0;
|
||||||
if (m_mailViews)
|
|
||||||
m_mailViews->Count(&mailViewCount);
|
m_mailViews->Count(&mailViewCount);
|
||||||
nsCOMPtr<nsIMsgMailView> mailView;
|
nsCOMPtr<nsIMsgMailView> mailView;
|
||||||
nsCOMPtr<nsIMsgFilter> newMailFilter;
|
nsCOMPtr<nsIMsgFilter> newMailFilter;
|
||||||
|
|
|
@ -826,13 +826,11 @@ NS_IMETHODIMP nsImapService::Search(nsIMsgSearchSession *aSearchSession,
|
||||||
nsIMsgFolder *aMsgFolder,
|
nsIMsgFolder *aMsgFolder,
|
||||||
const char *aSearchUri)
|
const char *aSearchUri)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(aMsgFolder);
|
nsresult rv = NS_OK;
|
||||||
nsresult rv;
|
|
||||||
nsCAutoString folderURI;
|
nsCAutoString folderURI;
|
||||||
|
|
||||||
nsCOMPtr<nsIImapUrl> imapUrl;
|
nsCOMPtr<nsIImapUrl> imapUrl;
|
||||||
nsCOMPtr <nsIUrlListener> urlListener = do_QueryInterface(aSearchSession, &rv);
|
nsCOMPtr <nsIUrlListener> urlListener = do_QueryInterface(aSearchSession);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
|
|
||||||
nsCAutoString urlSpec;
|
nsCAutoString urlSpec;
|
||||||
PRUnichar hierarchySeparator = GetHierarchyDelimiter(aMsgFolder);
|
PRUnichar hierarchySeparator = GetHierarchyDelimiter(aMsgFolder);
|
||||||
|
@ -1124,7 +1122,6 @@ NS_IMETHODIMP nsImapService::StreamMessage(const char *aMessageURI,
|
||||||
const char *aAdditionalHeader,
|
const char *aAdditionalHeader,
|
||||||
nsIURI **aURL)
|
nsIURI **aURL)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(aMessageURI);
|
|
||||||
nsCOMPtr<nsIMsgFolder> folder;
|
nsCOMPtr<nsIMsgFolder> folder;
|
||||||
nsCAutoString msgKey;
|
nsCAutoString msgKey;
|
||||||
nsCAutoString mimePart;
|
nsCAutoString mimePart;
|
||||||
|
@ -1466,7 +1463,6 @@ NS_IMETHODIMP nsImapService::DeleteFolder(nsIEventTarget *aClientEventTarget,
|
||||||
nsIMsgWindow *aMsgWindow,
|
nsIMsgWindow *aMsgWindow,
|
||||||
nsIURI **aURL)
|
nsIURI **aURL)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(aImapMailFolder);
|
|
||||||
// If it's an aol server then use 'deletefolder' url to
|
// If it's an aol server then use 'deletefolder' url to
|
||||||
// remove all msgs first and then remove the folder itself.
|
// remove all msgs first and then remove the folder itself.
|
||||||
PRBool removeFolderAndMsgs = PR_FALSE;
|
PRBool removeFolderAndMsgs = PR_FALSE;
|
||||||
|
@ -2700,8 +2696,6 @@ NS_IMETHODIMP nsImapService::GetDefaultLocalPath(nsILocalFile **aResult)
|
||||||
havePref,
|
havePref,
|
||||||
getter_AddRefs(localFile));
|
getter_AddRefs(localFile));
|
||||||
|
|
||||||
if (!localFile)
|
|
||||||
return NS_ERROR_FAILURE;
|
|
||||||
PRBool exists;
|
PRBool exists;
|
||||||
rv = localFile->Exists(&exists);
|
rv = localFile->Exists(&exists);
|
||||||
if (NS_SUCCEEDED(rv) && !exists)
|
if (NS_SUCCEEDED(rv) && !exists)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче