From 7fd136b33749d9063038e35b046aeb0b9885fb51 Mon Sep 17 00:00:00 2001 From: "reed%reedloden.com" Date: Sat, 23 Feb 2008 09:32:09 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20416696=20-=20"Restart=20and=20quit=20aler?= =?UTF-8?q?ts=20should=20use=20independent=20"don't=20warn=20again"=20pref?= =?UTF-8?q?s"=20[p=3Ddao@mozilla.com=20(D=EF=BF=BD=EF=BF=BDo=20Gottwald)?= =?UTF-8?q?=20r=3Dzeniko=20r=3DMano=20ui-r=3Dbeltzner=20a1.9=3Ddamons]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- browser/app/profile/firefox.js | 3 ++- browser/components/nsBrowserGlue.js | 17 ++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index 0407bae2ef2..19b6f2b2ef0 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -197,6 +197,7 @@ pref("browser.chrome.site_icons", true); pref("browser.chrome.favicons", true); pref("browser.formfill.enable", true); pref("browser.warnOnQuit", true); +pref("browser.warnOnRestart", true); #ifdef UNIX_BUT_NOT_MAC pref("browser.urlbar.clickSelectsAll", false); @@ -609,7 +610,7 @@ pref("browser.EULA.version", 2); pref("browser.sessionstore.enabled", true); pref("browser.sessionstore.resume_from_crash", true); pref("browser.sessionstore.resume_session_once", false); - + // minimal interval between two save operations in milliseconds pref("browser.sessionstore.interval", 10000); // maximum amount of POSTDATA to be saved in bytes per history entry (-1 = all of it) diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js index f36ce10a845..e97fb9ef0ec 100644 --- a/browser/components/nsBrowserGlue.js +++ b/browser/components/nsBrowserGlue.js @@ -237,7 +237,9 @@ BrowserGlue.prototype = { prefBranch.getBoolPref("browser.sessionstore.resume_session_once")) showPrompt = false; else - showPrompt = prefBranch.getBoolPref("browser.warnOnQuit"); + showPrompt = aQuitType == "restart" ? + prefBranch.getBoolPref("browser.warnOnRestart") : + prefBranch.getBoolPref("browser.warnOnQuit"); } catch (ex) {} var buttonChoice = 0; @@ -297,10 +299,15 @@ BrowserGlue.prototype = { break; case 0: this._saveSession = true; - // could also set browser.warnOnQuit to false here, - // but not setting it is a little safer. - if (neverAsk.value) - prefBranch.setIntPref("browser.startup.page", 3); + if (neverAsk.value) { + if (aQuitType == "restart") + prefBranch.setBoolPref("browser.warnOnRestart", false); + else { + // could also set browser.warnOnQuit to false here, + // but not setting it is a little safer. + prefBranch.setIntPref("browser.startup.page", 3); + } + } break; } }