[gi-docgen/filter-hidden: 9/11] generate: Filter hidden data from interface index
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gi-docgen/filter-hidden: 9/11] generate: Filter hidden data from interface index
- Date: Thu, 10 Jun 2021 10:53:30 +0000 (UTC)
commit e50720c7d498016af27a5bac8dc53dddb2013be8
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu Jun 10 11:05:13 2021 +0100
generate: Filter hidden data from interface index
Just like we do for hidden class data.
gidocgen/gdgenerate.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/gidocgen/gdgenerate.py b/gidocgen/gdgenerate.py
index 868cde8..115e75f 100644
--- a/gidocgen/gdgenerate.py
+++ b/gidocgen/gdgenerate.py
@@ -999,7 +999,7 @@ class TemplateField:
class TemplateInterface:
- def __init__(self, namespace, interface):
+ def __init__(self, namespace, interface, config):
if isinstance(interface, gir.Interface):
if '.' in interface.name:
self.namespace, self.name = interface.name.split('.')
@@ -1085,12 +1085,14 @@ class TemplateInterface:
if len(interface.properties) != 0:
self.properties = []
for pname, prop in interface.properties.items():
- self.properties.append(gen_index_property(prop, namespace, md))
+ if not config.is_hidden(interface.name, "property", pname):
+ self.properties.append(gen_index_property(prop, namespace, md))
if len(interface.signals) != 0:
self.signals = []
for sname, signal in interface.signals.items():
- self.signals.append(gen_index_signal(signal, namespace, md))
+ if not config.is_hidden(interface.name, "signal", sname):
+ self.signals.append(gen_index_signal(signal, namespace, md))
if len(interface.methods) != 0:
self.methods = []
@@ -1772,7 +1774,7 @@ def _gen_interfaces(config, theme_config, output_dir, jinja_env, repository, all
iface_file = os.path.join(output_dir, f"iface.{iface.name}.html")
log.info(f"Creating interface file for {namespace.name}.{iface.name}: {iface_file}")
- tmpl = TemplateInterface(namespace, iface)
+ tmpl = TemplateInterface(namespace, iface, config)
template_interfaces.append(tmpl)
with open(iface_file, "w") as out:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]