[epiphany] ephy-session: Never save the session if the policy is set to never



commit adbe1549da2f28deba3f223a60f0873d46ef034d
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Thu Jan 14 12:07:45 2016 +0100

    ephy-session: Never save the session if the policy is set to never

 src/ephy-session.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/ephy-session.c b/src/ephy-session.c
index 143c7b8..a6b6655 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -860,6 +860,7 @@ ephy_session_save (EphySession *session,
        EphyShell *shell;
        SaveData *data;
        GTask *task;
+       EphyPrefsRestoreSessionPolicy policy;
 
        g_return_if_fail (EPHY_IS_SESSION (session));
 
@@ -877,6 +878,12 @@ ephy_session_save (EphySession *session,
                return;
        }
 
+       policy = g_settings_get_enum (EPHY_SETTINGS_MAIN, EPHY_PREFS_RESTORE_SESSION_POLICY);
+       if (policy == EPHY_PREFS_RESTORE_SESSION_POLICY_NEVER)
+       {
+               return;
+       }
+
        LOG ("ephy_sesion_save %s", filename);
 
        shell = ephy_shell_get_default ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]