Bug 507392: remove moveToAlertPosition() usage from comm-central. r=standard8, r=philipp, sr=neil, a=standard8
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Thu, 01 Oct 2009 21:14:56 +0300
changeset 4007 a7ee2565bfa615f881dfc6e37fcea50a22f39188
parent 4006 b951cf498d4ff8244746bb60ac1322e4bd808953
child 4008 df305226035de6e59cfaf4bf790524929172f4e7
push idunknown
push userunknown
push dateunknown
reviewersstandard8, philipp, neil, standard8
bugs507392
Bug 507392: remove moveToAlertPosition() usage from comm-central. r=standard8, r=philipp, sr=neil, a=standard8
calendar/base/content/dialogs/calendar-event-dialog.js
mail/base/content/editContactOverlay.js
mail/base/content/folderPane.js
mail/base/content/mailOverlay.xul
mail/base/content/newTagDialog.js
mail/components/addrbook/content/abCardOverlay.js
mail/components/addrbook/content/abCommon.js
mail/components/compose/content/messengercompose.xul
mailnews/addrbook/content/abAddressBookNameDialog.js
mailnews/addrbook/content/abMailListDialog.js
mailnews/base/content/folderProps.js
mailnews/base/content/newFolderDialog.js
mailnews/base/content/renameFolderDialog.js
mailnews/base/content/shutdownWindow.js
mailnews/base/prefs/content/am-identity-edit.js
mailnews/base/search/content/CustomHeaders.js
mailnews/base/search/content/FilterEditor.js
mailnews/base/src/nsMsgProgress.cpp
mailnews/compose/content/sendProgress.js
suite/browser/mailNavigatorOverlay.xul
suite/common/askViewZoom.js
suite/common/viewZoomOverlay.js
suite/mailnews/addrbook/abCardOverlay.js
suite/mailnews/addrbook/abCommon.js
suite/mailnews/mailOverlay.xul
suite/mailnews/mailWindowOverlay.js
suite/mailnews/widgetglue.js
--- a/calendar/base/content/dialogs/calendar-event-dialog.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog.js
@@ -1148,17 +1148,17 @@ function openNewMessage() {
 
 /**
  * Open a new addressbook window
  */
 function openNewCardDialog() {
     window.openDialog(
         "chrome://messenger/content/addressbook/abNewCardDialog.xul",
         "",
-        "chrome,resizable=no,titlebar,modal");
+        "chrome,modal,resizable=no,centerscreen");
 }
 
 /**
  * Update the transparency status of this dialog, depending on if the event
  * is all-day or not.
  *
  * @param allDay    If true, the event is all-day
  */
