2014-06-06 21:34:36 +00:00
|
|
|
/**********************************************************************
|
|
|
|
|
|
|
|
Audacity: A Digital Audio Editor
|
|
|
|
|
|
|
|
HelpSystem.cpp
|
|
|
|
|
|
|
|
Jimmy Johnson
|
|
|
|
Leland Lucius
|
|
|
|
Richard Ash
|
|
|
|
|
|
|
|
*//********************************************************************/
|
|
|
|
|
|
|
|
#include "../Audacity.h"
|
|
|
|
|
|
|
|
#include <wx/button.h>
|
|
|
|
#include <wx/icon.h>
|
|
|
|
#include <wx/dialog.h>
|
|
|
|
#include <wx/intl.h>
|
|
|
|
#include <wx/sizer.h>
|
|
|
|
#include <wx/stattext.h>
|
|
|
|
#include <wx/utils.h>
|
|
|
|
#include <wx/html/htmlwin.h>
|
|
|
|
#include <wx/settings.h>
|
|
|
|
#include <wx/statusbr.h>
|
2014-08-27 00:43:32 +00:00
|
|
|
#include <wx/regex.h>
|
2014-06-06 21:34:36 +00:00
|
|
|
|
2014-06-09 19:55:14 +00:00
|
|
|
#include "../FileNames.h"
|
2014-06-06 21:34:36 +00:00
|
|
|
#include "LinkingHtmlWindow.h"
|
|
|
|
#include "../Theme.h"
|
|
|
|
#include "../AllThemeResources.h"
|
|
|
|
#include "../ShuttleGui.h"
|
|
|
|
#include "../HelpText.h"
|
|
|
|
#include "../Project.h"
|
|
|
|
#include "../Prefs.h"
|
|
|
|
|
|
|
|
#include "ErrorDialog.h"
|
|
|
|
#include "HelpSystem.h"
|
|
|
|
|
2017-09-11 04:08:31 +00:00
|
|
|
#ifdef USE_ALPHA_MANUAL
|
2016-05-23 02:19:10 +00:00
|
|
|
const wxString HelpSystem::HelpHostname = wxT("alphamanual.audacityteam.org");
|
2014-08-28 00:24:31 +00:00
|
|
|
const wxString HelpSystem::HelpServerHomeDir = wxT("/man/");
|
|
|
|
const wxString HelpSystem::HelpServerManDir = wxT("/man/");
|
|
|
|
#else
|
2016-05-23 02:19:10 +00:00
|
|
|
const wxString HelpSystem::HelpHostname = wxT("manual.audacityteam.org");
|
|
|
|
const wxString HelpSystem::HelpServerHomeDir = wxT("/");
|
|
|
|
const wxString HelpSystem::HelpServerManDir = wxT("/man/");
|
2014-08-28 00:24:31 +00:00
|
|
|
#endif
|
|
|
|
const wxString HelpSystem::LocalHelpManDir = wxT("/man/");
|
2014-06-09 19:55:14 +00:00
|
|
|
const wxString HelpSystem::ReleaseSuffix = wxT(".html");
|
|
|
|
|
2014-06-06 21:34:36 +00:00
|
|
|
/// Mostly we use this so that we have the code for resizability
|
|
|
|
/// in one place. Other considerations like screen readers are also
|
|
|
|
/// handled by having the code in one place.
|
2014-06-09 18:42:19 +00:00
|
|
|
void HelpSystem::ShowInfoDialog( wxWindow *parent,
|
2014-06-06 21:34:36 +00:00
|
|
|
const wxString &dlogTitle,
|
|
|
|
const wxString &shortMsg,
|
|
|
|
const wxString &message,
|
|
|
|
const int xSize, const int ySize)
|
|
|
|
{
|
2016-07-10 21:10:50 +00:00
|
|
|
wxDialogWrapper dlog(parent, wxID_ANY,
|
2014-06-06 21:34:36 +00:00
|
|
|
dlogTitle,
|
|
|
|
wxDefaultPosition, wxDefaultSize,
|
|
|
|
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX /*| wxDEFAULT_FRAME_STYLE */);
|
|
|
|
|
2015-05-18 12:57:05 +00:00
|
|
|
dlog.SetName(dlog.GetTitle());
|
2014-06-06 21:34:36 +00:00
|
|
|
ShuttleGui S(&dlog, eIsCreating);
|
|
|
|
|
|
|
|
S.StartVerticalLay(1);
|
|
|
|
{
|
|
|
|
S.AddTitle( shortMsg);
|
|
|
|
S.SetStyle( wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH | wxTE_RICH2 |
|
|
|
|
wxTE_AUTO_URL | wxTE_NOHIDESEL | wxHSCROLL );
|
|
|
|
S.AddTextWindow(message);
|
|
|
|
}
|
|
|
|
S.SetBorder( 0 );
|
|
|
|
S.StartHorizontalLay(wxALIGN_CENTER|wxALIGN_BOTTOM, 0);
|
|
|
|
S.AddStandardButtons(eOkButton);
|
|
|
|
|
|
|
|
S.EndHorizontalLay();
|
|
|
|
|
|
|
|
// Next three lines add a tiny dragger.
|
2016-02-13 23:06:49 +00:00
|
|
|
wxStatusBar * pBar = safenew wxStatusBar( &dlog );
|
2014-06-06 21:34:36 +00:00
|
|
|
pBar->SetSize( 18, 38);
|
|
|
|
S.AddWindow( pBar, wxALIGN_BOTTOM|wxALIGN_RIGHT );
|
|
|
|
|
|
|
|
S.EndVerticalLay();
|
|
|
|
|
|
|
|
// Smallest size is half default size. Seems reasonable.
|
|
|
|
dlog.SetMinSize( wxSize(xSize/2, ySize/2) );
|
|
|
|
dlog.SetSize( wxSize(xSize, ySize) );
|
|
|
|
dlog.Center();
|
|
|
|
dlog.ShowModal();
|
|
|
|
}
|
|
|
|
|
2014-06-09 18:42:19 +00:00
|
|
|
void HelpSystem::ShowHtmlText(wxWindow *pParent,
|
2014-06-06 21:34:36 +00:00
|
|
|
const wxString &Title,
|
|
|
|
const wxString &HtmlText,
|
2014-08-26 22:53:11 +00:00
|
|
|
bool bIsFile,
|
|
|
|
bool bModal)
|
2014-06-06 21:34:36 +00:00
|
|
|
{
|
|
|
|
LinkingHtmlWindow *html;
|
|
|
|
|
2016-08-14 03:16:05 +00:00
|
|
|
wxASSERT(pParent); // to justify safenew
|
2017-02-26 09:44:23 +00:00
|
|
|
// JKC: ANSWER-ME: Why do we create a fake 'frame' and then put a BrowserDialog
|
|
|
|
// inside it, rather than have a variant of the BrowserDialog that is a
|
|
|
|
// frame??
|
|
|
|
// Bug 1412 seems to be related to the extra frame.
|
2016-06-20 18:02:44 +00:00
|
|
|
auto pFrame = safenew wxFrame {
|
|
|
|
pParent, wxID_ANY, Title, wxDefaultPosition, wxDefaultSize,
|
2014-06-06 21:34:36 +00:00
|
|
|
#if defined(__WXMAC__)
|
|
|
|
// On OSX, the html frame can go behind the help dialog and if the help
|
|
|
|
// html frame is modal, you can't get back to it. Pressing escape gets
|
|
|
|
// you out of this, but it's just easier to add the wxSTAY_ON_TOP flag
|
|
|
|
// to prevent it from falling behind the dialog. Not the perfect solution
|
|
|
|
// but acceptable in this case.
|
|
|
|
wxSTAY_ON_TOP |
|
|
|
|
#endif
|
2016-06-20 18:02:44 +00:00
|
|
|
wxDEFAULT_FRAME_STYLE
|
|
|
|
};
|
|
|
|
|
|
|
|
BrowserDialog * pWnd;
|
|
|
|
if( bModal )
|
|
|
|
pWnd = safenew HtmlTextHelpDialog{ pFrame, Title };
|
|
|
|
else
|
|
|
|
pWnd = safenew BrowserDialog{ pFrame, Title };
|
2014-06-06 21:34:36 +00:00
|
|
|
|
2017-02-26 09:44:23 +00:00
|
|
|
// Bug 1412 workaround for 'extra window'. Hide the 'fake' window.
|
|
|
|
pFrame->SetTransparent(0);
|
2014-06-06 21:34:36 +00:00
|
|
|
ShuttleGui S( pWnd, eIsCreating );
|
|
|
|
|
|
|
|
S.SetStyle( wxNO_BORDER | wxTAB_TRAVERSAL );
|
|
|
|
wxPanel *pPan = S.Prop(true).StartPanel();
|
|
|
|
{
|
|
|
|
S.StartHorizontalLay( wxEXPAND, false );
|
|
|
|
{
|
|
|
|
wxButton * pWndBackwards = S.Id( wxID_BACKWARD ).AddButton( _("<") );
|
|
|
|
wxButton * pWndForwards = S.Id( wxID_FORWARD ).AddButton( _(">") );
|
|
|
|
pWndForwards->Enable( false );
|
|
|
|
pWndBackwards->Enable( false );
|
|
|
|
#if wxUSE_TOOLTIPS
|
|
|
|
pWndForwards->SetToolTip( _("Forwards" ));
|
|
|
|
pWndBackwards->SetToolTip( _("Backwards" ));
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
S.EndHorizontalLay();
|
|
|
|
|
2016-02-13 23:06:49 +00:00
|
|
|
html = safenew LinkingHtmlWindow(pPan, wxID_ANY,
|
2014-06-06 21:34:36 +00:00
|
|
|
wxDefaultPosition,
|
|
|
|
bIsFile ? wxSize(500, 400) : wxSize(480, 240),
|
|
|
|
wxHW_SCROLLBAR_AUTO | wxSUNKEN_BORDER);
|
|
|
|
|
2016-06-20 18:02:44 +00:00
|
|
|
html->SetRelatedFrame( pFrame, wxT("Help: %s") );
|
2014-06-06 21:34:36 +00:00
|
|
|
if( bIsFile )
|
|
|
|
html->LoadFile( HtmlText );
|
|
|
|
else
|
|
|
|
html->SetPage( HtmlText);
|
|
|
|
|
|
|
|
S.Prop(1).AddWindow( html, wxEXPAND );
|
|
|
|
|
|
|
|
S.Id( wxID_CANCEL ).AddButton( _("Close") )->SetDefault();
|
|
|
|
}
|
|
|
|
S.EndPanel();
|
|
|
|
|
|
|
|
// -- START of ICON stuff -----
|
|
|
|
// If this section (providing an icon) causes compilation errors on linux, comment it out for now.
|
|
|
|
// it will just mean that the icon is missing. Works OK on Windows.
|
|
|
|
#ifdef __WXMSW__
|
2016-02-01 01:39:24 +00:00
|
|
|
wxIcon ic{ wxICON(AudacityLogo) };
|
2014-06-06 21:34:36 +00:00
|
|
|
#else
|
2016-02-01 01:39:24 +00:00
|
|
|
wxIcon ic{};
|
2014-06-06 21:34:36 +00:00
|
|
|
ic.CopyFromBitmap(theTheme.Bitmap(bmpAudacityLogo48x48));
|
|
|
|
#endif
|
2016-06-20 18:02:44 +00:00
|
|
|
pFrame->SetIcon( ic );
|
2014-06-06 21:34:36 +00:00
|
|
|
// -- END of ICON stuff -----
|
|
|
|
|
|
|
|
|
|
|
|
pWnd->mpHtml = html;
|
|
|
|
pWnd->SetBackgroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
|
2016-06-20 18:02:44 +00:00
|
|
|
|
|
|
|
pFrame->CreateStatusBar();
|
|
|
|
pFrame->Centre();
|
|
|
|
pFrame->Layout();
|
|
|
|
pFrame->Fit();
|
|
|
|
pFrame->SetSizeHints(pWnd->GetSize());
|
|
|
|
|
|
|
|
pFrame->SetName(Title);
|
2016-06-21 15:54:21 +00:00
|
|
|
if (bModal)
|
|
|
|
pWnd->ShowModal();
|
2016-06-21 17:11:35 +00:00
|
|
|
else {
|
2016-06-21 15:54:21 +00:00
|
|
|
pWnd->Show(true);
|
2016-06-21 17:11:35 +00:00
|
|
|
pFrame->Show(true);
|
|
|
|
}
|
2014-06-06 21:34:36 +00:00
|
|
|
|
|
|
|
html->SetRelatedStatusBar( 0 );
|
|
|
|
html->SetFocus();
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2017-08-25 12:54:37 +00:00
|
|
|
// Shows help in browser, or possibly in own dialog.
|
|
|
|
void HelpSystem::ShowHelp(wxWindow *parent,
|
2014-06-06 21:34:36 +00:00
|
|
|
const wxString &localFileName,
|
2014-08-26 22:53:11 +00:00
|
|
|
const wxString &remoteURL,
|
2017-05-19 17:20:05 +00:00
|
|
|
bool bModal,
|
|
|
|
bool alwaysDefaultBrowser)
|
2014-06-06 21:34:36 +00:00
|
|
|
{
|
2016-08-14 03:16:05 +00:00
|
|
|
wxASSERT(parent); // to justify safenew
|
2014-06-06 21:34:36 +00:00
|
|
|
AudacityProject * pProj = GetActiveProject();
|
|
|
|
wxString HelpMode = wxT("Local");
|
|
|
|
|
|
|
|
if( pProj )
|
|
|
|
{
|
|
|
|
HelpMode = pProj->mHelpPref;
|
|
|
|
// these next lines are for legacy cfg files (pre 2.0) where we had different modes
|
|
|
|
if( (HelpMode == wxT("Standard")) || (HelpMode == wxT("InBrowser")) )
|
|
|
|
{
|
|
|
|
HelpMode = wxT("Local");
|
|
|
|
pProj->mHelpPref = HelpMode;
|
|
|
|
gPrefs->Write(wxT("/GUI/Help"), HelpMode);
|
|
|
|
gPrefs->Flush();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-09-04 00:02:12 +00:00
|
|
|
// Anchors (URLs with a '#' in them) are not supported by many OSs for local file names
|
|
|
|
// See, for example, https://groups.google.com/forum/#!topic/wx-users/pC0uOZJalRQ
|
|
|
|
// Problems have been reported on Win, Mac and some versions of Linux.
|
|
|
|
// So we set HelpMode to use the internet if an anchor is found.
|
|
|
|
if (localFileName.Find('#', true) != wxNOT_FOUND)
|
|
|
|
HelpMode = wxT("FromInternet");
|
|
|
|
// Until a solution is found for this, the next few lines are irrelevant.
|
|
|
|
|
2014-08-25 23:46:50 +00:00
|
|
|
// Obtain the local file system file name, without the anchor if present.
|
|
|
|
wxString localfile;
|
|
|
|
if (localFileName.Find('#', true) != wxNOT_FOUND)
|
|
|
|
localfile = localFileName.BeforeLast('#');
|
|
|
|
else
|
|
|
|
localfile = localFileName;
|
|
|
|
|
2014-08-26 00:40:09 +00:00
|
|
|
if( (HelpMode == wxT("FromInternet")) && !remoteURL.IsEmpty() )
|
2014-06-06 21:34:36 +00:00
|
|
|
{
|
|
|
|
// Always go to remote URL. Use External browser.
|
|
|
|
OpenInDefaultBrowser( remoteURL );
|
|
|
|
}
|
2017-08-25 12:54:37 +00:00
|
|
|
else if( localfile.IsEmpty() || !wxFileExists( localfile ))
|
2014-06-06 21:34:36 +00:00
|
|
|
{
|
|
|
|
// If you give an empty remote URL, you should have already ensured
|
|
|
|
// that the file exists!
|
|
|
|
wxASSERT( !remoteURL.IsEmpty() );
|
|
|
|
// I can't find it'.
|
|
|
|
// Use Built-in browser to suggest you use the remote url.
|
|
|
|
wxString Text = HelpText( wxT("remotehelp") );
|
|
|
|
Text.Replace( wxT("*URL*"), remoteURL );
|
2014-08-26 22:53:11 +00:00
|
|
|
ShowHtmlText( parent, _("Help on the Internet"), Text, false, bModal );
|
2014-06-06 21:34:36 +00:00
|
|
|
}
|
2017-05-19 17:20:05 +00:00
|
|
|
else if( HelpMode == wxT("Local") || alwaysDefaultBrowser)
|
2014-06-06 21:34:36 +00:00
|
|
|
{
|
|
|
|
// Local file, External browser
|
|
|
|
OpenInDefaultBrowser( wxString(wxT("file:"))+localFileName );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// Local file, Built-in browser
|
2014-08-26 22:53:11 +00:00
|
|
|
ShowHtmlText( parent, wxT(""), localFileName, true, bModal );
|
2014-06-06 21:34:36 +00:00
|
|
|
}
|
|
|
|
}
|
2014-06-09 19:55:14 +00:00
|
|
|
|
2017-08-25 12:54:37 +00:00
|
|
|
void HelpSystem::ShowHelp(wxWindow *parent,
|
|
|
|
const wxString &PageName,
|
|
|
|
bool bModal)
|
2014-06-09 19:55:14 +00:00
|
|
|
{
|
|
|
|
wxString localHelpPage;
|
2014-08-28 00:24:31 +00:00
|
|
|
wxString webHelpPath;
|
2014-06-09 19:55:14 +00:00
|
|
|
wxString webHelpPage;
|
2014-06-25 10:12:15 +00:00
|
|
|
wxString releasePageName;
|
2014-08-25 23:28:09 +00:00
|
|
|
wxString anchor; // optional part of URL after (and including) the '#'
|
2014-06-25 10:12:15 +00:00
|
|
|
if (PageName.Find('#', true) != wxNOT_FOUND)
|
|
|
|
{ // need to split anchor off into separate variable
|
|
|
|
releasePageName= PageName.BeforeLast('#');
|
2014-08-25 23:28:09 +00:00
|
|
|
anchor = wxT("#") + PageName.AfterLast('#');
|
2014-06-25 10:12:15 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
releasePageName = PageName;
|
2014-08-25 23:28:09 +00:00
|
|
|
anchor = wxT("");
|
2014-06-25 10:12:15 +00:00
|
|
|
}
|
2014-08-27 00:43:32 +00:00
|
|
|
// The wiki pages are transformed to static HTML by
|
|
|
|
// scripts/mw2html_audacity/mw2html.py
|
|
|
|
// The name is first transformed to lower case, then all
|
|
|
|
// 'special characters' are replaced by underscores. Spaces are
|
|
|
|
// transformed to "+".
|
|
|
|
//
|
|
|
|
// The transformations are handled in mw2html by first applying
|
|
|
|
// 'urllib.parse.quote_plus' (escape chars that are not in "always safe" list)
|
2014-08-28 22:35:08 +00:00
|
|
|
// then replacing escape characters (%xx) with underscores,
|
2014-08-27 00:43:32 +00:00
|
|
|
// and finally removing duplicate / redundant underscores.
|
|
|
|
//
|
|
|
|
// The front page and 'quick_help' are treated as special cases and placed in
|
|
|
|
// the root of the help directory rather than the "/man/" sub-directory.
|
2014-06-25 10:12:15 +00:00
|
|
|
if (releasePageName == wxT("Main_Page"))
|
|
|
|
{
|
|
|
|
releasePageName = wxT("index") + HelpSystem::ReleaseSuffix + anchor;
|
2014-08-28 00:24:31 +00:00
|
|
|
localHelpPage = wxFileName(FileNames::HtmlHelpDir(), releasePageName).GetFullPath();
|
2017-08-25 12:54:37 +00:00
|
|
|
webHelpPath = wxT("https://")+HelpSystem::HelpHostname+HelpSystem::HelpServerHomeDir;
|
2014-06-25 10:12:15 +00:00
|
|
|
}
|
2014-08-27 00:43:32 +00:00
|
|
|
else if (releasePageName == wxT("Quick_Help"))
|
|
|
|
{
|
2017-04-02 22:07:13 +00:00
|
|
|
// DA: No bundled help, by default, and different quick-help URL.
|
|
|
|
#ifdef EXPERIMENTAL_DA
|
|
|
|
releasePageName = wxT("video") + HelpSystem::ReleaseSuffix + anchor;
|
|
|
|
localHelpPage = wxFileName(FileNames::HtmlHelpDir(), releasePageName).GetFullPath();
|
|
|
|
webHelpPath = wxT("http://www.darkaudacity.com/");
|
|
|
|
#else
|
2014-08-27 00:43:32 +00:00
|
|
|
releasePageName = wxT("quick_help") + HelpSystem::ReleaseSuffix + anchor;
|
2014-08-28 00:24:31 +00:00
|
|
|
localHelpPage = wxFileName(FileNames::HtmlHelpDir(), releasePageName).GetFullPath();
|
2017-08-25 12:54:37 +00:00
|
|
|
webHelpPath = wxT("https://")+HelpSystem::HelpHostname+HelpSystem::HelpServerHomeDir;
|
2017-04-02 22:07:13 +00:00
|
|
|
#endif
|
2014-08-27 00:43:32 +00:00
|
|
|
}
|
2017-08-25 12:54:37 +00:00
|
|
|
// not a page name, but rather a full path (e.g. to wiki)
|
|
|
|
// in which case do not do any substitutions.
|
|
|
|
else if (releasePageName.StartsWith( "http" ) )
|
|
|
|
{
|
|
|
|
localHelpPage = "";
|
|
|
|
webHelpPage = releasePageName + anchor;
|
|
|
|
}
|
2014-06-25 10:12:15 +00:00
|
|
|
else
|
2014-08-27 00:43:32 +00:00
|
|
|
{
|
2014-08-28 00:24:31 +00:00
|
|
|
// Handle all other pages.
|
2014-08-27 00:43:32 +00:00
|
|
|
// Change to lower case.
|
|
|
|
releasePageName = releasePageName.Lower();
|
|
|
|
wxRegEx re;
|
|
|
|
// replace 'special characters' with underscores.
|
|
|
|
// RFC 2396 defines the characters a-z, A-Z, 0-9 and ".-_" as "always safe"
|
|
|
|
// mw2html also replaces "-" with "_" so replace that too.
|
2014-08-28 22:35:08 +00:00
|
|
|
|
|
|
|
// If PageName contains a %xx code, mw2html will transform it:
|
|
|
|
// '%xx' => '%25xx' => '_'
|
|
|
|
re.Compile(wxT("%.."));
|
|
|
|
re.ReplaceAll(&releasePageName, (wxT("_")));
|
|
|
|
// Now replace all other 'not-safe' characters.
|
2014-08-27 00:43:32 +00:00
|
|
|
re.Compile(wxT("[^[:alnum:] . [:space:]]"));
|
|
|
|
re.ReplaceAll(&releasePageName, (wxT("_")));
|
|
|
|
// Replace spaces with "+"
|
|
|
|
releasePageName.Replace(wxT(" "), wxT("+"), true);
|
|
|
|
// Reduce multiple underscores to single underscores
|
2014-08-28 22:55:19 +00:00
|
|
|
re.Compile(wxT("__+"));
|
|
|
|
re.ReplaceAll(&releasePageName, (wxT("_")));
|
2014-08-27 00:43:32 +00:00
|
|
|
// Replace "_." with "."
|
|
|
|
releasePageName.Replace(wxT("_."), wxT("."), true);
|
|
|
|
// Concatenate file name with file extension and anchor.
|
|
|
|
releasePageName = releasePageName + HelpSystem::ReleaseSuffix + anchor;
|
2014-08-28 00:24:31 +00:00
|
|
|
// Other than index and quick_help, all local pages are in subdirectory 'LocalHelpManDir'.
|
|
|
|
localHelpPage = wxFileName(FileNames::HtmlHelpDir() + LocalHelpManDir, releasePageName).GetFullPath();
|
|
|
|
// Other than index and quick_help, all on-line pages are in subdirectory 'HelpServerManDir'.
|
2017-08-25 12:54:37 +00:00
|
|
|
webHelpPath = wxT("https://")+HelpSystem::HelpHostname+HelpSystem::HelpServerManDir;
|
2014-06-25 10:12:15 +00:00
|
|
|
}
|
2014-08-28 22:35:08 +00:00
|
|
|
|
2017-09-11 04:08:31 +00:00
|
|
|
#ifdef USE_ALPHA_MANUAL
|
2014-08-28 00:24:31 +00:00
|
|
|
webHelpPage = webHelpPath + PageName;
|
2014-06-09 19:55:14 +00:00
|
|
|
#else
|
2014-08-28 00:24:31 +00:00
|
|
|
webHelpPage = webHelpPath + releasePageName;
|
2014-06-09 19:55:14 +00:00
|
|
|
#endif
|
2014-08-28 00:24:31 +00:00
|
|
|
|
2014-06-09 19:55:14 +00:00
|
|
|
wxLogMessage(wxT("Help button pressed: PageName %s, releasePageName %s"),
|
|
|
|
PageName.c_str(), releasePageName.c_str());
|
|
|
|
wxLogMessage(wxT("webHelpPage %s, localHelpPage %s"),
|
|
|
|
webHelpPage.c_str(), localHelpPage.c_str());
|
2014-08-28 00:24:31 +00:00
|
|
|
|
2016-08-14 03:16:05 +00:00
|
|
|
wxASSERT(parent); // to justify safenew
|
2017-02-26 09:44:23 +00:00
|
|
|
|
2017-08-25 12:54:37 +00:00
|
|
|
HelpSystem::ShowHelp(
|
2014-06-09 19:55:14 +00:00
|
|
|
parent,
|
|
|
|
localHelpPage,
|
2014-08-26 22:53:11 +00:00
|
|
|
webHelpPage,
|
2017-02-26 09:44:23 +00:00
|
|
|
bModal
|
|
|
|
);
|
2014-06-09 19:55:14 +00:00
|
|
|
}
|