mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-21 06:01:13 +02:00
Sync with DarkAudacity
This commit is contained in:
@@ -19,15 +19,23 @@
|
||||
#include "HelpText.h"
|
||||
#include "FileNames.h"
|
||||
#include "AboutDialog.h"
|
||||
#include "AllThemeResources.h"
|
||||
|
||||
|
||||
wxString HtmlColourOfIndex( int i ){
|
||||
wxColour c = theTheme.Colour(i);
|
||||
return wxString::Format("\"#%02X%02X%02X\"",
|
||||
c.Red(), c.Green(), c.Blue() );
|
||||
}
|
||||
|
||||
static wxString WrapText( const wxString & Text )
|
||||
{
|
||||
return wxString(wxT(""))+
|
||||
wxT("<html><head></head>") +
|
||||
wxT("<body bgcolor=\"#ffffff\">") +
|
||||
wxT("<body bgcolor=") + HtmlColourOfIndex(clrTrackInfo) + wxT(">") +
|
||||
wxT("<font color=") + HtmlColourOfIndex(clrTrackPanelText) + wxT(">") +
|
||||
wxT("<p>") + Text +
|
||||
wxT("</font>")+
|
||||
wxT("</body></html>");
|
||||
}
|
||||
|
||||
@@ -90,6 +98,7 @@ static wxString LinkExpand( const wxString & Text )
|
||||
Key = Key.Mid( 0, j );
|
||||
LinkText = LinkText.Mid( 0, k );
|
||||
|
||||
LinkText=wxString("<font color=") + HtmlColourOfIndex(clrSample) + wxT(">") +LinkText+"</font>";
|
||||
wxString Replacement;
|
||||
if( Key.StartsWith( wxT("wiki:") ))
|
||||
{
|
||||
@@ -116,6 +125,7 @@ static wxString LinkExpand( const wxString & Text )
|
||||
Replacement = Link( Key, LinkText );
|
||||
}
|
||||
|
||||
|
||||
Temp = Temp.Mid( 0, i ) + Replacement + Temp.Mid( i + j + k + 5 );// 5 for the [[|]]
|
||||
}
|
||||
return Temp;
|
||||
@@ -190,7 +200,7 @@ static wxString HelpTextBuiltIn( const wxString & Key )
|
||||
if(Key==wxT("welcome"))
|
||||
{
|
||||
/// TO-DO: Make the links to help here use the widgets/HelpSystem mechanism
|
||||
/// so that they are consistent
|
||||
/// so that they are consistent
|
||||
/* i18n-hint: Preserve [[file:quick_help.html as it's the name of a file.*/
|
||||
wxString result =
|
||||
wxString(wxT("")) +
|
||||
@@ -200,7 +210,20 @@ static wxString HelpTextBuiltIn( const wxString & Key )
|
||||
_("<br><br>The version of Audacity you are using is an <b>Alpha test version</b>.") + " " +
|
||||
_("We strongly recommend that you use our latest stable released version, which has full documentation and support.<br><br>")+
|
||||
_("You can help us get Audacity ready for release by joining our [[http://www.audacityteam.org/community/|community]].<hr><br><br>")+
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// DA: Support methods text.
|
||||
#ifdef EXPERIMENTAL_DA
|
||||
wxT("<center><h3>DarkAudacity ") + AUDACITY_VERSION_STRING + wxT("</h3></center>") +
|
||||
_("<br><br>DarkAudacity is based on Audacity:") + wxT("<ul><li>") +
|
||||
_(" [[http://www.darkaudacity.com|www.darkaudacity.com]] - for differences between them.") + wxT("</li><li>") +
|
||||
_(" email to [[mailto:james@audacityteam.org|james@audacityteam.org]] - for help using DarkAudacity.") + wxT("</li><li>") +
|
||||
_(" [[http://www.darkaudacity.com/video.html|Tutorials]] - for getting started with DarkAudacity.") + wxT("</li></ul>") +
|
||||
|
||||
wxT("<br><br>Audacity has these support methods:") + wxT("<ul><li>") +
|
||||
wxT(" [[http://manual.audacityteam.org/|Manual]] - for comprehensive Audacity documentation") + wxT("</li><li>") +
|
||||
wxT(" [[http://forum.audacityteam.org/|Forum]] - for large knowledge base on using Audacity.") + wxT("</li></ul>");
|
||||
#else
|
||||
wxT("<center><h3>Audacity ") + AUDACITY_VERSION_STRING + wxT("</h3><h3>") +
|
||||
_("How to get help") + wxT("</h3></center>") +
|
||||
_("These are our support methods:") + wxT("<p><ul><li>") +
|
||||
@@ -208,6 +231,7 @@ static wxString HelpTextBuiltIn( const wxString & Key )
|
||||
_(" [[file:index.html|Manual]] - if not installed locally, [[http://manual.audacityteam.org/|view online]]") + wxT("</li><li>") +
|
||||
_(" [[http://forum.audacityteam.org/|Forum]] - ask your question directly, online.") + wxT("</li></ul></p><p>") + wxT("<b>") +
|
||||
_("More:</b> Visit our [[http://wiki.audacityteam.org/index.php|Wiki]] for tips, tricks, extra tutorials and effects plug-ins.") + wxT("</p>");
|
||||
#endif
|
||||
|
||||
#if IS_ALPHA
|
||||
result.Replace( "//manual.audacityteam.org/quick_help.html","//alphamanual.audacityteam.org/man/Quick_Help" );
|
||||
@@ -237,12 +261,20 @@ audio CDs]].") + wxT("</p>")
|
||||
if(Key == wxT("remotehelp") )
|
||||
{
|
||||
// *URL* will be replaced by whatever URL we are looking for.
|
||||
// DA: View the manual on line is expected.
|
||||
#ifdef EXPERIMENTAL_DA
|
||||
return WrapText(_("The Manual does not appear to be installed. \
|
||||
Please [[*URL*|view the Manual online]].<br><br>\
|
||||
To always view the Manual online, change \"Location of Manual\" in \
|
||||
Interface Preferences to \"From Internet\".")
|
||||
#else
|
||||
return WrapText(_("The Manual does not appear to be installed. \
|
||||
Please [[*URL*|view the Manual online]] or \
|
||||
[[http://manual.audacityteam.org/man/unzipping_the_manual.html| \
|
||||
download the Manual]].<br><br>\
|
||||
To always view the Manual online, change \"Location of Manual\" in \
|
||||
Interface Preferences to \"From Internet\".")
|
||||
#endif
|
||||
);
|
||||
}
|
||||
return wxT("");
|
||||
@@ -267,6 +299,7 @@ wxString HelpText( const wxString & Key )
|
||||
return WrapText( Key );
|
||||
}
|
||||
|
||||
|
||||
wxString FormatHtmlText( const wxString & Text ){
|
||||
|
||||
wxString localeStr = wxLocale::GetSystemEncodingName();
|
||||
|
Reference in New Issue
Block a user