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
This commit is contained in:
Paul Davis 2013-01-21 23:14:00 +00:00
parent c09dc77dfc
commit 2a2b48ef66
7 changed files with 27 additions and 11 deletions

View file

@ -50,7 +50,7 @@ namespace ARDOUR {
extern PBD::Signal1<void,std::string> BootMessage;
extern PBD::Signal0<void> GUIIdle;
int init (bool with_vst, bool try_optimization);
int init (bool with_vst, bool try_optimization, const char* localedir);
void init_post_engine ();
int cleanup ();
bool no_auto_connect ();

View file

@ -215,7 +215,7 @@ lotsa_files_please ()
}
int
ARDOUR::init (bool use_windows_vst, bool try_optimization)
ARDOUR::init (bool use_windows_vst, bool try_optimization, const char* localedir)
{
if (!Glib::thread_supported()) {
Glib::thread_init();
@ -224,7 +224,7 @@ ARDOUR::init (bool use_windows_vst, bool try_optimization)
// this really should be in PBD::init..if there was one
Gio::init ();
(void) bindtextdomain(PACKAGE, LOCALEDIR);
(void) bindtextdomain(PACKAGE, localedir);
PBD::ID::init ();
SessionEvent::init_event_pool ();

View file

@ -45,7 +45,7 @@ namespace Gtk {
}
namespace Gtkmm2ext {
void init ();
void init (const char*);
std::string fit_to_pixels (const std::string&, int pixel_width, Pango::FontDescription& font, int& actual_width, bool with_ellipses = false);
std::pair<std::string, double> fit_to_pixels (cairo_t *, std::string, double);

View file

@ -37,10 +37,10 @@
using namespace std;
void
Gtkmm2ext::init ()
Gtkmm2ext::init (const char* localedir)
{
// Necessary for gettext
(void) bindtextdomain(PACKAGE, LOCALEDIR);
(void) bindtextdomain(PACKAGE, localedir);
}
void