[epiphany/mcatanzaro/empty-session] Fix failure to launch any window on startup
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/empty-session] Fix failure to launch any window on startup
- Date: Sat, 11 Jan 2020 21:03:46 +0000 (UTC)
commit 6c7afb39a840f3a26632a8288f5ad97e96166e81
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sat Jan 11 15:02:15 2020 -0600
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.
src/ephy-shell.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 0acb0faa5..ead4f838b 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"
@@ -116,6 +117,7 @@ ephy_shell_startup_continue (EphyShell *shell,
EphyShellStartupContext *ctx)
{
EphySession *session = ephy_shell_get_session (shell);
+ EphyWindow *window;
if (ctx->session_filename != NULL) {
g_assert (session != NULL);
@@ -126,6 +128,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) {
+ 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]