[gtk/issue-1746] Move the gtkunixprint.h include in the gtk-doc stanza
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/issue-1746] Move the gtkunixprint.h include in the gtk-doc stanza
- Date: Wed, 13 Mar 2019 17:45:35 +0000 (UTC)
commit 7771869ab307a4f9bcfcdaca9fe3bc79f24672ae
Author: Emmanuele Bassi <ebassi gnome org>
Date: Wed Mar 13 17:39:33 2019 +0000
Move the gtkunixprint.h include in the gtk-doc stanza
Every time a new <INCLUDE> directive is used inside a gtk-doc
sections.txt file it overrides the current include header until the next
<INCLUDE> directive. This has the unfortunate effect of making every
single section following the print-related ones to generate
documentation that says to include gtkunixprint.h.
In order to avoid re-arranging the gtk3-sections.txt file, we can tell
gtk-doc what's the default header to include for GTK, and override it
using `@Include` directives directly into the gtk-doc stanzas of the
sections that require a different header.
Fixes: #1746
docs/reference/gtk/Makefile.am | 2 +-
docs/reference/gtk/gtk3-sections.txt | 6 ------
gtk/gtkpagesetupunixdialog.c | 1 +
gtk/gtkprintjob.c | 1 +
gtk/gtkprintunixdialog.c | 1 +
5 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/docs/reference/gtk/Makefile.am b/docs/reference/gtk/Makefile.am
index 9442a5d55d..abdea7fb59 100644
--- a/docs/reference/gtk/Makefile.am
+++ b/docs/reference/gtk/Makefile.am
@@ -276,7 +276,7 @@ GTKDOC_LIBS = \
# Extra options to supply to gtkdoc-mkdb
-MKDB_OPTIONS=--output-format=xml --name-space=gtk
+MKDB_OPTIONS=--output-format=xml --name-space=gtk --default-includes=gtk/gtk.h
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE)
content_files = \
diff --git a/docs/reference/gtk/gtk3-sections.txt b/docs/reference/gtk/gtk3-sections.txt
index ab10ddd025..8d379018c0 100644
--- a/docs/reference/gtk/gtk3-sections.txt
+++ b/docs/reference/gtk/gtk3-sections.txt
@@ -1,6 +1,3 @@
-
-<INCLUDE>gtk/gtk.h</INCLUDE>
-
<SECTION>
<FILE>gtkaboutdialog</FILE>
<TITLE>GtkAboutDialog</TITLE>
@@ -7089,7 +7086,6 @@ GtkPrintOperationPrivate
<SECTION>
-<INCLUDE>gtk/gtkunixprint.h</INCLUDE>
<FILE>gtkprintunixdialog</FILE>
<TITLE>GtkPrintUnixDialog</TITLE>
GtkPrintUnixDialog
@@ -7436,7 +7432,6 @@ gtk_print_context_get_type
<SECTION>
-<INCLUDE>gtk/gtkunixprint.h</INCLUDE>
<FILE>gtkprintjob</FILE>
<TITLE>GtkPrintJob</TITLE>
GtkPrintJob
@@ -7488,7 +7483,6 @@ gtk_print_job_get_type
<SECTION>
-<INCLUDE>gtk/gtkunixprint.h</INCLUDE>
<FILE>gtkpagesetupunixdialog</FILE>
<TITLE>GtkPageSetupUnixDialog</TITLE>
GtkPageSetupUnixDialog
diff --git a/gtk/gtkpagesetupunixdialog.c b/gtk/gtkpagesetupunixdialog.c
index 8952afa455..a992271c44 100644
--- a/gtk/gtkpagesetupunixdialog.c
+++ b/gtk/gtkpagesetupunixdialog.c
@@ -49,6 +49,7 @@
* SECTION:gtkpagesetupunixdialog
* @Short_description: A page setup dialog
* @Title: GtkPageSetupUnixDialog
+ * @Include: gtk/gtkunixprint.h
*
* #GtkPageSetupUnixDialog implements a page setup dialog for platforms
* which don’t provide a native page setup dialog, like Unix. It can
diff --git a/gtk/gtkprintjob.c b/gtk/gtkprintjob.c
index e74fdc01dc..16fd9e945e 100644
--- a/gtk/gtkprintjob.c
+++ b/gtk/gtkprintjob.c
@@ -19,6 +19,7 @@
* SECTION:gtkprintjob
* @Title: GtkPrintJob
* @Short_description: Represents a print job
+ * @Include: gtk/gtkunixprint.h
*
* A #GtkPrintJob object represents a job that is sent to a
* printer. You only need to deal directly with print jobs if
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c
index 1d29fd6fc4..936bbef18b 100644
--- a/gtk/gtkprintunixdialog.c
+++ b/gtk/gtkprintunixdialog.c
@@ -64,6 +64,7 @@
* SECTION:gtkprintunixdialog
* @Short_description: A print dialog
* @Title: GtkPrintUnixDialog
+ * @Include: gtk/gtkunixprint.h
* @See_also: #GtkPageSetupUnixDialog, #GtkPrinter, #GtkPrintJob
*
* GtkPrintUnixDialog implements a print dialog for platforms
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]