Add wxLocale::GetOSInfo() and use it in MSW wxDateTimePickerCtrl.
This fixes the size of wxDateTimePickerCtrl in programs that don't set any specific locale: previously, the standard "%m/%d/%y" format was used for computing the best size of the control in this case, but this could have been significantly shorter than the format actually used (compare with the default "%d %b, %Y"), resulting in the control contents being truncated by default. GetOSInfo() is currently different from GetInfo() only under MSW, but we might need to make the same distinction under OS X too, so do make this function public instead of keeping it MSW-specific. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -421,6 +421,21 @@ public:
|
||||
static wxString GetInfo(wxLocaleInfo index,
|
||||
wxLocaleCategory cat = wxLOCALE_CAT_DEFAULT);
|
||||
|
||||
/**
|
||||
Get the values of a locale datum in the OS locale.
|
||||
|
||||
This function is similar to GetInfo() and, in fact, identical to it
|
||||
under non-MSW systems. Under MSW it differs from it when no locale had
|
||||
been explicitly set: GetInfo() returns the values corresponding to the
|
||||
"C" locale used by the standard library functions, while this method
|
||||
returns the values used by the OS which, in Windows case, correspond to
|
||||
the user settings in the control panel.
|
||||
|
||||
@since 3.1.0
|
||||
*/
|
||||
static wxString GetOSInfo(wxLocaleInfo index,
|
||||
wxLocaleCategory cat = wxLOCALE_CAT_DEFAULT);
|
||||
|
||||
/**
|
||||
Initializes the wxLocale instance.
|
||||
|
||||
|
Reference in New Issue
Block a user