X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/69b5cec2b0993ce4cd56f2e50ab94e5ebd20069c..f75aecd00fc2ace70ffe846ab9e30d9d511214f3:/src/html/helpfrm.cpp diff --git a/src/html/helpfrm.cpp b/src/html/helpfrm.cpp index 5c1dffd66e..de616e06d1 100644 --- a/src/html/helpfrm.cpp +++ b/src/html/helpfrm.cpp @@ -454,7 +454,7 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, sizer->Add(m_SearchList, 1, wxALL | wxEXPAND, 2); m_NavigNotebook->AddPage(dummy, _("Search")); - m_SearchPage = notebook_page++; + m_SearchPage = notebook_page; } m_HtmlWin->Show(TRUE); @@ -501,6 +501,9 @@ wxHtmlHelpFrame::~wxHtmlHelpFrame() WX_CLEAR_HASH_TABLE(*m_PagesHash); delete m_PagesHash; } +#if wxUSE_PRINTING_ARCHITECTURE + if (m_Printer) delete m_Printer; +#endif } @@ -740,21 +743,29 @@ bool wxHtmlHelpFrame::KeywordSearch(const wxString& keyword, if (foundcnt) { wxHtmlContentsItem *it; - if (mode == wxHELP_SEARCH_ALL) - { - it = (wxHtmlContentsItem*) m_SearchList->GetClientData(0); - } - else if (mode == wxHELP_SEARCH_INDEX) + switch ( mode ) { - it = (wxHtmlContentsItem*) m_IndexList->GetClientData(0); + default: + wxFAIL_MSG( _T("unknown help search mode") ); + // fall back + + case wxHELP_SEARCH_ALL: + it = (wxHtmlContentsItem*) m_SearchList->GetClientData(0); + break; + + case wxHELP_SEARCH_INDEX: + it = (wxHtmlContentsItem*) m_IndexList->GetClientData(0); + break; } + if (it) { m_HtmlWin->LoadPage(it->GetFullPath()); NotifyPageChanged(); } } - return (foundcnt > 0); + + return foundcnt > 0; } void wxHtmlHelpFrame::CreateContents() @@ -1065,30 +1076,30 @@ public: NormalFont->GetStringSelection(), FixedFont->GetStringSelection(), FontSize->GetValue()); - TestWin->SetPage(_( -"
\ -\
-Normal face (and underlined. Italic face. \ -Bold face. Bold italic face. \ -font size -2 \ -font size -1 \ -font size +0 \ -font size +1 \ -font size +2 \ -font size +3 \ -font size +4 \ - | \
- Fixed size face. |
") ) +
+ _("Normal face and underlined. ") + + _("Italic face. ") + + _("Bold face. ") + + _("Bold italic face. ") + + content + + wxString( _T(" | ") ) +
+ _("Fixed size face. bold italic ") + + _("bold italic underlined ") + + content + + _T(" |