15#include <wx/settings.h>
16#include <wx/mstream.h>
17#include <wx/sstream.h>
18#include <wx/txtstrm.h>
19#include <wx/hyperlink.h>
20#include <wx/checkbox.h>
22#include <wx/statbmp.h>
23#include <wx/stattext.h>
32#include "../images/WhatsNewBtn.jpeg.h"
33#include "../images/MuseHub.jpeg.h"
38#if defined (__WXOSX__) || defined(__WXMSW__)
42const char*
WhatsNewURL =
"https://audacityteam.org/3.6.0-video";
45#if defined(SHOW_MUSEHUB)
66 : mMemoryFSHandler(
std::make_unique<wxMemoryFSHandler>())
68 wxFileSystem::AddHandler(mMemoryFSHandler.get());
70 wxMemoryFSHandler::AddFile(
71 "whats_new_btn.jpeg", bin2c_whats_new_btn_jpeg,
72 sizeof(bin2c_whats_new_btn_jpeg));
73 wxMemoryFSHandler::AddFile(
74 "musehub.jpeg", bin2c_musehub_jpeg,
75 sizeof(bin2c_musehub_jpeg));
80 wxMemoryFSHandler::RemoveFile(
"whats_new_btn.jpeg");
81 wxMemoryFSHandler::RemoveFile(
"musehub.jpeg");
82 wxFileSystem::RemoveHandler(mMemoryFSHandler.get());
91 wxStringOutputStream o;
92 wxTextOutputStream s(o);
98 <<
wxT(R
"(<img src="memory:whats_new_btn.jpeg" width="263" height="148" /><br></a></p>)")
99 << wxT("<h3>") <<
XO(
"What's new in Audacity %s").Format(AUDACITY_VERSION_STRING) <<
wxT(
"</h3>")
101 <<
XO(
"Watch the [[%s|release video]] or read the [[https://support.audacityteam.org/additional-resources/changelog|changelog]] to learn more!</p>").Format(
WhatsNewURL);
108 wxStringOutputStream o;
109 wxTextOutputStream s(o);
112 <<
wxT(
"<p><center>")
115 <<
wxT(R
"(<img src="memory:musehub.jpeg" width="263" height="148" /><br></a></p>)")
116 << wxT("<h3>") <<
XO(
"Get free plugins & sounds")<<
wxT(
"</h3>")
117 <<
XO(
"<p>Check out our [[%s|Muse Hub app]] for a wide range of audio plugins for Audacity users</p>").Format(
MuseHubURL);
130#if defined(__WXOSX__)
136#if defined(__WXMSW__)
154 dialog->CenterOnParent();
155 dialog->wxDialogWrapper::Show();
160 bool showSplashScreen;
161 gPrefs->
Read(
wxT(
"/GUI/ShowSplashScreen"), &showSplashScreen,
true );
165 S.StartHorizontalLay(wxEXPAND);
170 whatsnew->SetBackgroundColour(
S.GetParent()->GetBackgroundColour());
173#if defined(SHOW_MUSEHUB)
174 .Position(wxEXPAND | wxLEFT | wxTOP | wxBOTTOM)
176 .Position(wxEXPAND | wxALL)
178 .AddWindow(whatsnew);
180#if defined(SHOW_MUSEHUB)
185 getplugins->SetBackgroundColour(
S.GetParent()->GetBackgroundColour());
188 .Position(wxEXPAND | wxTOP | wxRIGHT | wxBOTTOM)
189 .AddWindow(getplugins);
192 S.EndHorizontalLay();
194 const auto line =
safenew wxWindow(
S.GetParent(), wxID_ANY);
195 line->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW));
196 line->SetSize(-1, 1);
203 S.StartHorizontalLay(wxALIGN_CENTRE, 0);
206 const auto tutorialsLink =
safenew wxHyperlinkCtrl(
210 "https://support.audacityteam.org/");
212 .Position(wxTOP | wxBOTTOM)
213 .AddWindow(tutorialsLink);
217 const auto forumLink =
safenew wxHyperlinkCtrl(
220 _(
"Visit our forum"),
221 "https://forum.audacityteam.org/");
223 .Position(wxTOP | wxBOTTOM)
224 .AddWindow(forumLink);
226 S.EndHorizontalLay();
228 S.Position(wxEXPAND).StartPanel(2);
230 S.StartHorizontalLay(wxEXPAND);
234 .Position(wxALL | wxALIGN_CENTRE)
235 .AddCheckBox(
XXO(
"Don't show this again at start up"), !showSplashScreen);
241 .AddButton(
XXO(
"OK"), wxALL,
true);
243 S.EndHorizontalLay();
EVT_BUTTON(wxID_NO, DependencyDialog::OnNo) EVT_BUTTON(wxID_YES
XXO("&Cut/Copy/Paste Toolbar")
wxString FormatHtmlText(const wxString &Text)
audacity::BasicSettings * gPrefs
AUDACITY_DLL_API wxFrame & GetProjectFrame(AudacityProject &project)
Get the top-level window associated with the project (as a wxFrame only, when you do not need to use ...
AUDACITY_DLL_API AttachedWindows & GetAttachedWindows(AudacityProject &project)
accessors for certain important windows associated with each project
AttachedWindows::RegisteredFactory sWhatsNewWindow
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Subclass & Get(const RegisteredFactory &key)
Get reference to an attachment, creating on demand if not present, down-cast it to Subclass.
An HtmlWindow that handles linked clicked - usually the link will go to our own local copy of the man...
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
wxColour & Colour(int iIndex)
wxCheckBox * mDontShowAgain
void Populate(ShuttleGui &S)
static void Show(AudacityProject &project)
void OnOK(wxCommandEvent &)
~WhatsNewDialog() override
virtual bool Flush() noexcept=0
virtual bool Write(const wxString &key, bool value)=0
virtual bool Read(const wxString &key, bool *value) const =0
IMPORT_EXPORT_API ExportResult Show(ExportTask exportTask)
wxString MakeGetPluginsText()
constexpr auto WindowWidth
wxString MakeWhatsNewText()
std::unique_ptr< wxMemoryFSHandler > mMemoryFSHandler