[gi-docgen/page-contents] generate: Use the proper fragment for the graph links
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gi-docgen/page-contents] generate: Use the proper fragment for the graph links
- Date: Mon, 7 Jun 2021 21:49:51 +0000 (UTC)
commit 686d8a052c8576bfe021151bcfdd849b93b7be6b
Author: Emmanuele Bassi <ebassi gnome org>
Date: Mon Jun 7 22:49:06 2021 +0100
generate: Use the proper fragment for the graph links
Ancestors use `class`, but interfaces use `iface`.
gidocgen/gdgenerate.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gidocgen/gdgenerate.py b/gidocgen/gdgenerate.py
index 8b78259..3621e1e 100644
--- a/gidocgen/gdgenerate.py
+++ b/gidocgen/gdgenerate.py
@@ -1253,9 +1253,9 @@ class TemplateClass:
def fmt_attrs(attrs):
return ','.join(f'{k}="{v}"' for k, v in attrs.items())
- def add_link(attrs, other):
+ def add_link(attrs, other, fragment):
if other['namespace'] == self.namespace:
- attrs['href'] = f"class.{other['name']}.html"
+ attrs['href'] = f"{fragment}.{other['name']}.html"
attrs['class'] = 'link'
else:
attrs['tooltip'] = other['fqtn']
@@ -1281,7 +1281,7 @@ class TemplateClass:
'label': ancestor['type_cname']
}
ancestor_attrs.update(node_attrs)
- add_link(ancestor_attrs, ancestor)
+ add_link(ancestor_attrs, ancestor, 'class')
res.append(f" {node_id} [{fmt_attrs(ancestor_attrs)}];")
ancestors.append(node_id)
ancestors.reverse()
@@ -1292,7 +1292,7 @@ class TemplateClass:
'fontname': 'sans-serif',
'shape': 'box',
}
- add_link(iface_attrs, iface)
+ add_link(iface_attrs, iface, 'iface')
res.append(f" {node_id} [{fmt_attrs(iface_attrs)}];")
implements.append(node_id)
if len(ancestors) > 0:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]