]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/helpfrm.cpp
SourceForge patch #654210 to fix naming/numbering shared libs under OS X
[wxWidgets.git] / src / html / helpfrm.cpp
index f64ea9e980ca6bd0d08446f95ad711ede03b624d..31eab70e8cd5b7c135fa0b2904325193cc8364d3 100644 (file)
@@ -878,10 +878,15 @@ void wxHtmlHelpFrame::WriteCustomization(wxConfigBase *cfg, const wxString& path
 
     cfg->Write(wxT("hcNavigPanel"), m_Cfg.navig_on);
     cfg->Write(wxT("hcSashPos"), (long)m_Cfg.sashpos);
-    cfg->Write(wxT("hcX"), (long)m_Cfg.x);
-    cfg->Write(wxT("hcY"), (long)m_Cfg.y);
-    cfg->Write(wxT("hcW"), (long)m_Cfg.w);
-    cfg->Write(wxT("hcH"), (long)m_Cfg.h);
+    if ( !IsIconized() )
+    {
+        //  Don't write if iconized as this would make the window
+        //  disappear next time it is shown!
+        cfg->Write(wxT("hcX"), (long)m_Cfg.x);
+        cfg->Write(wxT("hcY"), (long)m_Cfg.y);
+        cfg->Write(wxT("hcW"), (long)m_Cfg.w);
+        cfg->Write(wxT("hcH"), (long)m_Cfg.h);
+    }
     cfg->Write(wxT("hcFixedFace"), m_FixedFace);
     cfg->Write(wxT("hcNormalFace"), m_NormalFace);
     cfg->Write(wxT("hcBaseFontSize"), (long)m_FontSize);
@@ -1015,13 +1020,17 @@ Normal face<br>(and <u>underlined</u>. <i>Italic face.</i> \
     {
         UpdateTestWin();
     }
+    void OnUpdateSpin(wxSpinEvent& WXUNUSED(event))
+    {
+        UpdateTestWin();
+    }
 
     DECLARE_EVENT_TABLE()
 };
 
 BEGIN_EVENT_TABLE(wxHtmlHelpFrameOptionsDialog, wxDialog)
     EVT_COMBOBOX(-1, wxHtmlHelpFrameOptionsDialog::OnUpdate)
-    EVT_SPINCTRL(-1, wxHtmlHelpFrameOptionsDialog::OnUpdate)
+    EVT_SPINCTRL(-1, wxHtmlHelpFrameOptionsDialog::OnUpdateSpin)
 END_EVENT_TABLE()
 
 
@@ -1069,7 +1078,7 @@ void wxHtmlHelpFrame::OptionsDialog()
     if (!m_NormalFace.empty())
         dlg.NormalFont->SetStringSelection(m_NormalFace);
     else
-        dlg.FixedFont->SetSelection(0);
+        dlg.NormalFont->SetSelection(0);
     if (!m_FixedFace.empty())
         dlg.FixedFont->SetStringSelection(m_FixedFace);
     else
@@ -1120,8 +1129,14 @@ void wxHtmlHelpFrame::OnActivate(wxActivateEvent& event)
 {
     // This saves one mouse click when using the
     // wxHTML for context sensitive help systems
+#ifndef __WXGTK__
+    // NB: wxActivateEvent is a bit broken in wxGTK
+    //     and is sometimes sent when it should not be
     if (event.GetActive() && m_HtmlWin)
         m_HtmlWin->SetFocus();
+#endif
+
+    event.Skip();
 }
 
 void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event)