Leave NULL impl pointer in wxUILocale if locale is not supported
This finally seems better than always creating some kind of impl object, even if the locale isn't supported at all and makes all ports behave consistently, as previously CreateForLocale() only returned NULL in wxOSX implementation if the locale was unrecognized, but now all ports do this (at least when locale_t and related functions are available under Unix). Also stop returning bool from Use(), as this resulted in initializing wxLocale with any non-default language to fail under Mac: just ignore the error here, as we always did it until now, because there is nothing we can do about it anyhow.
This commit is contained in:
@@ -65,7 +65,7 @@ public:
|
||||
|
||||
private:
|
||||
// Default ctor is private and exists only for implementation reasons,
|
||||
// wxUILocale objects can't be invalid.
|
||||
// creating invalid wxUILocale objects doesn't make much sense.
|
||||
wxUILocale() : m_impl(NULL) { }
|
||||
|
||||
// Used by UseDefault().
|
||||
|
Reference in New Issue
Block a user