Changeset 21841e84


Ignore:
Timestamp:
08/19/2012 09:11:28 PM (10 months ago)
Author:
Thomas Goyne <plorkyeran@…>
Branches:
master, stable
Children:
d132364
Parents:
f2035d7
git-author:
Thomas Goyne <plorkyeran@…> (08/18/2012 03:13:24 AM)
git-committer:
Thomas Goyne <plorkyeran@…> (08/19/2012 09:11:28 PM)
Message:

Get the locale name for OS X from CF rather than wx

Originally committed to SVN as r6954.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • aegisub/src/dialog_version_check.cpp

    r8244271 r21841e84  
    8282#include <libaegisub/exception.h> 
    8383 
     84#ifdef __APPLE__ 
     85#include <CoreFoundation/CoreFoundation.h> 
     86#endif 
     87 
    8488/* *** Public API is implemented here *** */ 
    8589 
     
    306310        return res; 
    307311} 
     312#elif __APPLE__ 
     313static wxString GetSystemLanguage() 
     314{ 
     315        CFLocaleRef locale = CFLocaleCopyCurrent(); 
     316        CFStringRef localeName = (CFStringRef)CFLocaleGetValue(locale, kCFLocaleIdentifier); 
     317 
     318        char buf[128]; 
     319        CFStringGetCString(localeName, buf, sizeof buf, kCFStringEncodingUTF8); 
     320        CFRelease(locale); 
     321 
     322        return wxString::FromUTF8(buf); 
     323 
     324} 
    308325#else 
    309326static wxString GetSystemLanguage() 
Note: See TracChangeset for help on using the changeset viewer.