X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6c24d95cf93efbcdc8aeab1333e076761dc3582a..6e09ff550a0c2bdd5c03290ba47683adf05ae36a:/src/html/helpfrm.cpp?ds=inline
diff --git a/src/html/helpfrm.cpp b/src/html/helpfrm.cpp
index 90b3c02c77..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);
@@ -1076,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.bold italic \
-bold italic underlined
 \
-font size -2
 \
-font size -1
 \
-font size +0
 \
-font size +1
 \
-font size +2
 \
-font size +3
 \
-font size +4\
-
 | 
"
-                          ));
+
+        wxString content(_("font size"));
+
+        content = _T("") + content + _T(" -2
")
+                  _T("") + content + _T(" -1
")
+                  _T("") + content + _T(" +0
")
+                  _T("") + content + _T(" +1
")
+                  _T("") + content + _T(" +2
")
+                  _T("") + content + _T(" +3
")
+                  _T("") + content + _T(" +4
") ;
+
+        content = wxString( _T("| ") ) +
+                  _("Normal face and underlined. ") +
+                  _("Italic face. ") +
+                  _("Bold face. ") +
+                  _("Bold italic face.
 ") +
+                  content +
+                  wxString( _T("
 | ") ) +
+                  _("Fixed size face. bold italic ") +
+                  _("bold italic underlined
 ") +
+                  content +
+                  _T("
 | 
");
+
+        TestWin->SetPage( content );
     }
 
     void OnUpdate(wxCommandEvent& WXUNUSED(event))
@@ -1389,22 +1389,29 @@ void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event)
 
         case wxID_HTML_OPENFILE :
             {
+                wxString filemask = wxString(
+                    _("HTML files (*.html;*.htm)|*.html;*.htm|")) +
+                    _("Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|") +
+                    _("HTML Help Project (*.hhp)|*.hhp|") +
+#if wxUSE_LIBMSPACK
+                    _("Compressed HTML Help file (*.chm)|*.chm|") +
+#endif
+                    _("All files (*.*)|*");
                 wxString s = wxFileSelector(_("Open HTML document"),
                                             wxEmptyString,
                                             wxEmptyString,
                                             wxEmptyString,
-                                            _(
-"HTML files (*.htm)|*.htm|HTML files (*.html)|*.html|\
-Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|\
-HTML Help Project (*.hhp)|*.hhp|\
-All files (*.*)|*"
-                                            ),
+                                            filemask,
                                             wxOPEN | wxFILE_MUST_EXIST,
                                             this);
                 if (!s.IsEmpty())
                 {
                     wxString ext = s.Right(4).Lower();
-                    if (ext == _T(".zip") || ext == _T(".htb") || ext == _T(".hhp"))
+                    if (ext == _T(".zip") || ext == _T(".htb") ||
+#if wxUSE_LIBMSPACK
+                        ext == _T(".chm") ||
+#endif
+                        ext == _T(".hhp"))
                     {
                         wxBusyCursor bcur;
                         m_Data->AddBook(s);