The affine transform was previously multiplied by the translation matrix on
the right but this was incompatible with both the MSW version of the same
method and all the other methods of the generic version.
So multiply the transform by the translation on the left, as everywhere else.
Closes#13875.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
SetScrollbars() passed its input positions expressed in scroll units to
CalcUnscrolledPosition() which takes positions in pixels. This was definitely
wrong so don't do this and perform the conversion from scroll units to pixels
in SetScrollbars() itself for clarity instead.
It's not clear what concrete bugs, if any, does this fix as the calculated
positions are almost never used anyhow but the old code was obviously
incorrect and the new version has a chance of not being wrong so it's already
an improvement.
Closes#9988.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Enable wxDateTime if it's disabled but wxFileCtrl is enabled as the latter
needs the former, at least in the generic version.
Closes#12821.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70442 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Cast the string offsets to "unsigned" explicitly, even though they can be 64
bit (whereas unsigned is 32 bits) under Win64, the strings we operate with
here shouldn't be more than 4GiB long.
See #13815.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70440 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There is no more "mac" toolkit in 2.9, we have "osx_carbon" and "osx_cocoa"
instead (and also "osx_iphone" but it's not used with configure so far).
Closes#13817.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is shorter and arguably more clear than doing it in two steps as we did
before and also works in wxUniv, unlike creating wxStaticText with empty label
and setting it later.
Closes#13858.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The existing Reparent() implementation was wrong as it reparented spin control
subwindows under the new parent but left the main window itself under the old
one. Fix this by just not overriding Reparent() at all, the inherited version
works just fine for this control.
Closes#13849.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70432 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The translation was missing a %s, copied the translation from the same string at samples/internat/ja/internat.po.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The charset of the message catalog files changed to UTF-8 in r70411 but the
unit test still expected ISO-8859-1. Update the unit test too to make it pass
again.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The internal wxDateTime representation is in the UTC, so use
wxGetUTCTimeMillis() in UNow(), using wxGetLocalTimeMillis() made it
inconsistent with Now() and wrong.
Really closes#13862.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
As wxCharTypeBuffer ctor taking the length NUL-terminates the buffer, it may
be expected that extend() does the same but it did not. Do add the NUL at the
end for consistency, even though it's not really needed for the existing code
using extend() in wxWidgets itself.
Closes#13885.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70417 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Grouping methods using "//@{" and "//@}" apparently doesn't work and
completely wrong documentation is used in this case, so document the two
overloads separately, as it's done for the other methods.
Closes#13884.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Verify if retrieving client data failed which might happen if the index
is invalid for example. This makes code more robust and also consistent with
wxChoice.
Closes#13883.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70415 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We could wrongly return NULL client data if -1 was stored as client data in
wxChoice because it's the same value as CB_ERR and we always interpreted it as
an error, while it may not be one if GetLastError() doesn't indicate it.
See #13883.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't leave the wxGenericAboutDialog object alive when non-modal about dialog
(as can be used under GTK and OS X) is closed. This is wasteful and, worse,
resulted in the program not exiting after such a dialog was shown because it
counted as a remaining open top level window.
This also fixes the same bug in wxGTK when using GTK+ 2.4.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70413 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
MS and Apple guidelines mention ellipses should generally be used when a command needs additional information from the user before the operation can execute. This is not the case for showing an about dialog so the ellipses have been removed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Changing the localisation files to be in UTF-8 allows them to be committed by the pre-commit hook script.
Also regenerated relevant .mo files.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use (documented but undefined) TDF_SIZE_TO_CONTENT flag under Windows Vista/7
to reduce the chance that Windows truncates or ellipsizes the message text if
it can't wrap it.
Truncation can still happen for very long words but there doesn't seem to be
any drawbacks to using TDF_SIZE_TO_CONTENT and it does avoid truncation in at
least some cases.
This also improves the situation for wxRichMessageDialog and wxProgressDialog.
Closes#13843.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows to post binary data or text data in e.g. UTF-8 encoding (which is
by far the most common case) easily.
Deprecate the existing SetPostBuffer(wxString) as it didn't explicitly specify
the encoding to use for the data to be posted.
Closes#13870.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This fixes generation of EVT_CONTEXT_MENU for mouse clicks in wxHtmlWindow
under MSW: it wasn't generated before because we always ate the right mouse
clicks.
Closes#2465.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Create the buffer holding the result of conversion instead of converting
twice, once to only get the length of the result and the second time to get
the data.
Closes#13877.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It's unnecessary to link with these libraries as they're already embedded
inside our DLLs and the functions from them can't be used anyhow as they're
not declared as DLL-exported in the libraries headers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use WinStruct instead of the usual ZeroMemory() + cbSize setting fragment to
initialize Win32 structs that need to be initialized in this way.
No real changes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775