[epiphany] Open a new window in the primary instance when remoting without URIs
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Open a new window in the primary instance when remoting without URIs
- Date: Thu, 30 Jun 2011 20:11:45 +0000 (UTC)
commit 31f5d743a17dc5df98a0ee2ba83643c668b0437d
Author: Claudio Saavedra <csaavedra igalia com>
Date: Thu Jun 30 23:06:15 2011 +0300
Open a new window in the primary instance when remoting without URIs
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 691dc81..f5759d4 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]