Update of /cvsroot/audacity/audacity-src/src/prefs
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv22455/src/prefs
Modified Files:
BatchPrefs.h GUIPrefs.cpp GUIPrefs.h PrefsDialog.cpp
QualityPrefs.cpp QualityPrefs.h
Added Files:
DevicePrefs.cpp DevicePrefs.h ImportExportPrefs.cpp
ImportExportPrefs.h LibraryPrefs.cpp LibraryPrefs.h
PlaybackPrefs.cpp PlaybackPrefs.h ProjectsPrefs.cpp
ProjectsPrefs.h RecordingPrefs.cpp RecordingPrefs.h
TracksPrefs.cpp TracksPrefs.h WarningsPrefs.cpp
WarningsPrefs.h
Removed Files:
AudioIOPrefs.cpp AudioIOPrefs.h FileFormatPrefs.cpp
FileFormatPrefs.h SmartRecordPrefs.cpp SmartRecordPrefs.h
Log Message:
Cleaned up the prefs/ source.
--- NEW FILE: ProjectsPrefs.h ---
/**********************************************************************
Audacity: A Digital Audio Editor
ProjectsPrefs.h
Joshua Haberman
Dominic Mazzoni
James Crook
**********************************************************************/
#ifndef __AUDACITY_PROJECT_PREFS__
#define __AUDACITY_PROJECT_PREFS__
#include <wx/defs.h>
#include <wx/window.h>
#include "../ShuttleGui.h"
#include "PrefsPanel.h"
class ProjectsPrefs:public PrefsPanel
{
public:
ProjectsPrefs(wxWindow * parent);
~ProjectsPrefs();
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: 300a00cc-0770-45a1-8ab5-88cfb7ae1239
--- NEW FILE: RecordingPrefs.cpp ---
/**********************************************************************
Audacity: A Digital Audio Editor
RecordingPrefs.cpp
Joshua Haberman
Dominic Mazzoni
James Crook
*******************************************************************//**
\class RecordingPrefs
\brief A PrefsPanel used to select recording options.
Presents interface for user to update the various recording options
like playthrough, latency correction, and others.
*//********************************************************************/
#include "../Audacity.h"
#include <wx/defs.h>
#include "../AudioIO.h"
#include "../Envelope.h"
#include "../Prefs.h"
#include "../ShuttleGui.h"
#include "RecordingPrefs.h"
RecordingPrefs::RecordingPrefs(wxWindow * parent)
: PrefsPanel(parent, _("Recording"))
{
Populate();
}
RecordingPrefs::~RecordingPrefs()
{
}
void RecordingPrefs::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 RecordingPrefs::PopulateOrExchange(ShuttleGui & S)
{
S.SetBorder(2);
S.StartStatic(_("Playthrough"));
{
S.TieCheckBox(_("Overdub: &Play other tracks while recording new one"),
wxT("/AudioIO/Duplex"),
true);
#if defined(__WXMAC__)
S.TieCheckBox(_("&Hardware Playthrough: Play new track while recording
it"),
wxT("/AudioIO/Playthrough"),
false);
#endif
S.TieCheckBox(_("&Software Playthrough: Play new track while recording or
monitoring"),
wxT("/AudioIO/SWPlaythrough"),
false);
#if !defined(__WXMAC__)
S.AddUnits(wxString(wxT(" ")) + _("(uncheck when recording \"stereo
mix\")"));
#endif
}
S.EndStatic();
S.StartStatic( _("Latency"));
{
S.StartThreeColumn();
{
// only show the following controls if we use Portaudio v19, because
// for Portaudio v18 we always use default buffer sizes
S.TieTextBox(_("Audio to buffer:"),
wxT("/AudioIO/LatencyDuration"),
DEFAULT_LATENCY_DURATION,
9);
S.AddUnits(_("milliseconds (higher = more latency)"));
S.TieTextBox(_("Latency correction:"),
wxT("/AudioIO/LatencyCorrection"),
DEFAULT_LATENCY_CORRECTION,
9);
S.AddUnits(_("milliseconds (negative = backwards)"));
}
S.EndThreeColumn();
}
S.EndStatic();
S.StartStatic(_("Sound Activated Recording"));
{
S.TieCheckBox(_("Sound Activated Recording"),
wxT("/AudioIO/SoundActivatedRecord"),
false);
S.StartMultiColumn(2, wxEXPAND);
{
S.SetStretchyCol(1);
int dBRange = gPrefs->Read(wxT("/GUI/EnvdBRange"), ENV_DB_RANGE);
S.TieSlider(_("Sound Activation Level (dB):"),
wxT("/AudioIO/SilenceLevel"),
-50,
0,
-dBRange);
}
S.EndMultiColumn();
}
S.EndStatic();
}
bool RecordingPrefs::Apply()
{
ShuttleGui S(this, eIsSavingToPrefs);
PopulateOrExchange(S);
double latencyDuration = DEFAULT_LATENCY_DURATION;
gPrefs->Read(wxT("/AudioIO/LatencyDuration"), &latencyDuration);
if (latencyDuration < 0) {
gPrefs->Write(wxT("/AudioIO/LatencyDuration"), DEFAULT_LATENCY_DURATION);
}
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: d6904b91-a320-4194-8d60-caa9175b6bb4
--- NEW FILE: LibraryPrefs.h ---
/**********************************************************************
Audacity: A Digital Audio Editor
FileFormatPrefs.h
Joshua Haberman
Dominic Mazzoni
James Crook
**********************************************************************/
#ifndef __AUDACITY_FILE_FORMAT_PREFS__
#define __AUDACITY_FILE_FORMAT_PREFS__
#include <wx/defs.h>
#include <wx/stattext.h>
#include <wx/window.h>
#include "../ShuttleGui.h"
#include "PrefsPanel.h"
class LibraryPrefs:public PrefsPanel
{
public:
LibraryPrefs(wxWindow * parent);
~LibraryPrefs();
virtual bool Apply();
private:
void Populate();
void PopulateOrExchange(ShuttleGui & S);
void SetMP3VersionText(bool prompt = false);
void SetFFmpegVersionText();
void OnMP3FindButton(wxCommandEvent & e);
void OnMP3DownButton(wxCommandEvent & e);
void OnFFmpegFindButton(wxCommandEvent & e);
void OnFFmpegDownButton(wxCommandEvent & e);
wxStaticText *mMP3Version;
wxStaticText *mFFmpegVersion;
DECLARE_EVENT_TABLE();
};
#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: 300a00cc-0770-45a1-8ab5-88cfb7ae1239
Index: PrefsDialog.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/prefs/PrefsDialog.cpp,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- PrefsDialog.cpp 7 Apr 2009 04:27:22 -0000 1.61
+++ PrefsDialog.cpp 22 May 2009 05:46:00 -0000 1.62
@@ -42,21 +42,26 @@
#include "PrefsDialog.h"
#include "PrefsPanel.h"
-#include "AudioIOPrefs.h"
+#include "BatchPrefs.h"
+#include "DevicePrefs.h"
+#include "DirectoriesPrefs.h"
+#include "GUIPrefs.h"
+#include "ImportExportPrefs.h"
+#include "KeyConfigPrefs.h"
+#include "LibraryPrefs.h"
+#include "MousePrefs.h"
+#include "PlaybackPrefs.h"
+#include "ProjectsPrefs.h"
#include "QualityPrefs.h"
+#include "RecordingPrefs.h"
+#include "SpectrumPrefs.h"
+#include "ThemePrefs.h"
+#include "TracksPrefs.h"
+#include "WarningsPrefs.h"
/* REQUIRES PORTMIDI */
//#include "MidiIOPrefs.h"
-#include "DirectoriesPrefs.h"
-#include "FileFormatPrefs.h"
-#include "GUIPrefs.h"
-#include "ThemePrefs.h"
-#include "BatchPrefs.h"
-#include "SpectrumPrefs.h"
-#include "SmartRecordPrefs.h"
-#include "KeyConfigPrefs.h"
-#include "MousePrefs.h"
BEGIN_EVENT_TABLE(PrefsDialog, wxDialog)
EVT_BUTTON(wxID_OK, PrefsDialog::OnOK)
@@ -83,11 +88,11 @@
// REQUIRES PORTMIDI
// w = new MidiIOPrefs(mCategories); mCategories->AddPage(w,
w->GetName(), false, 0);
w = new QualityPrefs(mCategories); mCategories->AddPage(w,
w->GetName(), false, 0);
- w = new FileFormatPrefs(mCategories); mCategories->AddPage(w,
w->GetName(), false, 0);
- w = new ProjectPrefs(mCategories); mCategories->AddPage(w,
w->GetName(), false, 0);
- w = new LibraryPrefs(mCategories); mCategories->AddPage(w,
w->GetName(), false, 0);
w = new GUIPrefs(mCategories); mCategories->AddPage(w,
w->GetName(), false, 0);
w = new TracksPrefs(mCategories); mCategories->AddPage(w,
w->GetName(), false, 0);
+ w = new ImportExportPrefs(mCategories);mCategories->AddPage(w,
w->GetName(), false, 0);
+ w = new ProjectsPrefs(mCategories); mCategories->AddPage(w,
w->GetName(), false, 0);
+ w = new LibraryPrefs(mCategories); mCategories->AddPage(w,
w->GetName(), false, 0);
w = new SpectrumPrefs(mCategories); mCategories->AddPage(w,
w->GetName(), false, 0);
w = new DirectoriesPrefs(mCategories); mCategories->AddPage(w,
w->GetName(), false, 0);
w = new WarningsPrefs(mCategories); mCategories->AddPage(w,
w->GetName(), false, 0);
Index: GUIPrefs.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/prefs/GUIPrefs.cpp,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- GUIPrefs.cpp 21 May 2009 04:42:05 -0000 1.77
+++ GUIPrefs.cpp 22 May 2009 05:46:00 -0000 1.78
@@ -17,190 +17,17 @@
*//*******************************************************************/
+#include "../Audacity.h"
+
#include <wx/defs.h>
-#include <wx/choice.h>
-#include "../Audacity.h"
#include "../AudacityApp.h"
-#include "../Envelope.h"
#include "../Languages.h"
#include "../Prefs.h"
-#include "../Project.h"
#include "../ShuttleGui.h"
#include "GUIPrefs.h"
-////////////////////////////////////////////////////////////////////////////////
-
-WarningsPrefs::WarningsPrefs(wxWindow * parent)
-: PrefsPanel(parent, _("Warnings"))
-{
- Populate();
-}
-
-WarningsPrefs::~WarningsPrefs()
-{
-}
-
-void WarningsPrefs::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 WarningsPrefs::PopulateOrExchange(ShuttleGui & S)
-{
- S.SetBorder(2);
-
- S.StartStatic(_("Show Warnings/Prompts"));
- {
- S.TieCheckBox(_("When saving &projects"),
- wxT("/Warnings/FirstProjectSave"),
- true);
- S.TieCheckBox(_("When saving &empty project"),
- wxT("/GUI/EmptyCanBeDirty"),
- true);
- S.TieCheckBox(_("When &disk space is getting low"),
- wxT("/Warnings/DiskSpaceWarning"),
- true);
- S.TieCheckBox(_("When mixing down to &stereo during export"),
- wxT("/Warnings/MixStereo"),
- true);
- S.TieCheckBox(_("When mixing down to &mono during export"),
- wxT("/Warnings/MixMono"),
- true);
- }
- S.EndStatic();
-}
-
-bool WarningsPrefs::Apply()
-{
- ShuttleGui S(this, eIsSavingToPrefs);
- PopulateOrExchange(S);
-
- return true;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
-TracksPrefs::TracksPrefs(wxWindow * parent)
-: PrefsPanel(parent, _("Tracks"))
-{
- Populate();
-}
-
-TracksPrefs::~TracksPrefs()
-{
-}
-
-void TracksPrefs::Populate()
-{
- mSoloCodes.Add(wxT("Standard"));
- mSoloCodes.Add(wxT("Simple"));
- mSoloCodes.Add(wxT("None"));
-
- mSoloChoices.Add(_("Standard"));
- mSoloChoices.Add(_("Simple"));
- mSoloChoices.Add(_("None"));
-
- mViewCodes.Add(wxT("Waveform"));
- mViewCodes.Add(wxT("WaveformdB"));
- mViewCodes.Add(wxT("Spectrum"));
- mViewCodes.Add(wxT("SpectrumLogF"));
- mViewCodes.Add(wxT("PitchEAC"));
-
- mViewChoices.Add(_("Waveform"));
- mViewChoices.Add(_("Waveform (dB)"));
- mViewChoices.Add(_("Spectrum"));
- mViewChoices.Add(_("Spectrum log(f)"));
- mViewChoices.Add(_("Pitch (EAC)"));
-
- //------------------------- 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 TracksPrefs::PopulateOrExchange(ShuttleGui & S)
-{
- S.SetBorder(2);
-
- S.StartStatic(_("Display"));
- {
- S.TieCheckBox(_("&Update display while playing"),
- wxT("/GUI/AutoScroll"),
- true);
- S.TieCheckBox(_("Automatically &fit tracks vertically zoomed"),
- wxT("/GUI/TracksFitVerticallyZoomed"),
- false);
-
- S.AddSpace(10);
-
- S.StartMultiColumn(2);
- {
- S.TieChoice(_("Default View Mode:"),
- wxT("/GUI/DefaultViewMode"),
- wxT("Waveform"),
- mViewChoices,
- mViewCodes);
- S.SetSizeHints(mViewChoices);
- }
- S.EndMultiColumn();
- }
- S.EndStatic();
-
- S.StartStatic(_("Behaviors"));
- {
- S.TieCheckBox(_("&Select all audio in project, if none selected"),
- wxT("/GUI/SelectAllOnNone"),
- true);
- S.TieCheckBox(_("Enable cut &lines"),
- wxT("/GUI/EnableCutLines"),
- false);
- S.TieCheckBox(_("Enable &dragging of left and right selection edges"),
- wxT("/GUI/AdjustSelectionEdges"),
- true);
- S.TieCheckBox(_("\"Move track focus\" c&ycles repeatedly through
tracks"),
- wxT("/GUI/CircularTrackNavigation"),
- false);
- S.TieCheckBox(_("Editing a &clip can move other clips"),
- wxT("/GUI/EditClipCanMove"),
- true);
-
- S.AddSpace(10);
-
- S.StartMultiColumn(2);
- {
- S.TieChoice(_("Solo Button:"),
- wxT("/GUI/Solo"),
- wxT("Standard"),
- mSoloChoices,
- mSoloCodes);
- S.SetSizeHints(mSoloChoices);
- }
- S.EndMultiColumn();
- }
- S.EndStatic();
-}
-
-bool TracksPrefs::Apply()
-{
- ShuttleGui S(this, eIsSavingToPrefs);
- PopulateOrExchange(S);
-
- return true;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
GUIPrefs::GUIPrefs(wxWindow * parent)
: PrefsPanel(parent, _("Interface"))
{
@@ -344,6 +171,7 @@
return true;
}
+
// Indentation settings for Vim and Emacs and unique identifier for Arch, a
// version control system. Please do not modify past this point.
//
@@ -354,4 +182,3 @@
//
// vim: et sts=3 sw=3
// arch-tag: 7e997d04-6b94-4abb-b3d6-748400f86598
-
--- NEW FILE: ImportExportPrefs.h ---
/**********************************************************************
Audacity: A Digital Audio Editor
ImportExportPrefs.h
Joshua Haberman
Dominic Mazzoni
James Crook
**********************************************************************/
#ifndef __AUDACITY_IMPORT_EXPORT_PREFS__
#define __AUDACITY_IMPORT_EXPORT_PREFS__
#include <wx/defs.h>
#include <wx/window.h>
#include "../ShuttleGui.h"
#include "PrefsPanel.h"
class ImportExportPrefs:public PrefsPanel
{
public:
ImportExportPrefs(wxWindow * parent);
~ImportExportPrefs();
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: 300a00cc-0770-45a1-8ab5-88cfb7ae1239
--- NEW FILE: WarningsPrefs.h ---
/**********************************************************************
Audacity: A Digital Audio Editor
WarningsPrefs.h
Brian Gunlogson
Joshua Haberman
James Crook
**********************************************************************/
#ifndef __AUDACITY_WARNINGS_PREFS__
#define __AUDACITY_WARNINGS_PREFS__
#include <wx/defs.h>
#include <wx/window.h>
#include "../ShuttleGui.h"
#include "PrefsPanel.h"
class WarningsPrefs:public PrefsPanel
{
public:
WarningsPrefs(wxWindow * parent);
~WarningsPrefs();
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
--- FileFormatPrefs.h DELETED ---
--- NEW FILE: PlaybackPrefs.h ---
/**********************************************************************
Audacity: A Digital Audio Editor
PlaybackPrefs.h
Joshua Haberman
James Crook
**********************************************************************/
#ifndef __AUDACITY_PLAYBACK_PREFS__
#define __AUDACITY_PLAYBACK_PREFS__
#include <wx/defs.h>
#include <wx/window.h>
#include "../ShuttleGui.h"
#include "PrefsPanel.h"
class PlaybackPrefs:public PrefsPanel
{
public:
PlaybackPrefs(wxWindow * parent);
virtual ~PlaybackPrefs();
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: df22b108-e989-4ec4-a8b6-dddbcc7be6a7
--- NEW FILE: WarningsPrefs.cpp ---
/**********************************************************************
Audacity: A Digital Audio Editor
WarningsPrefs.cpp
Brian Gunlogson
Joshua Haberman
Dominic Mazzoni
James Crook
*******************************************************************//**
\class WarningsPrefs
\brief A PrefsPanel to enable/disable certain warning messages.
*//*******************************************************************/
#include "../Audacity.h"
#include <wx/defs.h>
#include "../ShuttleGui.h"
#include "WarningsPrefs.h"
////////////////////////////////////////////////////////////////////////////////
WarningsPrefs::WarningsPrefs(wxWindow * parent)
: PrefsPanel(parent, _("Warnings"))
{
Populate();
}
WarningsPrefs::~WarningsPrefs()
{
}
void WarningsPrefs::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 WarningsPrefs::PopulateOrExchange(ShuttleGui & S)
{
S.SetBorder(2);
S.StartStatic(_("Show Warnings/Prompts"));
{
S.TieCheckBox(_("When saving &projects"),
wxT("/Warnings/FirstProjectSave"),
true);
S.TieCheckBox(_("When saving &empty project"),
wxT("/GUI/EmptyCanBeDirty"),
true);
S.TieCheckBox(_("When &disk space is getting low"),
wxT("/Warnings/DiskSpaceWarning"),
true);
S.TieCheckBox(_("When mixing down to &stereo during export"),
wxT("/Warnings/MixStereo"),
true);
S.TieCheckBox(_("When mixing down to &mono during export"),
wxT("/Warnings/MixMono"),
true);
}
S.EndStatic();
}
bool WarningsPrefs::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
Index: BatchPrefs.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/prefs/BatchPrefs.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- BatchPrefs.h 1 Oct 2006 07:23:40 -0000 1.7
+++ BatchPrefs.h 22 May 2009 05:46:00 -0000 1.8
@@ -13,12 +13,12 @@
#define __AUDACITY_BATCH_PREFS__
#include <wx/defs.h>
-#include <wx/string.h>
-#include <wx/button.h>
-#include "PrefsPanel.h"
+#include <wx/window.h>
-class ShuttleGui;
+#include "../ShuttleGui.h"
+
+#include "PrefsPanel.h"
class BatchPrefs : public PrefsPanel
{
@@ -29,7 +29,7 @@
private:
void Populate();
- void PopulateOrExchange( ShuttleGui & S );
+ void PopulateOrExchange(ShuttleGui & S);
DECLARE_EVENT_TABLE();
};
@@ -46,4 +46,3 @@
//
// vim: et sts=3 sw=3
// arch-tag: 57018e2b-d264-4f93-bfa7-06752ebf631e
-
--- NEW FILE: ProjectsPrefs.cpp ---
/**********************************************************************
Audacity: A Digital Audio Editor
ProjectsPrefs.cpp
Joshua Haberman
Dominic Mazzoni
James Crook
*******************************************************************//**
\class ProjectsPrefs
\brief A PrefsPanel used to select options related to Audacity Project
handling.
*//*******************************************************************/
#include "../Audacity.h"
#include <wx/defs.h>
#include "../Prefs.h"
#include "../ShuttleGui.h"
#include "ProjectsPrefs.h"
////////////////////////////////////////////////////////////////////////////////
ProjectsPrefs::ProjectsPrefs(wxWindow * parent)
: PrefsPanel(parent, _("Projects"))
{
Populate();
}
ProjectsPrefs::~ProjectsPrefs()
{
}
/// Creates the dialog and its contents.
void ProjectsPrefs::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 ProjectsPrefs::PopulateOrExchange(ShuttleGui & S)
{
S.SetBorder(2);
S.StartStatic(_("When saving a project that depends on other audio files"));
{
S.StartRadioButtonGroup(wxT("/FileFormats/SaveProjectWithDependencies"),
wxT("ask"));
{
S.TieRadioButton(_("Always © all audio into project (safest)"),
wxT("copy"));
S.TieRadioButton(_("&Do not copy any audio"),
wxT("never"));
S.TieRadioButton(_("&Ask user"),
wxT("ask"));
}
S.EndRadioButtonGroup();
}
S.EndStatic();
S.StartStatic(_("Auto save"));
{
S.TieCheckBox(_("Auto save a copy of the project in a separate folder"),
wxT("/Directories/AutoSaveEnabled"),
true);
S.StartThreeColumn();
{
S.TieTextBox(_("Auto save interval:"),
wxT("/Directories/AutoSaveMinutes"),
2.0,
9);
S.AddUnits(_("minutes"));
}
S.EndThreeColumn();
}
S.EndStatic();
}
bool ProjectsPrefs::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: 427b9e64-3fc6-40ef-bbf8-e6fff1d442f0
--- NEW FILE: LibraryPrefs.cpp ---
/**********************************************************************
Audacity: A Digital Audio Editor
LibraryPrefs.cpp
Joshua Haberman
Dominic Mazzoni
James Crook
*******************************************************************//**
\class LibraryPrefs
\brief A PrefsPanel used to select manage external libraries like the
MP3 and FFmpeg encoding libraries.
*//*******************************************************************/
#include "../Audacity.h"
#include <wx/defs.h>
#include <wx/button.h>
#include "../FFmpeg.h"
#include "../ShuttleGui.h"
#include "../export/ExportMP3.h"
#include "../widgets/LinkingHtmlWindow.h"
#include "LibraryPrefs.h"
////////////////////////////////////////////////////////////////////////////////
#define ID_MP3_FIND_BUTTON 7001
#define ID_MP3_DOWN_BUTTON 7002
#define ID_FFMPEG_FIND_BUTTON 7003
#define ID_FFMPEG_DOWN_BUTTON 7004
BEGIN_EVENT_TABLE(LibraryPrefs, PrefsPanel)
EVT_BUTTON(ID_MP3_FIND_BUTTON, LibraryPrefs::OnMP3FindButton)
EVT_BUTTON(ID_MP3_DOWN_BUTTON, LibraryPrefs::OnMP3DownButton)
EVT_BUTTON(ID_FFMPEG_FIND_BUTTON, LibraryPrefs::OnFFmpegFindButton)
EVT_BUTTON(ID_FFMPEG_DOWN_BUTTON, LibraryPrefs::OnFFmpegDownButton)
END_EVENT_TABLE()
LibraryPrefs::LibraryPrefs(wxWindow * parent)
: PrefsPanel(parent, _("Libraries"))
{
Populate();
}
LibraryPrefs::~LibraryPrefs()
{
}
/// Creates the dialog and its contents.
void LibraryPrefs::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 --------------
// Set the MP3 Version string.
SetMP3VersionText();
SetFFmpegVersionText();
}
/// This PopulateOrExchange function is a good example of mixing the fully
/// automatic style of reading/writing from GUI to prefs with the partial form.
///
/// You'll notice that some of the Tie functions have Prefs identifiers in them
/// and others don't.
void LibraryPrefs::PopulateOrExchange(ShuttleGui & S)
{
S.SetBorder(2);
S.StartStatic(_("MP3 Export Library"));
{
S.StartTwoColumn();
{
S.AddVariableText(_("MP3 Library Version:"),
true,
wxALL | wxALIGN_RIGHT | wxALIGN_CENTRE_VERTICAL);
mMP3Version = S.AddVariableText(wxT("9.99"),
true,
wxALL | wxALIGN_LEFT |
wxALIGN_CENTRE_VERTICAL);
S.AddVariableText(_("MP3 Library:"),
true,
wxALL | wxALIGN_RIGHT | wxALIGN_CENTRE_VERTICAL);
S.Id(ID_MP3_FIND_BUTTON).AddButton(_("&Locate..."),
wxALL | wxALIGN_LEFT |
wxALIGN_CENTRE_VERTICAL);
S.AddVariableText(_("LAME MP3 Library:"),
true,
wxALL | wxALIGN_RIGHT | wxALIGN_CENTRE_VERTICAL);
S.Id(ID_MP3_DOWN_BUTTON).AddButton(_("&Download"),
wxALL | wxALIGN_LEFT |
wxALIGN_CENTRE_VERTICAL);
}
S.EndTwoColumn();
}
S.EndStatic();
S.StartStatic(_("FFmpeg Import/Export Library"));
{
S.StartTwoColumn();
{
S.AddVariableText(_("FFmpeg Library Version:"),
true,
wxALL | wxALIGN_RIGHT | wxALIGN_CENTRE_VERTICAL);
#if defined(USE_FFMPEG)
mFFmpegVersion = S.AddVariableText(_("No compatible FFmpeg library was
found"),
true,
wxALL | wxALIGN_LEFT |
wxALIGN_CENTRE_VERTICAL);
#else
mFFmpegVersion = S.AddVariableText(wxT("FFmpeg support is not compiled
in"),
true,
wxALL | wxALIGN_LEFT |
wxALIGN_CENTRE_VERTICAL);
#endif
S.AddVariableText(_("FFmpeg Library:"),
true,
wxALL | wxALIGN_RIGHT | wxALIGN_CENTRE_VERTICAL);
S.Id(ID_FFMPEG_FIND_BUTTON);
wxButton *bfnd = S.AddButton(_("&Locate..."),
wxALL | wxALIGN_LEFT |
wxALIGN_CENTRE_VERTICAL);
S.AddVariableText(_("FFmpeg Library:"),
true,
wxALL | wxALIGN_RIGHT | wxALIGN_CENTRE_VERTICAL);
S.Id(ID_FFMPEG_DOWN_BUTTON);
wxButton *bdwn = S.AddButton(_("&Download"),
wxALL | wxALIGN_LEFT |
wxALIGN_CENTRE_VERTICAL);
#if !defined(USE_FFMPEG)
bdwn->Enable(FALSE);
bfnd->Enable(FALSE);
#endif
}
S.EndTwoColumn();
}
S.EndStatic();
}
/// Sets the a text area on the dialog to have the name
/// of the MP3 Library version.
void LibraryPrefs::SetMP3VersionText(bool prompt)
{
mMP3Version->SetLabel(GetMP3Version(this, prompt));
}
/// Opens a file-finder dialog so that the user can
/// tell us where the MP3 library is.
void LibraryPrefs::OnMP3FindButton(wxCommandEvent & e)
{
SetMP3VersionText(true);
}
/// Opens a file-finder dialog so that the user can
/// tell us where the MP3 library is.
void LibraryPrefs::OnMP3DownButton(wxCommandEvent & e)
{
wxString url =
wxT("http://www.audacityteam.org/manual/index.php?title=FAQ:Installation_and_Plug-Ins%23How_do_I_download_and_install_the_LAME_MP3_encoder.3F");
::OpenInDefaultBrowser(url);
}
void LibraryPrefs::SetFFmpegVersionText()
{
mFFmpegVersion->SetLabel(GetFFmpegVersion(this));
}
void LibraryPrefs::OnFFmpegFindButton(wxCommandEvent & e)
{
#ifdef USE_FFMPEG
FFmpegLibs* FFmpegLibsInst = PickFFmpegLibs();
bool showerrs =
#if defined(__WXDEBUG__)
true;
#else
false;
#endif
FFmpegLibsInst->FreeLibs();
// Load the libs ('true' means that all errors will be shown)
bool locate = !LoadFFmpeg(showerrs);
// Libs are fine, don't show "locate" dialog unless user really wants it
if (!locate) {
int response = wxMessageBox(wxT("Audacity has automatically detected
valid FFmpeg libraries.\
\nDo you still want to locate them
manually?"),
wxT("Success"),
wxCENTRE | wxYES_NO | wxNO_DEFAULT
|wxICON_QUESTION);
if (response == wxYES) {
locate = true;
}
}
if (locate) {
// Show "Locate FFmpeg" dialog
FFmpegLibsInst->FindLibs(this);
FFmpegLibsInst->FreeLibs();
LoadFFmpeg(showerrs);
}
SetFFmpegVersionText();
DropFFmpegLibs();
#endif
}
void LibraryPrefs::OnFFmpegDownButton(wxCommandEvent & e)
{
wxString url =
wxT("http://www.audacityteam.org/manual/index.php?title=FAQ:Installation_and_Plug-Ins%23installffmpeg");
::OpenInDefaultBrowser(url);
}
bool LibraryPrefs::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: 427b9e64-3fc6-40ef-bbf8-e6fff1d442f0
--- SmartRecordPrefs.cpp DELETED ---
--- NEW FILE: ImportExportPrefs.cpp ---
/**********************************************************************
Audacity: A Digital Audio Editor
ImportExportPrefs.cpp
Joshua Haberman
Dominic Mazzoni
James Crook
*******************************************************************//**
\class ImportExportPrefs
\brief A PrefsPanel used to select import and export options.
*//*******************************************************************/
#include "../Audacity.h"
#include <wx/defs.h>
#include "../Prefs.h"
#include "../ShuttleGui.h"
#include "ImportExportPrefs.h"
ImportExportPrefs::ImportExportPrefs(wxWindow * parent)
: PrefsPanel(parent, _("Import / Export"))
{
Populate();
}
ImportExportPrefs::~ImportExportPrefs()
{
}
/// Creates the dialog and its contents.
void ImportExportPrefs::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 ImportExportPrefs::PopulateOrExchange(ShuttleGui & S)
{
S.SetBorder(2);
S.StartStatic(_("When importing audio files"));
{
S.StartRadioButtonGroup(wxT("/ImportExports/CopyOrEditUncompressedData"),
wxT("edit"));
{
S.TieRadioButton(_("&Make a copy of uncompressed audio files before
editing (safer)"),
wxT("copy"));
S.TieRadioButton(_("&Read uncompressed audio files directly from the
original (faster)"),
wxT("edit"));
}
S.EndRadioButtonGroup();
S.TieCheckBox(_("&Normalize all tracks in project"),
wxT("/AudioFiles/NormalizeOnLoad"),
false);
}
S.EndStatic();
S.StartStatic(_("When exporting tracks to an audio file"));
{
S.StartRadioButtonGroup(wxT("/ImportExports/ExportDownMix"), true);
{
S.TieRadioButton(_("A&lways mix all tracks down to Stereo or Mono
channel(s)."),
true);
S.TieRadioButton(_("&Use custom mix (for example to export a 5.1
multichannel file)"),
false);
}
S.EndRadioButtonGroup();
S.TieCheckBox(_("S&how Metadata Editor prior to export step"),
wxT("/AudioFiles/ShowId3Dialog"),
true);
S.AddFixedText(_("Note: Export quality options can be chosen by clicking
the Options\nbutton in the Export dialog."));
}
S.EndStatic();
}
bool ImportExportPrefs::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: 427b9e64-3fc6-40ef-bbf8-e6fff1d442f0
--- NEW FILE: DevicePrefs.cpp ---
/**********************************************************************
Audacity: A Digital Audio Editor
DevicePrefs.cpp
Joshua Haberman
Dominic Mazzoni
James Crook
*******************************************************************//**
\class DevicePrefs
\brief A PrefsPanel used to select recording and playback devices and
other settings.
Presents interface for user to select the recording device and
playback device, from the list of choices that PortAudio
makes available.
Also lets user decide how many channels to record.
*//********************************************************************/
#include "../Audacity.h"
#include <wx/defs.h>
#include <wx/choice.h>
#include <wx/intl.h>
#include "portaudio.h"
#include "../AudioIO.h"
#include "../Internat.h"
#include "../Prefs.h"
#include "../ShuttleGui.h"
#include "DevicePrefs.h"
enum {
HostID = 10000,
PlayID,
RecordID,
ChannelsID
};
BEGIN_EVENT_TABLE(DevicePrefs, PrefsPanel)
EVT_CHOICE(HostID, DevicePrefs::OnHost)
EVT_CHOICE(RecordID, DevicePrefs::OnDevice)
END_EVENT_TABLE()
DevicePrefs::DevicePrefs(wxWindow * parent)
: PrefsPanel(parent, _("Devices"))
{
Populate();
}
DevicePrefs::~DevicePrefs()
{
}
void DevicePrefs::Populate()
{
// First any pre-processing for constructing the GUI.
GetNamesAndLabels();
// Get current setting for devices
mPlayDevice = gPrefs->Read(wxT("/AudioIO/PlaybackDevice"), wxT(""));
mRecordDevice = gPrefs->Read(wxT("/AudioIO/RecordingDevice"), wxT(""));
mRecordChannels = gPrefs->Read(wxT("/AudioIO/RecordChannels"), 2L);
//------------------------- 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 --------------
wxCommandEvent e;
OnHost(e);
OnDevice(e);
}
void DevicePrefs::GetNamesAndLabels()
{
// Gather list of hosts. Only added hosts that have devices attached.
int nDevices = Pa_GetDeviceCount();
for (int i = 0; i < nDevices; i++) {
const PaDeviceInfo *info = Pa_GetDeviceInfo(i);
if (info->maxOutputChannels > 0 || info->maxInputChannels > 0) {
wxString name = LAT1CTOWX(Pa_GetHostApiInfo(info->hostApi)->name);
if (mHostNames.Index(name) == wxNOT_FOUND) {
mHostNames.Add(name);
mHostLabels.Add(name);
}
}
}
}
void DevicePrefs::PopulateOrExchange(ShuttleGui & S)
{
wxArrayString empty;
S.SetBorder(2);
S.StartStatic(_("Interface"));
{
S.StartMultiColumn(2);
{
S.Id(HostID);
mHost = S.TieChoice(_("Host") + wxString(wxT(":")),
wxT("/AudioIO/Host"),
wxT(""),
mHostNames,
mHostLabels);
S.SetSizeHints(mHostNames);
S.AddPrompt(_("Using:"));
S.AddFixedText(LAT1CTOWX(Pa_GetVersionText()));
}
S.EndMultiColumn();
}
S.EndStatic();
S.StartStatic(_("Playback"));
{
S.StartMultiColumn(2);
{
S.Id(PlayID);
mPlay = S.AddChoice(_("Device") + wxString(wxT(":")),
wxEmptyString,
&empty);
}
S.EndMultiColumn();
}
S.EndStatic();
S.StartStatic(_("Recording"));
{
S.StartMultiColumn(2);
{
S.Id(RecordID);
mRecord = S.AddChoice(_("Device") + wxString(wxT(":")),
wxEmptyString,
&empty);
S.Id(ChannelsID);
mChannels = S.AddChoice(_("Channels") + wxString(wxT(":")),
wxEmptyString,
&empty);
}
S.EndMultiColumn();
}
S.EndStatic();
}
void DevicePrefs::OnHost(wxCommandEvent & e)
{
int index = mHost->GetCurrentSelection();
int nDevices = Pa_GetDeviceCount();
mPlay->Clear();
mRecord->Clear();
wxArrayString playnames;
wxArrayString recordnames;
for (int i = 0; i < nDevices; i++) {
const PaDeviceInfo *info = Pa_GetDeviceInfo(i);
if (info->hostApi == index) {
wxString name = LAT1CTOWX(info->name);
wxString device = DeviceName(info);
int index;
if (info->maxOutputChannels > 0) {
playnames.Add(name);
index = mPlay->Append(name, (void *) info);
if (device == mPlayDevice) {
mPlay->SetSelection(index);
}
}
if (info->maxInputChannels > 0) {
recordnames.Add(name);
index = mRecord->Append(name, (void *) info);
if (device == mRecordDevice) {
mRecord->SetSelection(index);
}
}
}
}
if (mPlay->GetCount() && mPlay->GetSelection() == wxNOT_FOUND) {
mPlay->SetSelection(0);
}
if (mRecord->GetCount() && mRecord->GetSelection() == wxNOT_FOUND) {
mRecord->SetSelection(0);
}
ShuttleGui S(this, eIsCreating);
S.SetSizeHints(mPlay, playnames);
S.SetSizeHints(mRecord, recordnames);
}
void DevicePrefs::OnDevice(wxCommandEvent & e)
{
const PaDeviceInfo *info =
(const PaDeviceInfo *) mRecord->GetClientData(mRecord->GetSelection());
int cnt = info->maxInputChannels;
int sel = mChannels->GetSelection();
if (sel != wxNOT_FOUND) {
mRecordChannels = sel + 1;
}
mChannels->Clear();
// Mimic old behavior
if (cnt <= 0) {
cnt = 16;
}
// Place and artifical limit on the number of channels to prevent an
// outrageous number. I don't know if this is really necessary, but
// it doesn't hurt.
if (cnt > 256) {
cnt = 256;
}
wxArrayString channelnames;
// Channel counts, mono, stereo etc...
for (int i = 0; i < cnt; i++) {
wxString name;
if (i == 0) {
name = _("1 (Mono)");
}
else if (i == 1) {
name = _("2 (Stereo)");
}
else {
name = wxString::Format(wxT("%d"), i + 1);
}
channelnames.Add(name);
int index = mChannels->Append(name);
if (i == mRecordChannels - 1) {
mChannels->SetSelection(index);
}
}
if (mChannels->GetCount() && mChannels->GetSelection() == wxNOT_FOUND) {
mChannels->SetSelection(0);
}
ShuttleGui S(this, eIsCreating);
S.SetSizeHints(mChannels, channelnames);
}
bool DevicePrefs::Apply()
{
ShuttleGui S(this, eIsSavingToPrefs);
PopulateOrExchange(S);
const PaDeviceInfo *info;
info = (const PaDeviceInfo *) mPlay->GetClientData(mPlay->GetSelection());
gPrefs->Write(wxT("/AudioIO/PlaybackDevice"),
DeviceName(info));
info = (const PaDeviceInfo *)
mRecord->GetClientData(mRecord->GetSelection());
gPrefs->Write(wxT("/AudioIO/RecordingDevice"),
DeviceName(info));
gPrefs->Write(wxT("/AudioIO/RecordChannels"),
mChannels->GetSelection() + 1);
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: d6904b91-a320-4194-8d60-caa9175b6bb4
--- NEW FILE: TracksPrefs.h ---
/**********************************************************************
Audacity: A Digital Audio Editor
TracksPrefs.h
Brian Gunlogson
Joshua Haberman
James Crook
**********************************************************************/
#ifndef __AUDACITY_TRACKS_PREFS__
#define __AUDACITY_TRACKS_PREFS__
#include <wx/defs.h>
#include <wx/arrstr.h>
#include <wx/window.h>
#include "../ShuttleGui.h"
#include "PrefsPanel.h"
class TracksPrefs:public PrefsPanel
{
public:
TracksPrefs(wxWindow * parent);
~TracksPrefs();
virtual bool Apply();
private:
void Populate();
void PopulateOrExchange(ShuttleGui & S);
wxArrayString mSoloCodes;
wxArrayString mSoloChoices;
wxArrayString mViewCodes;
wxArrayString mViewChoices;
};
#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
--- AudioIOPrefs.h DELETED ---
--- NEW FILE: TracksPrefs.cpp ---
/**********************************************************************
Audacity: A Digital Audio Editor
TracksPrefs.cpp
Brian Gunlogson
Joshua Haberman
Dominic Mazzoni
James Crook
*******************************************************************//**
\class TracksPrefs
\brief A PrefsPanel for track display and behavior properties.
*//*******************************************************************/
#include "../Audacity.h"
#include <wx/defs.h>
#include "../ShuttleGui.h"
#include "TracksPrefs.h"
////////////////////////////////////////////////////////////////////////////////
TracksPrefs::TracksPrefs(wxWindow * parent)
: PrefsPanel(parent, _("Tracks"))
{
Populate();
}
TracksPrefs::~TracksPrefs()
{
}
void TracksPrefs::Populate()
{
mSoloCodes.Add(wxT("Standard"));
mSoloCodes.Add(wxT("Simple"));
mSoloCodes.Add(wxT("None"));
mSoloChoices.Add(_("Standard"));
mSoloChoices.Add(_("Simple"));
mSoloChoices.Add(_("None"));
mViewCodes.Add(wxT("Waveform"));
mViewCodes.Add(wxT("WaveformdB"));
mViewCodes.Add(wxT("Spectrum"));
mViewCodes.Add(wxT("SpectrumLogF"));
mViewCodes.Add(wxT("PitchEAC"));
mViewChoices.Add(_("Waveform"));
mViewChoices.Add(_("Waveform (dB)"));
mViewChoices.Add(_("Spectrum"));
mViewChoices.Add(_("Spectrum log(f)"));
mViewChoices.Add(_("Pitch (EAC)"));
//------------------------- 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 TracksPrefs::PopulateOrExchange(ShuttleGui & S)
{
S.SetBorder(2);
S.StartStatic(_("Display"));
{
S.TieCheckBox(_("&Update display while playing"),
wxT("/GUI/AutoScroll"),
true);
S.TieCheckBox(_("Automatically &fit tracks vertically zoomed"),
wxT("/GUI/TracksFitVerticallyZoomed"),
false);
S.AddSpace(10);
S.StartMultiColumn(2);
{
S.TieChoice(_("Default View Mode:"),
wxT("/GUI/DefaultViewMode"),
wxT("Waveform"),
mViewChoices,
mViewCodes);
S.SetSizeHints(mViewChoices);
}
S.EndMultiColumn();
}
S.EndStatic();
S.StartStatic(_("Behaviors"));
{
S.TieCheckBox(_("&Select all audio in project, if none selected"),
wxT("/GUI/SelectAllOnNone"),
true);
S.TieCheckBox(_("Enable cut &lines"),
wxT("/GUI/EnableCutLines"),
false);
S.TieCheckBox(_("Enable &dragging of left and right selection edges"),
wxT("/GUI/AdjustSelectionEdges"),
true);
S.TieCheckBox(_("\"Move track focus\" c&ycles repeatedly through
tracks"),
wxT("/GUI/CircularTrackNavigation"),
false);
S.TieCheckBox(_("Editing a &clip can move other clips"),
wxT("/GUI/EditClipCanMove"),
true);
S.AddSpace(10);
S.StartMultiColumn(2);
{
S.TieChoice(_("Solo Button:"),
wxT("/GUI/Solo"),
wxT("Standard"),
mSoloChoices,
mSoloCodes);
S.SetSizeHints(mSoloChoices);
}
S.EndMultiColumn();
}
S.EndStatic();
}
bool TracksPrefs::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
--- FileFormatPrefs.cpp DELETED ---
--- NEW FILE: DevicePrefs.h ---
/**********************************************************************
Audacity: A Digital Audio Editor
DevicePrefs.h
Joshua Haberman
James Crook
**********************************************************************/
#ifndef __AUDACITY_DEVICE_PREFS__
#define __AUDACITY_DEVICE_PREFS__
#include <wx/defs.h>
#include <wx/choice.h>
#include <wx/string.h>
#include <wx/window.h>
#include "../ShuttleGui.h"
#include "PrefsPanel.h"
class DevicePrefs:public PrefsPanel
{
public:
DevicePrefs(wxWindow * parent);
virtual ~DevicePrefs();
virtual bool Apply();
private:
void Populate();
void PopulateOrExchange(ShuttleGui & S);
void GetNamesAndLabels();
void OnHost(wxCommandEvent & e);
void OnDevice(wxCommandEvent & e);
wxArrayString mHostNames;
wxArrayString mHostLabels;
wxString mPlayDevice;
wxString mRecordDevice;
long mRecordChannels;
wxChoice *mHost;
wxChoice *mPlay;
wxChoice *mRecord;
wxChoice *mChannels;
DECLARE_EVENT_TABLE();
};
#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: df22b108-e989-4ec4-a8b6-dddbcc7be6a7
--- SmartRecordPrefs.h DELETED ---
--- NEW FILE: PlaybackPrefs.cpp ---
/**********************************************************************
Audacity: A Digital Audio Editor
PlaybackPrefs.cpp
Joshua Haberman
Dominic Mazzoni
James Crook
*******************************************************************//**
\class PlaybackPrefs
\brief A PrefsPanel used to select playback options.
Presents interface for user to update the various playback options
like previewing and seeking.
*//********************************************************************/
#include "../Audacity.h"
#include <wx/defs.h>
#include "../ShuttleGui.h"
#include "PlaybackPrefs.h"
PlaybackPrefs::PlaybackPrefs(wxWindow * parent)
: PrefsPanel(parent, _("Playback"))
{
Populate();
}
PlaybackPrefs::~PlaybackPrefs()
{
}
void PlaybackPrefs::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 PlaybackPrefs::PopulateOrExchange(ShuttleGui & S)
{
S.SetBorder(2);
S.StartStatic(_("Effects Preview"));
{
S.StartThreeColumn();
{
S.TieTextBox(_("Length of preview:"),
wxT("/AudioIO/EffectsPreviewLen"),
3.0,
9);
S.AddUnits(_("seconds"));
}
S.EndThreeColumn();
}
S.EndStatic();
S.StartStatic(_("Cut Preview"));
{
S.StartThreeColumn();
{
S.TieTextBox(_("Preview before cut region:"),
wxT("/AudioIO/CutPreviewBeforeLen"),
1.0,
9);
S.AddUnits(_("seconds"));
S.TieTextBox(_("Preview after cut region:"),
wxT("/AudioIO/CutPreviewAfterLen"),
1.0,
9);
S.AddUnits(_("seconds"));
}
S.EndThreeColumn();
}
S.EndStatic();
S.StartStatic(_("Seek Time when playing"));
{
S.StartThreeColumn();
{
S.TieTextBox(_("Short period:"),
wxT("/AudioIO/SeekShortPeriod"),
1.0,
9);
S.AddUnits(_("seconds"));
S.TieTextBox(_("Long period:"),
wxT("/AudioIO/SeekLongPeriod"),
15.0,
9);
S.AddUnits(_("seconds"));
}
S.EndThreeColumn();
}
S.EndStatic();
}
bool PlaybackPrefs::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: d6904b91-a320-4194-8d60-caa9175b6bb4
--- AudioIOPrefs.cpp DELETED ---
Index: GUIPrefs.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/prefs/GUIPrefs.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- GUIPrefs.h 7 Apr 2009 04:27:22 -0000 1.23
+++ GUIPrefs.h 22 May 2009 05:46:00 -0000 1.24
@@ -16,42 +16,12 @@
#include <wx/defs.h>
#include <wx/arrstr.h>
-#include <wx/string.h>
#include <wx/window.h>
#include "../ShuttleGui.h"
#include "PrefsPanel.h"
-class WarningsPrefs:public PrefsPanel
-{
- public:
- WarningsPrefs(wxWindow * parent);
- ~WarningsPrefs();
- virtual bool Apply();
-
- private:
- void Populate();
- void PopulateOrExchange(ShuttleGui & S);
-};
-
-class TracksPrefs:public PrefsPanel
-{
- public:
- TracksPrefs(wxWindow * parent);
- ~TracksPrefs();
- virtual bool Apply();
-
- private:
- void Populate();
- void PopulateOrExchange(ShuttleGui & S);
-
- wxArrayString mSoloCodes;
- wxArrayString mSoloChoices;
- wxArrayString mViewCodes;
- wxArrayString mViewChoices;
-};
-
class GUIPrefs:public PrefsPanel
{
public:
@@ -85,4 +55,3 @@
//
// vim: et sts=3 sw=3
// arch-tag: 57018e2b-d264-4f93-bfa7-06752ebf631e
-
--- NEW FILE: RecordingPrefs.h ---
/**********************************************************************
Audacity: A Digital Audio Editor
RecordingPrefs.h
Joshua Haberman
James Crook
**********************************************************************/
#ifndef __AUDACITY_RECORDING_PREFS__
#define __AUDACITY_RECORDING_PREFS__
#include <wx/defs.h>
#include <wx/window.h>
#include "../ShuttleGui.h"
#include "PrefsPanel.h"
class RecordingPrefs:public PrefsPanel
{
public:
RecordingPrefs(wxWindow * parent);
virtual ~RecordingPrefs();
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: df22b108-e989-4ec4-a8b6-dddbcc7be6a7
Index: QualityPrefs.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/prefs/QualityPrefs.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- QualityPrefs.cpp 6 Apr 2009 23:20:28 -0000 1.32
+++ QualityPrefs.cpp 22 May 2009 05:46:00 -0000 1.33
@@ -18,9 +18,6 @@
#include "../Audacity.h"
#include <wx/defs.h>
-#include <wx/choice.h>
-#include <wx/textctrl.h>
-#include <wx/intl.h>
#include "../AudioIO.h"
#include "../Dither.h"
@@ -28,6 +25,7 @@
#include "../Resample.h"
#include "../SampleFormat.h"
#include "../ShuttleGui.h"
+
#include "QualityPrefs.h"
#define ID_SAMPLE_RATE_CHOICE 7001
Index: QualityPrefs.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/prefs/QualityPrefs.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- QualityPrefs.h 4 Apr 2009 10:55:57 -0000 1.8
+++ QualityPrefs.h 22 May 2009 05:46:00 -0000 1.9
@@ -19,12 +19,10 @@
#include <wx/dynarray.h>
#include <wx/textctrl.h>
-#include <../ShuttleGui.h>
+#include "../ShuttleGui.h"
#include "PrefsPanel.h"
-class ShuttleGui;
-
class QualityPrefs:public PrefsPanel
{
public:
@@ -67,4 +65,3 @@
//
// vim: et sts=3 sw=3
// arch-tag: ccb794d2-45d5-4f7b-ba0c-6a4d2438ac93
-
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs