saving customization now works fine

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4346 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
1999-11-03 22:39:13 +00:00
parent 7f45dffc96
commit c32bfc1090

View File

@@ -13,7 +13,8 @@
#pragma implementation #pragma implementation
#endif #endif
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h"
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__
@@ -23,7 +24,6 @@
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_HTML #if wxUSE_HTML
#ifndef WXPRECOMP #ifndef WXPRECOMP
#include "wx/wx.h" #include "wx/wx.h"
#endif #endif
@@ -48,6 +48,7 @@
#include "bitmaps/book.xpm" #include "bitmaps/book.xpm"
#include "bitmaps/folder.xpm" #include "bitmaps/folder.xpm"
#include "bitmaps/page.xpm" #include "bitmaps/page.xpm"
#include "bitmaps/help.xpm"
#endif #endif
#include "wx/stream.h" #include "wx/stream.h"
@@ -140,10 +141,12 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, const wxString& ti
wxFrame::Create(parent, id, _("Help"), wxPoint(m_Cfg.x, m_Cfg.y), wxSize(m_Cfg.w, m_Cfg.h)); wxFrame::Create(parent, id, _("Help"), wxPoint(m_Cfg.x, m_Cfg.y), wxSize(m_Cfg.w, m_Cfg.h));
#ifdef __WXMSW__ #ifdef __WXMSW__
wxIcon frameIcon("wxhelp", wxBITMAP_TYPE_ICO_RESOURCE); wxIcon frameIcon("wxhelp", wxBITMAP_TYPE_ICO_RESOURCE, 32, 32);
#else
wxIcon frameIcon(help_xpm);
#endif
if (frameIcon.Ok()) if (frameIcon.Ok())
SetIcon(frameIcon); SetIcon(frameIcon);
#endif
int notebook_page = 0; int notebook_page = 0;
@@ -276,21 +279,22 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, const wxString& ti
m_NavigPan -> AddPage(dummy, _("Search")); m_NavigPan -> AddPage(dummy, _("Search"));
m_SearchPage = notebook_page++; m_SearchPage = notebook_page++;
} }
m_HtmlWin -> Show(TRUE);
//RefreshLists(); //RefreshLists();
// showtime // showtime
if (m_NavigPan && m_Splitter) { if (m_NavigPan && m_Splitter) {
m_NavigPan -> Show(TRUE);
m_Splitter -> SetMinimumPaneSize(20); m_Splitter -> SetMinimumPaneSize(20);
if (m_Cfg.navig_on) if (m_Cfg.navig_on) {
m_NavigPan -> Show(TRUE);
m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos); m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos);
}
else { else {
m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos); m_NavigPan -> Show(FALSE);
m_Splitter -> Unsplit(); m_Splitter -> Initialize(m_HtmlWin);
} }
} }
m_HtmlWin -> Show(TRUE);
return TRUE; return TRUE;
} }
@@ -331,6 +335,7 @@ bool wxHtmlHelpFrame::DisplayContents()
m_NavigPan -> Show(TRUE); m_NavigPan -> Show(TRUE);
m_HtmlWin -> Show(TRUE); m_HtmlWin -> Show(TRUE);
m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos); m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos);
m_Cfg.navig_on = TRUE;
} }
m_NavigPan -> SetSelection(0); m_NavigPan -> SetSelection(0);
return TRUE; return TRUE;
@@ -609,8 +614,8 @@ void wxHtmlHelpFrame::OnContentsSel(wxTreeEvent& event)
void wxHtmlHelpFrame::OnIndexSel(wxCommandEvent& WXUNUSED(event)) void wxHtmlHelpFrame::OnIndexSel(wxCommandEvent& WXUNUSED(event))
{ {
wxHtmlContentsItem *it = (wxHtmlContentsItem*) m_IndexBox -> GetClientData(m_IndexBox -> GetSelection()); wxHtmlContentsItem *it = (wxHtmlContentsItem*) m_IndexBox -> GetClientData(m_IndexBox -> GetSelection());
if (it) m_HtmlWin -> LoadPage(it -> m_Book -> GetBasePath() + it -> m_Page); m_HtmlWin -> LoadPage(it -> m_Book -> GetBasePath() + it -> m_Page);
} }