Commit Graph

1512 Commits

Author SHA1 Message Date
Vadim Zeitlin
fe733e34c2 add maxline restriction in single line mode textCtrl. let textctrl will fire wxEVT_TEXT_MAXLEN and not recive the chars when the text length beyond the maxlength
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:12 +00:00
Vadim Zeitlin
ba7835e5c6 add wxYield() to make sure the former event will executed done
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77805 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:21 +00:00
Vadim Zeitlin
9d7a7ec556 after analisys the behaviour of treectrl in GTK and Qt, right arrow should not move down. Expand the current item will be fine
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77803 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:15 +00:00
Vadim Zeitlin
f83756c2e5 after reset the m_current(focused item) in ClearFocusedItem(), the test could pass under wxUniv. Due to wxGTK and wxOSX use it in same way. So remove the check in test
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:12 +00:00
Vadim Zeitlin
bc19f463a2 add wxYield() after SetFocus(), set focus event needs to be processed before the control can accept input
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:06 +00:00
Vadim Zeitlin
4363f9b578 These test will cause test_gui segmentation fault, disable for now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77785 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:40:15 +00:00
Vadim Zeitlin
c40871e8ce Fix the prepocessor directive, from __WXOSX_COCOA__ to __WXOSX__
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77778 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:50 +00:00
Vadim Zeitlin
2bfd94d59c wxX11 use XColor directly, so wxX11 does not support alpha at all currently
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77775 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:41 +00:00
Vadim Zeitlin
196227619d Adjust comments
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77772 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:28 +00:00
Vadim Zeitlin
7138937cb1 in wxUniv, non-editable textctrl must be set focus, so that could get input value
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:13 +00:00
Vadim Zeitlin
c24ded647e in wxGTK, wxOSX/Cocoa, plus wxUniv, GetNumberOfLines() always returns the number of logical, not physical, lines. See #12366, maybe they did not test wxUniv at that time.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77766 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:08 +00:00
Vadim Zeitlin
c2e18d75e5 Fix wxCALL_FOR_EACH() to work with more than 2 arguments with MSVC.
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
2014-09-14 00:59:53 +00:00
Vadim Zeitlin
1addaeaa75 Add wxUIActionSimulator::Select().
Add a helper to select an item in a wxChoice, wxComboBox, wxListBox or similar.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77662 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 16:52:01 +00:00
Vadim Zeitlin
c4470b8a48 Fix crash in unit tests after TextEntryTestCase::Editable().
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
2014-09-10 16:51:56 +00:00
Vadim Zeitlin
614a0ef481 Don't change a shortcut file name when changing its path.
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
2014-08-29 23:22:05 +00:00
Vadim Zeitlin
df13791078 Merge wxQT branch into the trunk.
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
2014-08-24 01:50:11 +00:00
Vadim Zeitlin
edad9616e7 Return correct string from wxEVT_TEXT wxComboBox events.
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
2014-08-11 11:53:01 +00:00
Vadim Zeitlin
ab50aed57b Fix wxListCtrl sort callback signature in the test under Win64.
Use wxIntPtr instead of long which is not big enough to hold a pointer in
Win64 builds.

Closes #4309.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 15:50:54 +00:00
Vadim Zeitlin
29b68052bb Add support for "%V" and "%G" to wxDateTime::Format().
This is useful for creating ISO 8601 week number based stamps.

Closes #11857.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:47:36 +00:00
Vadim Zeitlin
db65392b95 Disable a harmless deprecation MSVC warning for wxNORMAL in a test.
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
2014-08-03 12:47:32 +00:00
Vadim Zeitlin
c3c0ae03fe No changes, just update the file name in the header.
Update the name in the header to match the actual file name.

