Provide both forms of wxLocale::Init to wxPython
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -724,17 +724,26 @@ public:
|
|||||||
wxLocale(int language = wxLANGUAGE_DEFAULT,
|
wxLocale(int language = wxLANGUAGE_DEFAULT,
|
||||||
int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING);
|
int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING);
|
||||||
|
|
||||||
bool Init(const wxString& szName,
|
// restores old locale
|
||||||
|
~wxLocale();
|
||||||
|
|
||||||
|
%name(Init1)bool Init(const wxString& szName,
|
||||||
const wxString& szShort = wxPyEmptyString,
|
const wxString& szShort = wxPyEmptyString,
|
||||||
const wxString& szLocale = wxPyEmptyString,
|
const wxString& szLocale = wxPyEmptyString,
|
||||||
bool bLoadDefault = TRUE,
|
bool bLoadDefault = TRUE,
|
||||||
bool bConvertEncoding = FALSE);
|
bool bConvertEncoding = FALSE);
|
||||||
|
|
||||||
%name(InitLang) bool Init(int language = wxLANGUAGE_DEFAULT,
|
%name(Init2) bool Init(int language = wxLANGUAGE_DEFAULT,
|
||||||
int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING);
|
int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING);
|
||||||
|
|
||||||
// restores old locale
|
%pragma(python) addtoclass = "
|
||||||
~wxLocale();
|
def Init(self, *_args, **_kwargs):
|
||||||
|
if type(_args[0]) in [type(''), type(u'')]:
|
||||||
|
val = apply(self.Init1, _args, _kwargs)
|
||||||
|
else:
|
||||||
|
val = apply(self.Init2, _args, _kwargs)
|
||||||
|
return val
|
||||||
|
"
|
||||||
|
|
||||||
|
|
||||||
// Try to get user's (or OS's) prefered language setting.
|
// Try to get user's (or OS's) prefered language setting.
|
||||||
|
Reference in New Issue
Block a user