[gobject-introspection/mallard-templates] g-ir-doc-tool: Properly link to signal pages
- From: Tomeu Vizoso <tomeuv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection/mallard-templates] g-ir-doc-tool: Properly link to signal pages
- Date: Mon, 20 Feb 2012 12:45:29 +0000 (UTC)
commit 99109f5a8ae11b7f182da497ca7b2d1dc3d11920
Author: Tomeu Vizoso <tomeu vizoso collabora com>
Date: Mon Feb 20 13:43:30 2012 +0100
g-ir-doc-tool: Properly link to signal pages
giscanner/mallardwriter.py | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/giscanner/mallardwriter.py b/giscanner/mallardwriter.py
index 351a8c1..59991a0 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:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]