mirror of
https://github.com/cookiengineer/audacity
synced 2026-03-07 23:15:36 +01:00
Start of module prefs. (work in progress). Linux will need the makefile updating.
This commit is contained in:
89
src/prefs/ModulePrefs.cpp
Normal file
89
src/prefs/ModulePrefs.cpp
Normal file
@@ -0,0 +1,89 @@
|
||||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
ModulePrefs.cpp
|
||||
|
||||
Brian Gunlogson
|
||||
Joshua Haberman
|
||||
Dominic Mazzoni
|
||||
James Crook
|
||||
|
||||
|
||||
*******************************************************************//**
|
||||
|
||||
\class ModulePrefs
|
||||
\brief A PrefsPanel to enable/disable certain modules.
|
||||
|
||||
*//*******************************************************************/
|
||||
|
||||
#include "../Audacity.h"
|
||||
|
||||
#include <wx/defs.h>
|
||||
|
||||
#include "../ShuttleGui.h"
|
||||
|
||||
#include "ModulePrefs.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ModulePrefs::ModulePrefs(wxWindow * parent)
|
||||
: PrefsPanel(parent, _("Modules"))
|
||||
{
|
||||
Populate();
|
||||
}
|
||||
|
||||
ModulePrefs::~ModulePrefs()
|
||||
{
|
||||
}
|
||||
|
||||
void ModulePrefs::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 --------------
|
||||
}
|
||||
|
||||
void ModulePrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
{
|
||||
S.SetBorder(2);
|
||||
|
||||
S.StartStatic(_("Enable these Modules (if present)"));
|
||||
{
|
||||
S.AddFixedText(_("These are experimental. Only enable them if you've read the manual\nand know what you are doing") );
|
||||
S.TieCheckBox(_("mod-script-pipe"),
|
||||
wxT("/Module/mod-script-pipe"),
|
||||
false);
|
||||
S.TieCheckBox(_("mod-nyq-bench"),
|
||||
wxT("/Module/mod-nyq-bench"),
|
||||
false);
|
||||
S.TieCheckBox(_("mod-track-panel"),
|
||||
wxT("/Module/mod-track-panel"),
|
||||
false);
|
||||
}
|
||||
S.EndStatic();
|
||||
}
|
||||
|
||||
bool ModulePrefs::Apply()
|
||||
{
|
||||
ShuttleGui S(this, eIsSavingToPrefs);
|
||||
PopulateOrExchange(S);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// Indentation settings for Vim and Emacs and unique identifier for Arch, a
|
||||
// version control system. Please do not modify past this point.
|
||||
//
|
||||
// Local Variables:
|
||||
// c-basic-offset: 3
|
||||
// indent-tabs-mode: nil
|
||||
// End:
|
||||
//
|
||||
// vim: et sts=3 sw=3
|
||||
// arch-tag: 7e997d04-6b94-4abb-b3d6-748400f86598
|
||||
Reference in New Issue
Block a user