diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-11-20 18:53:15 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-11-20 18:53:15 +0000 |
| commit | 9981fe99124d50239c90d26ed9251a7eaf4f21d9 (patch) | |
| tree | 04c074ce5ead599525b1f1ad62e0ee76c886c58b /src | |
| parent | 492bc5579d950e08847750ee1fba1187ba00d3c3 (diff) | |
ContentMenu is never destroyed, so some bits can be removed.
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/content_menu.cc | 26 | ||||
| -rw-r--r-- | src/wx/content_menu.h | 3 |
2 files changed, 7 insertions, 22 deletions
diff --git a/src/wx/content_menu.cc b/src/wx/content_menu.cc index 9f3b6333a..f332dbe91 100644 --- a/src/wx/content_menu.cc +++ b/src/wx/content_menu.cc @@ -88,19 +88,9 @@ ContentMenu::ContentMenu (wxWindow* p) _parent->Bind (wxEVT_MENU, boost::bind (&ContentMenu::kdm, this), ID_kdm); _parent->Bind (wxEVT_MENU, boost::bind (&ContentMenu::ov, this), ID_ov); _parent->Bind (wxEVT_MENU, boost::bind (&ContentMenu::remove, this), ID_remove); - _parent->Bind (wxEVT_MENU, boost::bind (&ContentMenu::cpl_selected, this, _1), 1, ID_repeat - 1); } -ContentMenu::~ContentMenu () -{ - delete _menu; - - BOOST_FOREACH (boost::signals2::connection& i, _job_connections) { - i.disconnect (); - } -} - void ContentMenu::popup (weak_ptr<Film> film, ContentList c, TimelineContentViewList v, wxPoint p) { @@ -316,15 +306,13 @@ ContentMenu::find_missing () shared_ptr<Job> j (new ExamineContentJob (film, content)); - _job_connections.push_back ( - j->Finished.connect ( - bind ( - &ContentMenu::maybe_found_missing, - this, - boost::weak_ptr<Job> (j), - boost::weak_ptr<Content> (_content.front ()), - boost::weak_ptr<Content> (content) - ) + j->Finished.connect ( + bind ( + &ContentMenu::maybe_found_missing, + this, + boost::weak_ptr<Job> (j), + boost::weak_ptr<Content> (_content.front ()), + boost::weak_ptr<Content> (content) ) ); diff --git a/src/wx/content_menu.h b/src/wx/content_menu.h index 84daa71a5..ecbb4a350 100644 --- a/src/wx/content_menu.h +++ b/src/wx/content_menu.h @@ -35,7 +35,6 @@ class ContentMenu : public boost::noncopyable { public: ContentMenu (wxWindow* p); - ~ContentMenu (); void popup (boost::weak_ptr<Film>, ContentList, TimelineContentViewList, wxPoint); @@ -67,8 +66,6 @@ private: wxMenuItem* _ov; wxMenuItem* _choose_cpl; wxMenuItem* _remove; - - std::list<boost::signals2::connection> _job_connections; }; #endif |
