diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-01-21 23:14:00 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-01-21 23:14:00 +0000 |
commit | 2a2b48ef66916f3ac7aafb46b83e1e86a6e15cf8 (patch) | |
tree | b6823d2558fc70c421e3d33e4457f873a094a3e4 /gtk2_ardour/main.cc | |
parent | c09dc77dfc3a5f0cd6d35b72388a9222e2f2faf3 (diff) |
start passing around the (possibly-bundle-modified) localedir so that we call bindtextdomain() correctly, and thus (hopefully) find message catalogs correctly inside a bundle
git-svn-id: svn://localhost/ardour2/branches/3.0@13965 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/main.cc')
-rw-r--r-- | gtk2_ardour/main.cc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc index cebef59f26..035434216c 100644 --- a/gtk2_ardour/main.cc +++ b/gtk2_ardour/main.cc @@ -148,6 +148,14 @@ fixup_bundle_environment (int, char* []) bundle_dir = Glib::path_get_dirname (exec_dir); + /* force localedir into the bundle */ + + vector<string> lpath; + lpath.push_back (bundle_dir); + lpath.push_back ("share"); + lpath.push_back ("locale"); + localedir = strdup (Glib::build_filename (lpath).c_str()); + export_search_path (bundle_dir, "ARDOUR_DLL_PATH", "/lib"); /* inside an OS X .app bundle, there is no difference @@ -224,6 +232,14 @@ fixup_bundle_environment (int /*argc*/, char* argv[]) std::string dir_path = Glib::path_get_dirname (Glib::path_get_dirname (argv[0])); std::string userconfigdir = user_config_directory(); + /* force localedir into the bundle */ + + vector<string> lpath; + lpath.push_back (dir_path); + lpath.push_back ("share"); + lpath.push_back ("locale"); + localedir = strdup (Glib::build_filename (lpath).c_str()); + /* note that this function is POSIX/Linux specific, so using / as a dir separator in this context is just fine. */ @@ -446,7 +462,7 @@ int main (int argc, char *argv[]) } try { - ui = new ARDOUR_UI (&argc, &argv); + ui = new ARDOUR_UI (&argc, &argv, localedir); } catch (failed_constructor& err) { error << _("could not create ARDOUR GUI") << endmsg; exit (1); |