Unicode TR #35 v26 allows for five-letter (MMMMM) or even six-letter
(EEEEEE) forms of some of the fields, but TranslateFromUnicodeFormat()
asserts in these situations.
Fix it to fall back to short forms for MMMMM and EEEEEE that are used in
practice e.g. on OS X if the user has custom formatting settings.
Consulting the table of sensible specifiers from
http://userguide.icu-project.org/formatparse/datetime, it appears these
two were the only omissions in this function.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78424 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use GET_{X,Y}_LPARAM() to extract them from the event position, which handle
negative coordinates (and coordinates can perfectly well be negative when
using multiple displays) correctly, unlike {LO,HI}WORD().
Closes#16812.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add Windows-specific wxMSWDisableSettingHighDPIAware() function then can
be called before startup (i.e. wxEntry() call) to disable wxWidgets'
handling of DPI awareness. This is useful for code embedded in non-wx
applications as well as for purely wx application that are not
HiDPI-ready (although the latter has the option of forcing
dpiAware=false in the manifest).
See also https://groups.google.com/d/msg/wx-dev/Z0VpgzCY34U/f1FfPqGDppMJ
and #16116.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The size of the dialog in wxPreferencesEditor's generic implementation
is determined from notebook pages alone and doesn't account for label
size, which may be significantly longer in some languages (German,
Danish). If the labels don't fit into the window, some of the tabs are
hidden behind scroll buttons that are easy to overlook.
Improve usability by using wxNB_MULTILINE, which will use multiple rows
of tabs in this situation. This is what e.g. Internet Explorer does in
its preferences as well.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78396 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Second click can result in a double click event instead of the usual simple
click if it happens quickly enough after the first one, so handle double
clicks in the same way as simple clicks instead of ignoring them.
Closes#16551.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Unless the table is faulty, this comparison can never fail. It is thus redundant and not needed. As optimizing compilers aren't smart enough yet to detect this, this commit removes the redundant check.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
When converting argv[] from char* to wchar_t* in ConvertArgsToUnicode(),
keep an extra (shallow) copy of argc and the argv[] array so that it can
be safely freed in FreeConvertedArgs().
The reason is that other functions such as wxApp::Initialize() may
modify argv[] and remove some arguments from it; this is indeed exactly
what wxOSX does. After such changes, gs_initData.argv would no longer be
in the original state and could contain e.g. duplicate pointers or be
missing some of the pointers that we should free.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78256 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These files shouldn't be included in the distribution and it's simpler to just
remove them, as it is pretty unlikely that a new Expat release is going to be
made, and even less likely that it would still use CVS if it does happen, than
to filter them out from the distribution creation scripts.
Closes#16711.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The cached widths need to be invalidated whenever an item is expanded or
collapsed, whether it's done programmatically (which was already handled) or
interactively by the user (which wasn't).
Closes#16678.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method used the wxKeyNames[] array originally intended for parsing
accelerator specification and not for human-friendly formatting. In
particular, non-alphanumeric keys such as WXK_DOWN and many others were
formatted using all-uppercase name, which was highly unusual and not
native on any platforms (the only unaffected one was OS X).
Improve the formatting by doing the following:
a) use Title case for the entries; because parsing is case-insensitive,
this has no effect on it;
b) add display_name field for keys where the symbolic name wasn't
appropriate for display and set it for some of the keys that are
likely to show up in menus;
c) add explanatory comments for translators
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The content of <accel> property was taken verbatim and appended to the
(translated) label; this bypassed wx's internal accelerators translation
mechanism, because wxMenuItem code quite reasonably assumes that the
string passed to it is translated.
Explicitly use SetAccel() instead, to force translation. This matters
for languages such as German where e.g. Ctrl+ is translated as Strg+.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78183 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't just release the window, call the close method. This is usually
the same, but in some situations, the difference (close sends
NSWindowWillCloseNotification, which wx doesn't use) is significant.
In particular, if the window is shown as fullscreen, OS X won't dispose
of its space correctly when the window is released, but not closed
first. See https://github.com/vslavik/poedit/issues/119
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78178 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Skip Cocoa-specific flags used by Xcode (such as -AppleLanguages) on OS
X when parsing the command line. They all take a single argument, so
skip both the flag and the following value in the argv list.
Also fix handling of -ApplePersistenceIgnoreState, which didn't skip the
value as it should.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78172 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The check for wxDV_VARIABLE_LINE_HEIGHT is already done in Create(), and the
IsVirtualListModel() check was probably an attempt to get around a performance
problem (#16680), but it's not a valid criteria for changing the height mode.
closes#16683
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Changes in r78108 would reset control's color to gray if it was disabled
more than once in a row. Guard against this and only remember the color
of an enabled control.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The text control was left empty if the string value was not specified, but
it should use the numeric initial value instead in this case.
This notably affected wxSpinCtrlDouble under non-GTK platforms.
Closes#16621.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775