From d7fbf79ebcbd70f08d9c7c8fd446261c50817c8f Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Sun, 28 Jul 2019 11:37:47 +0200 Subject: mkdb: only output "Types and Values" if not empty This was so far part of the static file template. Fixes #96 --- gtkdoc/mkdb.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/gtkdoc/mkdb.py b/gtkdoc/mkdb.py index 009e99e..bff1a94 100644 --- a/gtkdoc/mkdb.py +++ b/gtkdoc/mkdb.py @@ -217,11 +217,7 @@ ${extralinks}${long_desc} Functions ${functions_details} - -Types and Values -${other_details} - -${args_desc}${signals_desc}${see_also} +${other_desc}${args_desc}${signals_desc}${see_also} ''') @@ -411,6 +407,7 @@ def OutputDB(file, options): other_synop = '' functions_details = '' other_details = '' + other_desc = '' signals_synop = '' signals_desc = '' args_synop = '' @@ -678,11 +675,16 @@ def OutputDB(file, options): ''' % (section_id, other_synop) + other_desc += ''' +Types and Values +%s + +''' % (section_id, other_details) file_changed = OutputDBFile(filename, title, section_id, section_includes, functions_synop, other_synop, - functions_details, other_details, + functions_details, other_desc, signals_synop, signals_desc, args_synop, args_desc, hierarchy_str, interfaces, @@ -702,6 +704,7 @@ def OutputDB(file, options): other_synop = '' functions_details = '' other_details = '' + other_desc = '' signals_synop = '' signals_desc = '' args_synop = '' @@ -2078,7 +2081,7 @@ def ParseStabilityLevel(stability, file, line, message): return str(stability) -def OutputDBFile(file, title, section_id, includes, functions_synop, other_synop, functions_details, other_details, signals_synop, signals_desc, args_synop, args_desc, hierarchy, interfaces, implementations, prerequisites, derived, file_objects, default_stability): +def OutputDBFile(file, title, section_id, includes, functions_synop, other_synop, functions_details, other_desc, signals_synop, signals_desc, args_synop, args_desc, hierarchy, interfaces, implementations, prerequisites, derived, file_objects, default_stability): """Outputs the final DocBook file for one section. Args: @@ -2090,7 +2093,7 @@ def OutputDBFile(file, title, section_id, includes, functions_synop, other_synop functions_synop (str): the DocBook for the Functions Synopsis part. other_synop (str): the DocBook for the Types and Values Synopsis part. functions_details (str): the DocBook for the Functions Details part. - other_details (str): the DocBook for the Types and Values Details part. + other_desc (str): the DocBook for the Types and Values Details part. signal_synop (str): the DocBook for the Signal Synopsis part signal_desc (str): the DocBook for the Signal Description part args_synop (str): the DocBook for the Arg Synopsis part @@ -2228,7 +2231,7 @@ def OutputDBFile(file, title, section_id, includes, functions_synop, other_synop 'implementations': implementations, 'long_desc': long_desc, 'object_anchors': object_anchors, - 'other_details': other_details, + 'other_desc': other_desc, 'other_synop': other_synop, 'prerequisites': prerequisites, 'section_id': section_id, -- cgit v1.2.1