Bug 384907, Fix "Closing multiple tabs" warning suppression on last window on mac, r=mano
git-svn-id: svn://10.0.0.236/trunk@228601 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
f9bff0906b
commit
67c470c361
@ -1,8 +1,8 @@
|
||||
function closeWindow(aClose, aPromptFunction)
|
||||
{
|
||||
var windowCount = 0;
|
||||
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
|
||||
.getService(Components.interfaces.nsIWindowMediator);
|
||||
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
|
||||
.getService(Components.interfaces.nsIWindowMediator);
|
||||
var e = wm.getEnumerator(null);
|
||||
|
||||
while (e.hasMoreElements()) {
|
||||
@ -16,9 +16,10 @@ function closeWindow(aClose, aPromptFunction)
|
||||
// If we're down to the last window and someone tries to shut down, check to make sure we can!
|
||||
if (windowCount == 1 && !canQuitApplication())
|
||||
return false;
|
||||
else if (windowCount != 1)
|
||||
#endif
|
||||
if (windowCount != 1 && typeof(aPromptFunction) == "function" && !aPromptFunction())
|
||||
return false;
|
||||
if (typeof(aPromptFunction) == "function" && !aPromptFunction())
|
||||
return false;
|
||||
|
||||
if (aClose)
|
||||
window.close();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user