aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2012-10-08 17:44:06 +0800
committerCarlos Garcia Campos <cgarcia@igalia.com>2013-01-09 00:48:31 +0800
commitbfec1c2ce916b0a0054ccfdf5491132478e907f5 (patch)
tree33395132e912933b4acd0f6376d8f3b7b9b16f18 /src
parent59b0526207799db5e5e3039963e1cb0d08cc7642 (diff)
downloadgsoc2013-epiphany-bfec1c2ce916b0a0054ccfdf5491132478e907f5.tar
gsoc2013-epiphany-bfec1c2ce916b0a0054ccfdf5491132478e907f5.tar.gz
gsoc2013-epiphany-bfec1c2ce916b0a0054ccfdf5491132478e907f5.tar.bz2
gsoc2013-epiphany-bfec1c2ce916b0a0054ccfdf5491132478e907f5.tar.lz
gsoc2013-epiphany-bfec1c2ce916b0a0054ccfdf5491132478e907f5.tar.xz
gsoc2013-epiphany-bfec1c2ce916b0a0054ccfdf5491132478e907f5.tar.zst
gsoc2013-epiphany-bfec1c2ce916b0a0054ccfdf5491132478e907f5.zip
ephy-session: Remove EPHY_SESSION_CMD_MAYBE_OPEN_WINDOW
https://bugzilla.gnome.org/show_bug.cgi?id=641739
Diffstat (limited to 'src')
-rw-r--r--src/ephy-session.c43
-rw-r--r--src/ephy-session.h1
2 files changed, 22 insertions, 22 deletions
diff --git a/src/ephy-session.c b/src/ephy-session.c
index bf96236c9..bfe09c5b1 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -280,12 +280,31 @@ session_command_open_uris (EphySession *session,
g_object_unref (shell);
}
+static void
+session_maybe_open_window (EphySession *session,
+ guint32 user_time)
+{
+ EphyShell *shell = ephy_shell_get_default ();
+
+ /* FIXME: maybe just check for normal windows? */
+ if (ephy_shell_get_n_windows (shell) == 0)
+ {
+ ephy_shell_new_tab_full (shell,
+ NULL /* window */, NULL /* tab */,
+ NULL /* NetworkRequest */,
+ EPHY_NEW_TAB_IN_NEW_WINDOW |
+ EPHY_NEW_TAB_HOME_PAGE,
+ EPHY_WEB_VIEW_CHROME_ALL,
+ FALSE /* is popup? */,
+ user_time);
+ }
+}
+
static gboolean
session_command_dispatch (EphySession *session)
{
EphySessionPrivate *priv = session->priv;
SessionCommand *cmd;
- EphyShell *shell = ephy_shell_get_default ();
gboolean run_again = TRUE;
cmd = g_queue_pop_head (priv->queue);
@@ -298,20 +317,6 @@ session_command_dispatch (EphySession *session)
case EPHY_SESSION_CMD_OPEN_URIS:
session_command_open_uris (session, cmd->args, cmd->arg, cmd->user_time);
break;
- case EPHY_SESSION_CMD_MAYBE_OPEN_WINDOW:
- /* FIXME: maybe just check for normal windows? */
- if (ephy_shell_get_n_windows (shell) == 0)
- {
- ephy_shell_new_tab_full (shell,
- NULL /* window */, NULL /* tab */,
- NULL /* NetworkRequest */,
- EPHY_NEW_TAB_IN_NEW_WINDOW |
- EPHY_NEW_TAB_HOME_PAGE,
- EPHY_WEB_VIEW_CHROME_ALL,
- FALSE /* is popup? */,
- cmd->user_time);
- }
- break;
default:
g_assert_not_reached ();
break;
@@ -1004,9 +1009,7 @@ load_stream_complete_error (GSimpleAsyncResult *simple,
data = g_simple_async_result_get_op_res_gpointer (simple);
context = (SessionParserContext *)g_markup_parse_context_get_user_data (data->parser);
- ephy_session_queue_command (session,
- EPHY_SESSION_CMD_MAYBE_OPEN_WINDOW,
- NULL, NULL, context->user_time, FALSE);
+ session_maybe_open_window (session, context->user_time);
g_object_unref (session);
g_object_unref (simple);
@@ -1345,9 +1348,7 @@ ephy_session_resume (EphySession *session,
if (policy == EPHY_PREFS_RESTORE_SESSION_POLICY_NEVER)
session_delete (session, SESSION_STATE);
- ephy_session_queue_command (session,
- EPHY_SESSION_CMD_MAYBE_OPEN_WINDOW,
- NULL, NULL, user_time, FALSE);
+ session_maybe_open_window (session, user_time);
}
else if (ephy_shell_get_n_windows (shell) == 0)
{
diff --git a/src/ephy-session.h b/src/ephy-session.h
index 5d18cd47f..5197647ee 100644
--- a/src/ephy-session.h
+++ b/src/ephy-session.h
@@ -46,7 +46,6 @@ typedef struct _EphySessionClass EphySessionClass;
typedef enum
{
EPHY_SESSION_CMD_OPEN_URIS,
- EPHY_SESSION_CMD_MAYBE_OPEN_WINDOW,
EPHY_SESSION_CMD_MAYBE_OPEN_WINDOW_RESTORE,
EPHY_SESSION_CMD_LAST