Author: wlux
Date: Thu Mar 10 09:48:40 2016
New Revision: 39516

URL: http://svn.gna.org/viewcvs/gnustep?rev=39516&view=rev
Log:
Add method +[NSLocale localeWithLocaleIdentifier:], which was
introduced in OS X 10.6.

Modified:
    libs/base/trunk/ChangeLog
    libs/base/trunk/Headers/Foundation/NSLocale.h
    libs/base/trunk/Source/NSLocale.m

Modified: libs/base/trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/ChangeLog?rev=39516&r1=39515&r2=39516&view=diff
==============================================================================
--- libs/base/trunk/ChangeLog   (original)
+++ libs/base/trunk/ChangeLog   Thu Mar 10 09:48:40 2016
@@ -1,3 +1,9 @@
+2016-03-10  Wolfgang Lux  <[email protected]>
+
+       * Headers/Foundation/NSLocale.h:
+       * Source/NSLocale.m (+localeWithLocaleIdentifier:):
+       Add trivial method introduced in OS X 10.6.
+
 2016-03-09 Riccardo Mottola <[email protected]>
 
        * Headers/Foundation/NSPathUtilities.h

Modified: libs/base/trunk/Headers/Foundation/NSLocale.h
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Headers/Foundation/NSLocale.h?rev=39516&r1=39515&r2=39516&view=diff
==============================================================================
--- libs/base/trunk/Headers/Foundation/NSLocale.h       (original)
+++ libs/base/trunk/Headers/Foundation/NSLocale.h       Thu Mar 10 09:48:40 2016
@@ -186,6 +186,12 @@
 + (NSString *) localeIdentifierFromWindowsLocaleCode: (uint32_t)lcid;
 #endif
 
+#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
+/** Returns a locale initialised with the given locale identifier.
+ */
++ (id) localeWithLocaleIdentifier:(NSString *)string;
+#endif
+
 #if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
 /** Returns an array of preferred languages.  Sorted from most preferred to
  *  leave preferred.

Modified: libs/base/trunk/Source/NSLocale.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/NSLocale.m?rev=39516&r1=39515&r2=39516&view=diff
==============================================================================
--- libs/base/trunk/Source/NSLocale.m   (original)
+++ libs/base/trunk/Source/NSLocale.m   Thu Mar 10 09:48:40 2016
@@ -588,6 +588,11 @@
   return AUTORELEASE(result);
 }
 
++ (id) localeWithLocaleIdentifier:(NSString *)string
+{
+  return AUTORELEASE([[NSLocale alloc] initWithLocaleIdentifier: string]);
+}
+
 + (NSString *) localeIdentifierFromComponents: (NSDictionary *) dict
 {
   NSString *result;


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to