Bug 243807 profile manager hangs other dialogs' action

r=neil, sr=jst, patch by neo.liu@sun.com
This commit is contained in:
kyle.yuan%sun.com 2006-07-29 05:43:12 +00:00
Родитель bc8118cd9b
Коммит 9d08cfe621
1 изменённых файлов: 13 добавлений и 10 удалений

Просмотреть файл

@ -224,19 +224,22 @@ function checkFocusedWindow()
function toProfileManager()
{
var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
.getService(Components.interfaces.nsIWindowWatcher);
var params = Components.classes["@mozilla.org/embedcomp/dialogparam;1"]
const wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator);
var promgrWin = wm.getMostRecentWindow( "mozilla:profileSelection" );
if (promgrWin) {
promgrWin.focus();
} else {
var params = Components.classes["@mozilla.org/embedcomp/dialogparam;1"]
.createInstance(Components.interfaces.nsIDialogParamBlock);
params.SetNumberStrings(1);
params.SetString(0, "menu");
ww.openWindow(null, // no parent
"chrome://communicator/content/profile/profileSelection.xul",
null,
"centerscreen,chrome,modal,titlebar",
params.SetNumberStrings(1);
params.SetString(0, "menu");
window.openDialog("chrome://communicator/content/profile/profileSelection.xul",
"",
"centerscreen,chrome,titlebar",
params);
}
// Here, we don't care about the result code
// that was returned in the param block.
}