[gtk-doc] mkdb: merge multiple hierarchy boxes into one



commit 7a6bff27ff31a8e136a91d834ab17729b526f852
Author: Stefan Sauer <ensonic users sf net>
Date:   Thu Feb 13 21:47:09 2014 +0100

    mkdb: merge multiple hierarchy boxes into one
    
    Ideally we'd also merge the trees. Add a few todos for this.

 gtkdoc-mkdb.in |   27 +++++++++++++++------------
 1 files changed, 15 insertions(+), 12 deletions(-)
---
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
index d77e589..906a982 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -787,12 +787,12 @@ $style_args_desc
 EOF
                 }
 
-                 $hierarchy = TrimTextBlock($hierarchy);
+                $hierarchy = TrimTextBlock($hierarchy);
                 if ($hierarchy ne "") {
                     $hierarchy = <<EOF;
 <refsect1 id="$section_id.object-hierarchy" role="object_hierarchy">
 <title role="object_hierarchy.title">Object Hierarchy</title>
-$hierarchy
+<synopsis>$hierarchy</synopsis>
 </refsect1>
 EOF
                 }
@@ -3225,6 +3225,9 @@ sub MakeConditionDescription {
 # Description : Returns the DocBook output describing the ancestors and
 #               immediate children of a GObject subclass. It uses the
 #               global @Objects and @ObjectLevels arrays to walk the tree.
+#
+#               FIXME: See ReadObjectHierarchy() for some overlap
+#
 # Arguments   : $object - the GtkObject subclass.
 #############################################################################
 
@@ -3270,7 +3273,7 @@ sub GetHierarchy {
     }
 
     # Output the ancestors list, indented and with links.
-    my $hierarchy = "<synopsis>\n";
+    my $hierarchy = "<!-- -->"; # prevent trimming of initial indent
     $level = 0;
     for ($i = $#ancestors; $i >= 0; $i--) {
         my $link_text;
@@ -3298,7 +3301,6 @@ sub GetHierarchy {
       }
       $hierarchy .= ' ' x ($level * 4 - 3) . "<phrase role=\"lineart\">" . $junction . 
"&#9472;&#9472;</phrase> $link_text\n";
     }
-    $hierarchy .= "</synopsis>\n";
 
     return $hierarchy;
 }
@@ -5768,15 +5770,16 @@ sub ReadTemplateFile {
 #############################################################################
 # Function    : ReadObjectHierarchy
 # Description : This reads in the $MODULE-hierarchy.txt file containing all
-#                the GtkObject subclasses described in this module (and their
-#                ancestors).
-#                It places them in the @Objects array, and places their level
-#                in the object hierarchy in the @ObjectLevels array, at the
-#                same index. GtkObject, the root object, has a level of 1.
+#               the GtkObject subclasses described in this module (and their
+#               ancestors).
+#               It places them in the @Objects array, and places their level
+#               in the object hierarchy in the @ObjectLevels array, at the
+#               same index. GtkObject, the root object, has a level of 1.
 #
-#               FIXME: the version in gtkdoc-mkdb also generates tree_index.sgml
-#               as it goes along, this should be split out into a separate
-#               function.
+#               FIXME: This also generates tree_index.sgml as it goes along. The
+#               function GetHierarchy() formats trees with unicode lineart. This
+#               would be nice to have here too. On the otehr hand, the 
+#               GetHierarchy() lacks merging of trees.
 #
 # Arguments   : none
 #############################################################################


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