[epiphany] Do not allow incognito or private instances to save window geometry



commit 86378f748549dcd6098c0300f066ce4ee9c59dca
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Tue Jan 31 15:34:19 2017 +0100

    Do not allow incognito or private instances to save window geometry
    
    Allow them to read it, but not write it.

 src/ephy-window.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 7385f98..1835015 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -2809,12 +2809,24 @@ ephy_window_show (GtkWidget *widget)
   GTK_WIDGET_CLASS (ephy_window_parent_class)->show (widget);
 }
 
+static gboolean
+ephy_window_should_save_state (EphyWindow *window)
+{
+  if (window->is_popup)
+    return FALSE;
+
+  if (ephy_embed_shell_get_mode (ephy_embed_shell_get_default ()) == EPHY_EMBED_SHELL_MODE_APPLICATION)
+    return TRUE;
+
+  return ephy_dot_dir_is_default ();
+}
+
 static void
 ephy_window_destroy (GtkWidget *widget)
 {
   EphyWindow *window = EPHY_WINDOW (widget);
 
-  if (!window->is_popup) {
+  if (ephy_window_should_save_state (window)) {
     g_settings_set (EPHY_SETTINGS_STATE,
                     "window-size", "(ii)",
                     window->current_width,


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