[epiphany] ephy-session: Remove EPHY_SESSION_CMD_MAYBE_OPEN_WINDOW
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-session: Remove EPHY_SESSION_CMD_MAYBE_OPEN_WINDOW
- Date: Tue, 8 Jan 2013 17:02:13 +0000 (UTC)
commit bfec1c2ce916b0a0054ccfdf5491132478e907f5
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Mon Oct 8 11:44:06 2012 +0200
ephy-session: Remove EPHY_SESSION_CMD_MAYBE_OPEN_WINDOW
https://bugzilla.gnome.org/show_bug.cgi?id=641739
src/ephy-session.c | 43 ++++++++++++++++++++++---------------------
src/ephy-session.h | 1 -
2 files changed, 22 insertions(+), 22 deletions(-)
---
diff --git a/src/ephy-session.c b/src/ephy-session.c
index bf96236..bfe09c5 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 5d18cd4..5197647 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]