forked from audacity/audacity
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBatchPrefs.cpp
More file actions
112 lines (92 loc) · 2.52 KB
/
Copy pathBatchPrefs.cpp
File metadata and controls
112 lines (92 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
/**********************************************************************
Audacity: A Digital Audio Editor
BatchPrefs.cpp
Dominic Mazzoni
James Crook
*******************************************************************//**
\class BatchPrefs
\brief A probably unused PrefsPanel that in debug builds could offer a
setting used in debugging batch (aka macros) processing.
*//*******************************************************************/
#include "../Audacity.h"
#include "BatchPrefs.h"
#include <wx/defs.h>
#include <wx/intl.h>
#include <wx/textdlg.h>
#include "../Languages.h"
#include "../Prefs.h"
#include "../ShuttleGui.h"
BEGIN_EVENT_TABLE(BatchPrefs, PrefsPanel)
END_EVENT_TABLE()
/// Constructor
BatchPrefs::BatchPrefs(wxWindow * parent, wxWindowID winid):
PrefsPanel(parent, winid, XO("Batch"))
{
Populate();
}
ComponentInterfaceSymbol BatchPrefs::GetSymbol()
{
return BATCH_PREFS_PLUGIN_SYMBOL;
}
TranslatableString BatchPrefs::GetDescription()
{
return XO("Preferences for Batch");
}
wxString BatchPrefs::HelpPageName()
{
return "Batch_Preferences";
}
/// Creates the dialog and its contents.
void BatchPrefs::Populate( )
{
//------------------------- Main section --------------------
// Now construct the GUI itself.
// Use 'eIsCreatingFromPrefs' so that the GUI is
// initialised with values from gPrefs.
ShuttleGui S(this, eIsCreatingFromPrefs);
PopulateOrExchange(S);
// ----------------------- End of main section --------------
}
/// Defines the dialog and does data exchange with it.
void BatchPrefs::PopulateOrExchange( ShuttleGui & S )
{
S.SetBorder( 2 );
S.StartScroller();
S.StartHorizontalLay( wxEXPAND, 0 );
S.StartStatic( XO("Behaviors"),1 );
{
#ifdef _DEBUG
S.TieCheckBox( XXO("&Don't apply effects in batch mode"),
{wxT("/Batch/Debug"), false});
#endif
}
S.EndStatic();
S.EndHorizontalLay();
S.EndScroller();
return;
}
/// Send changed values back to Prefs, and update Audacity.
bool BatchPrefs::Commit()
{
ShuttleGui S( this, eIsSavingToPrefs );
PopulateOrExchange( S );
return true;
}
BatchPrefs::~BatchPrefs()
{
}
#if 0
namespace{
PrefsPanel::Registration sAttachment{ "Batch",
[](wxWindow *parent, wxWindowID winid, AudacityProject *)
{
wxASSERT(parent); // to justify safenew
return safenew BatchPrefs(parent, winid);
},
false,
// Register with an explicit ordering hint because this one is
// only conditionally compiled
{ "", { Registry::OrderingHint::Before, "KeyConfig" } }
};
}
#endif