Audacity 3.2.0
Public Member Functions | Private Member Functions | List of all members
UpdateNoticeDialog Class Referencefinal

Dialog, that notifies the users about automatic updates checking. More...

#include <UpdateNoticeDialog.h>

Inheritance diagram for UpdateNoticeDialog:
[legend]
Collaboration diagram for UpdateNoticeDialog:
[legend]

Public Member Functions

 UpdateNoticeDialog (wxWindow *parent)
 
- Public Member Functions inherited from wxDialogWrapper
 wxDialogWrapper ()
 
 wxDialogWrapper (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog"))
 
bool Create (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog"))
 
void SetTitle (const TranslatableString &title)
 
void SetLabel (const TranslatableString &title)
 
void SetName (const TranslatableString &title)
 
void SetName ()
 
- Public Member Functions inherited from wxTabTraversalWrapper< wxDialog >
 wxTabTraversalWrapper (Args &&... args)
 
 wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete
 
 wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete
 
wxTabTraversalWrapperoperator= (const wxTabTraversalWrapper &)=delete
 
wxTabTraversalWrapperoperator= (wxTabTraversalWrapper &&)=delete
 

Private Member Functions

void OnOk (wxCommandEvent &)
 
void OnSize (wxSizeEvent &)
 

Detailed Description

Dialog, that notifies the users about automatic updates checking.

Definition at line 20 of file UpdateNoticeDialog.h.

Constructor & Destructor Documentation

◆ UpdateNoticeDialog()

UpdateNoticeDialog::UpdateNoticeDialog ( wxWindow *  parent)
explicit

Definition at line 47 of file UpdateNoticeDialog.cpp.

49 /* i18n-hint: Title of the app update notice dialog. */
50 parent, -1, XO("App updates"), wxDefaultPosition, wxDefaultSize,
51 wxCAPTION | wxCLOSE_BOX)
52{
54
55 S.StartVerticalLay();
56 {
57 S.AddSpace(0, 16);
58
59 S.StartHorizontalLay(wxEXPAND, 0);
60 {
61 S.AddSpace(24, 0);
62
63 S.StartPanel();
64 {
65 S.SetBorder(8);
66
67 wxStaticText* titleCtrl = S.AddVariableText(title, false, 0, 500);
68
69 wxFont font = titleCtrl->GetFont().MakeLarger().MakeBold();
70
71 titleCtrl->SetFont(font);
72
73 S.AddFixedText(firstParagraph, false, 500);
74
75 S.AddFixedText(secondParagraph, false, 500);
76
77 S.AddSpace(0, 8);
78
79 /* i18n-hint: %s will be replaced with "our Privacy Policy" */
80 AccessibleLinksFormatter privacyPolicy(XO("See %s for more info."));
81
82 privacyPolicy.FormatLink(
83 /* i18n-hint: Title of hyperlink to the privacy policy. This is an object of "See". */
84 wxT("%s"), XO("our Privacy Policy"),
85 "https://www.audacityteam.org/about/desktop-privacy-notice/");
86
87 privacyPolicy.Populate(S);
88
89 AccessibleLinksFormatter preferencesMessage(thirdParagraph);
90
91 preferencesMessage.FormatLink(
92 // i18n-hint: a page in the Preferences dialog; use same name
93 wxT("%s"), XO("Preferences > Application"), [this]() {
94 GlobalPrefsDialog dialog(this /* parent */, nullptr);
95
96 dialog.SelectPageByName(XO("Application").Translation());
97 dialog.ShowModal();
98 });
99
100 preferencesMessage.Populate(S);
101 }
102 S.EndPanel();
103
104 S.AddSpace(24, 0);
105 }
106 S.EndHorizontalLay();
107
108 S.StartHorizontalLay(wxEXPAND);
109 {
110 S.AddSpace(1, 0, 1);
111
112 S.Id(wxID_OK).AddButton(XO("&OK"))->SetFocus();
113
114 S.AddSpace(8, 0);
115 }
116 S.EndHorizontalLay();
117 }
118
119 S.EndVerticalLay();
120
121 Fit();
122 Layout();
123
124 Center();
125}
wxT("CloseDown"))
XO("Cut/Copy/Paste")
@ eIsCreating
Definition: ShuttleGui.h:37
#define S(N)
Definition: ToChars.cpp:64
static const auto title
static const auto firstParagraph
static const auto secondParagraph
static const auto thirdParagraph
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640
void SetFocus(const WindowPlacement &focus)
Set the window that accepts keyboard input.
Definition: BasicUI.h:392

References eIsCreating, firstParagraph, AccessibleLinksFormatter::FormatLink(), AccessibleLinksFormatter::Populate(), S, secondParagraph, PrefsDialog::SelectPageByName(), BasicUI::SetFocus(), PrefsDialog::ShowModal(), thirdParagraph, title, wxT(), and XO().

Here is the call graph for this function:

Member Function Documentation

◆ OnOk()

void UpdateNoticeDialog::OnOk ( wxCommandEvent &  )
private

Definition at line 127 of file UpdateNoticeDialog.cpp.

128{
129 EndModal(wxOK);
130}

◆ OnSize()

void UpdateNoticeDialog::OnSize ( wxSizeEvent &  )
private

Definition at line 132 of file UpdateNoticeDialog.cpp.

133{
134 Fit();
135 Layout();
136}

The documentation for this class was generated from the following files: