зеркало из https://github.com/mozilla/pjs.git
Bug 404572: don't show multiple quit dialogs if you cancel the quit on the first one, patch by H��kan Waara <hwaara@gmail.com> and Graeme McCutcheon <graememcc_firefox@graeme-online.co.uk>, r=me
This commit is contained in:
Родитель
4b18321db7
Коммит
b151323783
|
@ -219,6 +219,10 @@ BrowserGlue.prototype = {
|
|||
|
||||
_onQuitRequest: function(aCancelQuit, aQuitType)
|
||||
{
|
||||
// If user has already dismissed quit request, then do nothing
|
||||
if ((aCancelQuit instanceof Ci.nsISupportsPRBool) && aCancelQuit.data)
|
||||
return;
|
||||
|
||||
var wm = Cc["@mozilla.org/appshell/window-mediator;1"].
|
||||
getService(Ci.nsIWindowMediator);
|
||||
var windowcount = 0;
|
||||
|
|
|
@ -1718,6 +1718,12 @@ nsDownloadManager::ConfirmCancelDownloads(PRInt32 aCount,
|
|||
const PRUnichar *aCancelMessageSingle,
|
||||
const PRUnichar *aDontCancelButton)
|
||||
{
|
||||
// If user has already dismissed quit request, then do nothing
|
||||
PRBool quitRequestCancelled = PR_FALSE;
|
||||
aCancelDownloads->GetData(&quitRequestCancelled);
|
||||
if (quitRequestCancelled)
|
||||
return;
|
||||
|
||||
nsXPIDLString title, message, quitButton, dontQuitButton;
|
||||
|
||||
mBundle->GetStringFromName(aTitle, getter_Copies(title));
|
||||
|
|
|
@ -5409,6 +5409,10 @@ ExtensionManager.prototype = {
|
|||
* false otherwise.
|
||||
*/
|
||||
_confirmCancelDownloadsOnQuit: function(subject) {
|
||||
// If user has already dismissed quit request, then do nothing
|
||||
if ((subject instanceof Ci.nsISupportsPRBool) && subject.data)
|
||||
return;
|
||||
|
||||
if (this._downloadCount > 0) {
|
||||
// The observers will be notified again after this so set the download
|
||||
// count to 0 to prevent this dialog from being displayed again.
|
||||
|
|
Загрузка…
Ссылка в новой задаче