[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Eliot-dev] eliot/qt main.cpp
From: |
Olivier Teulière |
Subject: |
[Eliot-dev] eliot/qt main.cpp |
Date: |
Fri, 29 Jan 2010 21:11:44 +0000 |
CVSROOT: /cvsroot/eliot
Module name: eliot
Changes by: Olivier Teulière <ipkiss> 10/01/29 21:11:44
Modified files:
qt : main.cpp
Log message:
On Mac, retrieve the locales in the bundle
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/eliot/qt/main.cpp?cvsroot=eliot&r1=1.4&r2=1.5
Patches:
Index: main.cpp
===================================================================
RCS file: /cvsroot/eliot/eliot/qt/main.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- main.cpp 7 Sep 2008 13:17:41 -0000 1.4
+++ main.cpp 29 Jan 2010 21:11:44 -0000 1.5
@@ -28,6 +28,10 @@
#ifdef WIN32
# include <windows.h>
#endif
+#ifdef __APPLE__
+# include <CoreFoundation/CFURL.h>
+# include <CoreFoundation/CFBundle.h>
+#endif
using std::string;
@@ -52,6 +56,10 @@
if (pos)
*pos = '\0';
const string localeDir = baseDir + string("\\locale");
+#elif defined(__APPLE__)
+ const char *bundlePath = CFStringGetCStringPtr(CFURLCopyFileSystemPath(
+ CFBundleCopyBundleURL(CFBundleGetMainBundle()),
kCFURLPOSIXPathStyle), CFStringGetSystemEncoding());
+ const string localeDir = string(bundlePath) + "/Contents/Resources/locale";
#else
static const string localeDir = LOCALEDIR;
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Eliot-dev] eliot/qt main.cpp,
Olivier Teulière <=