From d1afe32762e878378aa71a71e2f095d42be15741 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 23 Jul 2020 07:58:57 -0400 Subject: [PATCH 1/5] filechooser: Remove a leftover signal emission Commit 0145809a94667c75ed4a4 replace the response-requested signal with an action, but didn't actually remove the emission of that no-longer-existing signal. Fixes: #2942 --- gtk/gtkfilechooserwidget.c | 1 - 1 file changed, 1 deletion(-) diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c index 3f0bddf223..4c9360571e 100644 --- a/gtk/gtkfilechooserwidget.c +++ b/gtk/gtkfilechooserwidget.c @@ -5701,7 +5701,6 @@ static void request_response_and_add_to_recent_list (GtkFileChooserWidget *impl) { gtk_widget_activate_action (GTK_WIDGET (impl), "response.activate", NULL); - g_signal_emit_by_name (impl, "response-requested"); add_selection_to_recent_list (impl); } From 3108b8b4d3f6ddbc1f48b94b8693cac5fba9d493 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 23 Jul 2020 12:43:46 -0400 Subject: [PATCH 2/5] docs: Explain the shortcutcontroller example a bit Add a reference to the the syntax for shortcut actions in builder files. --- gtk/gtkshortcutcontroller.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gtk/gtkshortcutcontroller.c b/gtk/gtkshortcutcontroller.c index 1b995f5098..1d4806b198 100644 --- a/gtk/gtkshortcutcontroller.c +++ b/gtk/gtkshortcutcontroller.c @@ -50,7 +50,7 @@ * managed * * - * <Control>k + * k]]> * activate * * @@ -58,6 +58,11 @@ * * * ]| + * + * This example creates a #GtkActivateAction for triggering the `activate` + * signal of the GtkButton. See gtk_shortcut_action_parse_string() for the syntax + * for other kinds of #GtkShortcutAction. See gtk_shortcut_trigger_parse_string() + * to learn more about the syntax for triggers. **/ #include "config.h" From 03601cb794b54be6124649f97f9568e6979c3287 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 23 Jul 2020 12:57:08 -0400 Subject: [PATCH 3/5] docs: Improve shortcut trigger docs Point out the need to escape <> in xml. --- gtk/gtkshortcuttrigger.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gtk/gtkshortcuttrigger.c b/gtk/gtkshortcuttrigger.c index 65e3164b5b..8364932c59 100644 --- a/gtk/gtkshortcuttrigger.c +++ b/gtk/gtkshortcuttrigger.c @@ -122,6 +122,10 @@ gtk_shortcut_trigger_trigger (GtkShortcutTrigger *self, * - two valid trigger strings, separated by a `|` character, for a * #GtkAlternativeTrigger: `q|w` * + * Note that you will have to escape the `<` and `>` characters when specifying + * triggers in XML files, such as GtkBuilder ui files. Use `<` instead of + * `<` and `>` instead of `>`. + * * Returns: (nullable) (transfer full): a new #GtkShortcutTrigger * or %NULL on error */ From 561d3c68a00af7359f891de4a0b5e2b3e27e6b08 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 23 Jul 2020 15:46:06 -0400 Subject: [PATCH 4/5] docs: Pass --standalone to pandoc This flag causes pandoc to emit a proper doctype declaration and, crucially, namespace declarations for the xlink namespace that it insists on using for href attributes. Without this, putting external links in md documents doesn't survive the journey through xml. --- docs/reference/gtk/gtk-markdown-to-docbook | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/reference/gtk/gtk-markdown-to-docbook b/docs/reference/gtk/gtk-markdown-to-docbook index f48b556f48..4268bf1b7a 100755 --- a/docs/reference/gtk/gtk-markdown-to-docbook +++ b/docs/reference/gtk/gtk-markdown-to-docbook @@ -177,6 +177,7 @@ def ConvertToDocbook(infile, outfile): subprocess.check_call(["pandoc", infile, "-o", outfile, "--from=" + input_format, "--to=" + output_format, + "--standalone", "--top-level-division=" + division]) def ExpandGtkDocAbbreviations(infile, outfile): From 1e00c887ec39e82aa2957ed7b1f9c30300515d74 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 23 Jul 2020 16:14:33 -0400 Subject: [PATCH 5/5] docs: Work around escaping bugs This is truly a russian doll of documentation formats: a string containing <> inside an xml fragment in an |[ ]| gtk-doc example in markdown in a doc comment. Sadly, something gets escaping wrong, so the <> end up literally in the docbook and mess up the last step of our document formatting, even after turning them into entities. Work around this with an extra level of entities that really shouldn't be necessary. --- gtk/gtkshortcutcontroller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkshortcutcontroller.c b/gtk/gtkshortcutcontroller.c index 1d4806b198..e427ae5ed8 100644 --- a/gtk/gtkshortcutcontroller.c +++ b/gtk/gtkshortcutcontroller.c @@ -50,7 +50,7 @@ * managed * * - * k]]> + * &lt;Control&gt;k * activate * *