17#include <wx/sstream.h>
18#include <wx/txtstrm.h>
19#include <wx/display.h>
33 wxDefaultPosition, wxDefaultSize,
35 mVersionPatch(versionPatch)
39 S.StartVerticalLay (wxEXPAND, 1);
41 S.AddWindow (AddHtmlContent (
S.GetParent()));
43 S.StartHorizontalLay (wxEXPAND, 0);
47 if (configurableNotification)
50 XO(
"Don't show this again at start up"),
54 S.Prop(1).AddSpace(1, 0, 1);
56 S.Id (wxID_NO).AddButton (
XC (
"&Skip",
"update dialog"));
57 S.Id (wxID_YES).AddButton (
XC(
"&Install update",
"update dialog"));
69 wxSize sz = GetSize();
70 const auto maxHeight = std::max(1, wxDisplay().GetGeometry().GetHeight() - 100);
71 const auto minHeight =
std::min({ sz.y, 600, maxHeight });
72 SetSizeHints(sz.x, minHeight, wxDefaultCoord, maxHeight);
97 wxStringOutputStream o;
98 wxTextOutputStream informationStr (o);
100#if AUDACITY_BUILD_LEVEL == 0
101 const auto versionPostfix =
" Alpha";
102#elif AUDACITY_BUILD_LEVEL == 1
103 const auto versionPostfix =
" Beta";
105 const auto versionPostfix =
"";
109 <<
wxT(
"<html><body><h3>")
111 <<
XC(
"Audacity %s is available!",
"update dialog")
116 <<
XC(
"Changelog",
"update dialog")
119 informationStr <<
wxT(
"<ul>");
122 informationStr <<
wxT(
"<li>");
124 informationStr << logLine;
125 informationStr <<
wxT(
"</li>");
127 informationStr <<
wxT(
"</ul></p>");
129 informationStr <<
wxT(
"<p>");
130 informationStr <<
wxT(
"<a href = \"https://github.com/audacity/audacity/releases\">");
131 informationStr <<
XC(
"Read more on GitHub",
"update dialog");
132 informationStr <<
wxT(
"</a>");
133 informationStr <<
wxT(
"</p>");
135 informationStr <<
wxT(
"</body></html>");
140 wxHW_SCROLLBAR_AUTO );
142 html->SetBorders (20);
143 html->SetPage (o.GetString());
145 wxHtmlContainerCell* cell = html->GetInternalRepresentation();
149 const wxSize
size = wxSize (500, cell->GetHeight());
151 html->SetMinSize (
size);
152 html->SetMaxSize (
size);
153 html->SetSize (
size);
EVT_BUTTON(wxID_NO, DependencyDialog::OnNo) EVT_BUTTON(wxID_YES
StickySetting< BoolSetting > DefaultUpdatesCheckingFlag
Declare a class that handles managing of updates.
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.
wxString GetString() const
Make string with version by MakeString() from instance values.
A structure that describes patch fields.