зеркало из https://github.com/mozilla/pjs.git
109761 r=bienvenu sr=sspitzer Suppress RDF/Outliner notifications when creating new INBOX, will happen on migrating imap accts or creating new imap accts, confuses outliner, ends up showing 2 INBOX es.
This commit is contained in:
Родитель
4e7adb888f
Коммит
fedfcececb
|
@ -56,7 +56,7 @@ interface nsIMsgImapFolderProps : nsISupports {
|
|||
[scriptable, uuid(FBFEBE79-C1DD-11d2-8A40-0060B0FC04D2)]
|
||||
interface nsIMsgImapMailFolder : nsISupports {
|
||||
void removeSubFolder(in nsIMsgFolder folder);
|
||||
void createClientSubfolderInfo(in string folderName, in wchar hierarchyDelimiter, in long flags);
|
||||
void createClientSubfolderInfo(in string folderName, in wchar hierarchyDelimiter, in long flags, in boolean suppressNotification);
|
||||
void list();
|
||||
void renameLocal(in string newname, in nsIMsgFolder parent);
|
||||
void prepareToRename();
|
||||
|
|
|
@ -1266,7 +1266,7 @@ NS_IMETHODIMP nsImapIncomingServer::PossibleImapMailbox(const char *folderPath,
|
|||
}
|
||||
}
|
||||
|
||||
hostFolder->CreateClientSubfolderInfo(dupFolderPath.get(), hierarchyDelimiter,boxFlags);
|
||||
hostFolder->CreateClientSubfolderInfo(dupFolderPath.get(), hierarchyDelimiter,boxFlags, PR_FALSE);
|
||||
caseInsensitive = (nsCRT::strcasecmp("INBOX", dupFolderPath.get())== 0);
|
||||
a_nsIFolder->GetChildWithURI(uri.get(), PR_TRUE, caseInsensitive , getter_AddRefs(child));
|
||||
}
|
||||
|
|
|
@ -558,7 +558,7 @@ NS_IMETHODIMP nsImapMailFolder::GetSubFolders(nsIEnumerator* *result)
|
|||
if (NS_FAILED(rv) || numFolders == 0 || !inboxFolder)
|
||||
{
|
||||
// create an inbox if we don't have one.
|
||||
CreateClientSubfolderInfo("INBOX", kOnlineHierarchySeparatorUnknown,0);
|
||||
CreateClientSubfolderInfo("INBOX", kOnlineHierarchySeparatorUnknown,0, PR_TRUE);
|
||||
}
|
||||
}
|
||||
UpdateSummaryTotals(PR_FALSE);
|
||||
|
@ -639,7 +639,7 @@ nsImapMailFolder::UpdateFolder(nsIMsgWindow *msgWindow)
|
|||
GetHasSubFolders(&hasSubFolders);
|
||||
if (!hasSubFolders)
|
||||
{
|
||||
rv = CreateClientSubfolderInfo("Inbox", kOnlineHierarchySeparatorUnknown,0);
|
||||
rv = CreateClientSubfolderInfo("Inbox", kOnlineHierarchySeparatorUnknown,0, PR_FALSE);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
}
|
||||
|
@ -732,7 +732,7 @@ NS_IMETHODIMP nsImapMailFolder::CreateSubfolder(const PRUnichar* folderName, nsI
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsImapMailFolder::CreateClientSubfolderInfo(const char *folderName, PRUnichar hierarchyDelimiter, PRInt32 flags)
|
||||
NS_IMETHODIMP nsImapMailFolder::CreateClientSubfolderInfo(const char *folderName, PRUnichar hierarchyDelimiter, PRInt32 flags, PRBool suppressNotification)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
|
@ -786,7 +786,7 @@ NS_IMETHODIMP nsImapMailFolder::CreateClientSubfolderInfo(const char *folderName
|
|||
if (NS_FAILED(rv)) return rv;
|
||||
nsCAutoString leafnameC;
|
||||
leafnameC.AssignWithConversion(leafName);
|
||||
return parentFolder->CreateClientSubfolderInfo(leafnameC.get(), hierarchyDelimiter,flags);
|
||||
return parentFolder->CreateClientSubfolderInfo(leafnameC.get(), hierarchyDelimiter,flags, suppressNotification);
|
||||
}
|
||||
|
||||
// if we get here, it's really a leaf, and "this" is the parent.
|
||||
|
@ -853,6 +853,8 @@ NS_IMETHODIMP nsImapMailFolder::CreateClientSubfolderInfo(const char *folderName
|
|||
}
|
||||
}
|
||||
nsCOMPtr <nsIAtom> folderCreateAtom;
|
||||
if (!suppressNotification)
|
||||
{
|
||||
if(NS_SUCCEEDED(rv) && child)
|
||||
{
|
||||
nsCOMPtr<nsISupports> childSupports(do_QueryInterface(child));
|
||||
|
@ -870,6 +872,7 @@ NS_IMETHODIMP nsImapMailFolder::CreateClientSubfolderInfo(const char *folderName
|
|||
folderCreateAtom = getter_AddRefs(NS_NewAtom("FolderCreateFailed"));
|
||||
NotifyFolderEvent(folderCreateAtom);
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче