projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix processing of events for MRU entries #10 and more in docview.
[wxWidgets.git]
/
src
/
html
/
helpctrl.cpp
diff --git
a/src/html/helpctrl.cpp
b/src/html/helpctrl.cpp
index 28e07592b7b2fa1bad8fafcfbc2db1be91cd1372..d093b99b731a83eca918c0f59848032f41b36238 100644
(file)
--- a/
src/html/helpctrl.cpp
+++ b/
src/html/helpctrl.cpp
@@
-46,16
+46,20
@@
wxHtmlHelpController::wxHtmlHelpController(int style, wxWindow* parentWindow):
m_helpWindow = NULL;
m_helpFrame = NULL;
m_helpDialog = NULL;
m_helpWindow = NULL;
m_helpFrame = NULL;
m_helpDialog = NULL;
+#if wxUSE_CONFIG
m_Config = NULL;
m_ConfigRoot = wxEmptyString;
m_Config = NULL;
m_ConfigRoot = wxEmptyString;
+#endif // wxUSE_CONFIG
m_titleFormat = _("Help: %s");
m_FrameStyle = style;
}
wxHtmlHelpController::~wxHtmlHelpController()
{
m_titleFormat = _("Help: %s");
m_FrameStyle = style;
}
wxHtmlHelpController::~wxHtmlHelpController()
{
+#if wxUSE_CONFIG
if (m_Config)
WriteCustomization(m_Config, m_ConfigRoot);
if (m_Config)
WriteCustomization(m_Config, m_ConfigRoot);
+#endif // wxUSE_CONFIG
if (m_helpWindow)
DestroyHelpWindow();
}
if (m_helpWindow)
DestroyHelpWindow();
}
@@
-85,8
+89,10
@@
void wxHtmlHelpController::DestroyHelpWindow()
void wxHtmlHelpController::OnCloseFrame(wxCloseEvent& evt)
{
void wxHtmlHelpController::OnCloseFrame(wxCloseEvent& evt)
{
+#if wxUSE_CONFIG
if (m_Config)
WriteCustomization(m_Config, m_ConfigRoot);
if (m_Config)
WriteCustomization(m_Config, m_ConfigRoot);
+#endif // wxUSE_CONFIG
evt.Skip();
evt.Skip();
@@
-115,12
+121,7
@@
void wxHtmlHelpController::SetTitleFormat(const wxString& title)
// Find the top-most parent window
wxWindow* wxHtmlHelpController::FindTopLevelWindow()
{
// 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)
}
bool wxHtmlHelpController::AddBook(const wxFileName& book_file, bool show_wait_msg)
@@
-156,7
+157,11
@@
wxHtmlHelpFrame* wxHtmlHelpController::CreateHelpFrame(wxHtmlHelpData *data)
{
wxHtmlHelpFrame* frame = new wxHtmlHelpFrame(data);
frame->SetController(this);
{
wxHtmlHelpFrame* frame = new wxHtmlHelpFrame(data);
frame->SetController(this);
- frame->Create(m_parentWindow, -1, wxEmptyString, m_FrameStyle, m_Config, m_ConfigRoot);
+ frame->Create(m_parentWindow, -1, wxEmptyString, m_FrameStyle
+#if wxUSE_CONFIG
+ , m_Config, m_ConfigRoot
+#endif // wxUSE_CONFIG
+ );
frame->SetTitleFormat(m_titleFormat);
m_helpFrame = frame;
return frame;
frame->SetTitleFormat(m_titleFormat);
m_helpFrame = frame;
return frame;
@@
-185,12
+190,14
@@
wxWindow* wxHtmlHelpController::CreateHelpWindow()
return m_helpWindow;
}
return m_helpWindow;
}
+#if wxUSE_CONFIG
if (m_Config == NULL)
{
m_Config = wxConfigBase::Get(false);
if (m_Config != NULL)
if (m_Config == NULL)
{
m_Config = wxConfigBase::Get(false);
if (m_Config != NULL)
- m_ConfigRoot =
_
T("wxWindows/wxHtmlHelpController");
+ m_ConfigRoot =
wx
T("wxWindows/wxHtmlHelpController");
}
}
+#endif // wxUSE_CONFIG
if (m_FrameStyle & wxHF_DIALOG)
{
if (m_FrameStyle & wxHF_DIALOG)
{
@@
-212,6
+219,7
@@
wxWindow* wxHtmlHelpController::CreateHelpWindow()
return m_helpWindow;
}
return m_helpWindow;
}
+#if wxUSE_CONFIG
void wxHtmlHelpController::ReadCustomization(wxConfigBase* cfg, const wxString& path)
{
/* should not be called by the user; call UseConfig, and the controller
void wxHtmlHelpController::ReadCustomization(wxConfigBase* cfg, const wxString& path)
{
/* should not be called by the user; call UseConfig, and the controller
@@
-234,6
+242,7
@@
void wxHtmlHelpController::UseConfig(wxConfigBase *config, const wxString& rootp
if (m_helpWindow) m_helpWindow->UseConfig(config, rootpath);
ReadCustomization(config, rootpath);
}
if (m_helpWindow) m_helpWindow->UseConfig(config, rootpath);
ReadCustomization(config, rootpath);
}
+#endif // wxUSE_CONFIG
//// Backward compatibility with wxHelpController API
//// Backward compatibility with wxHelpController API