[epiphany/gnome-3-32] Fix failure to launch any window on startup



commit 53f45bbf1809834023e89347f0ce4ac6b1f70c00
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sat Jan 11 21:02:15 2020 +0000

    Fix failure to launch any window on startup
    
    If we have an empty session state file, a file that exists on disk but
    contains no windows, then nothing happens when we start Epiphany until
    the user manually deletes the file from disk. That's bad. Show a window.
    
    
    (cherry picked from commit a9ee1d2e10f17b85d0ff917cf4c14296ee4c44a6)

 src/ephy-shell.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index e9ad2ae7d..bf0a43452 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -30,6 +30,7 @@
 #include "ephy-gui.h"
 #include "ephy-header-bar.h"
 #include "ephy-history-dialog.h"
+#include "ephy-link.h"
 #include "ephy-lockdown.h"
 #include "ephy-notification.h"
 #include "ephy-prefs.h"
@@ -125,6 +126,9 @@ ephy_shell_startup_continue (EphyShell               *shell,
     /* since session autoresume will open one for us. */
     ephy_shell_open_uris (shell, (const char **)ctx->arguments,
                           ctx->startup_mode, ctx->user_time);
+  } else if (ephy_shell_get_n_windows (shell) == 0) {
+    EphyWindow *window = ephy_window_new ();
+    ephy_link_open (EPHY_LINK (window), NULL, NULL, EPHY_LINK_HOME_PAGE);
   }
 }
 


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