aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-main.c
diff options
context:
space:
mode:
authorGiovanni Campagna <gcampagna@src.gnome.org>2013-08-18 21:17:23 +0800
committerGiovanni Campagna <gcampagn@redhat.com>2013-08-29 22:09:41 +0800
commit77df45f51f70243aaad5ec88b816c881cfdb2dbe (patch)
treebba0f0b9ebb6c90390d4f68a8b041507c5fc4f7e /src/ephy-main.c
parentfa9ed211b6457537492162d71d552ad5fee9c835 (diff)
downloadgsoc2013-epiphany-77df45f51f70243aaad5ec88b816c881cfdb2dbe.tar
gsoc2013-epiphany-77df45f51f70243aaad5ec88b816c881cfdb2dbe.tar.gz
gsoc2013-epiphany-77df45f51f70243aaad5ec88b816c881cfdb2dbe.tar.bz2
gsoc2013-epiphany-77df45f51f70243aaad5ec88b816c881cfdb2dbe.tar.lz
gsoc2013-epiphany-77df45f51f70243aaad5ec88b816c881cfdb2dbe.tar.xz
gsoc2013-epiphany-77df45f51f70243aaad5ec88b816c881cfdb2dbe.tar.zst
gsoc2013-epiphany-77df45f51f70243aaad5ec88b816c881cfdb2dbe.zip
EphyShell: add support for starting without windows
To launch epiphany as a DBus service, we need to be able to launch without opening windows, and then use the GApplication inactivity timeout to manage our lifetime. https://bugzilla.gnome.org/show_bug.cgi?id=694943
Diffstat (limited to 'src/ephy-main.c')
-rw-r--r--src/ephy-main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ephy-main.c b/src/ephy-main.c
index 96ac40b31..0347a5770 100644
--- a/src/ephy-main.c
+++ b/src/ephy-main.c
@@ -56,6 +56,7 @@ 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
@@ -90,6 +91,8 @@ 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,
@@ -214,6 +217,9 @@ 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)