--- a/mail/base/content/editContactOverlay.js
+++ b/mail/base/content/editContactOverlay.js
@@ -166,17 +166,18 @@ var editContactInlineUI = {
                                          .nsIPopupBoxObject.ROLLUP_CONSUME);
     this.panel.openPopup(aAnchorElement, aPosition, -1, -1);
   },
 
   editDetails: function() {
     this.panel.hidePopup();
 
     window.openDialog("chrome://messenger/content/addressbook/abEditCardDialog.xul",
-                      "", "chrome,resizable=no,modal,titlebar,centerscreen",
+                      "",
+                      "chrome,modal,resizable=no,centerscreen",
                       { abURI: this._cardDetails.book.URI,
                         card: this._cardDetails.card });
 
   },
 
   deleteContact: function() {
     if (this._cardDetails.book.readOnly)
       return; /* double check we can delete this */
--- a/mail/base/content/folderPane.js
+++ b/mail/base/content/folderPane.js
@@ -1633,17 +1633,18 @@ let gFolderTreeController = {
       dualUseFolders = folder.server.dualUseFolders;
 
     function newFolderCallback(aName, aFolder) {
       if (aName)
         aFolder.createSubfolder(aName, msgWindow);
     }
 
     window.openDialog("chrome://messenger/content/newFolderDialog.xul",
-                      "", "chrome,titlebar,modal",
+                      "",
+                      "chrome,modal,resizable=no,centerscreen",
                       {folder: folder, dualUseFolders: dualUseFolders,
                        okCallback: newFolderCallback});
   },
 
   /**
    * Opens the dialog to edit the properties for a folder
    *
    * @param aTabID  (optional) the tab to show in the dialog
@@ -1688,18 +1689,19 @@ let gFolderTreeController = {
       }
       catch(e) {
         // In a failure, proceed anyway since we're dealing with problems
         folder.ForceDBClosed();
       }
       folder.updateFolder(msgWindow);
     }
 
-    window.openDialog("chrome://messenger/content/folderProps.xul", "",
-                      "chrome,centerscreen,titlebar,modal",
+    window.openDialog("chrome://messenger/content/folderProps.xul",
+                      "",
+                      "chrome,modal,centerscreen,modal",
                       {folder: folder, serverType: folder.server.type,
                        msgWindow: msgWindow, title: title,
                        okCallback: editFolderCallback,
                        tabID: aTabID, name: folder.prettyName,
                        rebuildSummaryCallback: rebuildSummary});
   },
 
   /**
@@ -1719,17 +1721,18 @@ let gFolderTreeController = {
         Components.utils.reportError("got back a different folder to rename!");
 
       controller._tree.view.selection.clearSelection();
 
       // Actually do the rename
       folder.rename(aName, msgWindow);
     }
     window.openDialog("chrome://messenger/content/renameFolderDialog.xul",
-                      "newFolder", "chrome,titlebar,modal",
+                      "",
+                      "chrome,modal,centerscreen",
                       {preselectedURI: folder.URI,
                        okCallback: renameCallback, name: folder.prettyName});
   },
 
   /**
    * Deletes a folder from its parent. Also handles unsubscribe from newsgroups
    * if the selected folder/s happen to be nntp.
    *
@@ -1867,33 +1870,35 @@ let gFolderTreeController = {
    */
   newVirtualFolder: function ftc_newVFolder(aName, aSearchTerms, aParent) {
     let folder = aParent || gFolderTreeView.getSelectedFolders()[0];
     let name = folder.prettyName;
     if (aName)
       name += "-" + aName;
 
     window.openDialog("chrome://messenger/content/virtualFolderProperties.xul",
-                      "", "chrome,titlebar,modal,centerscreen",
+                      "",
+                      "chrome,modal,centerscreen",
                       {folder: folder, searchTerms: aSearchTerms,
                        newFolderName: name});
   },
 
   editVirtualFolder: function ftc_editVirtualFolder(aFolder) {
     let folder = aFolder || gFolderTreeView.getSelectedFolders()[0];
 
     //xxx should pass the folder object
     function editVirtualCallback(aURI) {
       // we need to reload the folder if it is the currently loaded folder...
       if (gFolderDisplay.displayedFolder &&
           aURI == gFolderDisplay.displayedFolder.URI)
         FolderPaneSelectionChange();
     }
     window.openDialog("chrome://messenger/content/virtualFolderProperties.xul",
-                      "", "chrome,titlebar,modal,centerscreen",
+                      "",
+                      "chrome,modal,centerscreen",
                       {folder: folder, editExistingFolder: true,
                        onOKCallback: editVirtualCallback,
                        msgWindow: msgWindow});
   },
 
   /**
    * Opens a search window with the given folder, or the selected one if none
    * is given.
--- a/mail/base/content/mailOverlay.xul
+++ b/mail/base/content/mailOverlay.xul
@@ -4,18 +4,17 @@
 <overlay id="mailOverlay.xul"
          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <script type="application/x-javascript">
   <![CDATA[
     function openNewCardDialog()
       {
         window.openDialog("chrome://messenger/content/addressbook/abNewCardDialog.xul",
-                          "",
-                          "chrome,resizable=no,titlebar,modal");
+                          "", "chrome,modal,resizable=no,centerscreen");
       }
 
     function goOpenNewMessage()
       {
         // if there is a MsgNewMessage function in scope
         // and we should use it, so that we choose the proper
         // identity, based on the selected message or folder
         // if not, bring up the compose window to the default identity
@@ -30,17 +29,17 @@
         msgComposeService.OpenComposeWindow(null, null, null,
                                             Components.interfaces.nsIMsgCompType.New,
                                             Components.interfaces.nsIMsgCompFormat.Default,
                                             null, null);
       }
 
   ]]>
   </script>
-         
+
   <!-- generic commands -->  
   <commandset id="tasksCommands">
     <command id="cmd_newMessage" oncommand="goOpenNewMessage();"/>
     <command id="cmd_newCard" oncommand="openNewCardDialog()"/>
   </commandset>
   <menuitem id="menu_newCard" label="&newContactCmd.label;"
             accesskey="&newContactCmd.accesskey;" command="cmd_newCard"/>
   <menuitem id="menu_newMessage" label="&newMessageCmd.label;" accesskey="&newMessageCmd.accesskey;" key="key_newMessage" command="cmd_newMessage"/>
--- a/mail/base/content/newTagDialog.js
+++ b/mail/base/content/newTagDialog.js
@@ -54,85 +54,83 @@ function onLoad()
   dialog.nameField = document.getElementById("name");
   dialog.nameField.focus();
 
   // call this when OK is pressed
   dialog.okCallback = arguments.okCallback;
   if (arguments.keyToEdit)
     initializeForEditing(arguments.keyToEdit);
 
-  moveToAlertPosition();
   doEnabling();
 }
 
-/** 
+/**
  * Turn the new tag dialog into an edit existing tag dialog
  */
 function initializeForEditing(aTagKey)
 {
   dialog.editTagKey = aTagKey;
-  
+
   // Change the title of the dialog
   var messengerBundle = document.getElementById("bundle_messenger");
   document.title = messengerBundle.getString("editTagTitle");
-  
+
   // override the OK button
   document.documentElement.setAttribute("ondialogaccept", "return onOKEditTag();");
-  
+
   // extract the color and name for the current tag
   var tagService = Components.classes["@mozilla.org/messenger/tagservice;1"]
                      .getService(Components.interfaces.nsIMsgTagService);
   document.getElementById("tagColorPicker").color = tagService.getColorForKey(aTagKey);
   dialog.nameField.value = tagService.getTagForKey(aTagKey);
 }
 
 /**
  * on OK handler for editing a new tag. 
  */
 function onOKEditTag()
 {
   var tagService = Components.classes["@mozilla.org/messenger/tagservice;1"]
                      .getService(Components.interfaces.nsIMsgTagService);
   // get the tag name of the current key we are editing
   var existingTagName = tagService.getTagForKey(dialog.editTagKey);
-  
+
   // it's ok if the name didn't change
   if (existingTagName != dialog.nameField.value)
   {
     // don't let the user edit a tag to the name of another existing tag
     if (tagService.getKeyForTag(dialog.nameField.value))
     {
       alertForExistingTag();
       return false; // abort the OK
     }
-              
+
     tagService.setTagForKey(dialog.editTagKey, dialog.nameField.value);
   }
-    
+
   tagService.setColorForKey(dialog.editTagKey, document.getElementById("tagColorPicker").color);
   return dialog.okCallback();
 }
 
 /**
  * on OK handler for creating a new tag. Alerts the user if a tag with 
  * the name already exists.
  */
 function onOKNewTag()
 {
   var name = dialog.nameField.value;
 
   var tagService = Components.classes["@mozilla.org/messenger/tagservice;1"].getService(Components.interfaces.nsIMsgTagService);
-  
+
   if (tagService.getKeyForTag(name))
   {
     alertForExistingTag();
     return false;
-  } 
-  else
-    return dialog.okCallback(name, document.getElementById("tagColorPicker").color);
+  }
+  return dialog.okCallback(name, document.getElementById("tagColorPicker").color);
 }
 
 /**
  * Alerts the user that they are trying to create a tag with a name that
  * already exists.
  */
 function alertForExistingTag()
 {
--- a/mail/components/addrbook/content/abCardOverlay.js
+++ b/mail/components/addrbook/content/abCardOverlay.js
@@ -110,17 +110,17 @@ function OnLoadNewCard()
 
   if ("arguments" in window && window.arguments[0])
   {
     gEditCard.selectedAB = kPersonalAddressbookURI;
 
     if ("selectedAB" in window.arguments[0]) {
       // check if selected ab is a mailing list
       var abURI = window.arguments[0].selectedAB;
-      
+
       var directory = GetDirectoryFromURI(abURI);
       if (directory.isMailList) {
         var parentURI = GetParentDirectoryFromMailingListURI(abURI);
         if (parentURI)
           gEditCard.selectedAB = parentURI;
       }
       else if (!directory.readOnly)
         gEditCard.selectedAB = window.arguments[0].selectedAB;
@@ -154,45 +154,44 @@ function OnLoadNewCard()
       gEditCard.card =
         Components.classes["@mozilla.org/abmanager;1"]
                   .getService(Components.interfaces.nsIAbManager)
                   .escapedVCardToAbCard(window.arguments[0].escapedVCardStr);
     }
 
     if ("titleProperty" in window.arguments[0])
       gEditCard.titleProperty = window.arguments[0].titleProperty;
-    
+
     if ("hideABPicker" in window.arguments[0])
       gHideABPicker = window.arguments[0].hideABPicker;
   }
 
   // set popup with address book names
   var abPopup = document.getElementById('abPopup');
   abPopup.value = gEditCard.selectedAB || kPersonalAddressbookURI;
 
   if (gHideABPicker && abPopup) {
     abPopup.hidden = true;
     document.getElementById("abPopupLabel").hidden = true;
   }
 
   SetCardDialogTitle(gEditCard.card.displayName);
-    
+
   GetCardValues(gEditCard.card, document);
 
   // FIX ME - looks like we need to focus on both the text field and the tab widget
   // probably need to do the same in the addressing widget
 
   // focus on first or last name based on the pref
   var focus = document.getElementById(gEditCard.displayLastNameFirst
                                       ? "LastName" : "FirstName");
   if ( focus ) {
     // XXX Using the setTimeout hack until bug 103197 is fixed
     setTimeout( function(firstTextBox) { firstTextBox.focus(); }, 0, focus );
   }
-  moveToAlertPosition();
 }
 
 function EditCardOKButton()
 {
   if (!CheckCardRequiredDataPresence(document))
     return false;  // don't close window
 
   // See if this card is in any mailing list
--- a/mail/components/addrbook/content/abCommon.js
+++ b/mail/components/addrbook/content/abCommon.js
@@ -183,39 +183,41 @@ function SendCommandToResultsPane(comman
   // we should focus the results pane
   gAbResultsTree.focus();
 }
 
 function AbNewLDAPDirectory()
 {
   window.openDialog("chrome://messenger/content/addressbook/pref-directory-add.xul",
                     "",
-                    "chrome,modal=yes,resizable=no,centerscreen",
+                    "chrome,modal,resizable=no,centerscreen",
                     null);
 }
 
 function AbNewAddressBook()
 {
-  window.openDialog(
-    "chrome://messenger/content/addressbook/abAddressBookNameDialog.xul",
-    "", "chrome,modal=yes,resizable=no,centerscreen", null);
+  window.openDialog("chrome://messenger/content/addressbook/abAddressBookNameDialog.xul",
+                    "",
+                    "chrome,modal,resizable=no,centerscreen",
+                    null);
 }
 
 function AbEditSelectedDirectory()
 {
   if (dirTree.view.selection.count == 1) {
     var selecteduri = GetSelectedDirectory();
     var directory = GetDirectoryFromURI(selecteduri);
     if (directory.isMailList) {
       var dirUri = GetParentDirectoryFromMailingListURI(selecteduri);
       goEditListDialog(null, selecteduri);
     }
     else {
       window.openDialog(directory.propertiesChromeURI,
-                        "editDirectory", "chrome,modal=yes,resizable=no",
+                        "",
+                        "chrome,modal,resizable=no,centerscreen",
                         {selectedDirectory: directory});
     }
   }
 }
 
 function AbDeleteSelectedDirectory()
 {
   var selectedABURI = GetSelectedDirectory();
@@ -499,42 +501,42 @@ function AbNewList()
 {
   goNewListDialog(GetSelectedDirectory());
 }
 
 function goNewListDialog(selectedAB)
 {
   window.openDialog("chrome://messenger/content/addressbook/abMailListDialog.xul",
                     "",
-                    "chrome,resizable=no,titlebar,modal,centerscreen",
+                    "chrome,modal,resizable=no,centerscreen",
                     {selectedAB:selectedAB});
 }
 
 function goEditListDialog(abCard, listURI)
 {
   window.openDialog("chrome://messenger/content/addressbook/abEditListDialog.xul",
                     "",
-                    "chrome,resizable=no,titlebar,modal,centerscreen",
+                    "chrome,modal,resizable=no,centerscreen",
                     {abCard:abCard, listURI:listURI});
 }
 
 function goNewCardDialog(selectedAB)
 {
   window.openDialog("chrome://messenger/content/addressbook/abNewCardDialog.xul",
                     "",
-                    "chrome,resizable=no,titlebar,modal,centerscreen",
+                    "chrome,modal,resizable=no,centerscreen",
                     {selectedAB:selectedAB});
 }
 
 function goEditCardDialog(abURI, card)
 {
   window.openDialog("chrome://messenger/content/addressbook/abEditCardDialog.xul",
-            "",
-            "chrome,resizable=no,modal,titlebar,centerscreen",
-            {abURI:abURI, card:card});
+                    "",
+                    "chrome,modal,resizable=no,centerscreen",
+                    {abURI:abURI, card:card});
 }
 
 
 function setSortByMenuItemCheckState(id, value)
 {
     var menuitem = document.getElementById(id);
     if (menuitem) {
       menuitem.setAttribute("checked", value);
--- a/mail/components/compose/content/messengercompose.xul
+++ b/mail/components/compose/content/messengercompose.xul
@@ -320,17 +320,17 @@
           <menu id="menu_New" label="&newMenu.label;" accesskey="&newMenu.accesskey;">
             <menupopup id="menu_NewPopup">
               <menuitem id="menu_NewMessage"
                         label="&newMessage.label;" accesskey="&newMessage.accesskey;"
                         key="key_newMessage2" oncommand="goOpenNewMessage();"/>
               <menuseparator/>
               <menuitem id="menu_NewContact" label="&newContact.label;"
                         accesskey="&newContact.accesskey;"
-                        oncommand="window.openDialog('chrome://messenger/content/addressbook/abNewCardDialog.xul', '', 'chrome,resizable=no,titlebar,modal');"/>
+                        oncommand="window.openDialog('chrome://messenger/content/addressbook/abNewCardDialog.xul', '', 'chrome,modal,resizable=no,centerscreen');"/>
             </menupopup>
           </menu>
           <menu id="menu_Attach" label="&attachMenu.label;" accesskey="&attachMenu.accesskey;">
             <menupopup id="menu_AttachPopup">
               <menuitem label="&attachFileCmd.label;" accesskey="&attachFileCmd.accesskey;" command="cmd_attachFile"/>
               <menuitem label="&attachPageCmd.label;" accesskey="&attachPageCmd.accesskey;" command="cmd_attachPage"/>
               <menuseparator/>
               <menuitem type="checkbox" label="&attachVCardCmd.label;" accesskey="&attachVCardCmd.accesskey;" command="cmd_attachVCard"/>
--- a/mailnews/addrbook/content/abAddressBookNameDialog.js
+++ b/mailnews/addrbook/content/abAddressBookNameDialog.js
@@ -74,18 +74,16 @@ function abNameOnLoad()
     // only have an ok button that doesn't do anything.
     gNameInput.readOnly = true;
     document.documentElement.buttons = "accept";
     document.documentElement.removeAttribute("ondialogaccept");
   } else {
     gNameInput.focus();
     abNameDoOkEnabling();
   }
-
-  moveToAlertPosition();
 }
 
 function abNameOKButton()
 {
   var newName = gNameInput.value.trim();
 
   // Either create a new directory or update an existing one depending on what
   // we were given when we started.
--- a/mailnews/addrbook/content/abMailListDialog.js
+++ b/mailnews/addrbook/content/abMailListDialog.js
@@ -161,17 +161,17 @@ function GetListValue(mailList, doAdd)
         }
         pos++;
       }
     }
     i++;
   }
 
   --i;
