diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-07-26 11:14:41 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-07-26 11:14:41 +0100 |
| commit | 16a7ea91e973b327735658857cbf996cc740be77 (patch) | |
| tree | ab67c21cb8cb85274b079268ef7c8d2160e3cae2 /src/tools/dcpomatic_batch.cc | |
| parent | 750ad2a59ff2b3487859b6c290d06c0129cb6aa0 (diff) | |
Remove old Connect() wxWidgets API and use Bind().
Diffstat (limited to 'src/tools/dcpomatic_batch.cc')
| -rw-r--r-- | src/tools/dcpomatic_batch.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/tools/dcpomatic_batch.cc b/src/tools/dcpomatic_batch.cc index b4ab054fd..23d5a4819 100644 --- a/src/tools/dcpomatic_batch.cc +++ b/src/tools/dcpomatic_batch.cc @@ -62,9 +62,9 @@ public: setup_menu (bar); SetMenuBar (bar); - Connect (ID_file_add_film, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (Frame::file_add_film)); - Connect (ID_file_quit, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (Frame::file_quit)); - Connect (ID_help_about, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (Frame::help_about)); + Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::file_add_film, this), ID_file_add_film); + Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::file_quit, this), ID_file_quit); + Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::help_about, this), ID_help_about); wxPanel* panel = new wxPanel (this); wxSizer* s = new wxBoxSizer (wxHORIZONTAL); @@ -78,14 +78,14 @@ public: wxSizer* buttons = new wxBoxSizer (wxHORIZONTAL); wxButton* add = new wxButton (panel, wxID_ANY, _("Add Film...")); - add->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (Frame::add_film)); + add->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&Frame::add_film, this)); buttons->Add (add, 1, wxALL, 6); sizer->Add (buttons, 0, wxALL, 6); panel->SetSizer (sizer); - Connect (wxID_ANY, wxEVT_CLOSE_WINDOW, wxCloseEventHandler (Frame::close)); + Bind (wxEVT_CLOSE_WINDOW, boost::bind (&Frame::close, this, _1)); } private: @@ -117,19 +117,19 @@ private: ev.Skip (); } - void file_add_film (wxCommandEvent& ev) + void file_add_film () { - add_film (ev); + add_film (); } - void file_quit (wxCommandEvent &) + void file_quit () { if (should_close ()) { Close (true); } } - void help_about (wxCommandEvent &) + void help_about () { wxAboutDialogInfo info; info.SetName (_("DCP-o-matic Batch Converter")); @@ -161,7 +161,7 @@ private: wxAboutBox (info); } - void add_film (wxCommandEvent &) + void add_film () { wxDirDialog* c = new wxDirDialog (this, _("Select film to open"), wxStandardPaths::Get().GetDocumentsDir(), wxDEFAULT_DIALOG_STYLE | wxDD_DIR_MUST_EXIST); int r; @@ -226,12 +226,12 @@ class App : public wxApp f->Show (); ui_signaller = new wxUISignaller (this); - this->Connect (-1, wxEVT_IDLE, wxIdleEventHandler (App::idle)); + this->Bind (wxEVT_IDLE, boost::bind (&App::idle, this)); return true; } - void idle (wxIdleEvent &) + void idle () { ui_signaller->ui_idle (); } |
