*/
-#include "lib/dcpomatic_assert.h"
#include "full_language_tag_dialog.h"
+#include "lib/dcpomatic_assert.h"
#include <dcp/language_tag.h>
+#include <dcp/warnings.h>
+LIBDCP_DISABLE_WARNINGS
#include <wx/listctrl.h>
#include <wx/srchctrl.h>
#include <wx/wx.h>
+LIBDCP_ENABLE_WARNINGS
#include <boost/algorithm/string.hpp>
#include <boost/bind/bind.hpp>
#include <boost/optional.hpp>
#include <boost/signals2.hpp>
-#include <iostream>
#include <iterator>
#include <string>
#include <vector>
using std::min;
using std::pair;
+using std::shared_ptr;
using std::string;
using std::vector;
-using boost::optional;
-using std::shared_ptr;
using std::weak_ptr;
+using boost::optional;
#if BOOST_VERSION >= 106100
using namespace boost::placeholders;
#endif
}
private:
- wxString OnGetItemText (long item, long column) const
+ wxString OnGetItemText (long item, long column) const override
{
if (column == 0) {
return _matching_subtags[item].subtag;
{
auto search = _search->GetValue();
_list->set_search (search.ToStdString());
- if (search.Length() > 0) {
+ if (search.Length() > 0 && _list->GetItemCount() > 0) {
_list->EnsureVisible (0);
}
SearchChanged (_search->GetValue().ToStdString());
FullLanguageTagDialog::FullLanguageTagDialog (wxWindow* parent, dcp::LanguageTag tag)
- : wxDialog (parent, wxID_ANY, "Language Tag", wxDefaultPosition, wxSize(-1, 500))
+ : wxDialog (parent, wxID_ANY, _("Language Tag"), wxDefaultPosition, wxSize(-1, 500))
{
_current_tag_list = new wxListCtrl (this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_SINGLE_SEL | wxLC_NO_HEADER);
_current_tag_list->AppendColumn ("", wxLIST_FORMAT_LEFT, 200);