-  
+
   if (doAdd == false && i < oldTotal)
   {
     for (var j = i; j < oldTotal; j++)
       mailList.addressLists.removeElementAt(j);
   }
   return true;
 }
 
@@ -214,45 +214,42 @@ function OnLoadNewMailList()
     var abURI = window.arguments[0].selectedAB;
     if (abURI) {
       var directory = GetDirectoryFromURI(abURI);
       if (directory.isMailList) {
         var parentURI = GetParentDirectoryFromMailingListURI(abURI);
         if (parentURI) {
           selectedAB = parentURI;
         }
-  }
+      }
       else if (directory.readOnly) {
         selectedAB = kPersonalAddressbookURI;
-        
-      }      
+      }
       else {
         selectedAB = abURI;
       }
     }
   }
-  
+
   if (!selectedAB)
     selectedAB = kPersonalAddressbookURI;
 
   // set popup with address book names
   var abPopup = document.getElementById('abPopup');
   abPopup.value = selectedAB;
 
   AppendNewRowAndSetFocus();
   awFitDummyRows(1);
 
   document.addEventListener("keypress", awDocumentKeyPress, true);
 
   // focus on first name
   var listName = document.getElementById('ListName');
   if ( listName )
     setTimeout( function(firstTextBox) { firstTextBox.focus(); }, 0, listName );
