Audacity 3.2.0
ApplicationPrefs.cpp
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 ApplicationPrefs.cpp
6
7 Anton Gerasimov
8
9
10*******************************************************************//*******************************************************************/
16
17
18#include "ApplicationPrefs.h"
20
21#include <wx/defs.h>
22#include <wx/hyperlink.h>
23
24#include "Prefs.h"
25#include "ShuttleGui.h"
26
28
30
32
33ApplicationPrefs::ApplicationPrefs(wxWindow * parent, wxWindowID winid)
34: PrefsPanel(parent, winid, XO("Application"))
35{
36 Populate();
37}
38
40{
41}
42
44{
46}
47
49{
50 return XO("Preferences for Application");
51}
52
54{
55 return "Application_Preferences";
56}
57
59{
60 //------------------------- Main section --------------------
61 // Now construct the GUI itself.
62 // Use 'eIsCreatingFromPrefs' so that the GUI is
63 // initialised with values from gPrefs.
66 // ----------------------- End of main section --------------
67}
68
70{
71 S.SetBorder(2);
72 S.StartScroller();
73
74 /* i18n-hint: Title for the update notifications panel in the preferences dialog. */
75 S.StartStatic(XO("Update notifications"));
76 {
77 S.TieCheckBox(
78 /* i18n-hint: Check-box title that configures periodic updates checking. */
79 XXC("&Check for updates", "application preferences"),
81
82 S.StartVerticalLay();
83 {
84 S.AddFixedText(XO(
85 "App update checking requires network access. In order to protect your privacy, Audacity does not store any personal information."),
86 false, 470);
87
88 /* i18n-hint: %s will be replaced with "our Privacy Policy" */
89 AccessibleLinksFormatter privacyPolicy(XO("See %s for more info."));
90
91 privacyPolicy.FormatLink(
92 /* i18n-hint: Title of hyperlink to the privacy policy. This is an object of "See". */
93 wxT("%s"), XO("our Privacy Policy"),
94 "https://www.audacityteam.org/about/desktop-privacy-notice/");
95
96 privacyPolicy.Populate(S);
97 }
98
99 S.EndVerticalLay();
100 }
101
102 S.EndStatic();
103 S.EndScroller();
104}
105
107{
110 DefaultUpdatesCheckingFlag->Invalidate();
111
112 return true;
113}
114
115namespace{
117 [](wxWindow *parent, wxWindowID winid, AudacityProject *)
118 {
119 wxASSERT(parent); // to justify safenew
120 return safenew ApplicationPrefs(parent, winid);
121 }
122};
123}
wxT("CloseDown"))
static ComponentInterfaceSymbol s_ComponentInterfaceSymbol
XO("Cut/Copy/Paste")
#define XXC(s, c)
Definition: Internat.h:47
#define safenew
Definition: MemoryX.h:10
StickySetting< BoolSetting > DefaultUpdatesCheckingFlag
Definition: Prefs.cpp:63
@ eIsCreatingFromPrefs
Definition: ShuttleGui.h:46
@ eIsSavingToPrefs
Definition: ShuttleGui.h:47
#define S(N)
Definition: ToChars.cpp:64
Declare a class that handles managing of updates.
A PrefsPanel to enable/disable certain general application options like checking updates,...
ManualPageID HelpPageName() override
If not empty string, the Help button is added below the panel.
void PopulateOrExchange(ShuttleGui &S) override
bool Commit() override
TranslatableString GetDescription() const override
ApplicationPrefs(wxWindow *parent, wxWindowID winid)
ComponentInterfaceSymbol GetSymbol() const override
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Base class for a panel in the PrefsDialog. Classes derived from this class include BatchPrefs,...
Definition: PrefsPanel.h:51
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640
Holds a msgid for the translation catalog; may also bind format arguments.