BOOST_FOREACH.
[dcpomatic.git] / src / wx / recipients_panel.cc
index e4559742fe0ad330d9ecd75e149ce1494dfcabf1..e59293fe782a92e634a98ad7af92317e9652e717 100644 (file)
@@ -23,7 +23,6 @@
 #include "recipient_dialog.h"
 #include "dcpomatic_button.h"
 #include "lib/config.h"
-#include <boost/foreach.hpp>
 #include <list>
 #include <iostream>
 
@@ -33,7 +32,7 @@ using std::cout;
 using std::map;
 using std::string;
 using std::make_pair;
-using boost::shared_ptr;
+using std::shared_ptr;
 using boost::optional;
 using namespace dcpomatic;
 
@@ -43,8 +42,17 @@ RecipientsPanel::RecipientsPanel (wxWindow* parent)
 {
        wxBoxSizer* sizer = new wxBoxSizer (wxVERTICAL);
 
-       _search = new wxSearchCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (200, -1));
+#ifdef __WXGTK3__
+       int const height = 30;
+#else
+       int const height = -1;
+#endif
+
+       _search = new wxSearchCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (200, height));
+#ifndef __WXGTK3__
+       /* The cancel button seems to be strangely broken in GTK3; clicking on it twice sometimes works */
        _search->ShowCancelButton (true);
+#endif
        sizer->Add (_search, 0, wxBOTTOM, DCPOMATIC_SIZER_GAP);
 
        wxBoxSizer* targets = new wxBoxSizer (wxHORIZONTAL);
@@ -216,7 +224,7 @@ RecipientsPanel::add_recipients ()
 {
        _root = _targets->AddRoot ("Foo");
 
-       BOOST_FOREACH (shared_ptr<DKDMRecipient> i, Config::instance()->dkdm_recipients()) {
+       for (auto i: Config::instance()->dkdm_recipients()) {
                add_recipient (i);
        }
 }