Bug fixes for 79555(Download/Sync not retain pref), 80127(Select Dialog not modal). r=bhuvan, sr=sspitzer

This commit is contained in:
dianesun%netscape.com 2001-05-22 21:23:04 +00:00
parent 720e9bb26f
commit c08d05ce60
5 changed files with 24 additions and 4 deletions

View File

@ -177,7 +177,7 @@ function getEnclosingContainer(startNode) {
function onClickSelect()
{
top.window.openDialog("chrome://messenger/content/msgSelectOffline.xul", "", "chrome,titlebar,resizable=yes");
top.window.openDialog("chrome://messenger/content/msgSelectOffline.xul", "", "chrome,modal,titlebar,resizable=yes");
return true;
}

View File

@ -1069,7 +1069,7 @@ function MsgSynchronizeOffline()
{
dump("in MsgSynchronize() \n");
window.openDialog("chrome://messenger/content/msgSynchronize.xul",
"", "centerscreen,chrome,titlebar,resizable=yes",{msgWindow:msgWindow});
"", "centerscreen,chrome,modal,titlebar,resizable=yes",{msgWindow:msgWindow});
}

View File

@ -38,6 +38,11 @@ function OnLoad()
}
doSetOKCancel(syncOkButton, syncCancelButton);
var prefs = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPref);
gSyncMail = prefs.GetBoolPref("mailnews.offline_sync_mail");
gSyncNews = prefs.GetBoolPref("mailnews.offline_sync_news");
gSendMessage = prefs.GetBoolPref("mailnews.offline_sync_send_unsent");
gWorkOffline = prefs.GetBoolPref("mailnews.offline_sync_work_offline");
document.getElementById("syncMail").checked = gSyncMail;
document.getElementById("syncNews").checked = gSyncNews;
document.getElementById("sendMessage").checked = gSendMessage;
@ -54,8 +59,13 @@ function syncOkButton()
gSyncNews = document.getElementById("syncNews").checked;
gSendMessage = document.getElementById("sendMessage").checked;
gWorkOffline = document.getElementById("workOffline").checked;
var prefs = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPref);
prefs.SetBoolPref("mailnews.offline_sync_mail", gSyncMail);
prefs.SetBoolPref("mailnews.offline_sync_news", gSyncNews);
prefs.SetBoolPref("mailnews.offline_sync_send_unsent", gSendMessage);
prefs.SetBoolPref("mailnews.offline_sync_work_offline", gWorkOffline);
if( gSyncMail || gSyncNews || gSendMessage || gWorkOffline) {
if( gSyncMail || gSyncNews || gSendMessage || gWorkOffline) {
var offlineManager = Components.classes["@mozilla.org/messenger/offline-manager;1"].getService(Components.interfaces.nsIMsgOfflineManager);
if(offlineManager)
@ -76,7 +86,7 @@ function syncCancelButton()
function OnSelect()
{
top.window.openDialog("chrome://messenger/content/msgSelectOffline.xul", "", "chrome,titlebar,resizable=yes");
top.window.openDialog("chrome://messenger/content/msgSelectOffline.xul", "", "chrome,modal,titlebar,resizable=yes");
return true;
}

View File

@ -121,6 +121,11 @@ pref("mailnews.reply_header_type", 1);
pref("mail.purge_threshhold", 100);
pref("mail.prompt_purge_threshhold", false);
pref("mailnews.offline_sync_mail", false);
pref("mailnews.offline_sync_news", false);
pref("mailnews.offline_sync_send_unsent", true);
pref("mailnews.offline_sync_work_offline", false);
pref("mailnews.force_ascii_search", false);
pref("mailnews.autolookup_unknown_mime_types", true);

View File

@ -121,6 +121,11 @@ pref("mailnews.reply_header_type", 1);
pref("mail.purge_threshhold", 100);
pref("mail.prompt_purge_threshhold", false);
pref("mailnews.offline_sync_mail", false);
pref("mailnews.offline_sync_news", false);
pref("mailnews.offline_sync_send_unsent", true);
pref("mailnews.offline_sync_work_offline", false);
pref("mailnews.force_ascii_search", false);
pref("mailnews.autolookup_unknown_mime_types", true);