[epiphany] ephy-session: Use ephy_session_load() directly instead of queueing a load session command
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-session: Use ephy_session_load() directly instead of queueing a load session command
- Date: Tue, 8 Jan 2013 17:02:03 +0000 (UTC)
commit b18992cb830ce129ba6b9b1132f0921414554bb8
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Mon Aug 13 19:33:00 2012 +0200
ephy-session: Use ephy_session_load() directly instead of queueing a load session command
https://bugzilla.gnome.org/show_bug.cgi?id=641739
src/ephy-session.c | 11 ++---------
src/ephy-session.h | 1 -
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 3600805..653fc44 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 6ab4d38..c264e0c 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 452ded7..1b24387 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. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]