mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-30 01:03:53 +01:00
bug 2081 - Frequencies added to labels
Mitigate bug by making old label format the default and the addition of frequency ranges optional.
This commit is contained in:
@@ -45,6 +45,7 @@ for drawing different aspects of the label and its text box.
|
|||||||
|
|
||||||
#include "Prefs.h"
|
#include "Prefs.h"
|
||||||
#include "ProjectFileIORegistry.h"
|
#include "ProjectFileIORegistry.h"
|
||||||
|
#include "prefs/ImportExportPrefs.h"
|
||||||
|
|
||||||
#include "effects/TimeWarper.h"
|
#include "effects/TimeWarper.h"
|
||||||
#include "widgets/AudacityMessageBox.h"
|
#include "widgets/AudacityMessageBox.h"
|
||||||
@@ -443,8 +444,9 @@ void LabelStruct::Export(wxTextFile &file) const
|
|||||||
// Do we need more lines?
|
// Do we need more lines?
|
||||||
auto f0 = selectedRegion.f0();
|
auto f0 = selectedRegion.f0();
|
||||||
auto f1 = selectedRegion.f1();
|
auto f1 = selectedRegion.f1();
|
||||||
if (f0 == SelectedRegion::UndefinedFrequency &&
|
if ((f0 == SelectedRegion::UndefinedFrequency &&
|
||||||
f1 == SelectedRegion::UndefinedFrequency)
|
f1 == SelectedRegion::UndefinedFrequency) ||
|
||||||
|
ImportExportPrefs::LabelStyleSetting.ReadEnum())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Write a \ character at the start of a second line,
|
// Write a \ character at the start of a second line,
|
||||||
|
|||||||
@@ -76,6 +76,19 @@ EnumSetting< bool > ImportExportPrefs::ExportDownMixSetting{
|
|||||||
wxT("/FileFormats/ExportDownMix"),
|
wxT("/FileFormats/ExportDownMix"),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
EnumSetting< bool > ImportExportPrefs::LabelStyleSetting{
|
||||||
|
wxT("/FileFormats/LabelStyleChoice"),
|
||||||
|
{
|
||||||
|
EnumValueSymbol{ wxT("Standard"), XXO("S&tandard") },
|
||||||
|
EnumValueSymbol{ wxT("Extended"), XXO("E&xtended (with frequency ranges)") },
|
||||||
|
},
|
||||||
|
0, // true
|
||||||
|
|
||||||
|
{
|
||||||
|
true, false,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
EnumSetting< bool > ImportExportPrefs::AllegroStyleSetting{
|
EnumSetting< bool > ImportExportPrefs::AllegroStyleSetting{
|
||||||
wxT("/FileFormats/AllegroStyleChoice"),
|
wxT("/FileFormats/AllegroStyleChoice"),
|
||||||
{
|
{
|
||||||
@@ -114,6 +127,18 @@ void ImportExportPrefs::PopulateOrExchange(ShuttleGui & S)
|
|||||||
false});
|
false});
|
||||||
}
|
}
|
||||||
S.EndStatic();
|
S.EndStatic();
|
||||||
|
|
||||||
|
S.StartStatic(XO("Exported Label Style:"));
|
||||||
|
{
|
||||||
|
S.StartRadioButtonGroup(ImportExportPrefs::LabelStyleSetting);
|
||||||
|
{
|
||||||
|
S.TieRadioButton();
|
||||||
|
S.TieRadioButton();
|
||||||
|
}
|
||||||
|
S.EndRadioButtonGroup();
|
||||||
|
}
|
||||||
|
S.EndStatic();
|
||||||
|
|
||||||
#ifdef USE_MIDI
|
#ifdef USE_MIDI
|
||||||
S.StartStatic(XO("Exported Allegro (.gro) files save time as:"));
|
S.StartStatic(XO("Exported Allegro (.gro) files save time as:"));
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ class ImportExportPrefs final : public PrefsPanel
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static EnumSetting< bool > ExportDownMixSetting;
|
static EnumSetting< bool > ExportDownMixSetting;
|
||||||
|
static EnumSetting< bool > LabelStyleSetting;
|
||||||
static EnumSetting< bool > AllegroStyleSetting;
|
static EnumSetting< bool > AllegroStyleSetting;
|
||||||
|
|
||||||
ImportExportPrefs(wxWindow * parent, wxWindowID winid);
|
ImportExportPrefs(wxWindow * parent, wxWindowID winid);
|
||||||
|
|||||||
Reference in New Issue
Block a user