If I have a dialog and I want to center it on the screen, I can just do something like:
var w = window.openDialog('chrome://syndicus/content/saveDialog.xul', '', 'chrome,dialog');
w.centerWindowOnScreen();
but if it's a modal dialog, then the openDialog
function doesn't return until after the user has pressed something, so centerWindowOnScreen
won't get called until it's too late. How can I center a modal dialog?