Audacity 3.2.0
NoUpdatesAvailableDialog.cpp
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 @file NoUpdatesAvailableDialog.cpp
6 @brief Define a dialog with Information about no updates available.
7
8 Anton Gerasimov
9
10**********************************************************************/
11
13
14#include "HelpSystem.h"
15#include "ShuttleGui.h"
16
17#include "prefs/PrefsDialog.h"
19
20#include <wx/stattext.h>
21
22static const auto title =
23/* i18n-hint: Title of the dialog no updates available. */
24XO("No Updates Available");
25
29
32 parent, -1, XO("Check for Updates"), wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX)
33{
35
36 S.SetBorder(8);
37
38 S.StartVerticalLay();
39 {
40 S.AddSpace(0, 12);
41
42 S.StartHorizontalLay();
43 {
44 S.AddSpace(12, 0);
45
46 S.StartVerticalLay();
47 {
48 wxStaticText* titleCtrl = S.AddVariableText(title, false, 0, 500);
49
50 wxFont font = titleCtrl->GetFont().MakeLarger().MakeBold();
51
52 titleCtrl->SetFont(font);
53
54 AccessibleLinksFormatter preferencesMessage(
55 /* i18n-hint: %s is replaced with 'Preferences > Application'. */
56 XO("If you want to change your preference for automatic updates checking, you can find it in %s."));
57
58 preferencesMessage.FormatLink(
59 /* i18n-hint: Hyperlink title that opens Preferences dialog on Application page and is substituted into "... you can find it in %s." string. */
60 wxT("%s"), XO("Preferences > Application"), [parent, this]() {
61 EndModal(wxID_OK);
62
63 GlobalPrefsDialog dialog(parent, nullptr);
64
65 dialog.SelectPageByName(XO("Application").Translation());
66 dialog.ShowModal();
67 });
68
69 preferencesMessage.Populate(S);
70 }
71 S.EndVerticalLay();
72
73 S.AddSpace(12, 0);
74 }
75 S.EndHorizontalLay();
76
77 S.AddSpace(0, 12);
78
79 S.AddStandardButtons(eOkButton);
80 }
81 S.EndVerticalLay();
82
83 Layout();
84 Fit();
85 Center();
86}
87
89{
90 ;
91}
92
93void NoUpdatesAvailableDialog::OnOk(wxCommandEvent&)
94{
95 EndModal(wxID_OK);
96}
wxT("CloseDown"))
END_EVENT_TABLE()
EVT_BUTTON(wxID_NO, DependencyDialog::OnNo) EVT_BUTTON(wxID_YES
XO("Cut/Copy/Paste")
static const auto title
@ eIsCreating
Definition: ShuttleGui.h:37
@ eOkButton
Definition: ShuttleGui.h:609
for(int ii=0, nn=names.size();ii< nn;++ii)
#define S(N)
Definition: ToChars.cpp:64
Information dialog about no updates available, that allows to navigate to settings quickly.
void OnOk(wxCommandEvent &event)
void SelectPageByName(const wxString &pageName)
int ShowModal() override
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640