summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-08-12 09:10:08 +0100
committerCarl Hetherington <cth@carlh.net>2016-08-12 09:14:09 +0100
commitb81241ce69a689629307832f802ac4faa6ed885f (patch)
tree307eb7b6bb562553e6e92e8939d5c89f7111e66a /src
parent94056bf7f8fdef32da3cd78eff68d58560b4e6be (diff)
Move locale_convert into libdcp.
Diffstat (limited to 'src')
-rw-r--r--src/lib/audio_content.cc1
-rw-r--r--src/lib/colour_conversion.cc2
-rw-r--r--src/lib/config.cc2
-rw-r--r--src/lib/content.cc3
-rw-r--r--src/lib/ffmpeg_content.cc9
-rw-r--r--src/lib/film.cc2
-rw-r--r--src/lib/j2k_image_proxy.cc2
-rw-r--r--src/lib/locale_convert.cc122
-rw-r--r--src/lib/locale_convert.h81
-rw-r--r--src/lib/player_video.cc4
-rw-r--r--src/lib/raw_image_proxy.cc2
-rw-r--r--src/lib/subtitle_content.cc8
-rw-r--r--src/lib/user_property.h4
-rw-r--r--src/lib/util.cc3
-rw-r--r--src/lib/video_content.cc1
-rw-r--r--src/lib/wscript1
-rw-r--r--src/wx/audio_mapping_view.cc3
-rw-r--r--src/wx/colour_conversion_editor.cc3
-rw-r--r--src/wx/config_dialog.cc3
-rw-r--r--src/wx/dcp_panel.cc3
-rw-r--r--src/wx/image_sequence_dialog.cc4
-rw-r--r--src/wx/playhead_to_frame_dialog.cc4
-rw-r--r--src/wx/time_picker.cc3
-rw-r--r--src/wx/timing_panel.cc3
-rw-r--r--src/wx/video_waveform_plot.cc3
-rw-r--r--src/wx/wx_util.cc3
26 files changed, 43 insertions, 236 deletions
diff --git a/src/lib/audio_content.cc b/src/lib/audio_content.cc
index 25a7ef8a5..e66b8b998 100644
--- a/src/lib/audio_content.cc
+++ b/src/lib/audio_content.cc
@@ -24,7 +24,6 @@
#include "config.h"
#include "frame_rate_change.h"
#include "compose.hpp"
-#include "locale_convert.h"
#include <dcp/raw_convert.h>
#include <libcxml/cxml.h>
#include <libxml++/libxml++.h>
diff --git a/src/lib/colour_conversion.cc b/src/lib/colour_conversion.cc
index e4659a5d9..aa6b61fed 100644
--- a/src/lib/colour_conversion.cc
+++ b/src/lib/colour_conversion.cc
@@ -152,7 +152,7 @@ ColourConversion::as_xml (xmlpp::Node* node) const
in_node->add_child("B")->add_child_text (raw_convert<string> (tf->B ()));
}
- node->add_child("YUVToRGB")->add_child_text (raw_convert<string> (_yuv_to_rgb));
+ node->add_child("YUVToRGB")->add_child_text (raw_convert<string> (static_cast<int> (_yuv_to_rgb)));
node->add_child("RedX")->add_child_text (raw_convert<string> (_red.x));
node->add_child("RedY")->add_child_text (raw_convert<string> (_red.y));
node->add_child("GreenX")->add_child_text (raw_convert<string> (_green.x));
diff --git a/src/lib/config.cc b/src/lib/config.cc
index 7f457439d..b5e4b4d00 100644
--- a/src/lib/config.cc
+++ b/src/lib/config.cc
@@ -380,7 +380,7 @@ Config::write_config_xml () const
}
root->add_child("OnlyServersEncode")->add_child_text (_only_servers_encode ? "1" : "0");
- root->add_child("TMSProtocol")->add_child_text (raw_convert<string> (_tms_protocol));
+ root->add_child("TMSProtocol")->add_child_text (raw_convert<string> (static_cast<int> (_tms_protocol)));
root->add_child("TMSIP")->add_child_text (_tms_ip);
root->add_child("TMSPath")->add_child_text (_tms_path);
root->add_child("TMSUser")->add_child_text (_tms_user);
diff --git a/src/lib/content.cc b/src/lib/content.cc
index 536036ff7..9083635f2 100644
--- a/src/lib/content.cc
+++ b/src/lib/content.cc
@@ -27,9 +27,9 @@
#include "content_factory.h"
#include "exceptions.h"
#include "film.h"
-#include "locale_convert.h"
#include "job.h"
#include "compose.hpp"
+#include <dcp/locale_convert.h>
#include <dcp/raw_convert.h>
#include <libcxml/cxml.h>
#include <libxml++/libxml++.h>
@@ -46,6 +46,7 @@ using std::max;
using std::pair;
using boost::shared_ptr;
using dcp::raw_convert;
+using dcp::locale_convert;
int const ContentProperty::PATH = 400;
int const ContentProperty::POSITION = 401;
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc
index 71cda084c..b5c5ce0a8 100644
--- a/src/lib/ffmpeg_content.cc
+++ b/src/lib/ffmpeg_content.cc
@@ -33,7 +33,6 @@
#include "exceptions.h"
#include "frame_rate_change.h"
#include "subtitle_content.h"
-#include "locale_convert.h"
#include <dcp/raw_convert.h>
#include <libcxml/cxml.h>
extern "C" {
@@ -223,10 +222,10 @@ FFmpegContent::as_xml (xmlpp::Node* node) const
node->add_child("FirstVideo")->add_child_text (raw_convert<string> (_first_video.get().get()));
}
- node->add_child("ColorRange")->add_child_text (raw_convert<string> (_color_range));
- node->add_child("ColorPrimaries")->add_child_text (raw_convert<string> (_color_primaries));
- node->add_child("ColorTransferCharacteristic")->add_child_text (raw_convert<string> (_color_trc));
- node->add_child("Colorspace")->add_child_text (raw_convert<string> (_colorspace));
+ node->add_child("ColorRange")->add_child_text (raw_convert<string> (static_cast<int> (_color_range)));
+ node->add_child("ColorPrimaries")->add_child_text (raw_convert<string> (static_cast<int> (_color_primaries)));
+ node->add_child("ColorTransferCharacteristic")->add_child_text (raw_convert<string> (static_cast<int> (_color_trc)));
+ node->add_child("Colorspace")->add_child_text (raw_convert<string> (static_cast<int> (_colorspace)));
if (_bits_per_pixel) {
node->add_child("BitsPerPixel")->add_child_text (raw_convert<string> (_bits_per_pixel.get ()));
}
diff --git a/src/lib/film.cc b/src/lib/film.cc
index 58c272eb1..a41ab3c95 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -361,7 +361,7 @@ Film::metadata () const
if (_audio_processor) {
root->add_child("AudioProcessor")->add_child_text (_audio_processor->id ());
}
- root->add_child("ReelType")->add_child_text (raw_convert<string> (_reel_type));
+ root->add_child("ReelType")->add_child_text (raw_convert<string> (static_cast<int> (_reel_type)));
root->add_child("ReelLength")->add_child_text (raw_convert<string> (_reel_length));
root->add_child("UploadAfterMakeDCP")->add_child_text (_upload_after_make_dcp ? "1" : "0");
_playlist->as_xml (root->add_child ("Playlist"));
diff --git a/src/lib/j2k_image_proxy.cc b/src/lib/j2k_image_proxy.cc
index 707a088e9..fb38c9e99 100644
--- a/src/lib/j2k_image_proxy.cc
+++ b/src/lib/j2k_image_proxy.cc
@@ -143,7 +143,7 @@ J2KImageProxy::add_metadata (xmlpp::Node* node) const
node->add_child("Width")->add_child_text (raw_convert<string> (_size.width));
node->add_child("Height")->add_child_text (raw_convert<string> (_size.height));
if (_eye) {
- node->add_child("Eye")->add_child_text (raw_convert<string> (_eye.get ()));
+ node->add_child("Eye")->add_child_text (raw_convert<string> (static_cast<int> (_eye.get ())));
}
node->add_child("Size")->add_child_text (raw_convert<string> (_data.size ()));
}
diff --git a/src/lib/locale_convert.cc b/src/lib/locale_convert.cc
deleted file mode 100644
index 6358c0f8c..000000000
--- a/src/lib/locale_convert.cc
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
-
- This file is part of DCP-o-matic.
-
- DCP-o-matic is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- DCP-o-matic is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#include "locale_convert.h"
-#include <string>
-#include <inttypes.h>
-
-using std::string;
-
-template<>
-string
-locale_convert (int x, int)
-{
- char buffer[64];
- snprintf (buffer, sizeof(buffer), "%d", x);
- return buffer;
-}
-
-template<>
-string
-locale_convert (int64_t x, int)
-{
- char buffer[64];
- snprintf (buffer, sizeof(buffer), "%" PRId64, x);
- return buffer;
-}
-
-template<>
-string
-locale_convert (float x, int precision)
-{
- char format[64];
- snprintf (format, sizeof(format), "%%.%df", precision);
- char buffer[64];
- snprintf (buffer, sizeof(buffer), format, x);
- return buffer;
-}
-
-template<>
-string
-locale_convert (double x, int precision)
-{
- char format[64];
- snprintf (format, sizeof(format), "%%.%df", precision);
- char buffer[64];
- snprintf (buffer, sizeof(buffer), format, x);
- return buffer;
-}
-
-template<>
-string
-locale_convert (string x, int)
-{
- return x;
-}
-
-template<>
-string
-locale_convert (char* x, int)
-{
- return x;
-}
-
-template<>
-string
-locale_convert (char const * x, int)
-{
- return x;
-}
-
-template<>
-int
-locale_convert (string x, int)
-{
- int y = 0;
- sscanf (x.c_str(), "%d", &y);
- return y;
-}
-
-template<>
-int64_t
-locale_convert (string x, int)
-{
- int64_t y = 0;
- sscanf (x.c_str(), "%" PRId64, &y);
- return y;
-}
-
-template<>
-float
-locale_convert (string x, int)
-{
- float y = 0;
- sscanf (x.c_str(), "%f", &y);
- return y;
-}
-
-template<>
-double
-locale_convert (string x, int)
-{
- double y = 0;
- sscanf (x.c_str(), "%lf", &y);
- return y;
-}
diff --git a/src/lib/locale_convert.h b/src/lib/locale_convert.h
deleted file mode 100644
index b5c38caae..000000000
--- a/src/lib/locale_convert.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
-
- This file is part of DCP-o-matic.
-
- DCP-o-matic is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- DCP-o-matic is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#ifndef DCPOMATIC_LOCALE_CONVERT_H
-#define DCPOMATIC_LOCALE_CONVERT_H
-
-#include <boost/static_assert.hpp>
-#include <string>
-
-template <typename P, typename Q>
-P
-locale_convert (Q x, int precision = 16)
-{
- /* We can't write a generic version of locale_convert; all required
- versions must be specialised.
- */
- BOOST_STATIC_ASSERT (sizeof (Q) == 0);
-}
-
-template <>
-std::string
-locale_convert (int x, int);
-
-template <>
-std::string
-locale_convert (int64_t x, int);
-
-template <>
-std::string
-locale_convert (float x, int precision);
-
-template <>
-std::string
-locale_convert (double x, int precision);
-
-template <>
-std::string
-locale_convert (std::string x, int);
-
-template <>
-std::string
-locale_convert (char* x, int);
-
-template <>
-std::string
-locale_convert (char const * x, int);
-
-template <>
-int
-locale_convert (std::string x, int);
-
-template <>
-int64_t
-locale_convert (std::string x, int);
-
-template <>
-float
-locale_convert (std::string x, int);
-
-template <>
-double
-locale_convert (std::string x, int);
-
-#endif
diff --git a/src/lib/player_video.cc b/src/lib/player_video.cc
index a86ff1451..17d3dc522 100644
--- a/src/lib/player_video.cc
+++ b/src/lib/player_video.cc
@@ -159,8 +159,8 @@ PlayerVideo::add_metadata (xmlpp::Node* node) const
node->add_child("InterHeight")->add_child_text (raw_convert<string> (_inter_size.height));
node->add_child("OutWidth")->add_child_text (raw_convert<string> (_out_size.width));
node->add_child("OutHeight")->add_child_text (raw_convert<string> (_out_size.height));
- node->add_child("Eyes")->add_child_text (raw_convert<string> (_eyes));
- node->add_child("Part")->add_child_text (raw_convert<string> (_part));
+ node->add_child("Eyes")->add_child_text (raw_convert<string> (static_cast<int> (_eyes)));
+ node->add_child("Part")->add_child_text (raw_convert<string> (static_cast<int> (_part)));
if (_colour_conversion) {
_colour_conversion.get().as_xml (node);
}
diff --git a/src/lib/raw_image_proxy.cc b/src/lib/raw_image_proxy.cc
index e182c0e5d..6ebcee60c 100644
--- a/src/lib/raw_image_proxy.cc
+++ b/src/lib/raw_image_proxy.cc
@@ -64,7 +64,7 @@ RawImageProxy::add_metadata (xmlpp::Node* node) const
node->add_child("Type")->add_child_text (N_("Raw"));
node->add_child("Width")->add_child_text (raw_convert<string> (_image->size().width));
node->add_child("Height")->add_child_text (raw_convert<string> (_image->size().height));
- node->add_child("PixelFormat")->add_child_text (raw_convert<string> (_image->pixel_format ()));
+ node->add_child("PixelFormat")->add_child_text (raw_convert<string> (static_cast<int> (_image->pixel_format ())));
}
void
diff --git a/src/lib/subtitle_content.cc b/src/lib/subtitle_content.cc
index d6bf54aef..21bfd8a2d 100644
--- a/src/lib/subtitle_content.cc
+++ b/src/lib/subtitle_content.cc
@@ -224,8 +224,8 @@ SubtitleContent::as_xml (xmlpp::Node* root) const
{
boost::mutex::scoped_lock lm (_mutex);
- root->add_child("UseSubtitles")->add_child_text (raw_convert<string> (_use));
- root->add_child("BurnSubtitles")->add_child_text (raw_convert<string> (_burn));
+ root->add_child("UseSubtitles")->add_child_text (_use ? "1" : "0");
+ root->add_child("BurnSubtitles")->add_child_text (_burn ? "1" : "0");
root->add_child("SubtitleXOffset")->add_child_text (raw_convert<string> (_x_offset));
root->add_child("SubtitleYOffset")->add_child_text (raw_convert<string> (_y_offset));
root->add_child("SubtitleXScale")->add_child_text (raw_convert<string> (_x_scale));
@@ -234,8 +234,8 @@ SubtitleContent::as_xml (xmlpp::Node* root) const
root->add_child("Red")->add_child_text (raw_convert<string> (_colour.r));
root->add_child("Green")->add_child_text (raw_convert<string> (_colour.g));
root->add_child("Blue")->add_child_text (raw_convert<string> (_colour.b));
- root->add_child("Outline")->add_child_text (raw_convert<string> (_outline));
- root->add_child("Shadow")->add_child_text (raw_convert<string> (_shadow));
+ root->add_child("Outline")->add_child_text (_outline ? "1" : "0");
+ root->add_child("Shadow")->add_child_text (_shadow ? "1" : "0");
root->add_child("EffectRed")->add_child_text (raw_convert<string> (_effect_colour.r));
root->add_child("EffectGreen")->add_child_text (raw_convert<string> (_effect_colour.g));
root->add_child("EffectBlue")->add_child_text (raw_convert<string> (_effect_colour.b));
diff --git a/src/lib/user_property.h b/src/lib/user_property.h
index 8b69b7687..ffbb99a5f 100644
--- a/src/lib/user_property.h
+++ b/src/lib/user_property.h
@@ -21,7 +21,7 @@
#ifndef DCPOMATIC_USER_PROPERTY_H
#define DCPOMATIC_USER_PROPERTY_H
-#include "locale_convert.h"
+#include <dcp/locale_convert.h>
class UserProperty
{
@@ -37,7 +37,7 @@ public:
UserProperty (Category category_, std::string key_, T value_, std::string unit_ = "")
: category (category_)
, key (key_)
- , value (locale_convert<std::string> (value_))
+ , value (dcp::locale_convert<std::string> (value_))
, unit (unit_)
{}
diff --git a/src/lib/util.cc b/src/lib/util.cc
index eedc7ddb5..d20fd7dc7 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -36,7 +36,7 @@
#include "digester.h"
#include "audio_processor.h"
#include "compose.hpp"
-#include "locale_convert.h"
+#include <dcp/locale_convert.h>
#include <dcp/util.h>
#include <dcp/raw_convert.h>
#include <dcp/picture_asset.h>
@@ -94,6 +94,7 @@ using boost::lexical_cast;
using boost::bad_lexical_cast;
using dcp::Size;
using dcp::raw_convert;
+using dcp::locale_convert;
/** Path to our executable, required by the stacktrace stuff and filled
* in during App::onInit().
diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc
index ac038678c..4f1b08016 100644
--- a/src/lib/video_content.cc
+++ b/src/lib/video_content.cc
@@ -30,7 +30,6 @@
#include "exceptions.h"
#include "frame_rate_change.h"
#include "log.h"
-#include "locale_convert.h"
#include <dcp/raw_convert.h>
#include <libcxml/cxml.h>
#include <dcp/colour_matrix.h>
diff --git a/src/lib/wscript b/src/lib/wscript
index 074c12ad4..911ee0af4 100644
--- a/src/lib/wscript
+++ b/src/lib/wscript
@@ -94,7 +94,6 @@ sources = """
job.cc
job_manager.cc
json_server.cc
- locale_convert.cc
log.cc
log_entry.cc
magick_image_proxy.cc
diff --git a/src/wx/audio_mapping_view.cc b/src/wx/audio_mapping_view.cc
index 866156336..0833eadde 100644
--- a/src/wx/audio_mapping_view.cc
+++ b/src/wx/audio_mapping_view.cc
@@ -27,7 +27,7 @@
#include "audio_gain_dialog.h"
#include "lib/audio_mapping.h"
#include "lib/util.h"
-#include "lib/locale_convert.h"
+#include <dcp/locale_convert.h>
#include <dcp/types.h>
#include <wx/wx.h>
#include <wx/renderer.h>
@@ -45,6 +45,7 @@ using std::vector;
using std::pair;
using std::make_pair;
using boost::shared_ptr;
+using dcp::locale_convert;
#define INDICATOR_SIZE 16
#define LEFT_WIDTH 48
diff --git a/src/wx/colour_conversion_editor.cc b/src/wx/colour_conversion_editor.cc
index e56f30baf..d21d45fd2 100644
--- a/src/wx/colour_conversion_editor.cc
+++ b/src/wx/colour_conversion_editor.cc
@@ -21,7 +21,7 @@
#include "wx_util.h"
#include "colour_conversion_editor.h"
#include "lib/colour_conversion.h"
-#include "lib/locale_convert.h"
+#include <dcp/locale_convert.h>
#include <dcp/gamma_transfer_function.h>
#include <dcp/modified_gamma_transfer_function.h>
#include <wx/spinctrl.h>
@@ -32,6 +32,7 @@ using std::string;
using std::cout;
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
+using dcp::locale_convert;
ColourConversionEditor::ColourConversionEditor (wxWindow* parent, bool yuv)
: wxPanel (parent, wxID_ANY)
diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc
index 6006ba782..cb9f4669b 100644
--- a/src/wx/config_dialog.cc
+++ b/src/wx/config_dialog.cc
@@ -41,7 +41,7 @@
#include "lib/util.h"
#include "lib/cross.h"
#include "lib/exceptions.h"
-#include "lib/locale_convert.h"
+#include <dcp/locale_convert.h>
#include <dcp/exceptions.h>
#include <dcp/certificate_chain.h>
#include <wx/stdpaths.h>
@@ -63,6 +63,7 @@ using boost::bind;
using boost::shared_ptr;
using boost::function;
using boost::optional;
+using dcp::locale_convert;
class Page
{
diff --git a/src/wx/dcp_panel.cc b/src/wx/dcp_panel.cc
index 8cbd1dbb6..ea1315246 100644
--- a/src/wx/dcp_panel.cc
+++ b/src/wx/dcp_panel.cc
@@ -34,7 +34,7 @@
#include "lib/subtitle_content.h"
#include "lib/dcp_content.h"
#include "lib/audio_content.h"
-#include "lib/locale_convert.h"
+#include <dcp/locale_convert.h>
#include <dcp/key.h>
#include <wx/wx.h>
#include <wx/notebook.h>
@@ -53,6 +53,7 @@ using std::max;
using std::make_pair;
using boost::lexical_cast;
using boost::shared_ptr;
+using dcp::locale_convert;
DCPPanel::DCPPanel (wxNotebook* n, boost::shared_ptr<Film> film)
: _audio_dialog (0)
diff --git a/src/wx/image_sequence_dialog.cc b/src/wx/image_sequence_dialog.cc
index a207338a1..0484b900e 100644
--- a/src/wx/image_sequence_dialog.cc
+++ b/src/wx/image_sequence_dialog.cc
@@ -20,7 +20,9 @@
#include "wx_util.h"
#include "image_sequence_dialog.h"
-#include "lib/locale_convert.h"
+#include <dcp/locale_convert.h>
+
+using dcp::locale_convert;
ImageSequenceDialog::ImageSequenceDialog (wxWindow* parent)
: TableDialog (parent, _("Add image sequence"), 2, 1, true)
diff --git a/src/wx/playhead_to_frame_dialog.cc b/src/wx/playhead_to_frame_dialog.cc
index 3f1d06d2a..137be60ae 100644
--- a/src/wx/playhead_to_frame_dialog.cc
+++ b/src/wx/playhead_to_frame_dialog.cc
@@ -19,7 +19,9 @@
*/
#include "playhead_to_frame_dialog.h"
-#include "lib/locale_convert.h"
+#include <dcp/locale_convert.h>
+
+using dcp::locale_convert;
PlayheadToFrameDialog::PlayheadToFrameDialog (wxWindow* parent, int fps)
: TableDialog (parent, _("Go to frame"), 2, 1, true)
diff --git a/src/wx/time_picker.cc b/src/wx/time_picker.cc
index bddf615d0..309e5c713 100644
--- a/src/wx/time_picker.cc
+++ b/src/wx/time_picker.cc
@@ -20,7 +20,7 @@
#include "time_picker.h"
#include "wx_util.h"
-#include "lib/locale_convert.h"
+#include <dcp/locale_convert.h>
#include <wx/spinctrl.h>
#include <boost/bind.hpp>
#include <iomanip>
@@ -32,6 +32,7 @@ using std::max;
using std::string;
using std::cout;
using boost::bind;
+using dcp::locale_convert;
TimePicker::TimePicker (wxWindow* parent, wxDateTime time)
: wxPanel (parent)
diff --git a/src/wx/timing_panel.cc b/src/wx/timing_panel.cc
index 25cf2b524..d9777834f 100644
--- a/src/wx/timing_panel.cc
+++ b/src/wx/timing_panel.cc
@@ -30,8 +30,8 @@
#include "lib/dcp_subtitle_content.h"
#include "lib/audio_content.h"
#include "lib/text_subtitle_content.h"
-#include "lib/locale_convert.h"
#include "lib/video_content.h"
+#include <dcp/locale_convert.h>
#include <boost/foreach.hpp>
#include <set>
#include <iostream>
@@ -42,6 +42,7 @@ using std::set;
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
using boost::optional;
+using dcp::locale_convert;
TimingPanel::TimingPanel (ContentPanel* p, FilmViewer* viewer)
/* horrid hack for apparent lack of context support with wxWidgets i18n code */
diff --git a/src/wx/video_waveform_plot.cc b/src/wx/video_waveform_plot.cc
index 096d340e8..794922bff 100644
--- a/src/wx/video_waveform_plot.cc
+++ b/src/wx/video_waveform_plot.cc
@@ -23,7 +23,7 @@
#include "wx_util.h"
#include "lib/image.h"
#include "lib/dcp_video.h"
-#include "lib/locale_convert.h"
+#include <dcp/locale_convert.h>
#include <dcp/openjpeg_image.h>
#include <wx/rawbmp.h>
#include <wx/graphics.h>
@@ -35,6 +35,7 @@ using std::min;
using std::string;
using boost::weak_ptr;
using boost::shared_ptr;
+using dcp::locale_convert;
int const VideoWaveformPlot::_vertical_margin = 8;
diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc
index cb9f72a42..05f2db121 100644
--- a/src/wx/wx_util.cc
+++ b/src/wx/wx_util.cc
@@ -26,12 +26,13 @@
#include "file_picker_ctrl.h"
#include "lib/config.h"
#include "lib/util.h"
-#include "lib/locale_convert.h"
+#include <dcp/locale_convert.h>
#include <wx/spinctrl.h>
#include <boost/thread.hpp>
using namespace std;
using namespace boost;
+using dcp::locale_convert;
/** Add a wxStaticText to a wxSizer, aligning it at vertical centre.
* @param s Sizer to add to.