]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/helpfrm.cpp
default style now applies to the text entered by the user as well (patch 574789)
[wxWidgets.git] / src / html / helpfrm.cpp
index 076addc04d5715cc239a9b4a96f8961c84f8deb7..765dc8c452784545a0f79fac81a8c5942255785b 100644 (file)
@@ -10,7 +10,7 @@
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
-#pragma implementation
+#pragma implementation "helpfrm.h"
 #endif
 
 // For compilers that support precompilation, includes "wx.h"
@@ -756,8 +756,6 @@ void wxHtmlHelpFrame::CreateContents()
             imaged[it->m_Level] = TRUE;
         }
     }
-
-    m_ContentsBox->Expand(roots[0]);
 }
 
 
@@ -1101,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())
@@ -1436,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)
@@ -1450,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)