diff --git a/src/Experimental.h b/src/Experimental.h index 8813b72e7..87d58196b 100644 --- a/src/Experimental.h +++ b/src/Experimental.h @@ -50,6 +50,7 @@ // enables dark theme and customisations. #define EXPERIMENTAL_DARK_AUDACITY +#define EXPERIMENTAL_DA // experimental theming // Work in progress, June-2008. diff --git a/src/Project.cpp b/src/Project.cpp index 1528b471e..4c3ade458 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -199,6 +199,9 @@ const int sbarHjump = 30; //STM: This is how far the thumb jumps when the #include "AllThemeResources.h" #endif +int AudacityProject::mProjectCounter=0;// global counter. + + //////////////////////////////////////////////////////////// /// Custom events //////////////////////////////////////////////////////////// @@ -890,6 +893,7 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id, // field. Currently there are no such help strings, but it they were introduced, then // there would need to be an event handler to send them to the appropriate field. mStatusBar = CreateStatusBar(4); + mProjectNo = mProjectCounter++; // Bug 322 wxGetApp().SetMissingAliasedFileWarningShouldShow(true); @@ -2016,17 +2020,6 @@ void AudacityProject::HandleResize() UpdateLayout(); } -// What number is this project? -int AudacityProject::GetProjectNumber() -{ - int i; - for(i=0;imIconized ){ - gAudacityProjects[i]->SetProjectTitle( bShowProjectNumbers ? i : -1 ); + AudacityProject * p; + p = gAudacityProjects[i].get(); + p->SetProjectTitle( bShowProjectNumbers ? p->GetProjectNumber() : -1 ); } } } @@ -2372,6 +2367,10 @@ void AudacityProject::OnMouseEvent(wxMouseEvent & event) class TitleRestorer{ public: TitleRestorer(AudacityProject * p ){ + if( p->IsIconized() ) + p->Restore(); + p->Raise(); // May help identifying the window on Mac + // Construct this projects name and number. sProjNumber = ""; sProjName = p->GetName(); diff --git a/src/Project.h b/src/Project.h index 475d71901..e675f2e30 100644 --- a/src/Project.h +++ b/src/Project.h @@ -341,7 +341,7 @@ class AUDACITY_DLL_API AudacityProject final : public wxFrame, static TrackList *GetClipboardTracks(); static void DeleteClipboard(); - int GetProjectNumber(); + int GetProjectNumber(){ return mProjectNo;}; static int CountUnnamed(); static void RefreshAllTitles(bool bShowProjectNumbers ); // checkActive is a temporary hack that should be removed as soon as we @@ -522,6 +522,7 @@ public: void PushState(const wxString &desc, const wxString &shortDesc, UndoPush flags); void RollbackState(); + private: void OnCapture(wxCommandEvent & evt); @@ -550,6 +551,9 @@ public: bool mbLoadedFromAup; std::shared_ptr mDirManager; // MM: DirManager now created dynamically + static int mProjectCounter;// global counter. + int mProjectNo; // count when this project was created. + double mRate; sampleFormat mDefaultFormat; diff --git a/src/ViewInfo.cpp b/src/ViewInfo.cpp index 4d74380dd..b8ffc7bba 100644 --- a/src/ViewInfo.cpp +++ b/src/ViewInfo.cpp @@ -90,6 +90,7 @@ bool ZoomInfo::ZoomOutAvailable() const void ZoomInfo::SetZoom(double pixelsPerSecond) { zoom = std::max(gMinZoom, std::min(gMaxZoom, pixelsPerSecond)); +#ifdef EXPERIMENTAL_DA // Disable snapping if user zooms in a long way. // Helps stop users be trapped in snap-to. // The level chosen is in sample viewing range with samples @@ -100,6 +101,7 @@ void ZoomInfo::SetZoom(double pixelsPerSecond) if( project ) project->OnSnapToOff(); } +#endif } void ZoomInfo::ZoomBy(double multiplier) diff --git a/src/export/Export.h b/src/export/Export.h index 2a8f51123..2c8e895c5 100644 --- a/src/export/Export.h +++ b/src/export/Export.h @@ -174,7 +174,6 @@ public: wxFileName GetAutoExportFileName(); private: - bool ExamineTracks(); bool GetFilename(); bool CheckFilename(); diff --git a/src/export/ExportMultiple.cpp b/src/export/ExportMultiple.cpp index db29ed1cf..e41ef2be5 100644 --- a/src/export/ExportMultiple.cpp +++ b/src/export/ExportMultiple.cpp @@ -886,6 +886,14 @@ int ExportMultiple::ExportMultipleByTrack(bool byName, continue; } + // Bug 1510 possibly increment iter, before deciding whether to export. + // Check for a linked track + tr2 = NULL; + if (tr->GetLinked()) { + tr2 = iter.Next(); + } + + wxLogDebug( "Get setting %i", count ); /* get the settings to use for the export from the array */ activeSetting = exportSettings[count]; if( activeSetting.destfile.GetName().IsEmpty() ){ @@ -895,15 +903,9 @@ int ExportMultiple::ExportMultipleByTrack(bool byName, /* Select the track */ tr->SetSelected(true); - - // Check for a linked track - tr2 = NULL; - if (tr->GetLinked()) { - tr2 = iter.Next(); - if (tr2) { - // Select it also - tr2->SetSelected(true); - } + if (tr2) { + // Select it also + tr2->SetSelected(true); } // Export the data. "channels" are per track. diff --git a/src/toolbars/ControlToolBar.cpp b/src/toolbars/ControlToolBar.cpp index f5b2db975..9e820f9b6 100644 --- a/src/toolbars/ControlToolBar.cpp +++ b/src/toolbars/ControlToolBar.cpp @@ -223,8 +223,12 @@ void ControlToolBar::RegenerateTooltips() break; case ID_RECORD_BUTTON: commands.push_back(wxT("Record")); +#ifndef EXPERIMENTAL_DA + commands.push_back(wxT("RecordBelow")); +#else commands.push_back(_("Record Below")); commands.push_back(wxT("RecordBelow")); +#endif break; case ID_PAUSE_BUTTON: commands.push_back(wxT("Pause")); @@ -875,12 +879,14 @@ void ControlToolBar::OnRecord(wxCommandEvent &evt) if (p) { TrackList *trackList = p->GetTracks(); TrackListIterator it(trackList); + bool shifted = mRecord->WasShiftDown(); -#ifdef EXPERIMENTAL_DARK_AUDACITY +#ifdef EXPERIMENTAL_DA shifted = !shifted; #endif if(it.First() == NULL) shifted = false; + double t0 = p->GetSel0(); double t1 = p->GetSel1(); if (t1 == t0) @@ -981,7 +987,7 @@ void ControlToolBar::OnRecord(wxCommandEvent &evt) else { bool recordingNameCustom, useTrackNumber, useDateStamp, useTimeStamp; wxString defaultTrackName, defaultRecordingTrackName; - + // Count the tracks. int numTracks = 0;