Separate creating wxUILocaleImpl from using it
Add Use() virtual function which can be used if the newly created wxUILocaleImpl object should be used as the default UI locale. Currently Use() is always called after creating a new wxUILocaleImpl, so adding a separate function just seems to complicate matters needlessly, but this won't be the case any more soon, when wxUILocaleImpl could be created for using them for other purposes than making them the default. No real changes yet.
This commit is contained in:
@@ -142,7 +142,14 @@ public:
|
||||
explicit wxUILocaleImplLCID(LCID lcid)
|
||||
: m_lcid(lcid)
|
||||
{
|
||||
wxUseLCID(lcid);
|
||||
}
|
||||
|
||||
bool Use() wxOVERRIDE
|
||||
{
|
||||
wxUseLCID(m_lcid);
|
||||
|
||||
// As long as we use a valid LCID (and we always do), it shouldn't fail.
|
||||
return true;
|
||||
}
|
||||
|
||||
wxString GetName() const wxOVERRIDE
|
||||
|
Reference in New Issue
Block a user