From f8d8bb95e5a553b8b5acb75c016975c401bd948c Mon Sep 17 00:00:00 2001 From: William JCM Date: Sun, 21 Jun 2020 21:39:39 +0200 Subject: [PATCH] MainFrame: rename some events for consistency. --- GUI/EvtMainFrame.cpp | 10 +++++----- GUI/EvtMainFrame.h | 10 +++++----- GUI/MainFrame.cpp | 24 ++++++++++++------------ GUI/MainFrame.fbp | 12 ++++++------ GUI/MainFrame.h | 12 ++++++------ 5 files changed, 34 insertions(+), 34 deletions(-) diff --git a/GUI/EvtMainFrame.cpp b/GUI/EvtMainFrame.cpp index 451ac0b..8ec424e 100644 --- a/GUI/EvtMainFrame.cpp +++ b/GUI/EvtMainFrame.cpp @@ -83,7 +83,7 @@ bool EvtMainFrame::ready() { return _manager.ready(); } -void EvtMainFrame::importEvent(wxCommandEvent&) { +void EvtMainFrame::importMassEvent(wxCommandEvent&) { const static std::string error_prefix = "Importing failed:\n\n"; long selected_hangar = _installedListView->GetFirstSelected(); @@ -122,7 +122,7 @@ void EvtMainFrame::importEvent(wxCommandEvent&) { } } -void EvtMainFrame::exportEvent(wxCommandEvent&) { +void EvtMainFrame::exportMassEvent(wxCommandEvent&) { const static std::string error_prefix = "Export failed:\n\n"; long slot = _installedListView->GetFirstSelected(); @@ -132,7 +132,7 @@ void EvtMainFrame::exportEvent(wxCommandEvent&) { } } -void EvtMainFrame::moveEvent(wxCommandEvent&) { +void EvtMainFrame::moveMassEvent(wxCommandEvent&) { const static std::string error_prefix = "Move failed:\n\n"; long source_slot = _installedListView->GetFirstSelected(); @@ -163,7 +163,7 @@ void EvtMainFrame::moveEvent(wxCommandEvent&) { } } -void EvtMainFrame::deleteEvent(wxCommandEvent&) { +void EvtMainFrame::deleteMassEvent(wxCommandEvent&) { const static std::string error_prefix = "Deletion failed:\n\n"; if(wxMessageBox(wxString::Format("Are you sure you want to delete the data in hangar %.2d ? This operation cannot be undone.", _installedListView->GetFirstSelected() + 1), @@ -249,7 +249,7 @@ void EvtMainFrame::deleteStagedEvent(wxCommandEvent&) { } } -void EvtMainFrame::stagingButtonEvent(wxCommandEvent&) { +void EvtMainFrame::openStagingDirEvent(wxCommandEvent&) { wxExecute("explorer.exe " + Utility::Directory::toNativeSeparators(_manager.stagingAreaDirectory())); } diff --git a/GUI/EvtMainFrame.h b/GUI/EvtMainFrame.h index 90a2c5c..52e8458 100644 --- a/GUI/EvtMainFrame.h +++ b/GUI/EvtMainFrame.h @@ -35,16 +35,16 @@ class EvtMainFrame: public MainFrame { protected: // M.A.S.S.-related events - void importEvent(wxCommandEvent&); - void exportEvent(wxCommandEvent&); - void moveEvent(wxCommandEvent&); - void deleteEvent(wxCommandEvent&); + void importMassEvent(wxCommandEvent&); + void exportMassEvent(wxCommandEvent&); + void moveMassEvent(wxCommandEvent&); + void deleteMassEvent(wxCommandEvent&); void renameMassEvent(wxCommandEvent&); void backupEvent(wxCommandEvent&); void openSaveDirEvent(wxCommandEvent&); void stagingSelectionEvent(wxCommandEvent&); void deleteStagedEvent(wxCommandEvent&); - void stagingButtonEvent(wxCommandEvent&); + void openStagingDirEvent(wxCommandEvent&); void installedSelectionEvent(wxListEvent&); void listColumnDragEvent(wxListEvent&); diff --git a/GUI/MainFrame.cpp b/GUI/MainFrame.cpp index b9ef7dc..b7d484c 100644 --- a/GUI/MainFrame.cpp +++ b/GUI/MainFrame.cpp @@ -208,16 +208,16 @@ MainFrame::MainFrame( wxWindow* parent, wxWindowID id, const wxString& title, co this->Centre( wxBOTH ); // Connect Events - _moveButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::moveEvent ), NULL, this ); - _deleteButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::deleteEvent ), NULL, this ); + _moveButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::moveMassEvent ), NULL, this ); + _deleteButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::deleteMassEvent ), NULL, this ); _renameButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::renameMassEvent ), NULL, this ); - _zipButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::backupEvent ), NULL, this ); + _zipButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::backupSavesEvent ), NULL, this ); _openSaveDirButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::openSaveDirEvent ), NULL, this ); - _importButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::importEvent ), NULL, this ); - _exportButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::exportEvent ), NULL, this ); + _importButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::importMassEvent ), NULL, this ); + _exportButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::exportMassEvent ), NULL, this ); _stagingList->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( MainFrame::stagingSelectionEvent ), NULL, this ); _deleteStagedButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::deleteStagedEvent ), NULL, this ); - _stagingAreaButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::stagingButtonEvent ), NULL, this ); + _stagingAreaButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::openStagingDirEvent ), NULL, this ); _screenshotsList->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( MainFrame::viewScreenshotEvent ), NULL, this ); _screenshotsList->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( MainFrame::screenshotListSelectionEvent ), NULL, this ); _screenshotsList->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( MainFrame::screenshotListSelectionEvent ), NULL, this ); @@ -234,16 +234,16 @@ MainFrame::MainFrame( wxWindow* parent, wxWindowID id, const wxString& title, co MainFrame::~MainFrame() { // Disconnect Events - _moveButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::moveEvent ), NULL, this ); - _deleteButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::deleteEvent ), NULL, this ); + _moveButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::moveMassEvent ), NULL, this ); + _deleteButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::deleteMassEvent ), NULL, this ); _renameButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::renameMassEvent ), NULL, this ); - _zipButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::backupEvent ), NULL, this ); + _zipButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::backupSavesEvent ), NULL, this ); _openSaveDirButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::openSaveDirEvent ), NULL, this ); - _importButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::importEvent ), NULL, this ); - _exportButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::exportEvent ), NULL, this ); + _importButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::importMassEvent ), NULL, this ); + _exportButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::exportMassEvent ), NULL, this ); _stagingList->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( MainFrame::stagingSelectionEvent ), NULL, this ); _deleteStagedButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::deleteStagedEvent ), NULL, this ); - _stagingAreaButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::stagingButtonEvent ), NULL, this ); + _stagingAreaButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::openStagingDirEvent ), NULL, this ); _screenshotsList->Disconnect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( MainFrame::viewScreenshotEvent ), NULL, this ); _screenshotsList->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( MainFrame::screenshotListSelectionEvent ), NULL, this ); _screenshotsList->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( MainFrame::screenshotListSelectionEvent ), NULL, this ); diff --git a/GUI/MainFrame.fbp b/GUI/MainFrame.fbp index 0fac677..2946cae 100644 --- a/GUI/MainFrame.fbp +++ b/GUI/MainFrame.fbp @@ -392,7 +392,7 @@ - moveEvent + moveMassEvent @@ -465,7 +465,7 @@ - deleteEvent + deleteMassEvent @@ -622,7 +622,7 @@ - backupEvent + backupSavesEvent @@ -781,7 +781,7 @@ - importEvent + importMassEvent @@ -854,7 +854,7 @@ - exportEvent + exportMassEvent @@ -1078,7 +1078,7 @@ - stagingButtonEvent + openStagingDirEvent diff --git a/GUI/MainFrame.h b/GUI/MainFrame.h index 6ab7a09..61916f2 100644 --- a/GUI/MainFrame.h +++ b/GUI/MainFrame.h @@ -72,16 +72,16 @@ class MainFrame : public wxFrame wxTimer _gameCheckTimer; // Virtual event handlers, overide them in your derived class - virtual void moveEvent( wxCommandEvent& event ) { event.Skip(); } - virtual void deleteEvent( wxCommandEvent& event ) { event.Skip(); } + virtual void moveMassEvent( wxCommandEvent& event ) { event.Skip(); } + virtual void deleteMassEvent( wxCommandEvent& event ) { event.Skip(); } virtual void renameMassEvent( wxCommandEvent& event ) { event.Skip(); } - virtual void backupEvent( wxCommandEvent& event ) { event.Skip(); } + virtual void backupSavesEvent( wxCommandEvent& event ) { event.Skip(); } virtual void openSaveDirEvent( wxCommandEvent& event ) { event.Skip(); } - virtual void importEvent( wxCommandEvent& event ) { event.Skip(); } - virtual void exportEvent( wxCommandEvent& event ) { event.Skip(); } + virtual void importMassEvent( wxCommandEvent& event ) { event.Skip(); } + virtual void exportMassEvent( wxCommandEvent& event ) { event.Skip(); } virtual void stagingSelectionEvent( wxCommandEvent& event ) { event.Skip(); } virtual void deleteStagedEvent( wxCommandEvent& event ) { event.Skip(); } - virtual void stagingButtonEvent( wxCommandEvent& event ) { event.Skip(); } + virtual void openStagingDirEvent( wxCommandEvent& event ) { event.Skip(); } virtual void viewScreenshotEvent( wxListEvent& event ) { event.Skip(); } virtual void screenshotListSelectionEvent( wxListEvent& event ) { event.Skip(); } virtual void screenshotFilenameSortingEvent( wxCommandEvent& event ) { event.Skip(); }