Bug 640342 - Archive granularity should be flat when using GMail; r=bienvenu
This commit is contained in:
Родитель
efc1973a25
Коммит
ce4dd4577b
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче