diff options
Add a setting to control whether the session is automatically restored
We add a new gsettings key, 'restore-session-policy', with two valid
values: 'always' and 'never'. A brief explanation of our session state
mechanism follows.
There are three ways to exit Epiphany:
1) Activate 'Quit' in the application menu
2) Close the last application window
3) Kill the process manually, SIGSEGV, or other similar unexpected
event.
For 1) and 2), we'll now do the same thing:
a) Call ephy_session_close
b) Exit the application manually
ephy_session_close will check the new restore-session-policy setting,
and only save the session state if it's set to 'always'. Before it
used to manually destroy all present windows. We now let EphyShell or
EphyWindow do this, EphySession only manages the session state saving.
For 3), the process will die with the state saved up to that point,
there's nothing we can do. For that reason, on startup also check the
new setting; if it's set to 'never' ignore the session state, open a
window in the homepage, and delete the old state file.
https://bugzilla.gnome.org/show_bug.cgi?id=673453
Diffstat (limited to 'data/org.gnome.epiphany.gschema.xml')
-rw-r--r-- | data/org.gnome.epiphany.gschema.xml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/data/org.gnome.epiphany.gschema.xml b/data/org.gnome.epiphany.gschema.xml index f286277f6..d39fc3849 100644 --- a/data/org.gnome.epiphany.gschema.xml +++ b/data/org.gnome.epiphany.gschema.xml @@ -59,6 +59,11 @@ <default>true</default> <summary>Don't use an external application to view page source.</summary> </key> + <key name="restore-session-policy" enum="org.gnome.Epiphany.EphyPrefsRestoreSessionPolicy"> + <default>'always'</default> + <summary>Whether to automatically restore the last session</summary> + <description>Defines how the session will be restored during startup. Allowed values are 'always' (the previous state of the application is always restored) and 'never' (the homepage is always shown).</description> + </key> </schema> <schema path="/org/gnome/epiphany/ui/" id="org.gnome.Epiphany.ui"> <key type="b" name="show-toolbars"> |