rem: promptService.confirmEx(window, dialogTitle, dialogMsg, (promptService.BUTTON_TITLE_SAVE * promptService.BUTTON_POS_0) + (promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1) + (allowDontSave ? (promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_2) : 0), null, null, (allowDontSave ? GetString("DontSave") : null), null, {value:0}, result); 
add: var promptFlags = (promptService.BUTTON_TITLE_SAVE * promptService.BUTTON_POS_0) + (promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1) + (allowDontSave ? (promptService.BUTTON_TITLE_DONT_SAVE * promptService.BUTTON_POS_2) : 0); promptService.confirmEx( window, dialogTitle, dialogMsg, promptFlags, null, null, null, null, {value:0}, result ); 
context: function CheckAndSaveDocument(reasonToSave, allowDontSave){  var document = editorShell.editorDocument;  if (!editorShell.documentModified && !gHTMLSourceChanged)    return true;  // call window.focus, since we need to pop up a dialog  // and therefore need to be visible (to prevent user confusion)  window.focus();    var title = window.editorShell.editorDocument.title;  if (!title)    title = GetString("untitled");  var dialogTitle = GetString("SaveDocument");  var dialogMsg = GetString("SaveFilePrompt");  dialogMsg = (dialogMsg.replace(/%title%/,title)).replace(/%reason%/,reasonToSave);  var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();  promptService = promptService.QueryInterface(Components.interfaces.nsIPromptService);  var result = {value:0};  promptService.confirmEx(window, dialogTitle, dialogMsg,  						  (promptService.BUTTON_TITLE_SAVE * promptService.BUTTON_POS_0) +  						  (promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1) +  						  (allowDontSave ? (promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_2) : 0),  						  null, null,  						  (allowDontSave ? GetString("DontSave") : null),  						  null, {value:0}, result);  if (result.value == 0)  {    // Save, but first finish HTML source mode    if (gHTMLSourceChanged)      FinishHTMLSource();    var success = SaveDocument(false, false, editorShell.contentsMIMEType);    return success;  }  if (result.value == 2) // "Don't Save"    return true;  // Default or result.value == 1 (Cancel)  return false;}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/cddc03d11835637983534cc9b6f16cfb47bb0922/editor.js/buggy/editor/ui/composer/content/editor.js