summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-03-13 11:24:00 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-03-13 11:24:00 +0000
commitb0ccb3d4d418f912ec0a54f50fa6846d599e5a0a (patch)
tree478fc644e94459eb3de3ecab2f64e2256c0c64b0
parentb619d01da4f353fefbf3be740f8add0c61415c56 (diff)
(OS X native: don't write dynamic pango.rc into app.bundle); use Glib::get_home_dir() rather than HOME for user_ardour_path
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3142 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/main.cc8
-rw-r--r--libs/ardour/globals.cc10
2 files changed, 10 insertions, 8 deletions
diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc
index 85b41c4f88..707a4155a7 100644
--- a/gtk2_ardour/main.cc
+++ b/gtk2_ardour/main.cc
@@ -163,10 +163,12 @@ fixup_bundle_environment ()
localedir = strdup (path.c_str());
- /* write a pango.rc file and tell pango to use it */
+ /* write a pango.rc file and tell pango to use it. we'd love
+ to put this into the Ardour.app bundle and leave it there,
+ but the user may not have write permission. so ...
+ */
- path = dir_path;
- path += "/../Resources/pango.rc";
+ path = Glib::build_filename (ARDOUR::get_user_ardour_path(), "pango.rc");
std::ofstream pangorc (path.c_str());
if (!pangorc) {
diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc
index c873ac02ab..a5bcedb6c2 100644
--- a/libs/ardour/globals.cc
+++ b/libs/ardour/globals.cc
@@ -413,13 +413,13 @@ string
ARDOUR::get_user_ardour_path ()
{
string path;
- char* envvar;
-
- if ((envvar = getenv ("HOME")) == 0 || strlen (envvar) == 0) {
+
+ path = Glib::get_home_dir();
+
+ if (path.empty()) {
return "/";
}
-
- path = envvar;
+
path += "/.ardour2/";
/* create it if necessary */