[gi-docgen/ebassi/issue-106: 3/3] template: Improve output for properties and signals
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gi-docgen/ebassi/issue-106: 3/3] template: Improve output for properties and signals
- Date: Tue, 31 Aug 2021 21:41:00 +0000 (UTC)
commit e3e5e3bb9a65682b62f2e239daa1721f051d8ab9
Author: Emmanuele Bassi <ebassi gnome org>
Date: Tue Aug 31 22:39:22 2021 +0100
template: Improve output for properties and signals
We should show the inherited properties and signals of a class even when
the class itself does not define any property or signal.
Fixes: #106
gidocgen/templates/basic/class.html | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/gidocgen/templates/basic/class.html b/gidocgen/templates/basic/class.html
index c8096cd..658a12d 100644
--- a/gidocgen/templates/basic/class.html
+++ b/gidocgen/templates/basic/class.html
@@ -154,7 +154,7 @@ SPDX-License-Identifier: Apache-2.0 OR GPL-3.0-or-later
{% if ancestor.namespace == namespace.name %}
<li class="class"><a href="class.{{ ancestor.name }}.html" title="{{ ancestor.name }}">{{
ancestor.type_cname }}</a></li>
{% else %}
- <li class="class">{{ ancestor.type_cname }}</a></li>
+ <li class="class">{{ ancestor.type_cname }}</li>
{% endif %}
{% endfor %}
</ul>
@@ -303,13 +303,14 @@ SPDX-License-Identifier: Apache-2.0 OR GPL-3.0-or-later
</div>
{% endif %}
- {% if class.properties %}
+ {% if class.show_properties %}
<div class="toggle-wrapper properties">
<h4 id="properties">
Properties
<a href="#properties" class="anchor"></a>
</h4>
+ {% if class.properties %}
<div class="docblock">
{% for property in class.properties %}
<div class="{% if property.deprecated_since %}deprecated{% endif %}">
@@ -332,6 +333,7 @@ SPDX-License-Identifier: Apache-2.0 OR GPL-3.0-or-later
</div>
{% endfor %}
</div>
+ {% endif %}
{% for ancestor in class.ancestors %}
{% if ancestor.namespace == namespace.name and ancestor.n_properties > 0 %}
@@ -394,13 +396,14 @@ SPDX-License-Identifier: Apache-2.0 OR GPL-3.0-or-later
</div>
{% endif %}
- {% if class.signals %}
+ {% if class.show_signals %}
<div class="signals toggle-wrapper">
<h4 id="signals">
Signals
<a href="#signals" class="anchor"></a>
</h4>
+ {% if class.signals %}
<div class="docblock">
{% for signal in class.signals %}
<div class="{% if signal.deprecated_since %}deprecated{% endif %}">
@@ -421,6 +424,7 @@ SPDX-License-Identifier: Apache-2.0 OR GPL-3.0-or-later
</div>
{% endfor %}
</div>
+ {% endif %}
{% for ancestor in class.ancestors %}
{% if ancestor.namespace == namespace.name and ancestor.n_signals > 0 %}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]