summaryrefslogtreecommitdiff
path: root/giscanner/doctemplates
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2013-02-15 06:04:11 -0500
committerJasper St. Pierre <jstpierre@mecheye.net>2013-02-15 19:54:08 -0500
commitd05e20a61d3e381e46fcb306f806566bbbd76312 (patch)
tree3bd8fa4eaf01e5b7dd08cef188ce15d482418aab /giscanner/doctemplates
parent2ebd527a853638eb3c13d00dedca1353dcffb212 (diff)
downloadgobject-introspection-d05e20a61d3e381e46fcb306f806566bbbd76312.tar.gz
doctool: Use format_xref to format some links to pages
We don't do a full 100% conversion for all link tags, yet, because I don't want to break too much here. This may come later.
Diffstat (limited to 'giscanner/doctemplates')
-rw-r--r--giscanner/doctemplates/C/function.tmpl6
-rw-r--r--giscanner/doctemplates/C/property.tmpl2
-rw-r--r--giscanner/doctemplates/C/signal.tmpl2
-rw-r--r--giscanner/doctemplates/C/vfunc.tmpl2
-rw-r--r--giscanner/doctemplates/Gjs/function.tmpl6
-rw-r--r--giscanner/doctemplates/Gjs/property.tmpl2
-rw-r--r--giscanner/doctemplates/Gjs/signal.tmpl2
-rw-r--r--giscanner/doctemplates/Python/function.tmpl6
-rw-r--r--giscanner/doctemplates/Python/property.tmpl2
-rw-r--r--giscanner/doctemplates/Python/signal.tmpl2
-rw-r--r--giscanner/doctemplates/base.tmpl2
11 files changed, 11 insertions, 23 deletions
diff --git a/giscanner/doctemplates/C/function.tmpl b/giscanner/doctemplates/C/function.tmpl
index c788225e..8d669438 100644
--- a/giscanner/doctemplates/C/function.tmpl
+++ b/giscanner/doctemplates/C/function.tmpl
@@ -1,10 +1,6 @@
<%inherit file="/base.tmpl"/>
<%block name="info">
-% if node.parent is not None:
- <link type="guide" xref="${namespace.name}.${node.parent.name}" group="${page_kind}"/>
-% else:
- <link type="guide" xref="index" group="${page_kind}"/>
-% endif
+ ${formatter.format_xref(node.parent, type="guide", group=page_kind)}
<api:function>
<api:returns>
<api:type>${formatter.format_type(node.retval.type) | x}</api:type>
diff --git a/giscanner/doctemplates/C/property.tmpl b/giscanner/doctemplates/C/property.tmpl
index e3eb0511..6ec9e8e1 100644
--- a/giscanner/doctemplates/C/property.tmpl
+++ b/giscanner/doctemplates/C/property.tmpl
@@ -1,5 +1,5 @@
<%inherit file="/base.tmpl"/>
<%block name="info">
- <link type="guide" xref="${namespace.name}.${node.parent.name}" group="property"/>
+ ${formatter.format_xref(node.parent, type="guide", group=page_kind)}
<title type="link" role="topic">${node.name}</title>
</%block>
diff --git a/giscanner/doctemplates/C/signal.tmpl b/giscanner/doctemplates/C/signal.tmpl
index 20e28e18..28c0b740 100644
--- a/giscanner/doctemplates/C/signal.tmpl
+++ b/giscanner/doctemplates/C/signal.tmpl
@@ -1,5 +1,5 @@
<%inherit file="./function.tmpl"/>
<%block name="info">
- <link type="guide" xref="${namespace.name}.${node.parent.name}" group="property"/>
+ ${formatter.format_xref(node.parent, type="guide", group=page_kind)}
<title type="link" role="topic">${node.name}</title>
</%block>
diff --git a/giscanner/doctemplates/C/vfunc.tmpl b/giscanner/doctemplates/C/vfunc.tmpl
index 85427de8..aa0394f4 100644
--- a/giscanner/doctemplates/C/vfunc.tmpl
+++ b/giscanner/doctemplates/C/vfunc.tmpl
@@ -1,4 +1,4 @@
<%inherit file="./function.tmpl"/>
<%block name="info">
- <link type="guide" xref="${namespace.name}.${node.parent.name}" group="vfunc"/>
+ ${formatter.format_xref(node.parent, type="guide", group=page_kind)}
</%block>
diff --git a/giscanner/doctemplates/Gjs/function.tmpl b/giscanner/doctemplates/Gjs/function.tmpl
index 6a43ddb3..e0fd9612 100644
--- a/giscanner/doctemplates/Gjs/function.tmpl
+++ b/giscanner/doctemplates/Gjs/function.tmpl
@@ -1,10 +1,6 @@
<%inherit file="/base.tmpl"/>
<%block name="info">
-% if node.parent is not None:
- <link type="guide" xref="${namespace.name}.${node.parent.name}" group="${page_kind}"/>
-% else:
- <link type="guide" xref="index" group="${page_kind}"/>
-% endif
+ ${formatter.format_xref(node.parent, type="guide", group=page_kind)}
<api:function>
<api:returns>
<api:type>${formatter.format_type(node.retval.type) | x}</api:type>
diff --git a/giscanner/doctemplates/Gjs/property.tmpl b/giscanner/doctemplates/Gjs/property.tmpl
index f05bc820..3316a00c 100644
--- a/giscanner/doctemplates/Gjs/property.tmpl
+++ b/giscanner/doctemplates/Gjs/property.tmpl
@@ -1,6 +1,6 @@
<%inherit file="/base.tmpl"/>
<%block name="info">
- <link type="guide" xref="${namespace.name}.${node.parent.name}" group="property"/>
+ ${formatter.format_xref(node.parent, type="guide", group=page_kind)}
<title type="link" role="topic">${node.name}</title>
</%block>
<%block name="synopsis">
diff --git a/giscanner/doctemplates/Gjs/signal.tmpl b/giscanner/doctemplates/Gjs/signal.tmpl
index a8e900ff..084d9743 100644
--- a/giscanner/doctemplates/Gjs/signal.tmpl
+++ b/giscanner/doctemplates/Gjs/signal.tmpl
@@ -1,6 +1,6 @@
<%inherit file="/base.tmpl"/>
<%block name="info">
- <link type="guide" xref="${namespace.name}.${node.parent.name}" group="signal"/>
+ ${formatter.format_xref(node.parent, type="guide", group=page_kind)}
<title type="link" role="topic">${node.name}</title>
</%block>
<%block name="synopsis">
diff --git a/giscanner/doctemplates/Python/function.tmpl b/giscanner/doctemplates/Python/function.tmpl
index e1fc5d94..072a1185 100644
--- a/giscanner/doctemplates/Python/function.tmpl
+++ b/giscanner/doctemplates/Python/function.tmpl
@@ -1,10 +1,6 @@
<%inherit file="/base.tmpl"/>
<%block name="info">
-% if node.parent is not None:
- <link type="guide" xref="${namespace.name}.${node.parent.name}" group="${page_kind}"/>
-% else:
- <link type="guide" xref="index" group="${page_kind}"/>
-% endif
+ ${formatter.format_xref(node.parent, type="guide", group=page_kind)}
<api:function>
<api:returns>
<api:type>${formatter.format_type(node.retval.type) | x}</api:type>
diff --git a/giscanner/doctemplates/Python/property.tmpl b/giscanner/doctemplates/Python/property.tmpl
index f05bc820..3316a00c 100644
--- a/giscanner/doctemplates/Python/property.tmpl
+++ b/giscanner/doctemplates/Python/property.tmpl
@@ -1,6 +1,6 @@
<%inherit file="/base.tmpl"/>
<%block name="info">
- <link type="guide" xref="${namespace.name}.${node.parent.name}" group="property"/>
+ ${formatter.format_xref(node.parent, type="guide", group=page_kind)}
<title type="link" role="topic">${node.name}</title>
</%block>
<%block name="synopsis">
diff --git a/giscanner/doctemplates/Python/signal.tmpl b/giscanner/doctemplates/Python/signal.tmpl
index a2d7b0be..dc931107 100644
--- a/giscanner/doctemplates/Python/signal.tmpl
+++ b/giscanner/doctemplates/Python/signal.tmpl
@@ -1,6 +1,6 @@
<%inherit file="/base.tmpl"/>
<%block name="info">
- <link type="guide" xref="${namespace.name}.${node.parent.name}" group="signal"/>
+ ${formatter.format_xref(node.parent, type="guide", group=page_kind)}
<title type="link" role="topic">${node.name}</title>
</%block>
<%block name="synopsis">
diff --git a/giscanner/doctemplates/base.tmpl b/giscanner/doctemplates/base.tmpl
index 7fd0fd26..78980773 100644
--- a/giscanner/doctemplates/base.tmpl
+++ b/giscanner/doctemplates/base.tmpl
@@ -8,7 +8,7 @@
xmlns:ui="http://projectmallard.org/1.0/ui/">
<info>
<%block name="info">
- <link type="guide" xref="index"/>
+ ${formatter.format_xref(node.parent, type="guide", group=page_kind)}
</%block>
</info>
<title><%block name="title">${formatter.format_page_name(node)}</%block></title>