diff --git a/aegisub/src/dialog_style_manager.cpp b/aegisub/src/dialog_style_manager.cpp index 7a20c776c..3b3f8c606 100644 --- a/aegisub/src/dialog_style_manager.cpp +++ b/aegisub/src/dialog_style_manager.cpp @@ -36,6 +36,8 @@ #include "config.h" #ifndef AGI_PRE +#include + #include #include #include @@ -196,10 +198,9 @@ DialogStyleManager::DialogStyleManager (agi::Context *context) CurrentDelete->Disable(); // Buttons - wxStdDialogButtonSizer *buttonSizer = new wxStdDialogButtonSizer(); - buttonSizer->SetCancelButton(new wxButton(this, wxID_CLOSE)); - buttonSizer->AddButton(new HelpButton(this,"Styles Manager")); - buttonSizer->Realize(); + wxStdDialogButtonSizer *buttonSizer = CreateStdDialogButtonSizer(wxCANCEL | wxHELP); + buttonSizer->GetCancelButton()->SetLabel(_("Close")); + Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(&HelpButton::OpenPage, "Styles Manager"), wxID_HELP); // General layout wxSizer *StylesSizer = new wxBoxSizer(wxHORIZONTAL); @@ -342,7 +343,6 @@ void DialogStyleManager::StorageActions (bool state) { /////////////// // Event table BEGIN_EVENT_TABLE(DialogStyleManager, wxDialog) - EVT_BUTTON(wxID_CLOSE, DialogStyleManager::OnClose) EVT_BUTTON(BUTTON_CATALOG_NEW, DialogStyleManager::OnCatalogNew) EVT_BUTTON(BUTTON_CATALOG_DELETE, DialogStyleManager::OnCatalogDelete) EVT_COMBOBOX(LIST_CATALOG, DialogStyleManager::OnChangeCatalog) @@ -376,11 +376,6 @@ END_EVENT_TABLE() ////////// // Events -/// @brief Close -void DialogStyleManager::OnClose (wxCommandEvent &) { - Close(); -} - /// @brief Change catalog entry void DialogStyleManager::OnChangeCatalog (wxCommandEvent &) { int sel = CatalogList->GetSelection(); diff --git a/aegisub/src/dialog_style_manager.h b/aegisub/src/dialog_style_manager.h index 9e16cad71..0c7901220 100644 --- a/aegisub/src/dialog_style_manager.h +++ b/aegisub/src/dialog_style_manager.h @@ -104,7 +104,6 @@ class DialogStyleManager : public wxDialog { /// DOCME wxSizer *MainSizer; - void OnClose (wxCommandEvent &event); void OnChangeCatalog (wxCommandEvent &event); void OnCatalogNew (wxCommandEvent &event); void OnCatalogDelete (wxCommandEvent &event);