1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 16:10:06 +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

@ -39,6 +39,7 @@ hold information about one contributor to Audacity.
#include <wx/intl.h>
#include "FileNames.h"
#include "HelpText.h"
#include "ShuttleGui.h"
#include "widgets/LinkingHtmlWindow.h"
@ -69,39 +70,6 @@ hold information about one contributor to Audacity.
extern wxString FormatHtmlText( const wxString & Text );
// Function to give the xtra 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;
}
// 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();
}
// Text of htperlink to check versions.
const wxString VerCheckHtml(){
wxString result = "<center>[[";
result += VerCheckUrl() + "|" + _("Check Online");
result += "]]</center>\n";
return result;
}
void AboutDialog::CreateCreditsList()
{
// The Audacity Team: developers and support

View File

@ -14,10 +14,6 @@
#include <vector>
#include "widgets/wxPanelWrapper.h" // to inherit
extern const wxString VerCheckArgs();
extern const wxString VerCheckUrl();
extern const wxString VerCheckHtml();
class wxStaticBitmap;
class ShuttleGui;

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();
}

View File

@ -16,4 +16,8 @@ class wxString;
wxString HelpText( const wxString & Key );
wxString TitleText( const wxString & Key );
extern const wxString VerCheckArgs();
extern const wxString VerCheckUrl();
extern const wxString VerCheckHtml();
#endif

View File

@ -9,6 +9,7 @@
#include "../CrashReport.h"
#include "../Dependencies.h"
#include "../FileNames.h"
#include "../HelpText.h"
#include "../Project.h"
#include "../ShuttleGui.h"
#include "../SplashDialog.h"