Kill DialogStyleManager::OnClose as it just does the default thing

Originally committed to SVN as r6415.
This commit is contained in:
Thomas Goyne 2012-02-01 00:48:42 +00:00
parent b48436c5de
commit c6ac746215
2 changed files with 5 additions and 11 deletions

View file

@ -36,6 +36,8 @@
#include "config.h" #include "config.h"
#ifndef AGI_PRE #ifndef AGI_PRE
#include <tr1/functional>
#include <wx/bmpbuttn.h> #include <wx/bmpbuttn.h>
#include <wx/clipbrd.h> #include <wx/clipbrd.h>
#include <wx/filedlg.h> #include <wx/filedlg.h>
@ -196,10 +198,9 @@ DialogStyleManager::DialogStyleManager (agi::Context *context)
CurrentDelete->Disable(); CurrentDelete->Disable();
// Buttons // Buttons
wxStdDialogButtonSizer *buttonSizer = new wxStdDialogButtonSizer(); wxStdDialogButtonSizer *buttonSizer = CreateStdDialogButtonSizer(wxCANCEL | wxHELP);
buttonSizer->SetCancelButton(new wxButton(this, wxID_CLOSE)); buttonSizer->GetCancelButton()->SetLabel(_("Close"));
buttonSizer->AddButton(new HelpButton(this,"Styles Manager")); Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(&HelpButton::OpenPage, "Styles Manager"), wxID_HELP);
buttonSizer->Realize();
// General layout // General layout
wxSizer *StylesSizer = new wxBoxSizer(wxHORIZONTAL); wxSizer *StylesSizer = new wxBoxSizer(wxHORIZONTAL);
@ -342,7 +343,6 @@ void DialogStyleManager::StorageActions (bool state) {
/////////////// ///////////////
// Event table // Event table
BEGIN_EVENT_TABLE(DialogStyleManager, wxDialog) BEGIN_EVENT_TABLE(DialogStyleManager, wxDialog)
EVT_BUTTON(wxID_CLOSE, DialogStyleManager::OnClose)
EVT_BUTTON(BUTTON_CATALOG_NEW, DialogStyleManager::OnCatalogNew) EVT_BUTTON(BUTTON_CATALOG_NEW, DialogStyleManager::OnCatalogNew)
EVT_BUTTON(BUTTON_CATALOG_DELETE, DialogStyleManager::OnCatalogDelete) EVT_BUTTON(BUTTON_CATALOG_DELETE, DialogStyleManager::OnCatalogDelete)
EVT_COMBOBOX(LIST_CATALOG, DialogStyleManager::OnChangeCatalog) EVT_COMBOBOX(LIST_CATALOG, DialogStyleManager::OnChangeCatalog)
@ -376,11 +376,6 @@ END_EVENT_TABLE()
////////// //////////
// Events // Events
/// @brief Close
void DialogStyleManager::OnClose (wxCommandEvent &) {
Close();
}
/// @brief Change catalog entry /// @brief Change catalog entry
void DialogStyleManager::OnChangeCatalog (wxCommandEvent &) { void DialogStyleManager::OnChangeCatalog (wxCommandEvent &) {
int sel = CatalogList->GetSelection(); int sel = CatalogList->GetSelection();

View file

@ -104,7 +104,6 @@ class DialogStyleManager : public wxDialog {
/// DOCME /// DOCME
wxSizer *MainSizer; wxSizer *MainSizer;
void OnClose (wxCommandEvent &event);
void OnChangeCatalog (wxCommandEvent &event); void OnChangeCatalog (wxCommandEvent &event);
void OnCatalogNew (wxCommandEvent &event); void OnCatalogNew (wxCommandEvent &event);
void OnCatalogDelete (wxCommandEvent &event); void OnCatalogDelete (wxCommandEvent &event);