[yelp: 15/17] yelp-docbook-document: Only set root title for the root



commit 7413e93e638edb481cfe34d3c772a518c6211ae1
Author: Shaun McCance <shaunm gnome org>
Date:   Sun Feb 13 17:04:20 2011 -0500

    yelp-docbook-document: Only set root title for the root

 libyelp/yelp-docbook-document.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/libyelp/yelp-docbook-document.c b/libyelp/yelp-docbook-document.c
index 4142b69..45a15f8 100644
--- a/libyelp/yelp-docbook-document.c
+++ b/libyelp/yelp-docbook-document.c
@@ -921,8 +921,9 @@ docbook_index_chunk (DocbookIndexData *index)
     id = xmlGetProp (index->cur, BAD_CAST "id");
     if (id != NULL) {
         title = docbook_walk_get_title (index->docbook, index->cur);
-        yelp_storage_set_root_title (yelp_storage_get_default (),
-                                     index->doc_uri, title);
+        if (index->cur->parent->parent == NULL)
+            yelp_storage_set_root_title (yelp_storage_get_default (),
+                                         index->doc_uri, title);
         index->str = g_string_new ("");
     }
 



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