-
-  moveToAlertPosition();
 }
 
 function EditListOKButton()
 {
   //edit mailing list in database
   if (GetListValue(gEditList, false))
   {
     if (gListCard) {
@@ -322,18 +319,16 @@ function OnLoadEditList()
     // basically need a separate dialog. Given I'm not sure about the future of
     // the mailing list dialog in its current state, let's just disable it
     // completely.
     document.getElementById("addressingWidget").disabled = true;
   }
 
   document.addEventListener("keypress", awDocumentKeyPress, true);
 
-  moveToAlertPosition();
-
   // workaround for bug 118337 - for mailing lists that have more rows than fits inside
   // the display, the value of the textbox inside the new row isn't inherited into the input -
   // the first row then appears to be duplicated at the end although it is actually empty.
   // see awAppendNewRow which copies first row and clears it
   setTimeout(AppendLastRow, 0);
 }
 
 function AppendLastRow()
--- a/mailnews/base/content/folderProps.js
+++ b/mailnews/base/content/folderProps.js
@@ -270,18 +270,16 @@ function folderPropsOnLoad()
       document.getElementById("folderPropTabBox").selectedTab =
                            document.getElementById(window.arguments[0].tabID);
     }
     catch (ex) {}
   }
   hideShowControls(serverType);
   onCheckKeepMsg();
   onUseDefaultRetentionSettings();
-
-  moveToAlertPosition();
 }
 
 function hideShowControls(serverType)
 {
   var controls = document.getElementsByAttribute("hidable", "true");
   var len = controls.length;
   for (var i=0; i<len; i++) {
     var control = controls[i];
--- a/mailnews/base/content/newFolderDialog.js
+++ b/mailnews/base/content/newFolderDialog.js
@@ -72,17 +72,16 @@ function onLoad()
     var newFolderTypeBox = document.getElementById("newFolderTypeBox");
     newFolderTypeBox.setAttribute("hidden", "true");
   } else {
     // set our folder type by calling the default selected type's oncommand
     var selectedFolderType = document.getElementById("folderGroup").selectedItem;
     eval(selectedFolderType.getAttribute("oncommand"));
   }
 
-  moveToAlertPosition();
   doEnabling();
 }
 
 function onFolderSelect(event) {
   dialog.folder = event.target._folder;
   document.getElementById("msgNewFolderPicker")
           .setAttribute("label", dialog.folder.prettyName);
 }
