From: H.G.Muller Date: Thu, 9 Oct 2014 06:47:25 +0000 (+0200) Subject: Relocate OS X' LOCALEDIR X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=commitdiff_plain;h=b0cd2c1c921fde42bcacfd5363e3b319eada846c Relocate OS X' LOCALEDIR --- diff --git a/gtk/xboard.c b/gtk/xboard.c index b1f7103..68d8757 100644 --- a/gtk/xboard.c +++ b/gtk/xboard.c @@ -176,12 +176,15 @@ extern char *getenv(); // redefine some defaults # undef ICS_LOGON # undef DATADIR +# undef LOCALEDIR # undef SETTINGS_FILE # define ICS_LOGON "Library/Preferences/XboardICS.conf" # define DATADIR dataDir +# define LOCALEDIR localeDir # define SETTINGS_FILE masterSettings # define SYNC_MENUBAR gtkosx_application_sync_menubar(theApp) char dataDir[MSG_SIZ]; // for expanding ~~ + char localeDir[MSG_SIZ]; char masterSettings[MSG_SIZ]; #else # define SLASH '/' @@ -873,6 +876,10 @@ main (int argc, char **argv) #ifdef __APPLE__ { // prepare to catch OX OpenFile signal, which will tell us the clicked file char *path = gtkosx_application_get_bundle_path(); +#ifdef ENABLE_NLS + char *res_path = gtkosx_application_get_resource_path(); + snprintf(localeDir, MSG_SIZ, "%s/share/locale", res_path); // redefine locale dir for OSX bundle +#endif theApp = g_object_new(GTKOSX_TYPE_APPLICATION, NULL); strncpy(dataDir, path, MSG_SIZ); snprintf(masterSettings, MSG_SIZ, "%s/Contents/Resources/etc/xboard.conf", path);