mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-10 09:01:13 +02:00
The last of Steve's set of 'essential' patches for 2.0.6, committed as a result of code review and others saying it is OK, rather than full testing.
There are other patches od Steve's awaiting testing.
This commit is contained in:
parent
07f1c22c38
commit
74763375fc
@ -37,8 +37,14 @@
|
||||
#include "HelpSystem.h"
|
||||
|
||||
const wxString HelpSystem::HelpHostname = wxT("manual.audacityteam.org");
|
||||
const wxString HelpSystem::HelpServerDir = wxT("/o/man/");
|
||||
const wxString HelpSystem::HelpAlphaDir = wxT("/man/");
|
||||
#if IS_ALPHA
|
||||
const wxString HelpSystem::HelpServerHomeDir = wxT("/man/");
|
||||
const wxString HelpSystem::HelpServerManDir = wxT("/man/");
|
||||
#else
|
||||
const wxString HelpSystem::HelpServerHomeDir = wxT("/o/");
|
||||
const wxString HelpSystem::HelpServerManDir = wxT("/o/man/");
|
||||
#endif
|
||||
const wxString HelpSystem::LocalHelpManDir = wxT("/man/");
|
||||
const wxString HelpSystem::ReleaseSuffix = wxT(".html");
|
||||
|
||||
/// Mostly we use this so that we have the code for resizability
|
||||
@ -233,6 +239,7 @@ void HelpSystem::ShowHelpDialog(wxWindow *parent,
|
||||
bool bModal)
|
||||
{
|
||||
wxString localHelpPage;
|
||||
wxString webHelpPath;
|
||||
wxString webHelpPage;
|
||||
wxString releasePageName;
|
||||
wxString anchor; // optional part of URL after (and including) the '#'
|
||||
@ -261,16 +268,19 @@ void HelpSystem::ShowHelpDialog(wxWindow *parent,
|
||||
// the root of the help directory rather than the "/man/" sub-directory.
|
||||
if (releasePageName == wxT("Main_Page"))
|
||||
{
|
||||
// FIXME: Needs to be outside /man/ directory for release manual.
|
||||
releasePageName = wxT("index") + HelpSystem::ReleaseSuffix + anchor;
|
||||
localHelpPage = wxFileName(FileNames::HtmlHelpDir(), releasePageName).GetFullPath();
|
||||
webHelpPath = wxT("http://")+HelpSystem::HelpHostname+HelpSystem::HelpServerHomeDir;
|
||||
}
|
||||
else if (releasePageName == wxT("Quick_Help"))
|
||||
{
|
||||
// FIXME: Needs to be outside /man/ directory for release manual.
|
||||
releasePageName = wxT("quick_help") + HelpSystem::ReleaseSuffix + anchor;
|
||||
localHelpPage = wxFileName(FileNames::HtmlHelpDir(), releasePageName).GetFullPath();
|
||||
webHelpPath = wxT("http://")+HelpSystem::HelpHostname+HelpSystem::HelpServerHomeDir;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Handle all other pages.
|
||||
// Change to lower case.
|
||||
releasePageName = releasePageName.Lower();
|
||||
wxRegEx re;
|
||||
@ -287,18 +297,23 @@ void HelpSystem::ShowHelpDialog(wxWindow *parent,
|
||||
releasePageName.Replace(wxT("_."), wxT("."), true);
|
||||
// Concatenate file name with file extension and anchor.
|
||||
releasePageName = releasePageName + HelpSystem::ReleaseSuffix + anchor;
|
||||
// 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'.
|
||||
webHelpPath = wxT("http://")+HelpSystem::HelpHostname+HelpSystem::HelpServerManDir;
|
||||
}
|
||||
|
||||
localHelpPage = wxFileName(FileNames::HtmlHelpDir()+wxT("/man/"), releasePageName).GetFullPath();
|
||||
|
||||
#if IS_ALPHA
|
||||
webHelpPage = wxT("http://")+HelpSystem::HelpHostname+HelpSystem::HelpAlphaDir+PageName;
|
||||
webHelpPage = webHelpPath + PageName;
|
||||
#else
|
||||
webHelpPage = wxT("http://")+HelpSystem::HelpHostname+HelpSystem::HelpServerDir+releasePageName;
|
||||
webHelpPage = webHelpPath + releasePageName;
|
||||
#endif
|
||||
|
||||
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());
|
||||
|
||||
HelpSystem::ShowHelpDialog(
|
||||
parent,
|
||||
localHelpPage,
|
||||
|
@ -76,12 +76,22 @@ public:
|
||||
/// Hostname (domain name including subdomain) of the server on which the
|
||||
/// online help is available
|
||||
static const wxString HelpHostname;
|
||||
/// URL path on the help server under which the help pages are located. Must
|
||||
/// both start and end with '/' characters.
|
||||
static const wxString HelpServerDir;
|
||||
/// URL path on the help server under which the development help pages are
|
||||
/// located. Must both start and end with '/' characters.
|
||||
static const wxString HelpAlphaDir;
|
||||
|
||||
/// URL path on the help server to the root directory of the manual.
|
||||
/// index and quick_help are here in the on-line release manual.
|
||||
/// Must both start and end with '/' characters.
|
||||
static const wxString HelpServerHomeDir;
|
||||
|
||||
/// Path to sub-directory where the manual pages are located.
|
||||
/// index and quick_help are here only in the alpha manual.
|
||||
/// Must both start and end with '/' characters.
|
||||
static const wxString HelpServerManDir;
|
||||
|
||||
/// Sub-directory for local help pages (but not index.html
|
||||
/// or quick_help.html)
|
||||
/// Must both start and end with '/' characters.
|
||||
static const wxString LocalHelpManDir;
|
||||
|
||||
/// The string which is appended to the development manual page name in order
|
||||
/// obtain the file name in the local and release web copies of the manual
|
||||
static const wxString ReleaseSuffix;
|
||||
|
Loading…
x
Reference in New Issue
Block a user