mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-04 02:33:14 +01: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:
@@ -39,6 +39,7 @@ hold information about one contributor to Audacity.
|
|||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
|
|
||||||
#include "FileNames.h"
|
#include "FileNames.h"
|
||||||
|
#include "HelpText.h"
|
||||||
#include "ShuttleGui.h"
|
#include "ShuttleGui.h"
|
||||||
#include "widgets/LinkingHtmlWindow.h"
|
#include "widgets/LinkingHtmlWindow.h"
|
||||||
|
|
||||||
@@ -69,39 +70,6 @@ hold information about one contributor to Audacity.
|
|||||||
|
|
||||||
extern wxString FormatHtmlText( const wxString & Text );
|
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()
|
void AboutDialog::CreateCreditsList()
|
||||||
{
|
{
|
||||||
// The Audacity Team: developers and support
|
// The Audacity Team: developers and support
|
||||||
|
|||||||
@@ -14,10 +14,6 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include "widgets/wxPanelWrapper.h" // to inherit
|
#include "widgets/wxPanelWrapper.h" // to inherit
|
||||||
|
|
||||||
extern const wxString VerCheckArgs();
|
|
||||||
extern const wxString VerCheckUrl();
|
|
||||||
extern const wxString VerCheckHtml();
|
|
||||||
|
|
||||||
class wxStaticBitmap;
|
class wxStaticBitmap;
|
||||||
|
|
||||||
class ShuttleGui;
|
class ShuttleGui;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
|
|
||||||
#include "FileNames.h"
|
#include "FileNames.h"
|
||||||
#include "AboutDialog.h"
|
#include "Internat.h"
|
||||||
#include "AllThemeResources.h"
|
#include "AllThemeResources.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -328,3 +328,35 @@ wxString FormatHtmlText( const wxString & Text ){
|
|||||||
WrapText( LinkExpand( Text ))+
|
WrapText( LinkExpand( Text ))+
|
||||||
wxT("</html>");
|
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();
|
||||||
|
}
|
||||||
|
|||||||
@@ -16,4 +16,8 @@ class wxString;
|
|||||||
wxString HelpText( const wxString & Key );
|
wxString HelpText( const wxString & Key );
|
||||||
wxString TitleText( const wxString & Key );
|
wxString TitleText( const wxString & Key );
|
||||||
|
|
||||||
|
extern const wxString VerCheckArgs();
|
||||||
|
extern const wxString VerCheckUrl();
|
||||||
|
extern const wxString VerCheckHtml();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
#include "../CrashReport.h"
|
#include "../CrashReport.h"
|
||||||
#include "../Dependencies.h"
|
#include "../Dependencies.h"
|
||||||
#include "../FileNames.h"
|
#include "../FileNames.h"
|
||||||
|
#include "../HelpText.h"
|
||||||
#include "../Project.h"
|
#include "../Project.h"
|
||||||
#include "../ShuttleGui.h"
|
#include "../ShuttleGui.h"
|
||||||
#include "../SplashDialog.h"
|
#include "../SplashDialog.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user