diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-10-24 22:13:53 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-10-24 22:13:53 +0100 |
| commit | 63ea6b6c5ee64f8ee067c2b488d004b6dfe363e0 (patch) | |
| tree | d248762556466fd076cfd20f2e6aa1d5d9544184 /src/wx | |
| parent | 977b36672892b14de4ecb68e98415c64946e8a93 (diff) | |
Use boost::signals2; fix bugs with x-thread signalling.
Diffstat (limited to 'src/wx')
| -rw-r--r-- | src/wx/config_dialog.cc | 4 | ||||
| -rw-r--r-- | src/wx/dcp_range_dialog.h | 4 | ||||
| -rw-r--r-- | src/wx/film_editor.cc | 6 | ||||
| -rw-r--r-- | src/wx/film_editor.h | 3 | ||||
| -rw-r--r-- | src/wx/film_list.cc | 2 | ||||
| -rw-r--r-- | src/wx/film_viewer.cc | 8 | ||||
| -rw-r--r-- | src/wx/filter_dialog.cc | 3 | ||||
| -rw-r--r-- | src/wx/filter_dialog.h | 3 | ||||
| -rw-r--r-- | src/wx/filter_view.h | 4 | ||||
| -rw-r--r-- | src/wx/job_manager_view.cc | 5 |
10 files changed, 24 insertions, 18 deletions
diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc index b0bd6f2ee..f505b4bdc 100644 --- a/src/wx/config_dialog.cc +++ b/src/wx/config_dialog.cc @@ -35,7 +35,7 @@ #include "server_dialog.h" using namespace std; -using namespace boost; +using boost::bind; ConfigDialog::ConfigDialog (wxWindow* parent) : wxDialog (parent, wxID_ANY, _("DVD-o-matic Configuration"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) @@ -307,7 +307,7 @@ void ConfigDialog::edit_reference_filters_clicked (wxCommandEvent &) { FilterDialog* d = new FilterDialog (this, Config::instance()->reference_filters ()); - d->ActiveChanged.connect (sigc::mem_fun (*this, &ConfigDialog::reference_filters_changed)); + d->ActiveChanged.connect (boost::bind (&ConfigDialog::reference_filters_changed, this, _1)); d->ShowModal (); d->Destroy (); } diff --git a/src/wx/dcp_range_dialog.h b/src/wx/dcp_range_dialog.h index 706b0e430..ea15154ba 100644 --- a/src/wx/dcp_range_dialog.h +++ b/src/wx/dcp_range_dialog.h @@ -19,7 +19,7 @@ #include <wx/wx.h> #include <wx/spinctrl.h> -#include <sigc++/sigc++.h> +#include <boost/signals2.hpp> #include "lib/trim_action.h" class Film; @@ -29,7 +29,7 @@ class DCPRangeDialog : public wxDialog public: DCPRangeDialog (wxWindow *, Film *); - sigc::signal2<void, int, TrimAction> Changed; + boost::signals2::signal<void (int, TrimAction)> Changed; private: void whole_toggled (wxCommandEvent &); diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc index 502f3734c..542cde7d7 100644 --- a/src/wx/film_editor.cc +++ b/src/wx/film_editor.cc @@ -594,7 +594,7 @@ FilmEditor::set_film (Film* f) set_things_sensitive (_film != 0); if (_film) { - _film->Changed.connect (sigc::mem_fun (*this, &FilmEditor::film_changed)); + _film->Changed.connect (bind (&FilmEditor::film_changed, this, _1)); } if (_film) { @@ -663,7 +663,7 @@ void FilmEditor::edit_filters_clicked (wxCommandEvent &) { FilterDialog* d = new FilterDialog (this, _film->filters()); - d->ActiveChanged.connect (sigc::mem_fun (*_film, &Film::set_filters)); + d->ActiveChanged.connect (bind (&Film::set_filters, _film, _1)); d->ShowModal (); d->Destroy (); } @@ -758,7 +758,7 @@ void FilmEditor::change_dcp_range_clicked (wxCommandEvent &) { DCPRangeDialog* d = new DCPRangeDialog (this, _film); - d->Changed.connect (sigc::mem_fun (*this, &FilmEditor::dcp_range_changed)); + d->Changed.connect (bind (&FilmEditor::dcp_range_changed, this, _1, _2)); d->ShowModal (); } diff --git a/src/wx/film_editor.h b/src/wx/film_editor.h index 28afe7ff0..f6e180979 100644 --- a/src/wx/film_editor.h +++ b/src/wx/film_editor.h @@ -25,6 +25,7 @@ #include <wx/spinctrl.h> #include <wx/filepicker.h> #include <wx/collpane.h> +#include <boost/signals2.hpp> #include "lib/trim_action.h" #include "lib/film.h" @@ -41,7 +42,7 @@ public: void set_film (Film *); void setup_visibility (); - sigc::signal1<void, std::string> FileChanged; + boost::signals2::signal<void (std::string)> FileChanged; private: /* Handle changes to the view */ diff --git a/src/wx/film_list.cc b/src/wx/film_list.cc index 1a9854450..05d9734f6 100644 --- a/src/wx/film_list.cc +++ b/src/wx/film_list.cc @@ -43,7 +43,7 @@ FilmList::FilmList (string d) } _list.set_headers_visible (false); - _list.get_selection()->signal_changed().connect (sigc::mem_fun (*this, &FilmList::selection_changed)); + _list.get_selection()->signal_changed().connect (bind (&FilmList::selection_changed, this)); } Gtk::Widget& diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index e26423212..2496679aa 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -32,8 +32,10 @@ #include "film_viewer.h" #include "wx_util.h" -using namespace std; -using namespace boost; +using std::string; +using std::pair; +using std::max; +using boost::shared_ptr; class ThumbPanel : public wxPanel { @@ -304,7 +306,7 @@ FilmViewer::set_film (Film* f) return; } - _film->Changed.connect (sigc::mem_fun (*this, &FilmViewer::film_changed)); + _film->Changed.connect (bind (&FilmViewer::film_changed, this, _1)); film_changed (Film::CROP); film_changed (Film::THUMBS); setup_visibility (); diff --git a/src/wx/filter_dialog.cc b/src/wx/filter_dialog.cc index 028d082b4..2abe53026 100644 --- a/src/wx/filter_dialog.cc +++ b/src/wx/filter_dialog.cc @@ -26,6 +26,7 @@ #include "filter_view.h" using namespace std; +using boost::bind; FilterDialog::FilterDialog (wxWindow* parent, vector<Filter const *> const & f) : wxDialog (parent, wxID_ANY, wxString (_("Filters"))) @@ -34,7 +35,7 @@ FilterDialog::FilterDialog (wxWindow* parent, vector<Filter const *> const & f) wxBoxSizer* sizer = new wxBoxSizer (wxVERTICAL); sizer->Add (_filters, 1, wxEXPAND | wxALL, 6); - _filters->ActiveChanged.connect (sigc::mem_fun (*this, &FilterDialog::active_changed)); + _filters->ActiveChanged.connect (bind (&FilterDialog::active_changed, this)); wxSizer* buttons = CreateSeparatedButtonSizer (wxOK); if (buttons) { diff --git a/src/wx/filter_dialog.h b/src/wx/filter_dialog.h index 882d740cb..e76f8536b 100644 --- a/src/wx/filter_dialog.h +++ b/src/wx/filter_dialog.h @@ -22,6 +22,7 @@ */ #include <wx/wx.h> +#include <boost/signals2.hpp> class Film; class FilterView; @@ -34,7 +35,7 @@ class FilterDialog : public wxDialog public: FilterDialog (wxWindow *, std::vector<Filter const *> const &); - sigc::signal1<void, std::vector<Filter const *> > ActiveChanged; + boost::signals2::signal<void (std::vector<Filter const *>)> ActiveChanged; private: void active_changed (); diff --git a/src/wx/filter_view.h b/src/wx/filter_view.h index 770b55da6..b8d5f644f 100644 --- a/src/wx/filter_view.h +++ b/src/wx/filter_view.h @@ -21,9 +21,9 @@ * @brief A panel to select FFmpeg filters. */ +#include <boost/signals2.hpp> #include <vector> #include <map> -#include <sigc++/sigc++.h> #include <wx/wx.h> class Filter; @@ -38,7 +38,7 @@ public: std::vector<Filter const *> active () const; - sigc::signal0<void> ActiveChanged; + boost::signals2::signal<void()> ActiveChanged; private: void filter_toggled (wxCommandEvent &); diff --git a/src/wx/job_manager_view.cc b/src/wx/job_manager_view.cc index a6eef6e34..bd2886231 100644 --- a/src/wx/job_manager_view.cc +++ b/src/wx/job_manager_view.cc @@ -28,8 +28,9 @@ #include "job_manager_view.h" #include "wx_util.h" -using namespace std; -using namespace boost; +using std::string; +using std::list; +using boost::shared_ptr; /** Must be called in the GUI thread */ JobManagerView::JobManagerView (wxWindow* parent) |
