[gobject-introspection/gir-docbook] [docbook] Add "Details" title above all methods.



commit b6cf8b836447bf50c4d84824b0814589490b6218
Author: Laszlo Pandy <lpandy src gnome org>
Date:   Thu Aug 11 11:38:41 2011 +0200

    [docbook] Add "Details" title above all methods.

 giscanner/docbookwriter.py |   10 +++++-----
 giscanner/transformer.py   |    1 +
 2 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/giscanner/docbookwriter.py b/giscanner/docbookwriter.py
index 7238595..f5aaff7 100644
--- a/giscanner/docbookwriter.py
+++ b/giscanner/docbookwriter.py
@@ -232,15 +232,15 @@ class DocBookWriter(object):
             #         desc = desc.replace("&", "&amp;")
             #         self._writer.write_line(desc)
 
+            with self._writer.tagcontext('refsect1',
+                                        [('id', "%s-details" % page.name),
+                                         ("role", "details")]):
+                self._writer.write_tag("title", [("role", "details.title")],
+                                      "Details")
             for entity in page.get_entities():
                 self._render_entity(entity)
 
     def _render_entity(self, entity):
-        with self._writer.tagcontext('refsect1',
-                                    [('id', "%s-details" % (entity.get_name())),
-                                     ("role", "details")]):
-            self._writer.write_tag("title", [("role", "details.title")],
-                                  "Details")
 
         self._writer.push_tag('refsect2',
                              [('id', "%s-function" % entity.get_name()),
diff --git a/giscanner/transformer.py b/giscanner/transformer.py
index 88be838..3bb0d4a 100644
--- a/giscanner/transformer.py
+++ b/giscanner/transformer.py
@@ -181,6 +181,7 @@ None."""
     @staticmethod
     def parse_from_gir(filename):
         transformer = Transformer(None)
+        transformer.set_passthrough_mode()
         transformer._parse_include(filename)
         parser = transformer._cachestore.load(filename)
         transformer._namespace = parser.get_namespace()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]