]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/helpfrm.cpp
wx-config symlink creation fix
[wxWidgets.git] / src / html / helpfrm.cpp
index abcdb10dcf3a7ab39211dd6e22efcd509f678176..0f48ca1d3567aa6abe82526df481900e9d0e5b81 100644 (file)
@@ -131,7 +131,7 @@ class wxHtmlHelpHtmlWindow : public wxHtmlWindow
 // wxHtmlHelpFrame::m_mergedIndex
 //---------------------------------------------------------------------------
 
 // wxHtmlHelpFrame::m_mergedIndex
 //---------------------------------------------------------------------------
 
-WX_DEFINE_ARRAY(const wxHtmlHelpDataItem*, wxHtmlHelpDataItemPtrArray);
+WX_DEFINE_ARRAY_PTR(const wxHtmlHelpDataItem*, wxHtmlHelpDataItemPtrArray);
 
 struct wxHtmlHelpMergedIndexItem
 {
 
 struct wxHtmlHelpMergedIndexItem
 {
@@ -328,6 +328,8 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id,
 
     wxMenu* helpMenu = new wxMenu;
     helpMenu->Append(wxID_ABOUT, _("&About..."));
 
     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"));
 
     menuBar->Append(fileMenu,_("&File"));
     menuBar->Append(helpMenu,_("&Help"));
@@ -336,7 +338,9 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id,
 
     int notebook_page = 0;
 
 
     int notebook_page = 0;
 
+#if wxUSE_STATUSBAR
     CreateStatusBar();
     CreateStatusBar();
+#endif // wxUSE_STATUSBAR
 
 #if wxUSE_TOOLBAR
     // toolbar?
 
 #if wxUSE_TOOLBAR
     // toolbar?
@@ -375,7 +379,9 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id,
     }
 
     m_HtmlWin->SetRelatedFrame(this, m_TitleFormat);
     }
 
     m_HtmlWin->SetRelatedFrame(this, m_TitleFormat);
+#if wxUSE_STATUSBAR
     m_HtmlWin->SetRelatedStatusBar(0);
     m_HtmlWin->SetRelatedStatusBar(0);
+#endif // wxUSE_STATUSBAR
     if ( m_Config )
         m_HtmlWin->ReadCustomization(m_Config, m_ConfigRoot);
 
     if ( m_Config )
         m_HtmlWin->ReadCustomization(m_Config, m_ConfigRoot);
 
@@ -1419,7 +1425,7 @@ void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event)
                         &m_Data->GetContentsArray()[ind];
                     while (ind >= 0 && it->level != level)
                     {
                         &m_Data->GetContentsArray()[ind];
                     while (ind >= 0 && it->level != level)
                     {
-                        ind--, it--;
+                        ind--;
                         it = &m_Data->GetContentsArray()[ind];
                     }
                     if (ind >= 0)
                         it = &m_Data->GetContentsArray()[ind];
                     }
                     if (ind >= 0)
@@ -1768,6 +1774,7 @@ BEGIN_EVENT_TABLE(wxHtmlHelpFrame, wxFrame)
 #ifdef __WXMAC__
     EVT_MENU(wxID_CLOSE, wxHtmlHelpFrame::OnClose)
     EVT_MENU(wxID_ABOUT, wxHtmlHelpFrame::OnAbout)
 #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()
 #endif
 
 END_EVENT_TABLE()