aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-shell.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2013-01-08 18:30:38 +0800
committerCarlos Garcia Campos <cgarcia@igalia.com>2013-01-09 00:49:28 +0800
commitaff7854dd623643a1d76676508dbb9265a4c3bc1 (patch)
treee3164dd4e200ee5d7658e91274500dca2c4b5e8d /src/ephy-shell.c
parent5a570470ebdd1f3ed5aa2977a40bb85623b336e6 (diff)
downloadgsoc2013-epiphany-aff7854dd623643a1d76676508dbb9265a4c3bc1.tar
gsoc2013-epiphany-aff7854dd623643a1d76676508dbb9265a4c3bc1.tar.gz
gsoc2013-epiphany-aff7854dd623643a1d76676508dbb9265a4c3bc1.tar.bz2
gsoc2013-epiphany-aff7854dd623643a1d76676508dbb9265a4c3bc1.tar.lz
gsoc2013-epiphany-aff7854dd623643a1d76676508dbb9265a4c3bc1.tar.xz
gsoc2013-epiphany-aff7854dd623643a1d76676508dbb9265a4c3bc1.tar.zst
gsoc2013-epiphany-aff7854dd623643a1d76676508dbb9265a4c3bc1.zip
ephy-session: Remove EPHY_SESSION_CMD_OPEN_URIS
Add ephy_session_open_uris() instead and use it from EphyShell instead of scheduling a command. https://bugzilla.gnome.org/show_bug.cgi?id=641739
Diffstat (limited to 'src/ephy-shell.c')
-rw-r--r--src/ephy-shell.c26
1 files changed, 6 insertions, 20 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index ee947ff97..42209bd5c 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -113,7 +113,7 @@ ephy_shell_startup_context_new (EphyStartupFlags startup_flags,
}
static void
-queue_commands (EphyShell *shell)
+ephy_shell_startup_continue (EphyShell *shell)
{
EphyShellStartupContext *ctx;
EphySession *session;
@@ -129,21 +129,8 @@ queue_commands (EphyShell *shell)
else if (ctx->arguments != NULL) {
/* Don't queue any window openings if no extra arguments given, */
/* since session autoresume will open one for us. */
- GString *options;
-
- options = g_string_sized_new (64);
-
- if (ctx->startup_flags & EPHY_STARTUP_NEW_WINDOW)
- g_string_append (options, "new-window,");
-
- if (ctx->startup_flags & EPHY_STARTUP_NEW_TAB)
- g_string_append (options, "new-tab,external,");
-
- ephy_session_queue_command (session,
- EPHY_SESSION_CMD_OPEN_URIS,
- (const char*)options->str,
- (const char **)ctx->arguments,
- ctx->user_time, FALSE);
+ ephy_session_open_uris (session, (const char **)ctx->arguments,
+ ctx->startup_flags, ctx->user_time);
}
}
@@ -262,7 +249,7 @@ session_load_cb (GObject *object,
EphyShell *shell = EPHY_SHELL (user_data);
ephy_session_resume_finish (session, result, NULL);
- queue_commands (shell);
+ ephy_shell_startup_continue (shell);
}
static void
@@ -281,9 +268,8 @@ ephy_shell_activate (GApplication *application)
ctx = shell->priv->startup_context;
ephy_session_resume (EPHY_SESSION (ephy_shell_get_session (shell)),
ctx->user_time, NULL, session_load_cb, shell);
- }
- else
- queue_commands (shell);
+ } else
+ ephy_shell_startup_continue (shell);
}
/*