mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-26 00:03:52 +02:00
Bug 1467 - New pref for pinned head should move to the Prefs>Tracks
Also updated the wording as per comment #2 in Bug 1467.
This commit is contained in:
@@ -30,6 +30,20 @@
|
||||
|
||||
#include "../Experimental.h"
|
||||
|
||||
|
||||
namespace {
|
||||
const wxChar *PinnedHeadPreferenceKey()
|
||||
{
|
||||
return wxT("/AudioIO/PinnedHead");
|
||||
}
|
||||
|
||||
bool PinnedHeadPreferenceDefault()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
TracksPrefs::TracksPrefs(wxWindow * parent)
|
||||
: PrefsPanel(parent, _("Tracks"))
|
||||
{
|
||||
@@ -89,9 +103,13 @@ void TracksPrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
|
||||
S.StartStatic(_("Display"));
|
||||
{
|
||||
S.TieCheckBox(_("&Update display while playing"),
|
||||
S.TieCheckBox(_("&Update display while when Recording/Playback head unpinned"),
|
||||
wxT("/GUI/AutoScroll"),
|
||||
true);
|
||||
|
||||
S.TieCheckBox(_("Pinned Recording/Playback head"),
|
||||
PinnedHeadPreferenceKey(),
|
||||
PinnedHeadPreferenceDefault());
|
||||
S.TieCheckBox(_("Automatically &fit tracks vertically zoomed"),
|
||||
wxT("/GUI/TracksFitVerticallyZoomed"),
|
||||
false);
|
||||
@@ -160,6 +178,19 @@ void TracksPrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
S.EndStatic();
|
||||
}
|
||||
|
||||
bool TracksPrefs::GetPinnedHeadPreference()
|
||||
{
|
||||
return gPrefs->ReadBool(PinnedHeadPreferenceKey(), PinnedHeadPreferenceDefault());
|
||||
}
|
||||
|
||||
void TracksPrefs::SetPinnedHeadPreference(bool value, bool flush)
|
||||
{
|
||||
gPrefs->Write(PinnedHeadPreferenceKey(), value);
|
||||
if(flush)
|
||||
gPrefs->Flush();
|
||||
}
|
||||
|
||||
|
||||
bool TracksPrefs::Apply()
|
||||
{
|
||||
ShuttleGui S(this, eIsSavingToPrefs);
|
||||
|
||||
Reference in New Issue
Block a user