1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-21 16:37:12 +01:00

A class encapsulating the global clipboard

This commit is contained in:
Paul Licameli
2019-04-25 16:49:31 -04:00
parent ca13f08ff8
commit 338d7cd164
18 changed files with 248 additions and 160 deletions

View File

@@ -33,7 +33,7 @@ undo memory so as to free up space.
#include <wx/textctrl.h>
#include "AudioIO.h"
#include "AudacityApp.h"
#include "Clipboard.h"
#include "../images/Arrow.xpm"
#include "../images/Empty9x16.xpm"
#include "UndoManager.h"
@@ -155,7 +155,8 @@ HistoryWindow::HistoryWindow(AudacityProject *parent, UndoManager *manager):
&HistoryWindow::OnAudioIO,
this);
wxTheApp->Bind(EVT_CLIPBOARD_CHANGE, &HistoryWindow::UpdateDisplay, this);
Clipboard::Get().Bind(
EVT_CLIPBOARD_CHANGE, &HistoryWindow::UpdateDisplay, this);
manager->Bind(EVT_UNDO_PUSHED, &HistoryWindow::UpdateDisplay, this);
manager->Bind(EVT_UNDO_MODIFIED, &HistoryWindow::UpdateDisplay, this);
manager->Bind(EVT_UNDO_RESET, &HistoryWindow::UpdateDisplay, this);
@@ -263,8 +264,7 @@ void HistoryWindow::OnDiscard(wxCommandEvent & WXUNUSED(event))
void HistoryWindow::OnDiscardClipboard(wxCommandEvent & WXUNUSED(event))
{
AudacityProject::ClearClipboard();
DoUpdate();
Clipboard::Get().Clear();
}
void HistoryWindow::OnItemSelected(wxListEvent &event)