]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/helpfrm.cpp
Fixed yet another error in my wxCmdLineParser mdifications.
[wxWidgets.git] / src / html / helpfrm.cpp
index 2e17256a5eccf47d0cdff79c9d08b694accdc408..34db326bf2ec43197a8d711eb19e32137d3b1fc2 100644 (file)
@@ -243,7 +243,7 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id,
 
     GetPosition(&m_Cfg.x, &m_Cfg.y);
 
-    SetIcon(wxArtProvider::GetIcon(wxART_FRAME_ICON, wxART_HELP_BROWSER));
+    SetIcon(wxArtProvider::GetIcon(wxART_HELP, wxART_HELP_BROWSER));
 
     int notebook_page = 0;
 
@@ -1099,6 +1099,14 @@ EVENT HANDLING :
 */
 
 
+void wxHtmlHelpFrame::OnActivate(wxActivateEvent& event)
+{
+    // This saves one mouse click when using the
+    // wxHTML for context sensitive help systems
+    if (event.GetActive() && m_HtmlWin)
+        m_HtmlWin->SetFocus();
+}
+
 void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event)
 {
     switch (event.GetId())
@@ -1434,6 +1442,13 @@ void wxHtmlHelpFrame::OnCloseWindow(wxCloseEvent& evt)
     GetSize(&m_Cfg.w, &m_Cfg.h);
     GetPosition(&m_Cfg.x, &m_Cfg.y);
 
+#ifdef __WXGTK__
+    if (IsGrabbed())
+    {
+        RemoveGrab();
+    }
+#endif
+    
     if (m_Splitter && m_Cfg.navig_on) m_Cfg.sashpos = m_Splitter->GetSashPosition();
 
     if (m_Config)
@@ -1448,6 +1463,7 @@ void wxHtmlHelpFrame::OnCloseWindow(wxCloseEvent& evt)
 }
 
 BEGIN_EVENT_TABLE(wxHtmlHelpFrame, wxFrame)
+    EVT_ACTIVATE(wxHtmlHelpFrame::OnActivate)
     EVT_TOOL_RANGE(wxID_HTML_PANEL, wxID_HTML_OPTIONS, wxHtmlHelpFrame::OnToolbar)
     EVT_BUTTON(wxID_HTML_BOOKMARKSREMOVE, wxHtmlHelpFrame::OnToolbar)
     EVT_BUTTON(wxID_HTML_BOOKMARKSADD, wxHtmlHelpFrame::OnToolbar)