Suppressed a spurious error message, now contents are looked for in entry
with help-id 0 and if not found a homemade list of contents is presented. :-) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -38,6 +38,8 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define CONTENTS_ID 0
|
||||||
|
|
||||||
class wxExtHelpMapEntry : public wxObject
|
class wxExtHelpMapEntry : public wxObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -198,11 +200,26 @@ wxHTMLHelpControllerBase::DisplayContents()
|
|||||||
if(! m_NumOfEntries)
|
if(! m_NumOfEntries)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
// use ID 0 for contents
|
wxString contents;
|
||||||
if(! DisplaySection(0))
|
wxNode *node = m_MapList->First();
|
||||||
return KeywordSearch("");
|
wxExtHelpMapEntry *entry;
|
||||||
else
|
while(node)
|
||||||
return TRUE;
|
{
|
||||||
|
entry = (wxExtHelpMapEntry *)node->Data();
|
||||||
|
if(entry->id == CONTENTS_ID)
|
||||||
|
{
|
||||||
|
contents = entry->url;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
node = node->Next();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool rc = FALSE;
|
||||||
|
if(contents.Length() && wxFileExists(contents.BeforeLast('#')))
|
||||||
|
rc = DisplaySection(CONTENTS_ID);
|
||||||
|
|
||||||
|
// if not found, open homemade toc:
|
||||||
|
return rc ? TRUE : KeywordSearch("");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
Reference in New Issue
Block a user