From 9c5c0d032a27605fc08a9aeb979b5da419ebe916 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 11 Dec 2017 11:13:37 +0100 Subject: [PATCH] doxygen: use native Doxyfile booleans instead of 0/1. --- doc/doxygen.rst | 2 +- doxygen/dox2html5.py | 9 ++++++--- doxygen/test/test_doxyfile.py | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/doxygen.rst b/doc/doxygen.rst index c0b98aa3..1ed4b6c0 100644 --- a/doc/doxygen.rst +++ b/doc/doxygen.rst @@ -248,7 +248,7 @@ Variable Description are shown. If not set, ``1`` is used. :ini:`M_EXPAND_INNER_TYPES` Whether to expand inner types (e.g. a class inside a class) in the symbol tree. If not - set, ``0`` is used. + set, ``NO`` is used. =================================== ======================================= Note that namespace, directory and page lists are always fully expanded as diff --git a/doxygen/dox2html5.py b/doxygen/dox2html5.py index 492a9a35..fc39e9b9 100755 --- a/doxygen/dox2html5.py +++ b/doxygen/dox2html5.py @@ -1542,7 +1542,7 @@ def parse_doxyfile(state: State, doxyfile, config = None): 'M_CLASS_TREE_EXPAND_LEVELS': ['1'], 'M_FILE_TREE_EXPAND_LEVELS': ['1'], - 'M_EXPAND_INNER_TYPES': ['0'], + 'M_EXPAND_INNER_TYPES': ['NO'], 'M_THEME_COLOR': ['#22272e'] } @@ -1623,10 +1623,13 @@ def parse_doxyfile(state: State, doxyfile, config = None): # Int values that we want for i in ['M_CLASS_TREE_EXPAND_LEVELS', - 'M_FILE_TREE_EXPAND_LEVELS', - 'M_EXPAND_INNER_TYPES']: + 'M_FILE_TREE_EXPAND_LEVELS']: if i in config: state.doxyfile[i] = int(' '.join(config[i])) + # Boolean values that we want + for i in ['M_EXPAND_INNER_TYPES']: + if i in config: state.doxyfile[i] = ' '.join(config[i]) == 'YES' + # List values that we want. Drop empty lines. for i in ['TAGFILES', 'HTML_EXTRA_STYLESHEET', diff --git a/doxygen/test/test_doxyfile.py b/doxygen/test/test_doxyfile.py index 8e1a29b6..862f5961 100644 --- a/doxygen/test/test_doxyfile.py +++ b/doxygen/test/test_doxyfile.py @@ -11,7 +11,7 @@ class Doxyfile(unittest.TestCase): 'HTML_EXTRA_STYLESHEET': ['a.css', 'b.css'], 'HTML_OUTPUT': 'html', 'M_CLASS_TREE_EXPAND_LEVELS': 1, - 'M_EXPAND_INNER_TYPES': 0, + 'M_EXPAND_INNER_TYPES': False, 'M_FILE_TREE_EXPAND_LEVELS': 1, 'M_THEME_COLOR': '#22272e', 'OUTPUT_DIRECTORY': '', -- 2.30.2