1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-21 06:01:13 +02:00

HelpText.cpp has fewer dependencies...

... freeing it to a low level and AboutDialog.cpp to a high level, by moving
functions from the latter into the former
This commit is contained in:
Paul Licameli
2019-05-11 07:18:24 -04:00
parent 4da02d667f
commit 56b1d531b2
5 changed files with 39 additions and 38 deletions

View File

@@ -21,7 +21,7 @@
#include <wx/intl.h>
#include "FileNames.h"
#include "AboutDialog.h"
#include "Internat.h"
#include "AllThemeResources.h"
@@ -328,3 +328,35 @@ wxString FormatHtmlText( const wxString & Text ){
WrapText( LinkExpand( Text ))+
wxT("</html>");
}
// Function to give the extra arguments to put on the version check string.
const wxString VerCheckArgs(){
wxString result = wxString("from_ver=") + AUDACITY_VERSION_STRING;
#ifdef REV_LONG
result += wxString("&CommitId=")+wxString(REV_LONG).Left(6);
#endif
result += wxString("&Time=") + wxString( __DATE__ ) + wxString( __TIME__ );
result.Replace(" ","");
return result;
}
// Text of hyperlink to check versions.
const wxString VerCheckHtml(){
wxString result = "<center>[[";
result += VerCheckUrl() + "|" + _("Check Online");
result += "]]</center>\n";
return result;
}
// Url with Version check args attached.
const wxString VerCheckUrl(){
//The version we intend to use for live Audacity.
#define VER_CHECK_URL "https://www.audacityteam.org/download/?"
//For testing of our scriptlet.
//#define VER_CHECK_URL "http://www.audacityteam.org/slug/?"
//For testing locally
//#define VER_CHECK_URL "http://localhost:63342/WorkingDocs/demos/download.html?"
return wxString( wxT(VER_CHECK_URL)) +VerCheckArgs();
}