mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-26 07:13:49 +01:00
Move ENV_DB_RANGE out of Envelope.h; that file can be included in fewer places.
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
*//*******************************************************************/
|
||||
|
||||
#include "../Audacity.h"
|
||||
#include "GUIPrefs.h"
|
||||
|
||||
#include <wx/defs.h>
|
||||
|
||||
@@ -26,7 +27,7 @@
|
||||
#include "../Prefs.h"
|
||||
#include "../ShuttleGui.h"
|
||||
|
||||
#include "GUIPrefs.h"
|
||||
#include "GUISettings.h"
|
||||
|
||||
GUIPrefs::GUIPrefs(wxWindow * parent)
|
||||
: PrefsPanel(parent, _("Interface"))
|
||||
@@ -99,9 +100,10 @@ void GUIPrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
|
||||
S.StartMultiColumn(2);
|
||||
{
|
||||
const wxString defaultRange = wxString::Format(wxT("%d"), ENV_DB_RANGE);
|
||||
S.TieChoice(_("Meter/Waveform dB &range:"),
|
||||
wxT("/GUI/EnvdBRange"),
|
||||
wxT("60"),
|
||||
ENV_DB_KEY,
|
||||
defaultRange,
|
||||
mRangeChoices,
|
||||
mRangeCodes);
|
||||
S.SetSizeHints(mRangeChoices);
|
||||
|
||||
18
src/prefs/GUISettings.h
Normal file
18
src/prefs/GUISettings.h
Normal file
@@ -0,0 +1,18 @@
|
||||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
GUIPrefs.h
|
||||
|
||||
Paul Licameli
|
||||
Moved a constant here from Envelope.h where it did not belong
|
||||
Define the key string in one place here too
|
||||
|
||||
**********************************************************************/
|
||||
#ifndef __AUDACITY_GUI_SETTINGS__
|
||||
#define __AUDACITY_GUI_SETTINGS__
|
||||
|
||||
#define ENV_DB_KEY (wxT("/GUI/EnvdBRange"))
|
||||
#define ENV_DB_RANGE 60
|
||||
|
||||
#endif
|
||||
@@ -19,18 +19,17 @@
|
||||
*//********************************************************************/
|
||||
|
||||
#include "../Audacity.h"
|
||||
#include "RecordingPrefs.h"
|
||||
|
||||
#include <wx/defs.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <algorithm>
|
||||
|
||||
#include "../AudioIO.h"
|
||||
#include "../Envelope.h"
|
||||
#include "../prefs/GUISettings.h"
|
||||
#include "../Prefs.h"
|
||||
#include "../ShuttleGui.h"
|
||||
|
||||
#include "RecordingPrefs.h"
|
||||
|
||||
using std::min;
|
||||
|
||||
RecordingPrefs::RecordingPrefs(wxWindow * parent)
|
||||
@@ -113,7 +112,7 @@ void RecordingPrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
{
|
||||
S.SetStretchyCol(1);
|
||||
|
||||
int dBRange = gPrefs->Read(wxT("/GUI/EnvdBRange"), ENV_DB_RANGE);
|
||||
int dBRange = gPrefs->Read(ENV_DB_KEY, ENV_DB_RANGE);
|
||||
S.TieSlider(_("Sound Activation Le&vel (dB):"),
|
||||
wxT("/AudioIO/SilenceLevel"),
|
||||
-50,
|
||||
|
||||
Reference in New Issue
Block a user