summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2012-06-23 05:09:44 +0000
committerTim Mayberry <mojofunk@gmail.com>2012-06-23 05:09:44 +0000
commit4b96a5b34de67b99cb89e34466a63bcac97fef42 (patch)
treecc6299590b353f46861c6211800c79766399194c
parent4522ef26a2213e694dbd3ac0d316c535d360d6fb (diff)
Use std::string and Glib instead of pbd/filesystem.h in DeviceProfile
git-svn-id: svn://localhost/ardour2/branches/3.0@12902 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--libs/surfaces/mackie/device_profile.cc20
1 files changed, 8 insertions, 12 deletions
diff --git a/libs/surfaces/mackie/device_profile.cc b/libs/surfaces/mackie/device_profile.cc
index fbf7d89361..ea57458e1c 100644
--- a/libs/surfaces/mackie/device_profile.cc
+++ b/libs/surfaces/mackie/device_profile.cc
@@ -26,7 +26,6 @@
#include "pbd/error.h"
#include "pbd/pathscanner.h"
#include "pbd/replace_all.h"
-#include "pbd/filesystem.h"
#include "ardour/filesystem_paths.h"
@@ -72,13 +71,10 @@ devprofile_search_path ()
return spath;
}
-static sys::path
+static std::string
user_devprofile_directory ()
{
- sys::path p(user_config_directory());
- p /= devprofile_dir_name;
-
- return p;
+ return Glib::build_filename (user_config_directory(), devprofile_dir_name);
}
static bool
@@ -340,20 +336,20 @@ legalize_for_path (const string& str)
void
DeviceProfile::save ()
{
- sys::path fullpath = user_devprofile_directory();
+ std::string fullpath = user_devprofile_directory();
- if (g_mkdir_with_parents (fullpath.to_string().c_str(), 0755) < 0) {
- error << string_compose(_("Session: cannot create user MCP profile folder \"%1\" (%2)"), fullpath.to_string(), strerror (errno)) << endmsg;
+ if (g_mkdir_with_parents (fullpath.c_str(), 0755) < 0) {
+ error << string_compose(_("Session: cannot create user MCP profile folder \"%1\" (%2)"), fullpath, strerror (errno)) << endmsg;
return;
}
- fullpath /= legalize_for_path (_name) + ".profile";
+ fullpath = Glib::build_filename (fullpath, legalize_for_path (_name) + ".profile");
XMLTree tree;
tree.set_root (&get_state());
- if (!tree.write (fullpath.to_string())) {
- error << string_compose ("MCP profile not saved to %1", fullpath.to_string()) << endmsg;
+ if (!tree.write (fullpath)) {
+ error << string_compose ("MCP profile not saved to %1", fullpath) << endmsg;
}
}