projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
we have dlerror() under Darwin
[wxWidgets.git]
/
samples
/
html
/
helpview
/
helpview.cpp
diff --git
a/samples/html/helpview/helpview.cpp
b/samples/html/helpview/helpview.cpp
index 5992be07a6be6fc905d05009af90b3108c18393d..ba4c62925decc493e010b3605e01d6f20ba1a9b3 100644
(file)
--- a/
samples/html/helpview/helpview.cpp
+++ b/
samples/html/helpview/helpview.cpp
@@
-1,31
+1,28
@@
-
/////////////////////////////////////////////////////////////////////////////
// Name: helpview.cpp
// Purpose: wxHtml help browser
/////////////////////////////////////////////////////////////////////////////
// Name: helpview.cpp
// Purpose: wxHtml help browser
+// Please note: see utils/helpview for a more fully-featured
+// standalone help browser.
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
-#pragma implementation "help.cpp"
-#pragma interface "help.cpp"
-#endif
-
// For compilers that support precompilation, includes "wx/wx.h".
// For compilers that support precompilation, includes "wx/wx.h".
-#include
<wx/wxprec.h>
+#include
"wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
// for all others, include the necessary headers (this file is usually all you
#ifdef __BORLANDC__
#pragma hdrstop
#endif
// for all others, include the necessary headers (this file is usually all you
-// need because it includes almost all "standard" wxWi
ndow
s headers
+// need because it includes almost all "standard" wxWi
dget
s headers
#ifndef WX_PRECOMP
#ifndef WX_PRECOMP
-#include
<wx/wx.h>
+#include
"wx/wx.h"
#endif
#endif
-#include <wx/image.h>
-#include <wx/wxhtml.h>
-#include <wx/fs_zip.h>
-#include <wx/log.h>
+#include "wx/image.h"
+#include "wx/wxhtml.h"
+#include "wx/fs_zip.h"
+#include "wx/log.h"
+#include "wx/filedlg.h"
// ----------------------------------------------------------------------------
// private classes
// ----------------------------------------------------------------------------
// private classes
@@
-48,7
+45,6
@@
class MyApp : public wxApp
private:
wxHtmlHelpController *help;
private:
wxHtmlHelpController *help;
- wxConfig* config;
};
};
@@
-64,18
+60,20
@@
bool MyApp::OnInit()
wxInitAllImageHandlers();
wxFileSystem::AddHandler(new wxZipFSHandler);
wxInitAllImageHandlers();
wxFileSystem::AddHandler(new wxZipFSHandler);
- config = new wxConfig("wxHTMLhelp");
+ SetVendorName(wxT("wxWidgets"));
+ SetAppName(wxT("wxHTMLHelp"));
+ wxConfig::Get(); // create an instance
+
help = new wxHtmlHelpController;
help = new wxHtmlHelpController;
- help -> UseConfig(config);
-
+
if (argc < 2) {
if (argc < 2) {
- wxLogError(
"Usage : helpview <helpfile> [<more helpfiles>]"
);
- wxLogError(
" helpfile may be .hhp, .zip or .htb"
);
- return
FALSE
;
+ wxLogError(
wxT("Usage : helpview <helpfile> [<more helpfiles>]")
);
+ wxLogError(
wxT(" helpfile may be .hhp, .zip or .htb")
);
+ return
false
;
}
for (int i = 1; i < argc; i++)
}
for (int i = 1; i < argc; i++)
- help
-> AddBook(argv[i]
);
+ help
->AddBook(wxFileName(argv[i])
);
#ifdef __WXMOTIF__
delete wxLog::SetActiveTarget(new wxLogGui);
#ifdef __WXMOTIF__
delete wxLog::SetActiveTarget(new wxLogGui);
@@
-83,14
+81,14
@@
bool MyApp::OnInit()
help -> DisplayContents();
help -> DisplayContents();
- return
TRUE
;
+ return
true
;
}
int MyApp::OnExit()
{
delete help;
}
int MyApp::OnExit()
{
delete help;
- delete
config
;
+ delete
wxConfig::Set(NULL)
;
return 0;
}
return 0;
}