Commit 480634f1 authored by Carlos Garcia Campos's avatar Carlos Garcia Campos Committed by Carlos Garcia Campos

Remove the headless mode

We don't need it anymore now that the search provider is in its own
binary
parent 78e8d7f0
......@@ -56,7 +56,6 @@ static char *application_to_delete = NULL;
static gboolean private_instance = FALSE;
static gboolean incognito_mode = FALSE;
static gboolean application_mode = FALSE;
static gboolean headless_mode = FALSE;
static char *profile_directory = NULL;
static gboolean
......@@ -91,8 +90,6 @@ static const GOptionEntry option_entries[] =
N_("Start an instance in netbank mode"), NULL },
{ "application-mode", 'a', 0, G_OPTION_ARG_NONE, &application_mode,
N_("Start the browser in application mode"), NULL },
{ "headless-mode", 0, 0, G_OPTION_ARG_NONE, &headless_mode,
N_("Start the application without opening windows"), NULL },
{ "profile", 0, 0, G_OPTION_ARG_STRING, &profile_directory,
N_("Profile directory to use in the private instance"), N_("DIR") },
{ G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_FILENAME_ARRAY, &arguments,
......@@ -217,9 +214,6 @@ get_startup_flags (void)
{
EphyStartupFlags flags = 0;
if (headless_mode)
return EPHY_STARTUP_OPEN_NOTHING;
if (open_in_new_tab)
flags |= EPHY_STARTUP_NEW_TAB;
if (open_in_new_window)
......
......@@ -1561,7 +1561,7 @@ ephy_session_resume (EphySession *session,
return;
}
g_task_return_boolean (task, FALSE);
g_task_return_boolean (task, TRUE);
g_object_unref (task);
}
......
......@@ -286,23 +286,7 @@ session_load_cb (GObject *object,
EphySession *session = EPHY_SESSION (object);
EphyShell *shell = EPHY_SHELL (user_data);
if (ephy_session_resume_finish (session, result, NULL))
shell->priv->startup_context->startup_flags |= EPHY_STARTUP_RESUMING_SESSION;
ephy_shell_startup_continue (shell);
}
static void
ephy_shell_start_headless (EphyShell *shell)
{
/* A bit of a hack: because we don't pass IS_SERVICE to GApplication
(because otherwise we would need a separate launcher binary), we
don't get the 10 seconds timeout for the first DBus call.
So just hold/release to get the inactivity timeout started instead.
*/
g_application_hold (G_APPLICATION (shell));
g_application_release (G_APPLICATION (shell));
ephy_session_resume_finish (session, result, NULL);
ephy_shell_startup_continue (shell);
}
......@@ -313,18 +297,14 @@ ephy_shell_activate (GApplication *application)
/*
* We get here on each new instance (remote or not). Autoresume the
* session unless we are in application or headless mode and queue the
* commands.
* session unless we are in application mode and queue the commands.
*/
if (ephy_embed_shell_get_mode (EPHY_EMBED_SHELL (shell)) != EPHY_EMBED_SHELL_MODE_APPLICATION) {
EphyShellStartupContext *ctx;
ctx = shell->priv->startup_context;
if (ctx->startup_flags != EPHY_STARTUP_OPEN_NOTHING) {
ephy_session_resume (ephy_shell_get_session (shell),
ctx->user_time, NULL, session_load_cb, shell);
} else
ephy_shell_start_headless (shell);
ephy_session_resume (ephy_shell_get_session (shell),
ctx->user_time, NULL, session_load_cb, shell);
} else
ephy_shell_startup_continue (shell);
}
......@@ -1096,7 +1076,7 @@ open_uris_data_new (EphyShell *shell,
data->flags |= EPHY_NEW_TAB_IN_NEW_WINDOW;
} else if (startup_flags & EPHY_STARTUP_NEW_TAB || (new_windows_in_tabs && have_uris)) {
data->flags |= EPHY_NEW_TAB_IN_EXISTING_WINDOW | EPHY_NEW_TAB_JUMP | EPHY_NEW_TAB_PRESENT_WINDOW | EPHY_NEW_TAB_FROM_EXTERNAL;
} else if (!have_uris && !(startup_flags & EPHY_STARTUP_RESUMING_SESSION)) {
} else if (!have_uris) {
data->window = NULL;
data->flags |= EPHY_NEW_TAB_IN_NEW_WINDOW;
}
......
......@@ -109,8 +109,6 @@ typedef enum {
typedef enum {
EPHY_STARTUP_NEW_TAB = 1 << 0,
EPHY_STARTUP_NEW_WINDOW = 1 << 1,
EPHY_STARTUP_OPEN_NOTHING = 1 << 2,
EPHY_STARTUP_RESUMING_SESSION = 1 << 3,
} EphyStartupFlags;
typedef struct {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment