Remove 2 x unneeded functions in 'SlaveSessionProxy'
[ardour.git] / libs / gtkmm2ext / cursors.cc
index 9948fc667f1347c0782b3a42bdbd941b86eaa538..2ac0dba627fd73e4734f810f30cf02e30610f1fb 100644 (file)
 */
 
 #include <sstream>
-#include <fstream>
 
+#include "pbd/gstdio_compat.h"
 #include "pbd/error.h"
 #include "pbd/compose.h"
 
 #include "gtkmm2ext/cursors.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace Gtkmm2ext;
 
@@ -41,13 +41,13 @@ CursorInfo::CursorInfo (const std::string& n, int hotspot_x, int hotspot_y)
 int
 CursorInfo::load_cursor_info (const std::string& path)
 {
-        std::ifstream infofile (path.c_str());
-
-        if (!infofile) {
-                return -1;
-        }
+       gchar *buf = NULL;
+       if (!g_file_get_contents (path.c_str(), &buf, NULL, NULL))  {
+               return -1;
+       }
+       std::stringstream infofile (buf);
+       g_free (buf);
 
-        std::stringstream s;
         std::string name;
         int x;
         int y;