Rename wxLocaleIdent::IsDefault() to IsEmpty()
We don't use empty wxLocaleIdent as default user locale and it doesn't make much sense to do it, as the default locale is already accessible via wxUILocale::GetDefault().
This commit is contained in:
@@ -33,7 +33,7 @@ enum
|
|||||||
class WXDLLIMPEXP_BASE wxLocaleIdent
|
class WXDLLIMPEXP_BASE wxLocaleIdent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Leave language empty
|
// Default ctor creates an empty, invalid identifier.
|
||||||
wxLocaleIdent() { }
|
wxLocaleIdent() { }
|
||||||
|
|
||||||
// Construct from language, i.e. a two-letter ISO 639-1 code (or a
|
// Construct from language, i.e. a two-letter ISO 639-1 code (or a
|
||||||
@@ -69,8 +69,8 @@ public:
|
|||||||
// Construct platform dependent name
|
// Construct platform dependent name
|
||||||
wxString GetName() const;
|
wxString GetName() const;
|
||||||
|
|
||||||
// Empty language represents user's default language
|
// Empty locale identifier is invalid. at least Language() must be called.
|
||||||
bool IsDefault() const
|
bool IsEmpty() const
|
||||||
{
|
{
|
||||||
return m_language.empty();
|
return m_language.empty();
|
||||||
}
|
}
|
||||||
|
@@ -214,7 +214,9 @@ class wxLocaleIdent
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
This is the default constructor and it leaves language empty.
|
Default constructor creates an empty and invalid locale identifier.
|
||||||
|
|
||||||
|
At least Language() must be called to make the identifier valid.
|
||||||
*/
|
*/
|
||||||
wxLocaleIdent();
|
wxLocaleIdent();
|
||||||
|
|
||||||
@@ -318,9 +320,9 @@ public:
|
|||||||
wxString GetName() const;
|
wxString GetName() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Empty language represents user's default language.
|
Check if the locale is empty.
|
||||||
|
|
||||||
@return @true if language is empty, @false otherwise.
|
@return @true if this is an empty, invalid object.
|
||||||
*/
|
*/
|
||||||
bool IsDefault() const;
|
bool IsEmpty() const;
|
||||||
};
|
};
|
||||||
|
@@ -261,7 +261,7 @@ wxUILocaleImplUnix::~wxUILocaleImplUnix()
|
|||||||
void
|
void
|
||||||
wxUILocaleImplUnix::Use()
|
wxUILocaleImplUnix::Use()
|
||||||
{
|
{
|
||||||
if ( m_locId.IsDefault() )
|
if ( m_locId.IsEmpty() )
|
||||||
{
|
{
|
||||||
// This is the default locale, it is already in use.
|
// This is the default locale, it is already in use.
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user