mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 10:45:42 +00:00
Bug 243807 profile manager hangs other dialogs' action
r=neil, sr=jst, patch by neo.liu@sun.com
This commit is contained in:
parent
bc8118cd9b
commit
9d08cfe621
@ -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.
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user