rem: gPromptService.confirmEx(window, gOfflinePromptsBundle.getString('downloadMessagesWindowTitle'), gOfflinePromptsBundle.getString('downloadMessagesLabel'), (gPromptService.BUTTON_TITLE_IS_STRING * gPromptService.BUTTON_POS_0) + (gPromptService.BUTTON_TITLE_IS_STRING * gPromptService.BUTTON_POS_2) + (gPromptService.BUTTON_TITLE_IS_STRING * gPromptService.BUTTON_POS_1), gOfflinePromptsBundle.getString('downloadMessagesDownloadButtonLabel'), gOfflinePromptsBundle.getString('downloadMessagesCancelButtonLabel'), gOfflinePromptsBundle.getString('downloadMessagesNoDownloadButtonLabel'), gOfflinePromptsBundle.getString('downloadMessagesCheckboxLabel'), checkValue, buttonPressed); if(buttonPressed) { if(buttonPressed.value == 0) { if(checkValue.value) gMailOfflinePrefs.setIntPref("offline.download.download_messages", 0); else gMailOfflinePrefs.setIntPref("offline.download.download_messages", 1);  gOfflineManager.synchronizeForOffline(true, true, false, true, msgWindow); return true; } else if(buttonPressed.value == 1) { return false; } else if(buttonPressed.value == 2) { if(checkValue.value) gMailOfflinePrefs.setIntPref("offline.download.download_messages", 0); else gMailOfflinePrefs.setIntPref("offline.download.download_messages", 2);  gOfflineManager.synchronizeForOffline(false, false, false, true, msgWindow); return true; } 
add: var buttonPressed = gPromptService.confirmEx(window, gOfflinePromptsBundle.getString('downloadMessagesWindowTitle'), gOfflinePromptsBundle.getString('downloadMessagesLabel'), gPromptService.BUTTON_TITLE_IS_STRING * (gPromptService.BUTTON_POS_0 + gPromptService.BUTTON_POS_1 + gPromptService.BUTTON_POS_2), gOfflinePromptsBundle.getString('downloadMessagesDownloadButtonLabel'), gOfflinePromptsBundle.getString('downloadMessagesCancelButtonLabel'), gOfflinePromptsBundle.getString('downloadMessagesNoDownloadButtonLabel'), gOfflinePromptsBundle.getString('downloadMessagesCheckboxLabel'), checkValue); if(buttonPressed == 0) { gMailOfflinePrefs.setIntPref("offline.download.download_messages", !checkValue.value); gOfflineManager.synchronizeForOffline(true, true, false, true, msgWindow); return true; } if(buttonPressed == 1) { return false; } if(buttonPressed == 2) { gMailOfflinePrefs.setIntPref("offline.download.download_messages", 2*!checkValue.value); gOfflineManager.synchronizeForOffline(false, false, false, true, msgWindow); return true; 
context: function PromptDownloadMessages(){  InitPrompts();  InitServices();  if(gPromptService) {    var buttonPressed = {value:0};    var checkValue = {value:true};    gPromptService.confirmEx(window,                             gOfflinePromptsBundle.getString('downloadMessagesWindowTitle'),                             gOfflinePromptsBundle.getString('downloadMessagesLabel'),                            (gPromptService.BUTTON_TITLE_IS_STRING * gPromptService.BUTTON_POS_0) +                            (gPromptService.BUTTON_TITLE_IS_STRING * gPromptService.BUTTON_POS_2) +                             (gPromptService.BUTTON_TITLE_IS_STRING * gPromptService.BUTTON_POS_1),                            gOfflinePromptsBundle.getString('downloadMessagesDownloadButtonLabel'),                            gOfflinePromptsBundle.getString('downloadMessagesCancelButtonLabel'),                            gOfflinePromptsBundle.getString('downloadMessagesNoDownloadButtonLabel'),                             gOfflinePromptsBundle.getString('downloadMessagesCheckboxLabel'),                             checkValue, buttonPressed);    if(buttonPressed) {      if(buttonPressed.value == 0) {        if(checkValue.value)           gMailOfflinePrefs.setIntPref("offline.download.download_messages", 0);        else           gMailOfflinePrefs.setIntPref("offline.download.download_messages", 1);        // download news, download mail, send unsent messages, go offline when done, msg window        gOfflineManager.synchronizeForOffline(true, true, false, true, msgWindow);        return true;      }      else if(buttonPressed.value == 1) {        return false;      }      else if(buttonPressed.value == 2) {        if(checkValue.value)           gMailOfflinePrefs.setIntPref("offline.download.download_messages", 0);        else           gMailOfflinePrefs.setIntPref("offline.download.download_messages", 2);        // download news, download mail, send unsent messages, go offline when done, msg window        gOfflineManager.synchronizeForOffline(false, false, false, true, msgWindow);        return true;      }    }  }}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/c3b4db921a0ab444658a6af9e53ee67d1ebea5a0/mail-offline.js/buggy/mailnews/base/resources/content/mail-offline.js