summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.com>2012-02-20 13:43:30 +0100
committerTomeu Vizoso <tomeu.vizoso@collabora.com>2012-02-20 13:43:30 +0100
commit99109f5a8ae11b7f182da497ca7b2d1dc3d11920 (patch)
tree593cd51c1c2e4a87678fe0244498945c006663aa
parent52c8a0fc9f26745a9c2e06c14fd2af91f8ea9370 (diff)
downloadgobject-introspection-99109f5a8ae11b7f182da497ca7b2d1dc3d11920.tar.gz
g-ir-doc-tool: Properly link to signal pages
-rw-r--r--giscanner/mallardwriter.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/giscanner/mallardwriter.py b/giscanner/mallardwriter.py
index 351a8c1f..59991a08 100644
--- a/giscanner/mallardwriter.py
+++ b/giscanner/mallardwriter.py
@@ -64,7 +64,14 @@ class MallardFormatter(object):
result += self.escape(para[:pos])
rest = para[pos + 1:]
link = re.split('[^a-zA-Z_:-]', rest, maxsplit=1)[0]
- if link in self._namespace.ctypes:
+ if '::' in link:
+ type_name, signal_name = link.split('::')
+ if type_name in self._namespace.ctypes:
+ type_ = self._namespace.get_by_ctype(type_name)
+ xref = '%s.%s-%s' % (self._namespace.name, type_.name, signal_name)
+ else:
+ xref = link
+ elif link in self._namespace.ctypes:
type_ = self._namespace.get_by_ctype(link)
xref = '%s.%s' % (self._namespace.name, type_.name)
else: