- wxString contents;
- wxList::compatibility_iterator node = m_MapList->GetFirst();
- wxExtHelpMapEntry *entry;
- while (node)
- {
- entry = (wxExtHelpMapEntry *)node->GetData();
- if (entry->id == CONTENTS_ID)
- {
- contents = entry->url;
- break;
- }
-
- node = node->GetNext();
- }
-
- bool rc = false;
- wxString file;
- file << m_helpDir << wxFILE_SEP_PATH << contents;
- if (file.Contains(wxT('#')))
- file = file.BeforeLast(wxT('#'));
- if (contents.length() && wxFileExists(file))
- rc = DisplaySection(CONTENTS_ID);
-
- // if not found, open homemade toc:
- return rc ? true : KeywordSearch(wxEmptyString);
+ wxString contents;
+ wxList::compatibility_iterator node = m_MapList->GetFirst();
+ wxExtHelpMapEntry *entry;
+ while (node)
+ {
+ entry = (wxExtHelpMapEntry *)node->GetData();
+ if (entry->entryid == WXEXTHELP_CONTENTS_ID)
+ {
+ contents = entry->url;
+ break;
+ }
+
+ node = node->GetNext();
+ }
+
+ bool rc = false;
+ wxString file;
+ file << m_helpDir << wxFILE_SEP_PATH << contents;
+ if (file.Contains(wxT('#')))
+ file = file.BeforeLast(wxT('#'));
+ if ( wxFileExists(file) )
+ rc = DisplaySection(WXEXTHELP_CONTENTS_ID);
+
+ // if not found, open homemade toc:
+ return rc ? true : KeywordSearch(wxEmptyString);