[epiphany] Add a 'crashed' option to the session restore policy
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Add a 'crashed' option to the session restore policy
- Date: Thu, 12 Apr 2012 15:19:43 +0000 (UTC)
commit 7e5bb20dfc1082d27e706fa1f0e898e2fca799b2
Author: Xan Lopez <xan igalia com>
Date: Thu Apr 12 17:15:45 2012 +0200
Add a 'crashed' option to the session restore policy
With this policy the session will only be restored if the application
has exited unexpectedly, but not if the user manually closes it.
There are no code changes needed for this to work, having a (valid)
different value than always/never in the setting makes things just
work.
data/org.gnome.epiphany.gschema.xml | 2 +-
lib/ephy-prefs.h | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/data/org.gnome.epiphany.gschema.xml b/data/org.gnome.epiphany.gschema.xml
index d39fc38..3ceee40 100644
--- a/data/org.gnome.epiphany.gschema.xml
+++ b/data/org.gnome.epiphany.gschema.xml
@@ -62,7 +62,7 @@
<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>
+ <description>Defines how the session will be restored during startup. Allowed values are 'always' (the previous state of the application is always restored), 'crashed' (the session is only restored if the application crashes) and 'never' (the homepage is always shown).</description>
</key>
</schema>
<schema path="/org/gnome/epiphany/ui/" id="org.gnome.Epiphany.ui">
diff --git a/lib/ephy-prefs.h b/lib/ephy-prefs.h
index bc95b35..9c74deb 100644
--- a/lib/ephy-prefs.h
+++ b/lib/ephy-prefs.h
@@ -39,7 +39,8 @@ typedef enum
typedef enum
{
EPHY_PREFS_RESTORE_SESSION_POLICY_ALWAYS,
- EPHY_PREFS_RESTORE_SESSION_POLICY_NEVER
+ EPHY_PREFS_RESTORE_SESSION_POLICY_NEVER,
+ EPHY_PREFS_RESTORE_SESSION_POLICY_CRASHED
} EphyPrefsRestoreSessionPolicy;
typedef enum
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]