diff --git a/src/commands/CommandContext.cpp b/src/commands/CommandContext.cpp index 140bc9d45..89d683ea9 100644 --- a/src/commands/CommandContext.cpp +++ b/src/commands/CommandContext.cpp @@ -65,10 +65,10 @@ CommandContext::CommandContext( { } -void CommandContext::Status( const wxString & message ) const +void CommandContext::Status( const wxString & message, bool bFlush ) const { if( pOutput ) - pOutput->Status( message ); + pOutput->Status( message, bFlush ); else { wxLogDebug("Status:%s", message ); diff --git a/src/commands/CommandContext.h b/src/commands/CommandContext.h index 310052ca3..46965d00b 100644 --- a/src/commands/CommandContext.h +++ b/src/commands/CommandContext.h @@ -35,7 +35,7 @@ public: AudacityProject &p, std::unique_ptr target); - virtual void Status( const wxString & WXUNUSED(message) ) const; + virtual void Status( const wxString & WXUNUSED(message), bool bFlush = false ) const; virtual void Error( const wxString & WXUNUSED(message) ) const; virtual void Progress( double WXUNUSED(d) ) const; diff --git a/src/commands/CommandTargets.h b/src/commands/CommandTargets.h index 9222dccaf..a6302831b 100644 --- a/src/commands/CommandTargets.h +++ b/src/commands/CommandTargets.h @@ -304,10 +304,13 @@ public: if (mProgressTarget) mProgressTarget->Update(completed); } - void Status(const wxString &status) + void Status(const wxString &status, bool bFlush=false) { - if (mStatusTarget) + if (mStatusTarget){ mStatusTarget->Update(status); + if( bFlush ) + mStatusTarget->Flush(); + } } void Error(const wxString &message) { diff --git a/src/commands/ScreenshotCommand.cpp b/src/commands/ScreenshotCommand.cpp index 32cf766e7..3601940e2 100644 --- a/src/commands/ScreenshotCommand.cpp +++ b/src/commands/ScreenshotCommand.cpp @@ -299,7 +299,8 @@ bool ScreenshotCommand::Capture( ::wxBell(); if (image.SaveFile(filename)) { - context.Status( wxString::Format( _("Saved %s"), filename ) ); + // flush + context.Status( wxString::Format( _("Saved %s"), filename ), true ); } else { context.Error( @@ -815,7 +816,7 @@ bool ScreenshotCommand::Apply(const CommandContext & context) CapturePreferences(context, context.GetProject(), mFileName); else if (mCaptureMode.IsSameAs(wxT("Selectionbar"))) return CaptureToolbar(context, context.GetProject()->GetToolManager(), SelectionBarID, mFileName); - else if (mCaptureMode.IsSameAs(wxT("Spectral__Selection"))) + else if (mCaptureMode.IsSameAs(wxT("Spectral_Selection"))) return CaptureToolbar(context, context.GetProject()->GetToolManager(), SpectralSelectionBarID, mFileName); else if (mCaptureMode.IsSameAs(wxT("Tools"))) return CaptureToolbar(context, context.GetProject()->GetToolManager(), ToolsBarID, mFileName); @@ -843,9 +844,9 @@ bool ScreenshotCommand::Apply(const CommandContext & context) return Capture(context, mFileName, ruler, GetRulerRect(ruler) ); else if (mCaptureMode.IsSameAs(wxT("Tracks"))) return Capture(context, mFileName, panel, GetTracksRect(panel)); - else if (mCaptureMode.IsSameAs(wxT("Firsttrack"))) + else if (mCaptureMode.IsSameAs(wxT("First_Track"))) return Capture(context, mFileName, panel, GetTrackRect( context.GetProject(), panel, 0 ) ); - else if (mCaptureMode.IsSameAs(wxT("Secondtrack"))) + else if (mCaptureMode.IsSameAs(wxT("Second_Track"))) return Capture(context, mFileName, panel, GetTrackRect( context.GetProject(), panel, 1 ) ); else return false; diff --git a/src/commands/ScriptCommandRelay.cpp b/src/commands/ScriptCommandRelay.cpp index ed7d241fe..de7080290 100644 --- a/src/commands/ScriptCommandRelay.cpp +++ b/src/commands/ScriptCommandRelay.cpp @@ -71,7 +71,7 @@ int ExecCommand(wxString *pIn, wxString *pOut) if (builder.WasValid()) { AudacityProject *project = GetActiveProject(); - project->SafeDisplayStatusMessage(wxT("Received script command")); + //project->SafeDisplayStatusMessage(wxT("Received script command")); OldStyleCommandPointer cmd = builder.GetCommand(); ScriptCommandRelay::PostCommand(project, cmd);