--- a/mailnews/base/content/renameFolderDialog.js
+++ b/mailnews/base/content/renameFolderDialog.js
@@ -54,17 +54,16 @@ function onLoad()
   dialog.nameField.focus();
 
   // call this when OK is pressed
   dialog.okCallback = arguments.okCallback;
 
   // pre select the folderPicker, based on what they selected in the folder pane
   dialog.preselectedFolderURI = arguments.preselectedURI;
 
-  moveToAlertPosition();
   doEnabling();
 }
 
 function onOK()
 {
   dialog.okCallback(dialog.nameField.value, dialog.preselectedFolderURI);
 
   return true;
--- a/mailnews/base/content/shutdownWindow.js
+++ b/mailnews/base/content/shutdownWindow.js
@@ -38,29 +38,27 @@
 */
 
 var curTaskIndex = 0;
 var numTasks = 0;
 var stringBundle;
 
 var msgShutdownService = Components.classes["@mozilla.org/messenger/msgshutdownservice;1"]
                            .getService(Components.interfaces.nsIMsgShutdownService);
-                        
+
 function onLoad()
 {
   numTasks = msgShutdownService.getNumTasks();
-  
+
   stringBundle = document.getElementById("bundle_shutdown");
   document.title = stringBundle.getString("shutdownDialogTitle");
-  
+
   updateTaskProgressLabel(1);
   updateProgressMeter(0);
-  
-  moveToAlertPosition();
-  
+
   msgShutdownService.startShutdownTasks();
 }
 
 function updateProgressLabel(inTaskName)
 {
   var curTaskLabel = document.getElementById("shutdownStatus_label");
   curTaskLabel.value = inTaskName;
 }
@@ -90,28 +88,28 @@ function nsMsgShutdownTaskListener()
 nsMsgShutdownTaskListener.prototype = 
 {
   QueryInterface : function(iid)
   {
     if (iid.equals(Components.interfaces.nsIWebProgressListener) ||
         iid.equals(Components.interfaces.nsISupportsWeakReference) ||
         iid.equals(Components.interfaces.nsISupports))
       return this;
-   
+
     throw Components.results.NS_NOINTERFACE;
   },
-  
+
   onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus)
   {
     if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP)
     {
       window.close();
     }
   },
