aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ephy-prefs.h
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-04-12 19:31:09 +0800
committerXan Lopez <xan@igalia.com>2012-04-12 19:31:09 +0800
commitbb759160ad593489d9b51488916a0fd8734136ca (patch)
tree71f82a0838b61b2f2ac601fb33a07e5313926478 /lib/ephy-prefs.h
parent94f2fb5c7a80dc2e904d8296bda14a0e0324ccc1 (diff)
downloadgsoc2013-epiphany-bb759160ad593489d9b51488916a0fd8734136ca.tar.gz
gsoc2013-epiphany-bb759160ad593489d9b51488916a0fd8734136ca.tar.zst
gsoc2013-epiphany-bb759160ad593489d9b51488916a0fd8734136ca.zip
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 'lib/ephy-prefs.h')
-rw-r--r--lib/ephy-prefs.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/ephy-prefs.h b/lib/ephy-prefs.h
index d5daaa034..e16f82c6a 100644
--- a/lib/ephy-prefs.h
+++ b/lib/ephy-prefs.h
@@ -37,6 +37,12 @@ typedef enum
typedef enum
{
+ EPHY_PREFS_RESTORE_SESSION_POLICY_ALWAYS,
+ EPHY_PREFS_RESTORE_SESSION_POLICY_NEVER
+} EphyPrefsRestoreSessionPolicy;
+
+typedef enum
+{
EPHY_PREFS_WEB_COOKIES_POLICY_ALWAYS,
EPHY_PREFS_WEB_COOKIES_POLICY_NO_THIRD_PARTY,
EPHY_PREFS_WEB_COOKIES_POLICY_NEVER
@@ -105,6 +111,7 @@ typedef enum
#define EPHY_PREFS_ENABLE_CARET_BROWSING "enable-caret-browsing"
#define EPHY_PREFS_ENABLED_EXTENSIONS "enabled-extensions"
#define EPHY_PREFS_INTERNAL_VIEW_SOURCE "internal-view-source"
+#define EPHY_PREFS_RESTORE_SESSION_POLICY "restore-session-policy"
#define EPHY_PREFS_LOCKDOWN_SCHEMA "org.gnome.Epiphany.lockdown"
#define EPHY_PREFS_LOCKDOWN_FULLSCREEN "disable-fullscreen"