diff options
author | Claudio Saavedra <csaavedra@igalia.com> | 2011-07-01 04:06:15 +0800 |
---|---|---|
committer | Claudio Saavedra <csaavedra@igalia.com> | 2011-07-01 04:06:15 +0800 |
commit | 31f5d743a17dc5df98a0ee2ba83643c668b0437d (patch) | |
tree | 2bae099fc118775701228c85755b960e1a4a2d2c /src/ephy-shell.c | |
parent | 1ae608baef5b8bcef83218da71b5bc9c31bd20f4 (diff) | |
download | gsoc2013-epiphany-31f5d743a17dc5df98a0ee2ba83643c668b0437d.tar gsoc2013-epiphany-31f5d743a17dc5df98a0ee2ba83643c668b0437d.tar.gz gsoc2013-epiphany-31f5d743a17dc5df98a0ee2ba83643c668b0437d.tar.bz2 gsoc2013-epiphany-31f5d743a17dc5df98a0ee2ba83643c668b0437d.tar.lz gsoc2013-epiphany-31f5d743a17dc5df98a0ee2ba83643c668b0437d.tar.xz gsoc2013-epiphany-31f5d743a17dc5df98a0ee2ba83643c668b0437d.tar.zst gsoc2013-epiphany-31f5d743a17dc5df98a0ee2ba83643c668b0437d.zip |
Open a new window in the primary instance when remoting without URIs
Diffstat (limited to 'src/ephy-shell.c')
-rw-r--r-- | src/ephy-shell.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c index 691dc8140..f5759d446 100644 --- a/src/ephy-shell.c +++ b/src/ephy-shell.c @@ -227,6 +227,8 @@ ephy_shell_add_platform_data (GApplication *application, EphyShell *app; EphyShellStartupContext *ctx; GVariantBuilder *ctx_builder; + static const char *empty_arguments[] = { "", NULL }; + const char* const * arguments; app = EPHY_SHELL (application); @@ -261,10 +263,18 @@ ephy_shell_add_platform_data (GApplication *application, CTX_BOOKMARK_URL, g_variant_new_string (ctx->bookmark_url)); + /* + * If there are no URIs specified, pass an empty string, so that + * the primary instance opens a new window. + */ if (ctx->arguments) - g_variant_builder_add (ctx_builder, "{iv}", - CTX_ARGUMENTS, - g_variant_new_strv ((const gchar * const *)ctx->arguments, -1)); + arguments = (const gchar * const *)ctx->arguments; + else + arguments = empty_arguments; + + g_variant_builder_add (ctx_builder, "{iv}", + CTX_ARGUMENTS, + g_variant_new_strv (arguments, -1)); g_variant_builder_add (ctx_builder, "{iv}", CTX_USER_TIME, |