Remove glibmm dependency.
authorCarl Hetherington <cth@carlh.net>
Fri, 9 Oct 2015 17:42:23 +0000 (18:42 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 9 Oct 2015 17:42:23 +0000 (18:42 +0100)
src/interop_subtitle_asset.cc
src/interop_subtitle_asset.h
src/smpte_subtitle_asset.cc
src/smpte_subtitle_asset.h
src/subtitle_asset.h

index c64796126724609cd403dbbb088a6325f7d5faba..bf493fdaeb7b1b3d4e25f5b119a32e00efad1f7b 100644 (file)
@@ -66,7 +66,7 @@ InteropSubtitleAsset::InteropSubtitleAsset ()
 
 }
 
-Glib::ustring
+string
 InteropSubtitleAsset::xml_as_string () const
 {
        xmlpp::Document doc;
@@ -151,8 +151,9 @@ InteropSubtitleAsset::write (boost::filesystem::path p) const
                throw FileError ("Could not open file for writing", p, -1);
        }
 
-       Glib::ustring const s = xml_as_string ();
-       fwrite (s.c_str(), 1, s.bytes(), f);
+       string const s = xml_as_string ();
+       /* length() here gives bytes not characters */
+       fwrite (s.c_str(), 1, s.length(), f);
        fclose (f);
 
        _file = p;
index 8690d11c3b82205b41e83291c3327012e32d1d9b..fe38a0c9916b5eb84676fa87cb5eafe494ca3b2b 100644 (file)
@@ -49,7 +49,7 @@ public:
 
        void add_font (std::string load_id, boost::filesystem::path file);
 
-       Glib::ustring xml_as_string () const;
+       std::string xml_as_string () const;
        void write (boost::filesystem::path path) const;
        void resolve_fonts (std::list<boost::shared_ptr<Object> > objects);
        void add_font_assets (std::list<boost::shared_ptr<Asset> >& assets);
index 43fa3026dc5f0a07f412a885a07b3ec359e28c65..130b344fb37c6aa7833c1c1909bcff9996623e4c 100644 (file)
@@ -183,7 +183,7 @@ SMPTESubtitleAsset::valid_mxf (boost::filesystem::path file)
        return !ASDCP_FAILURE (r);
 }
 
-Glib::ustring
+string
 SMPTESubtitleAsset::xml_as_string () const
 {
        xmlpp::Document doc;
index 23c0e948bddfe2526ea858d868153c8f91344625..a7adee6faa29919856e74a410c366332864e46fc 100644 (file)
@@ -56,7 +56,7 @@ public:
 
        std::list<boost::shared_ptr<LoadFontNode> > load_font_nodes () const;
 
-       Glib::ustring xml_as_string () const;
+       std::string xml_as_string () const;
        void write (boost::filesystem::path path) const;
        void add (SubtitleString);
        void add_font (std::string id, boost::filesystem::path file);
index 27b1bb32a6bca3f576238afbad6e7dfea6b6b50b..8e9f56d5e5c047fe1c4f7e8952d4dddfc9927ab9 100644 (file)
@@ -73,7 +73,7 @@ public:
        std::map<std::string, Data> fonts_with_load_ids () const;
 
        virtual void write (boost::filesystem::path) const = 0;
-       virtual Glib::ustring xml_as_string () const = 0;
+       virtual std::string xml_as_string () const = 0;
 
        Time latest_subtitle_out () const;