summaryrefslogtreecommitdiff
path: root/gtk2_ardour/main.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-08-17 00:28:20 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-08-17 00:28:20 +0000
commitf5c4c8a2931f383c76212ea1cfdb6f85f43bb72f (patch)
tree7ba2fe9ac4df3bf87b222f7079b644fb5e72c078 /gtk2_ardour/main.cc
parenta4d9d09af5853f769e1143c2353806bfb7d89f58 (diff)
forward port 2.X changes up to and including rev 6767
git-svn-id: svn://localhost/ardour2/branches/3.0@7636 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/main.cc')
-rw-r--r--gtk2_ardour/main.cc30
1 files changed, 19 insertions, 11 deletions
diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc
index e8cf2ac69c..a512af74a3 100644
--- a/gtk2_ardour/main.cc
+++ b/gtk2_ardour/main.cc
@@ -100,6 +100,8 @@ Please consider the possibilities, and perhaps (re)start JACK."));
#include <sys/param.h>
#include <fstream>
+extern void set_language_preference (); // cocoacarbon.mm
+
void
fixup_bundle_environment ()
{
@@ -107,6 +109,8 @@ fixup_bundle_environment ()
return;
}
+ set_language_preference ();
+
char execpath[MAXPATHLEN+1];
uint32_t pathsz = sizeof (execpath);
@@ -208,13 +212,17 @@ fixup_bundle_environment ()
setenv ("GTK_PATH", path.c_str(), 1);
- path = dir_path;
- path += "/../Resources/locale";
+ if (!ARDOUR::translations_are_disabled ()) {
- localedir = strdup (path.c_str());
+ path = dir_path;
+ path += "/../Resources/locale";
+
+ localedir = strdup (path.c_str());
+ setenv ("GTK_LOCALEDIR", localedir, 1);
+ }
/* 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,
+ to put this into the PROGRAM_NAME.app bundle and leave it there,
but the user may not have write permission. so ...
we also have to make sure that the user ardour directory
@@ -288,12 +296,12 @@ tell_about_jack_death (void* /* ignored */)
/* died during startup */
MessageDialog msg (_("JACK exited"), false, Gtk::MESSAGE_INFO, Gtk::BUTTONS_OK);
msg.set_position (Gtk::WIN_POS_CENTER);
- msg.set_secondary_text (_(
-"JACK exited unexpectedly, and without notifying Ardour.\n\
+ msg.set_secondary_text (string_compose (_(
+"JACK exited unexpectedly, and without notifying %1.\n\
\n\
This could be due to misconfiguration or to an error inside JACK.\n\
\n\
-Click OK to exit Ardour."));
+Click OK to exit %1."), PROGRAM_NAME));
msg.run ();
_exit (0);
@@ -303,12 +311,12 @@ Click OK to exit Ardour."));
/* engine has already run, so this is a mid-session JACK death */
MessageDialog* msg = manage (new MessageDialog (_("JACK exited"), false, Gtk::MESSAGE_INFO, Gtk::BUTTONS_NONE));
- msg->set_secondary_text (_(
-"JACK exited unexpectedly, and without notifying Ardour.\n\
+ msg->set_secondary_text (string_compose (_(
+"JACK exited unexpectedly, and without notifying %1.\n\
\n\
This is probably due to an error inside JACK. You should restart JACK\n\
-and reconnect Ardour to it, or exit Ardour now. You cannot save your\n\
-session at this time, because we would lose your connection information.\n"));
+and reconnect %1 to it, or exit %1 now. You cannot save your\n\
+session at this time, because we would lose your connection information.\n"), PROGRAM_NAME));
msg->present ();
}
return false; /* do not call again */