[telepathy-doc/master] Also support errors and signals

Davyd Madeley davyd at madeley.id.au
Thu Apr 2 23:08:02 PDT 2009


---
 docs/book/insert-links.py |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/docs/book/insert-links.py b/docs/book/insert-links.py
index 3b7cbb5..8c011d4 100755
--- a/docs/book/insert-links.py
+++ b/docs/book/insert-links.py
@@ -85,11 +85,13 @@ class SpecMapper(DevhelpMapper):
     def build_maps(self, dom):
         self._build_interface_list(dom)
         self._build_method_list(dom)
+        self._build_error_list(dom)
 
     def get_maps(self):
         return {
             'interfacename': self.interfaces,
             'methodname': self.methods,
+            'errorname': self.errors,
         }
 
     def _build_interface_list(self, dom):
@@ -98,10 +100,16 @@ class SpecMapper(DevhelpMapper):
             lambda n: n.rsplit('.', 1)[-1])
 
     def _build_method_list(self, dom):
-        methods = self.xpath_query(dom, type = 'Method ')
+        methods = self.xpath_query(dom, type = 'Method ') + \
+                  self.xpath_query(dom, type = 'Signal ')
         self.methods = self.build_map(methods,
             lambda n: n.rsplit('.', 1)[-1])
 
+    def _build_error_list(self, dom):
+        errors = self.xpath_query(dom, type = 'Error ')
+        self.errors = self.build_map(errors,
+            lambda n: n.rsplit('.', 1)[-1])
+
 MAPPINGS = Mapper(
     DevhelpMapper('http://telepathy.freedesktop.org/doc/telepathy-glib/',
         '/usr/share/gtk-doc/html/telepathy-glib/telepathy-glib.devhelp2.gz'),
-- 
1.5.6.5




More information about the telepathy-commits mailing list