rem: if ((gWindowReuse) && (numMessages == 1)) { if (!MsgOpenExistingWindowForMessage(dbView.getURIForViewIndex(indices[0]))) { MsgOpenNewWindowForMessage(dbView.getURIForViewIndex(indices[0]),dbView.getFolderForViewIndex(indices[0]).URI); } } else { 
add: if ((!gWindowReuse) || (numMessages != 1) || (!MsgOpenSelectedMessageInExistingWindow())) { 
context: function MsgOpenSelectedMessages(){  var dbView = GetDBView();  var indices = GetSelectedIndices(dbView);  var numMessages = indices.length;  gWindowReuse = gPrefs.getBoolPref("mailnews.reuse_message_window");  // This is a radio type button pref, currently with only 2 buttons.  // We need to keep the pref type as 'bool' for backwards compatibility  // with 4.x migrated prefs.  For future radio button(s), please use another  // pref (either 'bool' or 'int' type) to describe it.  //  // gWindowReuse values: false, true  //    false: open new standalone message window for each message  //    true : reuse existing standalone message window for each message  if ((gWindowReuse) && (numMessages == 1)) {      if (!MsgOpenExistingWindowForMessage(dbView.getURIForViewIndex(indices[0]))) {          MsgOpenNewWindowForMessage(dbView.getURIForViewIndex(indices[0]),dbView.getFolderForViewIndex(indices[0]).URI);      }  } else {      for (var i = 0; i < numMessages; i++) {          MsgOpenNewWindowForMessage(dbView.getURIForViewIndex(indices[i]),dbView.getFolderForViewIndex(indices[i]).URI);      }  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/af8f030f805f5a0bb05bce6d05a321248ecfae14/mailWindowOverlay.js/buggy/mail/base/content/mailWindowOverlay.js