Backported wxHTML fixes
Applied patch [ 654023 ] Enables HtmlHelp (native) Also fixed the bad event table in helpfrm.cpp. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18253 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -292,7 +292,7 @@ dragimag.cpp MSW
|
||||
dropsrc.cpp MSW OLE
|
||||
droptgt.cpp MSW OLE
|
||||
enhmeta.cpp MSW Win32Only
|
||||
helpbest.cpp MSW Win32Only
|
||||
helpbest.cpp MSW Win32Only,LowLevel
|
||||
evtloop.cpp MSW LowLevel
|
||||
fdrepdlg.cpp MSW Win32Only
|
||||
# FIXME: the generic implementation doesn't work under MSW, so we must
|
||||
@@ -308,8 +308,8 @@ gaugemsw.cpp MSW NotWin32
|
||||
gdiimage.cpp MSW LowLevel
|
||||
gdiobj.cpp MSW LowLevel
|
||||
glcanvas.cpp MSW
|
||||
helpchm.cpp MSW Win32Only
|
||||
helpwin.cpp MSW
|
||||
helpchm.cpp MSW Win32Only,LowLevel
|
||||
helpwin.cpp MSW LowLevel
|
||||
icon.cpp MSW LowLevel
|
||||
imaglist.cpp MSW Win32Only
|
||||
iniconf.cpp MSW
|
||||
|
@@ -888,7 +888,7 @@
|
||||
#define wxUSE_MS_HTML_HELP 1
|
||||
|
||||
// Use wxHTML-based help controller?
|
||||
#define wxUSE_WXHTML_HELP 0 //? error 'type cast' cannot convert from ...
|
||||
#define wxUSE_WXHTML_HELP 1
|
||||
|
||||
// Use resources
|
||||
#define wxUSE_RESOURCES 1
|
||||
|
@@ -888,7 +888,7 @@
|
||||
#define wxUSE_MS_HTML_HELP 1
|
||||
|
||||
// Use wxHTML-based help controller?
|
||||
#define wxUSE_WXHTML_HELP 0 //? error 'type cast' cannot convert from ...
|
||||
#define wxUSE_WXHTML_HELP 1
|
||||
|
||||
// Use resources
|
||||
#define wxUSE_RESOURCES 1
|
||||
|
@@ -84,6 +84,11 @@ void wxHtmlHelpController::SetTitleFormat(const wxString& title)
|
||||
}
|
||||
|
||||
|
||||
bool wxHtmlHelpController::AddBook(const wxFileName& book_file, bool show_wait_msg)
|
||||
{
|
||||
return AddBook(wxFileSystem::FileNameToURL(book_file), show_wait_msg);
|
||||
}
|
||||
|
||||
bool wxHtmlHelpController::AddBook(const wxString& book, bool show_wait_msg)
|
||||
{
|
||||
wxBusyCursor cur;
|
||||
@@ -186,7 +191,7 @@ bool wxHtmlHelpController::Initialize(const wxString& file)
|
||||
}
|
||||
}
|
||||
|
||||
return AddBook(actualFilename);
|
||||
return AddBook(wxFileName(actualFilename));
|
||||
}
|
||||
|
||||
bool wxHtmlHelpController::LoadFile(const wxString& WXUNUSED(file))
|
||||
|
@@ -570,7 +570,6 @@ bool wxHtmlHelpData::AddBook(const wxString& book)
|
||||
{
|
||||
wxFSFile *fi;
|
||||
wxFileSystem fsys;
|
||||
wxString bookFull;
|
||||
|
||||
wxString title = _("noname"),
|
||||
safetitle,
|
||||
@@ -579,23 +578,13 @@ bool wxHtmlHelpData::AddBook(const wxString& book)
|
||||
index = wxEmptyString,
|
||||
charset = wxEmptyString;
|
||||
|
||||
#if defined(__WXMAC__) && !defined(__DARWIN__)
|
||||
if (wxIsAbsolutePath(book)) bookFull = book;
|
||||
else bookFull = wxGetCwd() + book; // no slash or dot
|
||||
wxFileName fn( bookFull );
|
||||
bookFull = fn.GetFullPath( wxPATH_UNIX );
|
||||
#else
|
||||
if (wxIsAbsolutePath(book)) bookFull = book;
|
||||
else bookFull = wxGetCwd() + wxT("/") + book;
|
||||
#endif
|
||||
|
||||
fi = fsys.OpenFile(bookFull);
|
||||
fi = fsys.OpenFile(book);
|
||||
if (fi == NULL)
|
||||
{
|
||||
wxLogError(_("Cannot open HTML help book: %s"), bookFull.c_str());
|
||||
wxLogError(_("Cannot open HTML help book: %s"), book.c_str());
|
||||
return FALSE;
|
||||
}
|
||||
fsys.ChangePathTo(bookFull);
|
||||
fsys.ChangePathTo(book);
|
||||
|
||||
const wxChar *lineptr;
|
||||
wxChar linebuf[300];
|
||||
|
@@ -1020,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()
|
||||
|
||||
|
||||
|
113
src/wxUniv.dsp
113
src/wxUniv.dsp
@@ -49,7 +49,7 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\lib\wxuniv.lib"
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "wxUniv - Win32 Debug"
|
||||
|
||||
@@ -221,6 +221,11 @@ SOURCE=.\common\event.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common\extended.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common\fddlgcmn.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -549,6 +554,11 @@ SOURCE=.\common\txtstrm.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common\unzip.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common\url.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -599,18 +609,6 @@ SOURCE=.\common\zipstrm.cpp
|
||||
|
||||
SOURCE=.\common\zstream.cpp
|
||||
# End Source File
|
||||
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common\extended.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\common\unzip.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
|
||||
# End Group
|
||||
# Begin Group "Generic Files"
|
||||
|
||||
@@ -791,7 +789,6 @@ SOURCE=.\generic\treelay.cpp
|
||||
|
||||
SOURCE=.\generic\wizard.cpp
|
||||
# End Source File
|
||||
|
||||
# End Group
|
||||
# Begin Group "wxHTML Files"
|
||||
|
||||
@@ -876,18 +873,12 @@ SOURCE=.\html\m_tables.cpp
|
||||
|
||||
SOURCE=.\html\winpars.cpp
|
||||
# End Source File
|
||||
|
||||
# End Group
|
||||
# Begin Group "MSW Files"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\msw\dummy.cpp
|
||||
# ADD CPP /Yc"wx/wxprec.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\msw\app.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -952,6 +943,11 @@ SOURCE=.\msw\dir.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\msw\dummy.cpp
|
||||
# ADD CPP /Yc"wx/wxprec.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\msw\evtloop.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -980,6 +976,28 @@ SOURCE=.\msw\gdiobj.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\msw\gsocket.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\msw\gsockmsw.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\msw\helpbest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\msw\helpchm.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\msw\helpwin.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\msw\icon.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -1050,22 +1068,26 @@ SOURCE=.\msw\volume.cpp
|
||||
|
||||
SOURCE=.\msw\window.cpp
|
||||
# End Source File
|
||||
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\msw\gsocket.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\msw\gsockmsw.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
|
||||
# End Group
|
||||
# Begin Group "Universal Files"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Group "Theme Files"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\univ\themes\gtk.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\univ\themes\metal.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\univ\themes\win32.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\univ\bmpbuttn.cpp
|
||||
@@ -1202,24 +1224,6 @@ SOURCE=.\univ\topluniv.cpp
|
||||
|
||||
SOURCE=.\univ\winuniv.cpp
|
||||
# End Source File
|
||||
|
||||
# Begin Group "Theme Files"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\univ\themes\gtk.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\univ\themes\metal.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\univ\themes\win32.cpp
|
||||
# End Source File
|
||||
|
||||
# End Group
|
||||
# End Group
|
||||
# Begin Group "Headers"
|
||||
|
||||
@@ -1230,7 +1234,9 @@ SOURCE=.\univ\themes\win32.cpp
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\include\wx\univ\setup.h
|
||||
|
||||
!IF "$(CFG)" == "wxUniv - Win32 Release"
|
||||
|
||||
# Begin Custom Build - Creating lib\univ\wx\setup.h from $(InputPath)
|
||||
InputPath=..\include\wx\univ\setup.h
|
||||
|
||||
@@ -1238,7 +1244,9 @@ InputPath=..\include\wx\univ\setup.h
|
||||
copy "$(InputPath)" ..\lib\univ\wx\setup.h
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "wxUniv - Win32 Debug"
|
||||
|
||||
# Begin Custom Build - Creating lib\univd\wx\setup.h from $(InputPath)
|
||||
InputPath=..\include\wx\univ\setup.h
|
||||
|
||||
@@ -1246,7 +1254,9 @@ InputPath=..\include\wx\univ\setup.h
|
||||
copy "$(InputPath)" ..\lib\univd\wx\setup.h
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Common"
|
||||
@@ -2200,7 +2210,6 @@ SOURCE=..\include\wx\zipstrm.h
|
||||
|
||||
SOURCE=..\include\wx\zstream.h
|
||||
# End Source File
|
||||
|
||||
# End Group
|
||||
# Begin Group "MSW"
|
||||
|
||||
@@ -2369,7 +2378,6 @@ SOURCE=..\include\wx\generic\treectlg.h
|
||||
|
||||
SOURCE=..\include\wx\generic\wizard.h
|
||||
# End Source File
|
||||
|
||||
# End Group
|
||||
# Begin Group "HTML"
|
||||
|
||||
@@ -2426,7 +2434,6 @@ SOURCE=..\include\wx\html\m_templ.h
|
||||
|
||||
SOURCE=..\include\wx\html\winpars.h
|
||||
# End Source File
|
||||
|
||||
# End Group
|
||||
# Begin Group "Universal"
|
||||
|
||||
|
Reference in New Issue
Block a user