Start of module prefs. (work in progress). Linux will need the makefile updating.
This commit is contained in:
parent
5f81a48fe6
commit
0574c96a4c
|
@ -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
|
|
@ -0,0 +1,47 @@
|
|||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
ModulePrefs.h
|
||||
|
||||
Brian Gunlogson
|
||||
Joshua Haberman
|
||||
James Crook
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef __AUDACITY_MODULE_PREFS__
|
||||
#define __AUDACITY_MODULE_PREFS__
|
||||
|
||||
#include <wx/defs.h>
|
||||
|
||||
#include <wx/window.h>
|
||||
|
||||
#include "../ShuttleGui.h"
|
||||
|
||||
#include "PrefsPanel.h"
|
||||
|
||||
class ModulePrefs:public PrefsPanel
|
||||
{
|
||||
public:
|
||||
ModulePrefs(wxWindow * parent);
|
||||
~ModulePrefs();
|
||||
virtual bool Apply();
|
||||
|
||||
private:
|
||||
void Populate();
|
||||
void PopulateOrExchange(ShuttleGui & S);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// 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: 57018e2b-d264-4f93-bfa7-06752ebf631e
|
|
@ -51,6 +51,7 @@
|
|||
#include "KeyConfigPrefs.h"
|
||||
#include "LibraryPrefs.h"
|
||||
#include "MousePrefs.h"
|
||||
#include "ModulePrefs.h"
|
||||
#include "PlaybackPrefs.h"
|
||||
#include "ProjectsPrefs.h"
|
||||
#include "QualityPrefs.h"
|
||||
|
@ -146,6 +147,7 @@ PrefsDialog::PrefsDialog(wxWindow * parent)
|
|||
// w = new BatchPrefs(mCategories); mCategories->AddPage(w, w->GetName(), false, 0);
|
||||
w = new KeyConfigPrefs(mCategories); mCategories->AddPage(w, w->GetName(), false, 0);
|
||||
w = new MousePrefs(mCategories); mCategories->AddPage(w, w->GetName(), false, 0);
|
||||
w = new ModulePrefs(mCategories); mCategories->AddPage(w, w->GetName(), false, 0);
|
||||
}
|
||||
S.EndHorizontalLay();
|
||||
}
|
||||
|
|
|
@ -1675,6 +1675,14 @@
|
|||
RelativePath="..\..\..\src\prefs\MidiIOPrefs.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\prefs\ModulePrefs.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\prefs\ModulePrefs.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\prefs\MousePrefs.cpp"
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue