fix download now button on folder prop r=sspitzer 78892

This commit is contained in:
bienvenu%netscape.com 2001-05-04 14:47:19 +00:00
parent de1e7c79af
commit cec2828926
3 changed files with 4 additions and 11 deletions

View File

@ -186,15 +186,7 @@ function getEnclosingContainer(startNode)
function onOfflineFolderDownload()
{
var offlineManager = Components.classes["@mozilla.org/messenger/offline-manager;1"].getService(Components.interfaces.nsIMsgOfflineManager);
offlineManager.synchronizeForOffline(false, true, false, false, null);
window.close();
// we need to create a progress window and pass that in as the second parameter here.
gMsgFolder.downloadAllForOffline(null, null);
}
function onOfflineNewsgroupDownload()
{
var offlineManager = Components.classes["@mozilla.org/messenger/offline-manager;1"].getService(Components.interfaces.nsIMsgOfflineManager);
// download news, download mail, send unsent messages, go offline when done, msg window
offlineManager.synchronizeForOffline(true, false, false, false, null);
window.close();
}

View File

@ -86,7 +86,7 @@
class="dialog" oncommand="onOfflineFolderDownload();"
id="offline.offlineFolderDownloadButton" hidefor="nntp" orient="right"/>
<button iscontrolcontainer="true" hidable="true" label="&offlineNewsgroup.button.label;"
class="dialog" oncommand="onOfflineNewsgroupDownload();"
class="dialog" oncommand="onOfflineFolderDownload();"
id="offline.offlineNewsgroupDownloadButton" hidefor="pop3,imap" orient="right"/>
</titledbox>
</tabpanels>

View File

@ -3228,6 +3228,7 @@ NS_IMETHODIMP nsImapMailFolder::DownloadAllForOffline(nsIUrlListener *listener,
nsMsgKeyArray msgsToDownload;
GetDatabase(msgWindow);
m_downloadingFolderForOfflineUse = PR_TRUE;
GetBodysToDownload(&msgsToDownload);
if (msgsToDownload.GetSize() == 0)
{