Closed Bug 394099 Opened 17 years ago Closed 17 years ago

session restore dialog appears after reboot/logging out

Categories

(Firefox :: Session Restore, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 354686

People

(Reporter: robert, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070829 Firefox/2.0.0.6 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070829 Firefox/2.0.0.6 after rebooting or logging out from kde the restore dialog appears (restore session / start new session). this is quite annoying for me since i never pressed "start new session", but by mistake. there should be an "always restore" option or rebooting/logging out should not result in an improper shutdown of firefox. Reproducible: Always Steps to Reproduce: 1.start firefox 2.reboot / log out of kde 3.log in and start firefox Actual Results: restore dialog appears Expected Results: firefox should restore (if browser.startup.page == 3)
here is a small patch that introduces browser.sessionstore.resume_session_always. its not an ideal solution (when the browser crashes because of a site loaded you have to manually set sessionstore.resume_session_always to false) but i personally prefer this behaviour. diff -urN mozilla.orig/browser/app/profile/firefox.js mozilla.new/browser/app/profile/firefox.js --- mozilla.orig/browser/app/profile/firefox.js 2007-03-22 01:51:01.000000000 +0100 +++ mozilla.new/browser/app/profile/firefox.js 2007-08-29 01:38:24.000000000 +0200 @@ -531,6 +531,7 @@ pref("browser.sessionstore.enabled", true); pref("browser.sessionstore.resume_from_crash", true); pref("browser.sessionstore.resume_session_once", false); +pref("browser.sessionstore.resume_session_always", false); // minimal interval between two save operations in milliseconds pref("browser.sessionstore.interval", 10000); diff -urN mozilla.orig/browser/components/sessionstore/src/nsSessionStartup.js mozilla.new/browser/components/sessionstore/src/nsSessionStartup.js --- mozilla.orig/browser/components/sessionstore/src/nsSessionStartup.js 2007-04-03 19:14:04.000000000 +0200 +++ mozilla.new/browser/components/sessionstore/src/nsSessionStartup.js 2007-08-29 01:36:54.000000000 +0200 @@ -79,6 +79,9 @@ // whether the service is enabled const DEFAULT_ENABLED = true; +// resume the current session always at startup +const DEFAULT_RESUME_SESSION_ALWAYS = false; + // resume the current session at startup just this once const DEFAULT_RESUME_SESSION_ONCE = false; @@ -258,6 +261,10 @@ if (!this._getPref("sessionstore.resume_from_crash", DEFAULT_RESUME_FROM_CRASH)) return false; + // always resume if the user wants to + if (this._getPref("sessionstore.resume_session_always", DEFAULT_RESUME_SESSION_ALWAYS)) + return true; + // if the prompt fails, recover anyway var recover = true; // allow extensions to hook in a more elaborate restore prompt
Attached patch patch (deleted) — Splinter Review
Not going to introduce a new pref for SessionStore independent issues (especially if the bug in question has already been fixed for Firefox 3). As a work-around, create a new String pref "browser.sessionstore.restore_prompt_uri" and set it to "javascript:window.close();" (without the quotes) or use a session managing extension such as Session Manager <https://addons.mozilla.org/firefox/2324> to set that pref for you.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: