Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs1:/tmp/cvs-serv20840/src/gui
Modified Files:
wxMApp.cpp wxOptionsDlg.cpp
Log Message:
added an option to choose between internal and external help viewers
Index: wxMApp.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMApp.cpp,v
retrieving revision 1.265
retrieving revision 1.266
diff -b -u -2 -r1.265 -r1.266
--- wxMApp.cpp 23 Jul 2003 13:10:44 -0000 1.265
+++ wxMApp.cpp 23 Jul 2003 23:09:10 -0000 1.266
@@ -48,4 +48,5 @@
#include <wx/statusbr.h>
#include <wx/fs_mem.h>
+#include <wx/fs_zip.h>
#include <wx/fs_inet.h>
#include <wx/cmdline.h>
@@ -123,4 +124,5 @@
extern const MOption MP_DIALUP_SUPPORT;
#endif // USE_DIALUP
+extern const MOption MP_HELPBROWSER_KIND;
extern const MOption MP_HELPBROWSER;
extern const MOption MP_HELPBROWSER_ISNS;
@@ -954,4 +956,5 @@
wxInitAllImageHandlers();
wxFileSystem::AddHandler(new wxMemoryFSHandler);
+ wxFileSystem::AddHandler(new wxZipFSHandler);
// we need to reference wxInternetFSHandler or it might not be linked into
@@ -1309,4 +1312,7 @@
}
+#ifdef OS_UNIX
+ bool helpBrowserIsExternal = READ_APPCONFIG(MP_HELPBROWSER_KIND);
+#endif // OS_UNIX
while ( !m_HelpController )
{
@@ -1315,5 +1321,12 @@
// possible formats, just HTML and CHM
#ifdef OS_UNIX
+ if ( !helpBrowserIsExternal )
+ {
+ m_HelpController = new wxHtmlHelpController;
+ }
+ else
+ {
m_HelpController = new wxExtHelpController;
+ }
#else // Windows
m_HelpController = new wxBestHelpController;
@@ -1362,9 +1375,12 @@
// set help viewer options
-#if defined(OS_UNIX) // && !wxUSE_WXHTML_HELP
+#ifdef OS_UNIX
+ if ( helpBrowserIsExternal )
+ {
((wxExtHelpController *)m_HelpController)->SetBrowser(
READ_APPCONFIG(MP_HELPBROWSER),
READ_APPCONFIG(MP_HELPBROWSER_ISNS));
-#endif // using wxExtHelpController
+ }
+#endif // OS_UNIX
wxSize size = wxSize(READ_APPCONFIG(MP_HELPFRAME_WIDTH),
@@ -1374,4 +1390,11 @@
m_HelpController->SetFrameParameters("Mahogany : %s", size, pos);
+
+#ifdef OS_UNIX
+ if ( !helpBrowserIsExternal )
+ {
+ m_HelpController->DisplayContents();
+ }
+#endif // OS_UNIX
// remember the dir where we found the files
Index: wxOptionsDlg.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxOptionsDlg.cpp,v
retrieving revision 1.375
retrieving revision 1.376
diff -b -u -2 -r1.375 -r1.376
--- wxOptionsDlg.cpp 22 Jul 2003 22:01:41 -0000 1.375
+++ wxOptionsDlg.cpp 23 Jul 2003 23:09:10 -0000 1.376
@@ -99,7 +99,4 @@
#define USE_SENDMAIL
- // we use externabl browser for HTML help under Unix
- #define USE_EXT_HTML_HELP
-
// BBDB support only makes sense for Unix
#define USE_BBDB
@@ -495,9 +492,10 @@
ConfigField_BrowserInNewWindow,
-#ifdef USE_EXT_HTML_HELP
+#ifdef OS_UNIX
ConfigField_HelpersHelp2,
+ ConfigField_HelpBrowserKind,
ConfigField_HelpBrowser,
ConfigField_HelpBrowserIsNetscape,
-#endif // USE_EXT_HTML_HELP
+#endif // OS_UNIX
#ifdef OS_UNIX
@@ -1555,9 +1553,12 @@
#endif // Win/Unix
},
-#ifdef USE_EXT_HTML_HELP
+#ifdef OS_UNIX
{ gettext_noop("The following program will be used to view the online help
system:"), Field_Message, -1 },
- { gettext_noop("&Help viewer"), Field_File, -1
},
+ { gettext_noop("&Help viewer"
+ ":internal"
+ ":external"), Field_Combo, -1
},
+ { gettext_noop("&External viewer"), Field_File, -1
},
{ gettext_noop("Help &viewer is Netscape"), Field_Bool, -1
},
-#endif // USE_EXT_HTML_HELP
+#endif // OS_UNIX
#ifdef OS_UNIX
@@ -2006,9 +2007,10 @@
CONFIG_ENTRY(MP_BROWSER_INNW),
-#ifdef USE_EXT_HTML_HELP
+#ifdef OS_UNIX
CONFIG_NONE(),
+ CONFIG_ENTRY(MP_HELPBROWSER_KIND),
CONFIG_ENTRY(MP_HELPBROWSER),
CONFIG_ENTRY(MP_HELPBROWSER_ISNS),
-#endif // USE_EXT_HTML_HELP
+#endif // OS_UNIX
#ifdef OS_UNIX
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates