Audacity 3.2.0
WarningsPrefs.cpp
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 WarningsPrefs.cpp
6
7 Brian Gunlogson
8 Joshua Haberman
9 Dominic Mazzoni
10 James Crook
11
12
13*******************************************************************//*******************************************************************/
19
20
21#include "WarningsPrefs.h"
22
23#include <wx/defs.h>
24
25#include "Prefs.h"
26#include "ShuttleGui.h"
27
29
30WarningsPrefs::WarningsPrefs(wxWindow * parent, wxWindowID winid)
31: PrefsPanel(parent, winid, XO("Warnings"))
32{
33 Populate();
34}
35
37{
38}
39
41{
43}
44
46{
47 return XO("Preferences for Warnings");
48}
49
51{
52 return "Warnings_Preferences";
53}
54
56{
57 //------------------------- Main section --------------------
58 // Now construct the GUI itself.
59 // Use 'eIsCreatingFromPrefs' so that the GUI is
60 // initialised with values from gPrefs.
63 // ----------------------- End of main section --------------
64}
65
67{
68 S.SetBorder(2);
69 S.StartScroller();
70
71 S.StartStatic(XO("Show Warnings/Prompts for"));
72 {
73 S.TieCheckBox(XXO("Saving &projects versus exporting audio"),
74 {wxT("/Warnings/FirstProjectSave"),
75 true});
76 S.TieCheckBox(XXO("Saving &empty project"),
77 {wxT("/GUI/EmptyCanBeDirty"),
78 true});
79 }
80 S.EndStatic();
81 S.EndScroller();
82
83}
84
86{
89
90 return true;
91}
92
93namespace{
95 [](wxWindow *parent, wxWindowID winid, AudacityProject *)
96 {
97 wxASSERT(parent); // to justify safenew
98 return safenew WarningsPrefs(parent, winid);
99 }
100};
101}
wxT("CloseDown"))
XO("Cut/Copy/Paste")
XXO("&Cut/Copy/Paste Toolbar")
#define safenew
Definition: MemoryX.h:9
@ eIsCreatingFromPrefs
Definition: ShuttleGui.h:46
@ eIsSavingToPrefs
Definition: ShuttleGui.h:47
#define S(N)
Definition: ToChars.cpp:64
#define WARNINGS_PREFS_PLUGIN_SYMBOL
Definition: WarningsPrefs.h:22
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.
A PrefsPanel to enable/disable certain warning messages.
Definition: WarningsPrefs.h:25
WarningsPrefs(wxWindow *parent, wxWindowID winid)
ComponentInterfaceSymbol GetSymbol() const override
ManualPageID HelpPageName() override
If not empty string, the Help button is added below the panel.
void PopulateOrExchange(ShuttleGui &S) override
TranslatableString GetDescription() const override
bool Commit() override
PrefsPanel::Registration sAttachment