X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Ftemplates_dialog.cc;h=4ddd3ad929ac7cc7ada410a0bb03b023d0882ccf;hb=19760ad4cf6d348416444e515b5e709be565f81e;hp=eb0d491e072a5b0f87029ca9ff0760bc9587744c;hpb=73407f943ba25e2a0df2c98b3a9a938132876e9f;p=dcpomatic.git diff --git a/src/wx/templates_dialog.cc b/src/wx/templates_dialog.cc index eb0d491e0..4ddd3ad92 100644 --- a/src/wx/templates_dialog.cc +++ b/src/wx/templates_dialog.cc @@ -21,6 +21,7 @@ #include "templates_dialog.h" #include "wx_util.h" #include "rename_template_dialog.h" +#include "dcpomatic_button.h" #include "lib/config.h" #include #include @@ -47,9 +48,9 @@ TemplatesDialog::TemplatesDialog (wxWindow* parent) { wxSizer* s = new wxBoxSizer (wxVERTICAL); - _rename = new wxButton (this, wxID_ANY, _("Rename...")); + _rename = new Button (this, _("Rename...")); s->Add (_rename, 0, wxTOP | wxBOTTOM, 2); - _remove = new wxButton (this, wxID_ANY, _("Remove")); + _remove = new Button (this, _("Remove")); s->Add (_remove, 0, wxTOP | wxBOTTOM, 2); hs->Add (s, 0, wxLEFT, DCPOMATIC_SIZER_X_GAP); } @@ -61,11 +62,11 @@ TemplatesDialog::TemplatesDialog (wxWindow* parent) _sizer->Add (buttons, wxSizerFlags().Expand().DoubleBorder()); } - _rename->Bind (wxEVT_COMMAND_BUTTON_CLICKED, bind (&TemplatesDialog::rename_clicked, this)); - _remove->Bind (wxEVT_COMMAND_BUTTON_CLICKED, bind (&TemplatesDialog::remove_clicked, this)); + _rename->Bind (wxEVT_BUTTON, bind (&TemplatesDialog::rename_clicked, this)); + _remove->Bind (wxEVT_BUTTON, bind (&TemplatesDialog::remove_clicked, this)); - _list->Bind (wxEVT_COMMAND_LIST_ITEM_SELECTED, bind (&TemplatesDialog::selection_changed, this)); - _list->Bind (wxEVT_COMMAND_LIST_ITEM_DESELECTED, bind (&TemplatesDialog::selection_changed, this)); + _list->Bind (wxEVT_LIST_ITEM_SELECTED, bind (&TemplatesDialog::selection_changed, this)); + _list->Bind (wxEVT_LIST_ITEM_DESELECTED, bind (&TemplatesDialog::selection_changed, this)); _list->Bind (wxEVT_SIZE, bind (&TemplatesDialog::resized, this, _1)); _config_connection = Config::instance()->Changed.connect (bind (&TemplatesDialog::refresh, this));