1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-27 14:09:33 +02:00

Merge branch 'master' into darkaudacity

I moved type to create labels under labels.
I made the menu items for SaveAs MP3/WAV/Ogg mainstream.
Introduced EXPERIMENTAL_DA2 to deal with some colour issues.
This commit is contained in:
James Crook 2017-03-19 17:05:07 +00:00
commit 0aac05bd58
2 changed files with 17 additions and 7 deletions

View File

@ -325,7 +325,7 @@ void AudacityProject::CreateMenusAndCommands()
AudioIONotBusyFlag | UnsavedChangesFlag); AudioIONotBusyFlag | UnsavedChangesFlag);
c->AddItem(wxT("SaveAs"), _("Save Project &As..."), FN(OnSaveAs)); c->AddItem(wxT("SaveAs"), _("Save Project &As..."), FN(OnSaveAs));
c->BeginSubMenu( _("Save Other") ); c->BeginSubMenu( _("Save Other") );
#ifdef EXPERIMENTAL_DA //#ifdef EXPERIMENTAL_DA
// Enable Export audio commands only when there are audio tracks. // Enable Export audio commands only when there are audio tracks.
c->AddItem(wxT("ExportMp3"), _("Export as MP&3"), FN(OnExportMp3), wxT(""), c->AddItem(wxT("ExportMp3"), _("Export as MP&3"), FN(OnExportMp3), wxT(""),
AudioIONotBusyFlag | WaveTracksExistFlag, AudioIONotBusyFlag | WaveTracksExistFlag,
@ -338,7 +338,7 @@ void AudacityProject::CreateMenusAndCommands()
c->AddItem(wxT("ExportOgg"), _("Export as &OGG"), FN(OnExportOgg), wxT(""), c->AddItem(wxT("ExportOgg"), _("Export as &OGG"), FN(OnExportOgg), wxT(""),
AudioIONotBusyFlag | WaveTracksExistFlag, AudioIONotBusyFlag | WaveTracksExistFlag,
AudioIONotBusyFlag | WaveTracksExistFlag); AudioIONotBusyFlag | WaveTracksExistFlag);
#endif //#endif
c->AddItem(wxT("Export"), _("&Export Audio..."), FN(OnExportAudio), wxT("Ctrl+Shift+E"), c->AddItem(wxT("Export"), _("&Export Audio..."), FN(OnExportAudio), wxT("Ctrl+Shift+E"),
AudioIONotBusyFlag | WaveTracksExistFlag, AudioIONotBusyFlag | WaveTracksExistFlag,
@ -556,6 +556,11 @@ void AudacityProject::CreateMenusAndCommands()
c->AddItem(wxT("DisjoinLabels"), _("Detac&h at Silences"), FN(OnDisjoinLabels), wxT("Alt+Shift+J")); c->AddItem(wxT("DisjoinLabels"), _("Detac&h at Silences"), FN(OnDisjoinLabels), wxT("Alt+Shift+J"));
c->AddSeparator(); c->AddSeparator();
// New in Audacity 2.1.3
c->AddCheck(wxT("TypeToCreateLabel"), _("&Type to Create a Label (on/off)"),
FN(OnToggleTypeToCreateLabel), 0, AlwaysEnabledFlag, AlwaysEnabledFlag);
c->EndSubMenu(); c->EndSubMenu();
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -969,11 +974,6 @@ void AudacityProject::CreateMenusAndCommands()
c->AddSeparator(); c->AddSeparator();
#endif #endif
// New in Audacity 2.1.3
c->AddCheck(wxT("TypeToCreateLabel"), _("&Type to Create a Label (on/off)"),
FN(OnToggleTypeToCreateLabel), 0, AlwaysEnabledFlag, AlwaysEnabledFlag);
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
c->BeginSubMenu(_("S&ort Tracks")); c->BeginSubMenu(_("S&ort Tracks"));

View File

@ -922,7 +922,9 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id,
mbLoadedFromAup( false ) mbLoadedFromAup( false )
{ {
#ifdef EXPERIMENTAL_DA2
SetBackgroundColour(theTheme.Colour( clrMedium )); SetBackgroundColour(theTheme.Colour( clrMedium ));
#endif
// Note that the first field of the status bar is a dummy, and it's width is set // Note that the first field of the status bar is a dummy, and it's width is set
// to zero latter in the code. This field is needed for wxWidgets 2.8.12 because // to zero latter in the code. This field is needed for wxWidgets 2.8.12 because
// if you move to the menu bar, the first field of the menu bar is cleared, which // if you move to the menu bar, the first field of the menu bar is cleared, which
@ -981,7 +983,9 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id,
wxSize{ this->GetSize().GetWidth(), -1 } wxSize{ this->GetSize().GetWidth(), -1 }
}; };
mTopPanel->SetAutoLayout(true); mTopPanel->SetAutoLayout(true);
#ifdef EXPERIMENTAL_DA2
mTopPanel->SetBackgroundColour(theTheme.Colour( clrMedium )); mTopPanel->SetBackgroundColour(theTheme.Colour( clrMedium ));
#endif
// //
// Create the ToolDock // Create the ToolDock
@ -1036,7 +1040,10 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id,
//pPage->SetBackgroundColour( theTheme.Colour( clrDark )); //pPage->SetBackgroundColour( theTheme.Colour( clrDark ));
#endif #endif
#ifdef EXPERIMENTAL_DA2
pPage->SetBackgroundColour(theTheme.Colour( clrMedium )); pPage->SetBackgroundColour(theTheme.Colour( clrMedium ));
#endif
{ {
auto ubs = std::make_unique<wxBoxSizer>(wxVERTICAL); auto ubs = std::make_unique<wxBoxSizer>(wxVERTICAL);
ubs->Add(mToolManager->GetTopDock(), 0, wxEXPAND | wxALIGN_TOP); ubs->Add(mToolManager->GetTopDock(), 0, wxEXPAND | wxALIGN_TOP);
@ -1219,7 +1226,9 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id,
//Initialize the last selection adjustment time. //Initialize the last selection adjustment time.
mLastSelectionAdjustment = ::wxGetLocalTimeMillis(); mLastSelectionAdjustment = ::wxGetLocalTimeMillis();
#ifdef EXPERIMENTAL_DA2
ClearBackground();// For wxGTK. ClearBackground();// For wxGTK.
#endif
} }
AudacityProject::~AudacityProject() AudacityProject::~AudacityProject()
@ -1268,6 +1277,7 @@ void AudacityProject::UpdatePrefsVariables()
gPrefs->Read(wxT("/AudioFiles/NormalizeOnLoad"),&mNormalizeOnLoad, false); gPrefs->Read(wxT("/AudioFiles/NormalizeOnLoad"),&mNormalizeOnLoad, false);
gPrefs->Read(wxT("/GUI/AutoScroll"), &mViewInfo.bUpdateTrackIndicator, true); gPrefs->Read(wxT("/GUI/AutoScroll"), &mViewInfo.bUpdateTrackIndicator, true);
gPrefs->Read(wxT("/GUI/EmptyCanBeDirty"), &mEmptyCanBeDirty, true ); gPrefs->Read(wxT("/GUI/EmptyCanBeDirty"), &mEmptyCanBeDirty, true );
// DA 2.1.3x did not ship with a manual, so default for DA is internet.
#ifdef EXPERIMENTAL_DA #ifdef EXPERIMENTAL_DA
gPrefs->Read(wxT("/GUI/Help"), &mHelpPref, wxT("FromInternet") ); gPrefs->Read(wxT("/GUI/Help"), &mHelpPref, wxT("FromInternet") );
#else #else