{
if (m_Config)
WriteCustomization(m_Config, m_ConfigRoot);
-
+
evt.Skip();
OnQuit();
- m_helpWindow->SetController(NULL);
+ if ( m_helpWindow )
+ m_helpWindow->SetController(NULL);
m_helpWindow = NULL;
m_helpDialog = NULL;
m_helpFrame = NULL;
// Find the top-most parent window
wxWindow* wxHtmlHelpController::FindTopLevelWindow()
{
- wxWindow* parent = m_helpWindow;
- while (parent && !parent->IsTopLevel())
- {
- parent = parent->GetParent();
- }
- return parent;
+ return wxGetTopLevelParent(m_helpWindow);
}
bool wxHtmlHelpController::AddBook(const wxFileName& book_file, bool show_wait_msg)
{
wxHtmlHelpFrame* frame = new wxHtmlHelpFrame(data);
frame->SetController(this);
- frame->SetTitleFormat(m_titleFormat);
- frame->Create(m_parentWindow, -1, wxEmptyString, m_FrameStyle);
+ frame->Create(m_parentWindow, -1, wxEmptyString, m_FrameStyle, m_Config, m_ConfigRoot);
+ frame->SetTitleFormat(m_titleFormat);
m_helpFrame = frame;
return frame;
}
{
wxHtmlHelpDialog* dialog = new wxHtmlHelpDialog(data);
dialog->SetController(this);
- dialog->SetTitleFormat(m_titleFormat);
+ dialog->SetTitleFormat(m_titleFormat);
dialog->Create(m_parentWindow, -1, wxEmptyString, m_FrameStyle);
m_helpDialog = dialog;
return dialog;
bool wxHtmlHelpController::Initialize(const wxString& file)
{
wxString dir, filename, ext;
- wxSplitPath(file, & dir, & filename, & ext);
+ wxFileName::SplitPath(file, & dir, & filename, & ext);
if (!dir.empty())
dir = dir + wxFILE_SEP_PATH;