g-ir-doc-tool: Add class to its own hierarchy tree
authorTomeu Vizoso <tomeu.vizoso@collabora.com>
Tue, 21 Feb 2012 15:41:21 +0000 (16:41 +0100)
committerTomeu Vizoso <tomeu.vizoso@collabora.com>
Tue, 21 Feb 2012 16:09:29 +0000 (17:09 +0100)
giscanner/mallardwriter.py
tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.page

index 5fd9704..a7154b5 100644 (file)
@@ -121,7 +121,7 @@ class MallardFormatter(object):
         return to_underscores(string)
 
     def get_class_hierarchy(self, node):
-        parent_chain = []
+        parent_chain = [node]
 
         while node.parent:
             node = self._transformer.lookup_giname(str(node.parent))
index 3fd5125..cab691e 100644 (file)
@@ -22,6 +22,9 @@ obj = DocExamples.Obj(<link xref='DocExamples.Obj-property-example'>property_exa
     <tree>
       <item>
         <code>GObject.Object</code>
+      <item>
+        <code>DocExamples.Obj</code>
+      </item>
       </item>
     </tree>
   </synopsis>