Audacity 3.2.0
ImportExportPrefs.cpp
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 ImportExportPrefs.cpp
6
7 Joshua Haberman
8 Dominic Mazzoni
9 James Crook
10
11*******************************************************************//*******************************************************************/
17
18
19#include "ImportExportPrefs.h"
20
21#include <wx/defs.h>
22
23#include "Prefs.h"
24#include "ShuttleGui.h"
25
26ImportExportPrefs::ImportExportPrefs(wxWindow * parent, wxWindowID winid)
27: PrefsPanel(parent, winid, XO("Import / Export"))
28{
29 Populate();
30}
31
33{
34}
35
37{
39}
40
42{
43 return XO("Preferences for ImportExport");
44}
45
47{
48 return "Import_-_Export_Preferences";
49}
50
53{
54 //------------------------- Main section --------------------
55 // Now construct the GUI itself.
56 // Use 'eIsCreatingFromPrefs' so that the GUI is
57 // initialised with values from gPrefs.
60 // ----------------------- End of main section --------------
61}
62
64 wxT("/FileFormats/ExportDownMixChoice"),
65 {
66 EnumValueSymbol{ wxT("MixDown"), XXO("&Mix down to Stereo or Mono") },
67 EnumValueSymbol{ wxT("Custom"), XXO("&Use Advanced Mixing Options") },
68 },
69 0, // true
70
71 // for migrating old preferences:
72 {
73 true, false,
74 },
75 wxT("/FileFormats/ExportDownMix"),
76};
77
79 wxT("/FileFormats/LabelStyleChoice"),
80 {
81 EnumValueSymbol{ wxT("Standard"), XXO("S&tandard") },
82 EnumValueSymbol{ wxT("Extended"), XXO("E&xtended (with frequency ranges)") },
83 },
84 0, // true
85
86 {
87 true, false,
88 },
89};
90
92 wxT("/FileFormats/AllegroStyleChoice"),
93 {
94 EnumValueSymbol{ wxT("Seconds"), XXO("&Seconds") },
95 EnumValueSymbol{ wxT("Beats"), XXO("&Beats") },
96 },
97 0, // true
98
99 // for migrating old preferences:
100 {
101 true, false,
102 },
103 wxT("/FileFormats/AllegroStyle"),
104};
105
107{
108 S.SetBorder(2);
109 S.StartScroller();
110
111 S.StartStatic(XO("When exporting tracks to an audio file"));
112 {
113 // Bug 2692: Place button group in panel so tabbing will work and,
114 // on the Mac, VoiceOver will announce as radio buttons.
115 S.StartPanel();
116 {
117 S.StartRadioButtonGroup(ImportExportPrefs::ExportDownMixSetting);
118 {
119 S.TieRadioButton();
120 S.TieRadioButton();
121 }
122 S.EndRadioButtonGroup();
123 }
124 S.EndPanel();
125
126 S.TieCheckBox(XXO("S&how Metadata Tags editor before export"),
127 {wxT("/AudioFiles/ShowId3Dialog"),
128 true});
129 /* i18n-hint 'blank space' is space on the tracks with no audio in it*/
130 S.TieCheckBox(XXO("&Ignore blank space at the beginning"),
131 {wxT("/AudioFiles/SkipSilenceAtBeginning"),
132 false});
133 }
134 S.EndStatic();
135
136 S.StartStatic(XO("Exported Label Style:"));
137 {
138 // Bug 2692: Place button group in panel so tabbing will work and,
139 // on the Mac, VoiceOver will announce as radio buttons.
140 S.StartPanel();
141 {
142 S.StartRadioButtonGroup(ImportExportPrefs::LabelStyleSetting);
143 {
144 S.TieRadioButton();
145 S.TieRadioButton();
146 }
147 S.EndRadioButtonGroup();
148 }
149 S.EndPanel();
150 }
151 S.EndStatic();
152
153#ifdef USE_MIDI
154 S.StartStatic(XO("Exported Allegro (.gro) files save time as:"));
155 {
156 // Bug 2692: Place button group in panel so tabbing will work and,
157 // on the Mac, VoiceOver will announce as radio buttons.
158 S.StartPanel();
159 {
160 S.StartRadioButtonGroup(ImportExportPrefs::AllegroStyleSetting);
161 {
162 S.TieRadioButton();
163 S.TieRadioButton();
164 }
165 S.EndRadioButtonGroup();
166 }
167 S.EndPanel();
168 }
169 S.EndStatic();
170#endif
171 S.EndScroller();
172}
173
175{
178
179 return true;
180}
181
182namespace{
184 [](wxWindow *parent, wxWindowID winid, AudacityProject *)
185 {
186 wxASSERT(parent); // to justify safenew
187 return safenew ImportExportPrefs(parent, winid);
188 }
189};
190}
wxT("CloseDown"))
XO("Cut/Copy/Paste")
XXO("&Cut/Copy/Paste Toolbar")
#define IMPORT_EXPORT_PREFS_PLUGIN_SYMBOL
#define safenew
Definition: MemoryX.h:10
@ eIsCreatingFromPrefs
Definition: ShuttleGui.h:46
@ eIsSavingToPrefs
Definition: ShuttleGui.h:47
#define S(N)
Definition: ToChars.cpp:64
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,...
A PrefsPanel used to select import and export options.
void Populate()
Creates the dialog and its contents.
ImportExportPrefs(wxWindow *parent, wxWindowID winid)
bool Commit() override
void PopulateOrExchange(ShuttleGui &S) override
ManualPageID HelpPageName() override
If not empty string, the Help button is added below the panel.
TranslatableString GetDescription() const override
static EnumSetting< bool > LabelStyleSetting
ComponentInterfaceSymbol GetSymbol() const override
static EnumSetting< bool > AllegroStyleSetting
static EnumSetting< bool > ExportDownMixSetting
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:625
Holds a msgid for the translation catalog; may also bind format arguments.