diff options
author | Carlos Garcia Campos <cgarcia@igalia.com> | 2012-08-14 01:33:00 +0800 |
---|---|---|
committer | Carlos Garcia Campos <cgarcia@igalia.com> | 2013-01-09 00:42:17 +0800 |
commit | b18992cb830ce129ba6b9b1132f0921414554bb8 (patch) | |
tree | 8f139346d6bf4ea288bbbce8949c5c78cc08422d | |
parent | 12415ad405dc6a9bcc42bd693d22c9b857e9bab3 (diff) | |
download | gsoc2013-epiphany-b18992cb830ce129ba6b9b1132f0921414554bb8.tar gsoc2013-epiphany-b18992cb830ce129ba6b9b1132f0921414554bb8.tar.gz gsoc2013-epiphany-b18992cb830ce129ba6b9b1132f0921414554bb8.tar.bz2 gsoc2013-epiphany-b18992cb830ce129ba6b9b1132f0921414554bb8.tar.lz gsoc2013-epiphany-b18992cb830ce129ba6b9b1132f0921414554bb8.tar.xz gsoc2013-epiphany-b18992cb830ce129ba6b9b1132f0921414554bb8.tar.zst gsoc2013-epiphany-b18992cb830ce129ba6b9b1132f0921414554bb8.zip |
ephy-session: Use ephy_session_load() directly instead of queueing a load session command
https://bugzilla.gnome.org/show_bug.cgi?id=641739
-rw-r--r-- | src/ephy-session.c | 11 | ||||
-rw-r--r-- | src/ephy-session.h | 1 | ||||
-rw-r--r-- | src/ephy-shell.c | 6 |
3 files changed, 4 insertions, 14 deletions
diff --git a/src/ephy-session.c b/src/ephy-session.c index 36008054d..653fc448c 100644 --- a/src/ephy-session.c +++ b/src/ephy-session.c @@ -239,9 +239,7 @@ session_command_autoresume (EphySession *session, NULL, NULL, user_time, FALSE); } else if (ephy_shell_get_n_windows (shell) == 0) - ephy_session_queue_command (session, - EPHY_SESSION_CMD_LOAD_SESSION, - SESSION_STATE, NULL, user_time, TRUE); + ephy_session_load (session, SESSION_STATE, user_time, NULL, NULL, NULL); } static void @@ -350,9 +348,6 @@ session_command_dispatch (EphySession *session) case EPHY_SESSION_CMD_RESUME_SESSION: session_command_autoresume (session, cmd->user_time); break; - case EPHY_SESSION_CMD_LOAD_SESSION: - ephy_session_load (session, cmd->arg, cmd->user_time, NULL, NULL, NULL); - break; case EPHY_SESSION_CMD_OPEN_URIS: session_command_open_uris (session, cmd->args, cmd->arg, cmd->user_time); break; @@ -1374,9 +1369,7 @@ ephy_session_queue_command (EphySession *session, { cmd = (SessionCommand *) element->data; - if ((command == EPHY_SESSION_CMD_LOAD_SESSION && - strcmp (cmd->arg, arg) == 0) || - command == EPHY_SESSION_CMD_RESUME_SESSION) + if (command == EPHY_SESSION_CMD_RESUME_SESSION) { cmd->user_time = user_time; g_queue_remove (priv->queue, cmd); diff --git a/src/ephy-session.h b/src/ephy-session.h index 6ab4d389f..c264e0cab 100644 --- a/src/ephy-session.h +++ b/src/ephy-session.h @@ -46,7 +46,6 @@ typedef struct _EphySessionClass EphySessionClass; typedef enum { EPHY_SESSION_CMD_RESUME_SESSION, - EPHY_SESSION_CMD_LOAD_SESSION, EPHY_SESSION_CMD_OPEN_URIS, EPHY_SESSION_CMD_MAYBE_OPEN_WINDOW, EPHY_SESSION_CMD_MAYBE_OPEN_WINDOW_RESTORE, diff --git a/src/ephy-shell.c b/src/ephy-shell.c index 452ded781..1b24387e2 100644 --- a/src/ephy-shell.c +++ b/src/ephy-shell.c @@ -131,10 +131,8 @@ queue_commands (EphyShell *shell) NULL, NULL, ctx->user_time, TRUE); if (ctx->session_filename != NULL) - ephy_session_queue_command (session, - EPHY_SESSION_CMD_LOAD_SESSION, - (const char *)ctx->session_filename, NULL, - ctx->user_time, FALSE); + ephy_session_load (session, (const char *)ctx->session_filename, + ctx->user_time, NULL, NULL, NULL); else if (ctx->arguments != NULL) { /* Don't queue any window openings if no extra arguments given, */ /* since session autoresume will open one for us. */ |