[epiphany] Revert "ephy-shell: Don't interpret null arguments as empty string when adding platform data"
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Revert "ephy-shell: Don't interpret null arguments as empty string when adding platform data"
- Date: Thu, 13 Feb 2020 18:03:18 +0000 (UTC)
commit b1daac688cb2a62bdfbae9f1a60306e0aa153a8c
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Thu Feb 13 12:02:37 2020 -0600
Revert "ephy-shell: Don't interpret null arguments as empty string when adding platform data"
This reverts commit 2180a4f7946178eba9b3654800da2026e624c480.
src/ephy-shell.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 23c52717f..98babe02c 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -531,6 +531,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);
@@ -555,10 +557,18 @@ ephy_shell_add_platform_data (GApplication *application,
CTX_SESSION_FILENAME,
g_variant_new_string (ctx->session_filename));
+ /*
+ * 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 char **)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]