| 344 | } |
| 345 | |
| 346 | void NavLoop::computePageList(void) { |
| 347 | // scan the dirs for files with title |
| 348 | |
| 349 | bool haveMain = false; |
| 350 | for (size_t f = 0; f < pages.size(); f++) { |
| 351 | std::string page = getFileTitle(pages[f]); |
| 352 | if (compare_nocase(page, "main") == 0) { |
| 353 | haveMain = true; |
| 354 | } |
| 355 | } |
| 356 | |
| 357 | // ok sort that sucker so main is first |
| 358 | |
| 359 | if (haveMain) { |
| 360 | std::vector<std::string> files = pages; |
| 361 | pages.clear(); |
| 362 | pages.push_back("Main"); |
| 363 | for (size_t f = 0; f < files.size(); f++) { |
| 364 | if (compare_nocase(files[f], "main") != 0) { |
| 365 | pages.push_back(files[f]); |
| 366 | } |
| 367 | } |
| 368 | } |
| 369 | } |
| 370 | |
| 371 | void NavLoop::setSize(void) { |
| 372 | size = pages.size(); |
no test coverage detected