diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2012-01-22 19:51:13 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2012-01-22 19:51:13 (GMT) |
commit | c22d77a7a9c0f26a060a58047f514869a9e0a067 (patch) | |
tree | 082a1fab748f7d6917c9728b6f302bb4757de12d /src/index.cpp | |
parent | fd8b446f8ae60e7d1dc259c6f5fe38c287377d19 (diff) | |
download | Doxygen-c22d77a7a9c0f26a060a58047f514869a9e0a067.zip Doxygen-c22d77a7a9c0f26a060a58047f514869a9e0a067.tar.gz Doxygen-c22d77a7a9c0f26a060a58047f514869a9e0a067.tar.bz2 |
Release-1.7.6.1-20120122
Diffstat (limited to 'src/index.cpp')
-rw-r--r-- | src/index.cpp | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/src/index.cpp b/src/index.cpp index 09e152c..68725aa 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -2765,7 +2765,7 @@ static void writePageIndex(OutputList &ol) ol.startContents(); ol.startTextBlock(); bool addToIndex = lne==0 || lne->visible(); - if (addToIndex) + if (0 /*addToIndex*/) // skip Related Pages section in navigation index { Doxygen::indexList.addContentsItem(TRUE,title,0,"pages",0,TRUE,TRUE); Doxygen::indexList.incContentsDepth(); @@ -2777,7 +2777,7 @@ static void writePageIndex(OutputList &ol) PageDef *pd=0; for (pdi.toFirst();(pd=pdi.current());++pdi) { - if ( pd->visibleInIndex()) + if (pd->visibleInIndex()) { QCString pageTitle; @@ -2787,6 +2787,7 @@ static void writePageIndex(OutputList &ol) pageTitle=pd->title(); bool hasSubPages = pd->hasSubPages(); + bool hasSections = pd->hasSections(); ol.startIndexListItem(); ol.startIndexItem(pd->getReference(),pd->getOutputFileBase()); @@ -2801,14 +2802,25 @@ static void writePageIndex(OutputList &ol) ol.writeString("\n"); if (addToIndex) { - Doxygen::indexList.addContentsItem(hasSubPages,filterTitle(pageTitle),pd->getReference(),pd->getOutputFileBase(),0,hasSubPages,TRUE); + Doxygen::indexList.addContentsItem( + hasSubPages || hasSections, // isDir + filterTitle(pageTitle), // name + pd->getReference(), // ref + pd->getOutputFileBase(), // file + 0, // anchor + hasSubPages || hasSections, // separateIndex + TRUE); // addToNavIndex + if (hasSections) + { + pd->addSectionsToIndex(); + } } writeSubPages(pd); ol.endIndexListItem(); } } endIndexHierarchy(ol,0); - if (addToIndex) + if (0 /*addToIndex*/) // skip Related Pages section in navigation index { Doxygen::indexList.decContentsDepth(); } @@ -3445,8 +3457,12 @@ static void writeIndex(OutputList &ol) if (Doxygen::mainPage) { - Doxygen::indexList.addContentsItem(Doxygen::mainPage->hasSubPages(),title,0,indexName,0,Doxygen::mainPage->hasSubPages(),TRUE); - + if (Doxygen::mainPage->hasSubPages() || + (!Config_getString("PROJECT_NAME").isEmpty() && mainPageHasTitle()) + ) // to avoid duplicate entries in the treeview + { + Doxygen::indexList.addContentsItem(Doxygen::mainPage->hasSubPages(),title,0,indexName,0,Doxygen::mainPage->hasSubPages(),TRUE); + } if (Doxygen::mainPage->hasSubPages()) { writeSubPages(Doxygen::mainPage); |