*/
-#include "qube_certificate_panel.h"
#include "download_certificate_dialog.h"
+#include "qube_certificate_panel.h"
#include "wx_util.h"
-#include "lib/internet.h"
#include "lib/compose.hpp"
#include "lib/config.h"
-#include <boost/algorithm/string/predicate.hpp>
+#include "lib/internet.h"
+#include <boost/algorithm/string.hpp>
using std::string;
using std::list;
+using namespace boost::algorithm;
using boost::optional;
#if BOOST_VERSION >= 106100
using namespace boost::placeholders;
return;
}
- auto const serial = wx_to_std(_serial->GetValue());
+ auto serial = wx_to_std(_serial->GetValue());
+ trim(serial);
+
optional<string> name;
for (auto i: files) {
if (boost::algorithm::starts_with(i, String::compose("%1-%2-", _type, serial))) {
return;
}
- auto error = get_from_url (String::compose("%1SMPTE-%2/%3", base, _type, *name), true, false, boost::bind(&DownloadCertificatePanel::load_certificate, this, _1));
+ auto error = get_from_url (String::compose("%1SMPTE-%2/%3", base, _type, *name), true, false, boost::bind(&DownloadCertificatePanel::load_certificate, this, _1, _2));
if (error) {
_dialog->message()->SetLabel(wxT(""));