See #12904.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-26 10:50:38 +00:00
Vadim Zeitlin
2098cafcad Implement bounding box computations for wxGDDC.
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
2014-07-26 01:34:50 +00:00
Vadim Zeitlin
789f1a7975 Replace anonymous namespace with a named one in the test helpers.
This should avoid clang warnings about the function in anonymous namespace
being unused.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76928 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-14 19:17:12 +00:00
Stefan Csomor
cc48521426 forgotten commit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76924 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-14 17:15:59 +00:00
Stefan Csomor
c87149d7df attempt at getting rid of unused-function warning
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-14 15:37:21 +00:00
Vadim Zeitlin
45adc64f9f Fix inserting an element of wxArrayString itself back into it.
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
2014-07-13 14:30:22 +00:00
Vadim Zeitlin
86e587a096 Fix memory leak in ArraysTestCase unit test.
Clear the items in PTR array explicitly, this is not done by the array itself.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-13 14:30:14 +00:00
Stefan Csomor
52920b4b9b reverting incorrect change
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76867 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-07 05:16:33 +00:00
Stefan Csomor
37762124df adding padding nuls
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76864 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-06 19:32:26 +00:00
Stefan Csomor
25d3db36b0 add zero termination for utf16
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-06 07:00:09 +00:00
Vadim Zeitlin
202f62b4c4 Generate 64 bit configurations in MSVC 8/9 projects.
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
2014-06-24 23:54:08 +00:00
Dimitri Schoolwerth
1c49a2e1ba Fix exception while reinserting menu item.
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
2014-06-23 20:00:42 +00:00
Dimitri Schoolwerth
bab52682bc Fix wxMenuItem::SetBitmap infinite recursion (Vista+).
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
2014-06-23 19:58:13 +00:00
Vadim Zeitlin
af77028fcf Add wxDictionaryStringSortAscending comparison function.
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
2014-06-23 12:02:09 +00:00
Vadim Zeitlin
3410aa372f Fix wrong resulting string length in UTF-16 to wchar_t conversion.
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
2014-05-29 23:48:40 +00:00
Vadim Zeitlin
498f07a5b2 Ensure that wxTestableFrame is shown on the (main) screen.
Undo the accidental commit of local modifications in r74997.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76613 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-27 17:27:10 +00:00
Paul Cornett
0b92a2083d Fix setting client data when adding items to a sorted wxListBox, broken in r74317
closes #16290


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76605 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-26 07:30:42 +00:00
Vadim Zeitlin
5de9b53902 Disable another wxStopWatch test case in the build bot builds.
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
2014-05-22 15:13:16 +00:00
Vadim Zeitlin
268b33d8a3 Add simple font tests for the drawing unit test.
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
2014-05-17 12:29:21 +00:00
Vadim Zeitlin
4d8ff19a1a Include renderer version into the platform tag in graphics context tests.
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
2014-05-17 12:29:08 +00:00
Vadim Zeitlin
898562f7d3 Make assert message in GraphicsContextDrawingTestCase more informative.
Include the paths of the files that we failed to copy.

See #16260.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76553 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-17 12:29:02 +00:00
Vadim Zeitlin
e9f4d80887 Remove checks for ancient gcc/MinGW versions.
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
2014-05-16 13:01:35 +00:00
Vadim Zeitlin
8c7d31e615 Remove obsolete MSVC version tests.
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
2014-05-16 13:01:29 +00:00
Vadim Zeitlin
15f255cebb Remove support for Digital Mars compiler.
This compilers is not being developed any longer since many years, drop
support for it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-16 13:01:23 +00:00
Vadim Zeitlin
49b8d79c87 Remove (Open)Watcom support.
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
2014-05-16 13:01:06 +00:00
Vadim Zeitlin
ba8d58df6c Don't build drawing test plugin in static builds.
Static wxWidgets library can't be used in dynamically loaded plugin, simply
don't build it in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-16 10:53:55 +00:00
Vadim Zeitlin
a7a2978fb1 Remove remaining MSVC6 workspace files.
See #15726.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76540 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-16 10:00:30 +00:00
Vadim Zeitlin
9d3921122f Fix drawing test link in static build.
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
2014-05-16 09:59:10 +00:00
Vadim Zeitlin
0d4ad161d5 Remove support for Win9x from wxMSW.
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
2014-05-16 02:33:40 +00:00
Vadim Zeitlin
01f9accd19 Remove wxPM, wxWidgets port to OS/2.
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
2014-05-15 23:56:58 +00:00