[gnome-builder/wip/gtk4-port] plugins/buildui: use teletype for argv
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port] plugins/buildui: use teletype for argv
- Date: Tue, 14 Jun 2022 20:13:10 +0000 (UTC)
commit 7f5fd4061fa543d2eae8ff96c16442abc3e3d3a8
Author: Christian Hergert <chergert redhat com>
Date: Tue Jun 14 13:13:05 2022 -0700
plugins/buildui: use teletype for argv
This is a shell argument vector, so make it look more shell'y.
src/plugins/buildui/gbp-buildui-runnables-dialog.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/buildui/gbp-buildui-runnables-dialog.c
b/src/plugins/buildui/gbp-buildui-runnables-dialog.c
index 9b8e96399..d73bcf3ff 100644
--- a/src/plugins/buildui/gbp-buildui-runnables-dialog.c
+++ b/src/plugins/buildui/gbp-buildui-runnables-dialog.c
@@ -71,12 +71,13 @@ create_run_command_row (gpointer item,
if (argv != NULL)
{
- subtitle = g_string_new (NULL);
+ subtitle = g_string_new ("<tt>");
for (guint i = 0; argv[i]; i++)
{
const char *arg = argv[i];
g_autofree char *quote = NULL;
+ g_autofree char *arg_escaped = NULL;
if (i > 0)
g_string_append_c (subtitle, ' ');
@@ -93,11 +94,15 @@ create_run_command_row (gpointer item,
}
}
- if (quote)
- g_string_append (subtitle, quote);
+ if (quote != NULL)
+ arg_escaped = g_markup_escape_text (quote, -1);
else
- g_string_append (subtitle, arg);
+ arg_escaped = g_markup_escape_text (arg, -1);
+
+ g_string_append (subtitle, arg_escaped);
}
+
+ g_string_append (subtitle, "</tt>");
}
check = g_object_new (GTK_TYPE_CHECK_BUTTON,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]