X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/69b69d5ad972c1fc3c6a65130055b68cf101bda6..3a9f2af7ff06a48441a86096cbadbce57dc23a9f:/src/html/helpfrm.cpp diff --git a/src/html/helpfrm.cpp b/src/html/helpfrm.cpp index 61d4a1b72c..fca7231c10 100644 --- a/src/html/helpfrm.cpp +++ b/src/html/helpfrm.cpp @@ -328,6 +328,8 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, wxMenu* helpMenu = new wxMenu; helpMenu->Append(wxID_ABOUT, _("&About...")); + // Ensures we don't get an empty help menu + helpMenu->Append(wxID_HELP_CONTENTS, _("&About...")); menuBar->Append(fileMenu,_("&File")); menuBar->Append(helpMenu,_("&Help")); @@ -336,7 +338,9 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, int notebook_page = 0; +#if wxUSE_STATUSBAR CreateStatusBar(); +#endif // wxUSE_STATUSBAR #if wxUSE_TOOLBAR // toolbar? @@ -375,7 +379,9 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, } m_HtmlWin->SetRelatedFrame(this, m_TitleFormat); +#if wxUSE_STATUSBAR m_HtmlWin->SetRelatedStatusBar(0); +#endif // wxUSE_STATUSBAR if ( m_Config ) m_HtmlWin->ReadCustomization(m_Config, m_ConfigRoot); @@ -553,6 +559,8 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, wxHtmlHelpFrame::~wxHtmlHelpFrame() { + delete m_mergedIndex; + // PopEventHandler(); // wxhtmlhelpcontroller (not any more!) if (m_DataCreated) delete m_Data; @@ -1271,7 +1279,7 @@ void wxHtmlHelpFrame::OptionsDialog() enu.EnumerateFacenames(); m_NormalFonts = new wxArrayString; *m_NormalFonts = *enu.GetFacenames(); - m_NormalFonts->Sort(wxStringSortAscending); + m_NormalFonts->Sort(); // ascending sort } if (m_FixedFonts == NULL) { @@ -1279,7 +1287,7 @@ void wxHtmlHelpFrame::OptionsDialog() enu.EnumerateFacenames(wxFONTENCODING_SYSTEM, true /*enum fixed width only*/); m_FixedFonts = new wxArrayString; *m_FixedFonts = *enu.GetFacenames(); - m_FixedFonts->Sort(wxStringSortAscending); + m_FixedFonts->Sort(); // ascending sort } // VS: We want to show the font that is actually used by wxHtmlWindow. @@ -1626,8 +1634,13 @@ void wxHtmlHelpFrame::OnIndexFind(wxCommandEvent& event) if (displ++ == 0) { - m_IndexList->SetSelection(0); - DisplayIndexItem(&index[i]); + // don't automatically show topic selector if this + // item points to multiple pages: + if (index[i].items.size() == 1) + { + m_IndexList->SetSelection(0); + DisplayIndexItem(&index[i]); + } } // if this is nested item of the index, show its parent(s) @@ -1671,7 +1684,12 @@ void wxHtmlHelpFrame::OnIndexAll(wxCommandEvent& WXUNUSED(event)) m_IndexList->Append(index[i].name, (char*)(&index[i])); if (first) { - DisplayIndexItem(&index[i]); + // don't automatically show topic selector if this + // item points to multiple pages: + if (index[i].items.size() == 1) + { + DisplayIndexItem(&index[i]); + } first = false; } } @@ -1768,6 +1786,7 @@ BEGIN_EVENT_TABLE(wxHtmlHelpFrame, wxFrame) #ifdef __WXMAC__ EVT_MENU(wxID_CLOSE, wxHtmlHelpFrame::OnClose) EVT_MENU(wxID_ABOUT, wxHtmlHelpFrame::OnAbout) + EVT_MENU(wxID_HELP_CONTENTS, wxHtmlHelpFrame::OnAbout) #endif END_EVENT_TABLE()