-  
+
   onProgressChange: function(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress)
   {
     updateProgressMeter(((aCurTotalProgress / aMaxTotalProgress) * 100));
     updateTaskProgressLabel(aCurTotalProgress + 1);
   },
 
   onLocationChange: function(aWebProgress, aRequest, aLocation)
   {
--- a/mailnews/base/prefs/content/am-identity-edit.js
+++ b/mailnews/base/prefs/content/am-identity-edit.js
@@ -347,17 +347,17 @@ function editVCardCallback(escapedVCardS
 
 function editVCard()
 {
   var escapedVCard = document.getElementById("identity.escapedVCard");
 
   // read vCard hidden value from UI
   window.openDialog("chrome://messenger/content/addressbook/abNewCardDialog.xul",
                     "",
-                    "chrome,resizable=no,titlebar,modal",
+                    "chrome,modal,resizable=no,centerscreen",
                     {escapedVCardStr:escapedVCard.value, okCallback:editVCardCallback,
                      titleProperty:"editVCardTitle", hideABPicker:true});
 }
 
 function getAccountForFolderPickerState()
 {
   return gAccount;
 }
--- a/mailnews/base/search/content/CustomHeaders.js
+++ b/mailnews/base/search/content/CustomHeaders.js
@@ -69,18 +69,16 @@ function onLoad()
     gOKButton = document.getElementById("ok");
 
     initializeDialog(hdrs);
 
     doSetOKCancel(onOk, null);
 
     updateAddButton(true);
     updateRemoveButton();
-
-    moveToAlertPosition();
 }
 
 function initializeDialog(hdrs)
 {
   if (hdrs)
   {
     hdrs = hdrs.replace(/\s+/g,'');  //remove white spaces before splitting
     gArrayHdrs = hdrs.split(":");
--- a/mailnews/base/search/content/FilterEditor.js
+++ b/mailnews/base/search/content/FilterEditor.js
@@ -157,17 +157,16 @@ function filterEditorOnLoad()
 
   // in the case of a new filter, we may not have an action row yet.
   ensureActionRow();
   gFilterType = determineFilterType();
 
   gFilterNameElement.select();
   // This call is required on mac and linux.  It has no effect under win32.  See bug 94800.
   gFilterNameElement.focus();
-  moveToAlertPosition();
 }
 
 function filterEditorOnUnload()
 {
   if (gMailSession)
     gMailSession.RemoveFolderListener(gFolderListener);
 }
 
--- a/mailnews/base/src/nsMsgProgress.cpp
+++ b/mailnews/base/src/nsMsgProgress.cpp
@@ -76,48 +76,48 @@ nsMsgProgress::~nsMsgProgress()
 
 NS_IMETHODIMP nsMsgProgress::OpenProgressDialog(nsIDOMWindowInternal *parent, 
                                                 nsIMsgWindow *aMsgWindow, 
                                                 const char *dialogURL, 
                                                 PRBool inDisplayModal, 
                                                 nsISupports *parameters)
 {
   nsresult rv;
-  
+
   if (aMsgWindow)
   {
     SetMsgWindow(aMsgWindow);
     aMsgWindow->SetStatusFeedback(this);
   }
-  
+
   NS_ENSURE_ARG_POINTER(dialogURL);
   NS_ENSURE_ARG_POINTER(parent);
-  
+
   // Set up window.arguments[0]...
   nsCOMPtr<nsISupportsArray> array;
   rv = NS_NewISupportsArray(getter_AddRefs(array));
   NS_ENSURE_SUCCESS(rv, rv);
-  
+
   nsCOMPtr<nsISupportsInterfacePointer> ifptr =
     do_CreateInstance(NS_SUPPORTS_INTERFACE_POINTER_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
-  
+
   ifptr->SetData(static_cast<nsIMsgProgress*>(this));
   ifptr->SetDataIID(&NS_GET_IID(nsIMsgProgress));
-  
+
   array->AppendElement(ifptr);
   array->AppendElement(parameters);
-  
+
   // Open the dialog.
   nsCOMPtr<nsIDOMWindow> newWindow;
-  
-  nsString chromeOptions(NS_LITERAL_STRING("chrome,titlebar,dependent"));
+
+  nsString chromeOptions(NS_LITERAL_STRING("chrome,dependent,centerscreen"));
   if (inDisplayModal)
     chromeOptions.AppendLiteral(",modal");
-  
+
   return parent->OpenDialog(NS_ConvertASCIItoUTF16(dialogURL),
                             NS_LITERAL_STRING("_blank"),
                             chromeOptions,
                             array, getter_AddRefs(newWindow));
 }
 
 /* void closeProgressDialog (in boolean forceClose); */
 NS_IMETHODIMP nsMsgProgress::CloseProgressDialog(PRBool forceClose)
--- a/mailnews/compose/content/sendProgress.js
+++ b/mailnews/compose/content/sendProgress.js
@@ -163,17 +163,16 @@ function onLoad()
 
     dialog = {};
     dialog.status       = document.getElementById("dialog.status");
     dialog.progress     = document.getElementById("dialog.progress");
     dialog.progressText = document.getElementById("dialog.progressText");
 
     // set our web progress listener on the helper app launcher
     msgProgress.registerListener(progressListener);
-    moveToAlertPosition();
 
     var prefix = itsASaveOperation ? "titlePrefixSave" : "titlePrefixSend";
     document.title = gSendProgressStringBundle.getString(prefix) + " " + subject;
 }
 
 function onUnload() 
 {
   if (msgProgress)
--- a/suite/browser/mailNavigatorOverlay.xul
+++ b/suite/browser/mailNavigatorOverlay.xul
@@ -73,18 +73,17 @@
       var uri = ioService.newURI(mailto, null, null);
 
       extProtocolSvc.loadUrl(uri);
     }
 
     function openNewCardDialog()
     {
       window.openDialog("chrome://messenger/content/addressbook/abNewCardDialog.xul",
-                         "",
-                         "chrome,resizable=no,titlebar,modal");
+                        "", "chrome,modal,resizable=no,centerscreen");
     }
 
     function goOpenNewMessage()
     {
       if (gHasIntegratedMailClient) {
         if ("MsgNewMessage" in window)
         {
           MsgNewMessage(null);
--- a/suite/common/askViewZoom.js
+++ b/suite/common/askViewZoom.js
@@ -47,17 +47,16 @@ function onLoad() {
   dialog = {};
   dialog.OKButton = document.documentElement.getButton("accept");
 
   dialog.input = document.getElementById("zoomValue");
   dialog.input.value = args.value;
   dialog.input.select();
   dialog.input.focus();
 
-  moveToAlertPosition();
   doEnabling();
 }
 
 function onAccept() {
   var zoom = parseFloat(dialog.input.value);
   if (!isNaN(zoom) && zoom >= args.zoomMin && zoom <= args.zoomMax) {
     args.value = zoom;
     args.zoomOK = true;
--- a/suite/common/viewZoomOverlay.js
+++ b/suite/common/viewZoomOverlay.js
@@ -299,12 +299,13 @@ function updateZoomMenu()
 }
 
 function setZoomOther()
 {
   var zoom = ZoomManager.prototype.getInstance();
 
   // open dialog and ask for new value
   var o = {value: zoom.factorOther, zoomMin: zoom.MIN, zoomMax: zoom.MAX};
-  window.openDialog("chrome://communicator/content/askViewZoom.xul", "AskViewZoom", "chrome,modal,titlebar", o);
+  window.openDialog("chrome://communicator/content/askViewZoom.xul",
+                    "", "chrome,modal,centerscreen", o);
   if (o.zoomOK)
     zoom.currentZoom = o.value;
 }
--- a/suite/mailnews/addrbook/abCardOverlay.js
+++ b/suite/mailnews/addrbook/abCardOverlay.js
@@ -110,43 +110,43 @@ function OnLoadNewCard()
 
   if ("arguments" in window && window.arguments[0])
   {
     gEditCard.selectedAB = kPersonalAddressbookURI;
 
     if ("selectedAB" in window.arguments[0]) {
       // check if selected ab is a mailing list
       var abURI = window.arguments[0].selectedAB;
-      
+
       var directory = GetDirectoryFromURI(abURI);
       if (directory.isMailList) {
         var parentURI = GetParentDirectoryFromMailingListURI(abURI);
         if (parentURI)
           gEditCard.selectedAB = parentURI;
       }
       else if (!directory.readOnly)
         gEditCard.selectedAB = window.arguments[0].selectedAB;
     }
-    
+
     // we may have been given properties to pre-initialize the window with....
     // we'll fill these in here...
     if ("primaryEmail" in window.arguments[0])
       gEditCard.card.primaryEmail = window.arguments[0].primaryEmail;
     if ("displayName" in window.arguments[0]) {
       gEditCard.card.displayName = window.arguments[0].displayName;
       // if we've got a display name, don't generate
       // a display name (and stomp on the existing display name)
       // when the user types a first or last name
       if (gEditCard.card.displayName.length)
         gEditCard.generateDisplayName = false;
     }
     if ("aimScreenName" in window.arguments[0])
       gEditCard.card.setProperty("_AimScreenName",
                                  window.arguments[0].aimScreenName);
-    
+
     if ("allowRemoteContent" in window.arguments[0])
       gEditCard.card.setProperty("AllowRemoteContent",
                                  window.arguments[0].allowRemoteContent);
 
     if ("okCallback" in window.arguments[0])
       gOkCallback = window.arguments[0].okCallback;
 
     if ("escapedVCardStr" in window.arguments[0]) {
@@ -155,45 +155,44 @@ function OnLoadNewCard()
       gEditCard.card =
         Components.classes["@mozilla.org/abmanager;1"]
                   .getService(Components.interfaces.nsIAbManager)
                   .escapedVCardToAbCard(window.arguments[0].escapedVCardStr);
     }
 
     if ("titleProperty" in window.arguments[0])
       gEditCard.titleProperty = window.arguments[0].titleProperty;
-    
+
     if ("hideABPicker" in window.arguments[0])
       gHideABPicker = window.arguments[0].hideABPicker;
   }
 
   // set popup with address book names
   var abPopup = document.getElementById('abPopup');
   abPopup.value = gEditCard.selectedAB || kPersonalAddressbookURI;
 
   if (gHideABPicker && abPopup) {
     abPopup.hidden = true;
     document.getElementById("abPopupLabel").hidden = true;
   } 
 
   SetCardDialogTitle(gEditCard.card.displayName);
-    
+
   GetCardValues(gEditCard.card, document);
 
   // FIX ME - looks like we need to focus on both the text field and the tab widget
   // probably need to do the same in the addressing widget
 
   // focus on first or last name based on the pref
   var focus = document.getElementById(gEditCard.displayLastNameFirst
                                       ? "LastName" : "FirstName");
   if ( focus ) {
     // XXX Using the setTimeout hack until bug 103197 is fixed
     setTimeout( function(firstTextBox) { firstTextBox.focus(); }, 0, focus );
   }
-  moveToAlertPosition();
 }
 
 function EditCardOKButton()
 {
   if (!CheckCardRequiredDataPresence(document))
     return false;  // don't close window
 
   // See if this card is in any mailing list
@@ -462,17 +461,17 @@ function GetCardValues(cardproperty, doc
   birthYear.onchange = calculateAge;
   birthday.onchange = calculateAge;
   var age = doc.getElementById("Age");
   age.onchange = calculateYear;
 
   var popup = document.getElementById("PreferMailFormatPopup");
   if (popup)
     popup.value = cardproperty.getProperty("PreferMailFormat", "");
-    
+
   var allowRemoteContentEl = document.getElementById("allowRemoteContent");
   if (allowRemoteContentEl)
     // getProperty may return a "1" or "0" string, we want a boolean
     allowRemoteContentEl.checked = cardproperty.getProperty("AllowRemoteContent", false) != false;
 
   // get phonetic fields if exist
   try {
     doc.getElementById("PhoneticFirstName").value = cardproperty.getProperty("PhoneticFirstName", "");
@@ -549,17 +548,17 @@ function CheckAndSetCardValues(cardprope
   // set the birth day, month, and year properties
   cardproperty.setProperty("BirthDay", birthDay);
   cardproperty.setProperty("BirthMonth", birthMonth);
   cardproperty.setProperty("BirthYear", birthYear);
 
   var popup = document.getElementById("PreferMailFormatPopup");
   if (popup)
     cardproperty.setProperty("PreferMailFormat", popup.value);
-    
+
   var allowRemoteContentEl = document.getElementById("allowRemoteContent");
   if (allowRemoteContentEl)
     cardproperty.setProperty("AllowRemoteContent", allowRemoteContentEl.checked);
 
   // set phonetic fields if exist
   try {
     cardproperty.setProperty("PhoneticFirstName", doc.getElementById("PhoneticFirstName").value);
     cardproperty.setProperty("PhoneticLastName", doc.getElementById("PhoneticLastName").value);
--- a/suite/mailnews/addrbook/abCommon.js
+++ b/suite/mailnews/addrbook/abCommon.js
@@ -173,40 +173,42 @@ function SendCommandToResultsPane(comman
 
   // if we are sending the command so the results pane
   // we should focus the results pane
   gAbResultsTree.focus();
 }
 
 function AbNewLDAPDirectory()
 {
-  window.openDialog("chrome://messenger/content/addressbook/pref-directory-add.xul", 
-                    "", 
-                    "chrome,modal=yes,resizable=no,centerscreen", 
+  window.openDialog("chrome://messenger/content/addressbook/pref-directory-add.xul",
+                    "",
+                    "chrome,modal,resizable=no,centerscreen",
                     null);
 }
 
 function AbNewAddressBook()
 {
-  window.openDialog(
-    "chrome://messenger/content/addressbook/abAddressBookNameDialog.xul", 
-    "", "chrome,modal=yes,resizable=no,centerscreen", null);
+  window.openDialog("chrome://messenger/content/addressbook/abAddressBookNameDialog.xul",
+                    "",
+                    "chrome,modal,resizable=no,centerscreen",
+                    null);
 }
 
 function AbEditSelectedDirectory()
 {
   if (dirTree.view.selection.count == 1) {
     var selecteduri = GetSelectedDirectory();
     var directory = GetDirectoryFromURI(selecteduri);
     if (directory.isMailList) {
       goEditListDialog(null, selecteduri);
     }
     else {
       window.openDialog(directory.propertiesChromeURI,
-                        "editDirectory", "chrome,modal=yes,resizable=no",
+                        "",
+                        "chrome,modal,resizable=no,centerscreen",
                         { selectedDirectory: directory });
     }
   }
 }
 
 function AbDeleteSelectedDirectory()
 {
   var selectedABURI = GetSelectedDirectory();
@@ -512,42 +514,42 @@ function AbNewList()
 {
   goNewListDialog(GetSelectedDirectory());
 }
 
 function goNewListDialog(selectedAB)
 {
   window.openDialog("chrome://messenger/content/addressbook/abMailListDialog.xul",
                     "",
-                    "chrome,resizable=no,titlebar,modal,centerscreen",
+                    "chrome,modal,resizable=no,centerscreen",
                     {selectedAB:selectedAB});
 }
 
 function goEditListDialog(abCard, listURI)
 {
   window.openDialog("chrome://messenger/content/addressbook/abEditListDialog.xul",
                     "",
-                    "chrome,resizable=no,titlebar,modal,centerscreen",
+                    "chrome,modal,resizable=no,centerscreen",
                     {abCard:abCard, listURI:listURI});
 }
 
 function goNewCardDialog(selectedAB)
 {
   window.openDialog("chrome://messenger/content/addressbook/abNewCardDialog.xul",
                     "",
-                    "chrome,resizable=no,titlebar,modal,centerscreen",
+                    "chrome,modal,resizable=no,centerscreen",
                     {selectedAB:selectedAB});
 }
 
 function goEditCardDialog(abURI, card)
 {
   window.openDialog("chrome://messenger/content/addressbook/abEditCardDialog.xul",
-					  "",
-					  "chrome,resizable=no,modal,titlebar,centerscreen",
-					  {abURI:abURI, card:card});
+                    "",
+                    "chrome,modal,resizable=no,centerscreen",
+                    {abURI:abURI, card:card});
 }
 
 
 function setSortByMenuItemCheckState(id, value)
 {
     var menuitem = document.getElementById(id);
     if (menuitem) {
       menuitem.setAttribute("checked", value);
--- a/suite/mailnews/mailOverlay.xul
+++ b/suite/mailnews/mailOverlay.xul
@@ -7,18 +7,17 @@
 <overlay id="mailOverlay.xul"
          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <script type="application/x-javascript">
   <![CDATA[
     function openNewCardDialog()
       {
         window.openDialog("chrome://messenger/content/addressbook/abNewCardDialog.xul",
-                          "",
-                          "chrome,resizable=no,titlebar,modal");
+                          "", "chrome,modal,resizable=no,centerscreen");
       }
 
     function goOpenNewMessage()
       {
         // if there is a MsgNewMessage function in scope
         // and we should use it, so that we choose the proper
         // identity, based on the selected message or folder
         // if not, bring up the compose window to the default identity
--- a/suite/mailnews/mailWindowOverlay.js
+++ b/suite/mailnews/mailWindowOverlay.js
@@ -1456,17 +1456,18 @@ function MsgNewFolder(callBackFunctionNa
                 if (imapServer)
                     dualUseFolders = imapServer.dualUseFolders;
             }
         } catch (e) {
             dump ("Exception: dualUseFolders = true\n");
         }
     }
     window.openDialog("chrome://messenger/content/newFolderDialog.xul",
-                      "", "chrome,titlebar,modal",
+                      "",
+                      "chrome,modal,centerscreen",
                       {folder: destinationFolder,
                        dualUseFolders: dualUseFolders,
                        okCallback:callBackFunctionName});
 }
 
 function getDestinationFolder(preselectedFolder, server)
 {
     var destinationFolder = null;
--- a/suite/mailnews/widgetglue.js
+++ b/suite/mailnews/widgetglue.js
@@ -68,18 +68,18 @@ function GetSelectedFolderURI()
   return folders.length == 1 ? folders[0].URI : null;
 }
 
 function MsgRenameFolder() 
 {
   let folder = GetSelectedMsgFolders()[0];
   let dialog = window.openDialog(
                "chrome://messenger/content/renameFolderDialog.xul",
-               "newFolder",
-               "chrome,titlebar,modal",
+               "",
+               "chrome,modal,centerscreen",
                {preselectedURI: folder.URI,
                 okCallback: RenameFolder, name: folder.prettyName});
 }
 
 function RenameFolder(name,uri)
 {
   var folderTree = GetFolderTree();
   if (folderTree)
@@ -162,28 +162,28 @@ function MsgCompactFolder(aCompactAccoun
 }
 
 function openNewVirtualFolderDialogWithArgs(defaultViewName, aSearchTerms)
 {
   var folder = GetFirstSelectedMsgFolder();
   let name = folder.prettyName + "-" + defaultViewName;
 
   var dialog = window.openDialog("chrome://messenger/content/virtualFolderProperties.xul", "",
-                                 "chrome,titlebar,modal,centerscreen",
+                                 "chrome,modal,centerscreen",
                                  {folder:folder,
                                   searchTerms:aSearchTerms,
                                   newFolderName:name});
 }
 
 function MsgVirtualFolderProperties(aEditExistingVFolder)
 {
   var preselectedFolder = GetFirstSelectedMsgFolder();
 
   var dialog = window.openDialog("chrome://messenger/content/virtualFolderProperties.xul", "",
-                                 "chrome,titlebar,modal,centerscreen",
+                                 "chrome,modal,centerscreen",
                                  {folder:preselectedFolder,
                                   editExistingFolder: aEditExistingVFolder,
                                   onOKCallback:onEditVirtualFolderPropertiesCallback,
                                   msgWindow:msgWindow});
 }
 
 function onEditVirtualFolderPropertiesCallback(aVirtualFolderURI)
 {
@@ -213,17 +213,17 @@ function MsgFolderProperties()
     MsgVirtualFolderProperties(true);
     return;
   }
 
   var windowTitle = gMessengerBundle.getString("folderProperties");
   var dialog = window.openDialog(
               "chrome://messenger/content/folderProps.xul",
               "",
-              "chrome,centerscreen,titlebar,modal",
+              "chrome,modal,centerscreen",
               {folder: msgFolder, serverType: msgFolder.server.type,
                msgWindow: msgWindow, title: windowTitle,
                okCallback: FolderProperties, tabID: "", tabIndex: 0,
                name: msgFolder.prettyName,
                rebuildSummaryCallback: RebuildSummaryFile});
 }
 
 function RebuildSummaryFile(msgFolder)