Due to a bug in MSVC handling of __VA_ARGS__ (see
https://connect.microsoft.com/VisualStudio/feedback/details/380090/variadic-macro-replacement)
wxCALL_FOR_EACH() didn't work correctly as long as more than two arguments
were used with it.
Work around the bug by protecting __VA_ARGS__ from being incorrectly passed as
a single token to the macro being called on every step: this was already done
for wxCALL_FOR_EACH itself with wxCALL_FOR_EACH_, but we need to do it for all
the helper macros too.
Also add a test checking that this does, actually, work.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The class TextEventHandler added in r77057 (see #3901) setup an event handler
which wasn't disconnected when the handler was destroyed, which resulted in a
crash later as the window it was connected to continued to exist and generate
wxEVT_TEXT events.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77661 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxFileName::MakeRelativeTo() is only supposed to change the path of the file,
not its name, but it was doing the latter for the shortcuts as it implicitly
resolved them to the name of their target.
Fix this by ensuring we do not use wxPATH_NORM_SHORTCUT in MakeRelativeTo().
Closes#16239.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77509 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This merges in the latest sources from GSoC 2014 wxQt project with just a few
minor corrections, mostly undoing wrong changes to common files in that branch
(results of a previous bad merge?) and getting rid of whitespace-only changes.
Also remove debug logging from wxGrid.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxCommandEvent::GetString() could return empty string for the
programmatically-generated wxEVT_TEXT events from a wxComboBox.
Fix this by extending the on-demand string retrieval in wxCommandEvent to
wxComboBox as well (it was done only for wxTextCtrl).
Also add a unit test checking that the string has the expected value in the
events sent by all wxTextEntry-derived controls.
Closes#3901.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Explicitly disable the warning just for the code using wxNORMAL as the use of
this deprecated constant can't be avoided in the code which tests for its
support.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Update the bounding box in all the methods drawing something. This wasn't
done before in many of them, resulting in the bounding box remaining empty,
but it is updated now and a new test checking that it is was added.
Closes#12904.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Do the insertion/addition before deallocating the old memory to allow things
like array.Add(array[0]) to work correctly.
Closes#2290.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Update bakefile configuration to include x64 configurations into MSVS 2005 and
2008 projects (2003 doesn't support building in 64 bits, 2010 and later are
manually maintained and already have them) and rebake the projects.
Closes#13675.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76768 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
After removing an item from a menu that item's parent menu is set to NULL
and can't be used any longer to insert the item again. Fix by remembering
the parent menu before removing the item from it.
Regression since r76251 (this commit is a partial revert of that commit).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Calling a menu item's SetBitmap can result in a stack overflow. This
occurs when setting a bitmap after the menu item has already been added to
the menu and while running under Vista (and later). Under those
circumstances [Do]SetBitmap will call GetHBitmapForMenu which itself calls
SetBitmap again.
Fix by adding a simple check for re-entry.
Regression since r76202.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add "dictionary sort" callbacks and document them and the already existing
wxStringSortAscending() and wxStringSortDescending().
See #16330.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76753 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't optimize the returned length for surrogate-less case, this does save a
pass of the string but at the price of returning a wrong result, which is not
worth it, just compute the really required length exactly.
Closes#16298.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We can't rely on the program waking up quickly enough when running on the
(loaded) buildbot machines, better to skip this test than to have spurious
failures.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76598 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Check that DrawText() results in the expected output.
Currently the tests are disabled for non-Windows systems because of the
problem with the reference file paths there.
See #16261.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76556 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows to distinguish the results of the same renderer (e.g. GDI+-based
one) on the different OS versions (because GDI+ produces different results
under XP and Windows 8).
Closes#16260.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't test for wxUSE_NORLANDER_HEADERS, this is always true since many, many
years.
Remove tests for gcc version < 3.3, notably 2.95: the minimal supported gcc
version is 3.4.
Closes#15727.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76549 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't compare __VISUALC__ with versions 1200 (VC6) and earlier, such tests are
always true or always false now that we don't support VC6 any more, so just
remove them simplifying the code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This compiler is not being developed since several years and almost certainly
can't be used to build the current wxWidgets sources anyhow, so remove all
support for it, including a lot of extremely ugly workarounds for its bugs
with template functions.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We must use wx_append template which adds the required GUI libraries when
using static versions of wxWidgets libraries and not wx_append_base.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Most importantly, this allows us to remove all MSLU-related stuff.
Some functions which were previously loaded dynamically can now be just used
directly, too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This port is not used and is not being worked on, so remove it to reduce the
amount of the code which needs to be updated for every global change.
Also remove tests for VisualAge compiler which isn't used since ages.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775