diff options
-rw-r--r-- | src/engine/Engine.cpp | 12 | ||||
-rw-r--r-- | src/engine/Loader.cpp | 16 | ||||
-rw-r--r-- | src/engine/SMFDriver.hpp | 2 | ||||
-rw-r--r-- | src/engine/machina/Engine.hpp | 14 | ||||
-rw-r--r-- | src/engine/machina/Loader.hpp | 10 | ||||
-rw-r--r-- | src/gui/MachinaGUI.cpp | 2 |
6 files changed, 22 insertions, 34 deletions
diff --git a/src/engine/Engine.cpp b/src/engine/Engine.cpp index 969b7cc..1aed7b6 100644 --- a/src/engine/Engine.cpp +++ b/src/engine/Engine.cpp @@ -14,8 +14,6 @@ along with Machina. If not, see <http://www.gnu.org/licenses/>. */ -#include <glibmm/ustring.h> - #include "machina_config.h" #include "machina/Engine.hpp" #include "machina/Loader.hpp" @@ -62,7 +60,7 @@ Engine::new_driver(Forge& forge, * Safe to call while engine is processing. */ SPtr<Machine> -Engine::load_machine(const Glib::ustring& uri) +Engine::load_machine(const std::string& uri) { SPtr<Machine> machine = _loader.load(uri); SPtr<Machine> old_machine = _driver->machine(); // Keep reference @@ -78,9 +76,9 @@ Engine::load_machine(const Glib::ustring& uri) * Safe to call while engine is processing. */ SPtr<Machine> -Engine::load_machine_midi(const Glib::ustring& uri, - double q, - Raul::TimeDuration dur) +Engine::load_machine_midi(const std::string& uri, + double q, + Raul::TimeDuration dur) { SPtr<Machine> machine = _loader.load_midi(uri, q, dur); SPtr<Machine> old_machine = _driver->machine(); // Keep reference @@ -93,7 +91,7 @@ Engine::load_machine_midi(const Glib::ustring& uri, } void -Engine::export_midi(const Glib::ustring& filename, Raul::TimeDuration dur) +Engine::export_midi(const std::string& filename, Raul::TimeDuration dur) { SPtr<Machine> machine = _driver->machine(); SPtr<machina::SMFDriver> file_driver( diff --git a/src/engine/Loader.cpp b/src/engine/Loader.cpp index 7b37694..1c662d2 100644 --- a/src/engine/Loader.cpp +++ b/src/engine/Loader.cpp @@ -18,8 +18,6 @@ #include <iostream> #include <map> -#include <glibmm/ustring.h> - #include "lv2/lv2plug.in/ns/ext/midi/midi.h" #include "machina/Loader.hpp" @@ -81,14 +79,12 @@ load_action(Sord::Model& model, Sord::Node node) * @return Loaded Machine. */ SPtr<Machine> -Loader::load(const Glib::ustring& uri) +Loader::load(const std::string& uri) { - using Glib::ustring; - - ustring document_uri = uri; + std::string document_uri = uri; // If "URI" doesn't contain a colon, try to resolve as a filename - if (uri.find(":") == ustring::npos) { + if (uri.find(":") == string::npos) { document_uri = "file://" + document_uri; } @@ -186,9 +182,9 @@ Loader::load(const Glib::ustring& uri) } SPtr<Machine> -Loader::load_midi(const Glib::ustring& uri, - double q, - Raul::TimeDuration dur) +Loader::load_midi(const std::string& uri, + double q, + Raul::TimeDuration dur) { SPtr<SMFDriver> file_driver(new SMFDriver(_forge, dur.unit())); return file_driver->learn(uri, q, dur); diff --git a/src/engine/SMFDriver.hpp b/src/engine/SMFDriver.hpp index d961a19..d22ba53 100644 --- a/src/engine/SMFDriver.hpp +++ b/src/engine/SMFDriver.hpp @@ -17,8 +17,6 @@ #ifndef MACHINA_SMFDRIVER_HPP #define MACHINA_SMFDRIVER_HPP -#include <glibmm/ustring.h> - #include "machina/Driver.hpp" #include "machina/types.hpp" diff --git a/src/engine/machina/Engine.hpp b/src/engine/machina/Engine.hpp index 4bd907b..dd40f42 100644 --- a/src/engine/machina/Engine.hpp +++ b/src/engine/machina/Engine.hpp @@ -19,8 +19,6 @@ #include <string> -#include <glibmm/ustring.h> - #include "machina/Atom.hpp" #include "machina/Driver.hpp" #include "machina/Loader.hpp" @@ -47,13 +45,13 @@ public: SPtr<Machine> machine() { return _driver->machine(); } Forge& forge() { return _forge; } - SPtr<Machine> load_machine(const Glib::ustring& uri); - SPtr<Machine> load_machine_midi(const Glib::ustring& uri, - double q, - Raul::TimeDuration dur); + SPtr<Machine> load_machine(const std::string& uri); + SPtr<Machine> load_machine_midi(const std::string& uri, + double q, + Raul::TimeDuration dur); - void export_midi(const Glib::ustring& filename, - Raul::TimeDuration dur); + void export_midi(const std::string& filename, + Raul::TimeDuration dur); void set_bpm(double bpm); void set_quantization(double beat_fraction); diff --git a/src/engine/machina/Loader.hpp b/src/engine/machina/Loader.hpp index 0b1e9ec..3fa66ff 100644 --- a/src/engine/machina/Loader.hpp +++ b/src/engine/machina/Loader.hpp @@ -17,8 +17,6 @@ #ifndef MACHINA_LOADER_HPP #define MACHINA_LOADER_HPP -#include <glibmm/ustring.h> - #include "machina/Atom.hpp" #include "machina/types.hpp" #include "raul/TimeStamp.hpp" @@ -35,11 +33,11 @@ class Loader public: Loader(Forge& forge, Sord::World& rdf_world); - SPtr<Machine> load(const Glib::ustring& filename); + SPtr<Machine> load(const std::string& filename); - SPtr<Machine> load_midi(const Glib::ustring& filename, - double q, - Raul::TimeDuration dur); + SPtr<Machine> load_midi(const std::string& filename, + double q, + Raul::TimeDuration dur); private: Forge& _forge; diff --git a/src/gui/MachinaGUI.cpp b/src/gui/MachinaGUI.cpp index ff7095d..ff71ca7 100644 --- a/src/gui/MachinaGUI.cpp +++ b/src/gui/MachinaGUI.cpp @@ -481,7 +481,7 @@ MachinaGUI::menu_file_save_as() if (filename.length() < 13 || filename.substr(filename.length()-12) != ".machina.ttl") filename += ".machina.ttl"; - Glib::ustring uri = Glib::filename_to_uri(filename); + const std::string uri = Glib::filename_to_uri(filename); bool confirm = false; std::fstream fin; |