Bug 640342 - Archive granularity should be flat when using GMail; r=bienvenu

This commit is contained in:
Jim Porter 2011-05-07 21:41:42 -05:00
Родитель efc1973a25
Коммит ce4dd4577b
2 изменённых файлов: 18 добавлений и 2 удалений

Просмотреть файл

@ -1437,8 +1437,15 @@ BatchMessageMover.prototype = {
if (isImap)
return;
}
if (!archiveFolder.canCreateSubfolders)
granularity = Components.interfaces.nsIMsgIdentity.singleArchiveFolder;
let forceSingle = !archiveFolder.canCreateSubfolders;
if (!forceSingle && isImap)
forceSingle = archiveFolder.server.QueryInterface(
Components.interfaces.nsIImapIncomingServer).isGMailServer;
if (forceSingle)
granularity = Components.interfaces.nsIMsgIncomingServer
.singleArchiveFolder;
if (granularity >= Components.interfaces.nsIMsgIdentity.perYearArchiveFolders)
{
archiveFolderUri += "/" + msgYear;

Просмотреть файл

@ -41,11 +41,13 @@ var gFccRadioElemChoiceLocked, gDraftsRadioElemChoiceLocked, gArchivesRadioElemC
var gDefaultPickerMode = "1";
var gFccFolderWithDelim, gDraftsFolderWithDelim, gArchivesFolderWithDelim, gTemplatesFolderWithDelim;
var gAccount;
var gCurrentServerId;
var gPrefBranch = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
function onPreInit(account, accountValues)
{
gAccount = account;
var type = parent.getAccountValue(account, accountValues, "server", "type", null, false);
hideShowControls(type);
}
@ -469,6 +471,13 @@ function setupArchiveItems() {
}
else
broadcaster.setAttribute("disabled", "true");
let account = gAccount || parent.gAccount;
if (account.incomingServer.type == "imap" &&
account.incomingServer.QueryInterface(
Components.interfaces.nsIImapIncomingServer).isGMailServer) {
document.getElementById("archiveHierarchyButton").hidden = true;
}
}
/**