wxMSW automatically extended wxTextCtrl length limit beyond the tiny standard
32KB when it was exceeded, but part of the text being appended into the
control was lost when doing it.
Fix this by retrying insertion after extending the limit.
Closes#15980.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Sort() and ReadOnly() tests created a new combobox without deleting the old
one, and so these comboboxes were left on the screen for the duration of all
the subsequent tests, subtly breaking them. E.g. this was responsible for
spurious breakages in the event propagation test case because sometimes the
context menu event showed the combobox context menu (why this didn't happen
always is another question...).
It would be great to find some way to ensure that nothing is left after a test
terminates but I'm not sure about how to do this with cppunit. So for now just
manually delete the extraneous comboboxes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We were getting an extra event under MSW if the control was initially
unfocused, so do focus it. This is a work around as the extra event shouldn't
occur but I'm too afraid of changing wxMSW code itself so close to 3.0.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Even after the changes of r70415, we could still report an error when the
item client data was set to -1 (== CB_ERR) as checking for GetLastError() was
not enough, we need to also ensure that the last error is reset before trying
to get the client data.
Also apply the same fix to wxListBox and add the tests verifying that this
does work correctly.
Closes#13883.
Also fix wxListBox::GetClientData().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
After the changes of r53758 wxMSW didn't generate any wxEVT_TEXT events but
this was still the case for the generic version (and hence for
wxSpinCtrlDouble under MSW too) and wasn't documented.
Fix all versions to avoid sending events for programmatic actions, add unit
tests checking this behaviour and document it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Run the same NoEventsInCtor() test as we already had for wxSpinCtrl for
wxSpinCtrlDouble as well.
Unfortunately currently there is no way to reuse the tests between these two
classes, we should refactor these test cases to use a common
SpinCtrlTestCaseBase<T> base class.
See #15375 which fixed the underlying bug.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.
If nothing else, this will make an eventual transition to Git simpler.
Closes#14487.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This DOMRange method, previously used in GetSelectedText(), seems to provide
exactly what we need so there doesn't seem to be any reason to use JS to get
the selection text, especially as it didn't even work under OS X 10.8 and
returned an empty string in the unit test.
The unit test still needs adjustment to pass because we don't get back exactly
the same HTML as we used originally, but with more relaxed matching it does
pass now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74541 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The main user-visible effect of this change is that giving configure
--disable-vararg-macros argument now really disables the use of variadic
macros whereas it didn't disable them in wx/cpp.h before.
It is, of course, also less confusing to not have two very similar but
different symbols.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This fixes the wrong handling of the selection in wxSimplebook when the
currently selected page was deleted.
Also extend the unit tests to check for this bug.
Closes#15188.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add Realize() virtual function that can be overridden in ToolbookTestCase
instead of using explicit wxDynamicCasts.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Verify that the top item is _not_ at (0, 0) when the header is present in the
control, as the control client coordinates should not take the header into
account.
This test passes when using wxGenericListCtrl since r74197, add it to ensure
that it doesn't get broken again later.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes, just update the internal variables in ClearTable() to avoid
inconsistent internal state, even if this doesn't seem to result in any
problems for now.
Closes#15190.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Revert r73959, the name of the control can be seen from the name of the
failing test case actually, so there is no need to include it in the message.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This test is used for several different classes, show the name of the class
being tested when the assert in Editable() test fails.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73959 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This check keeps failing in buildbot builds even though it always passes in
local ones (and sometimes in buildbot ones too). Disable it to allow the
entire test suite to pass.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Call LoadUrl() after associating our custom event handler with the browser
object as otherwise the wxEVT_WEBVIEW_LOADED event could be generated before
we were set up to catch it, resulting in the assertion failure inside
ENSURE_LOADED.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use the same short names as are used by the event table macros for the event
type constants themselves. This makes them much more comfortable to use, e.g.
Bind(wxEVT_BUTTON) compared to Bind(wxEVT_COMMAND_BUTTON_CLICKED).
The old long names are still kept for backwards compatibility and shouldn't be
removed as it doesn't really cost anything to continue providing them, but all
new event types should only use the short versions.
Closes#10661.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
While we don't support auto-sizing of the hidden columns and rows, we need to
still show them back when SetColSize() or SetRowSize() is called with -1
(a.k.a. wxGRID_AUTOSIZE) argument.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Override GetMainWindowOfCompositeControl() in the windows composing the
generic wxSearchCtrl to ensure that HasFocus() correctly returns true for the
entire control when any of them has focus.
Add a trivial unit test to check that this really works and facilitate adding
more tests for this class later.
Closes#14970.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73401 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Set the range before setting the initial value when creating wxSpinCtrl, as
otherwise the value was wrongly limited to the default 0..100 range instead of
the one really specified.
Closes#14894.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Other ports don't send wxEVT_COMMAND_SPINCTRL_UPDATED from SetRange() even if
the value changed because it was adjusted to fit into the new range and this
makes sense as this change is not due to a user action, so don't send this
event under wxMSW neither.
Also add a unit test checking for this behaviour.
Closes#14583.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Revert r71945 which disabled failing wxRichTextCtrl unit test. It fails again
now and hopefully will be fixed before 2.9.5.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Disable CaretPosition() unit test as it is broken now. This is only temporary
to allow tests to pass in 2.9.4, will be reenabled (and hopefully fixed) later.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This shouldn't happen but did (and apparently still does, sometimes) under MSW
so add a test verifying that no events are generated by the ctor.
See #14428.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Something is seriously wrong with simulated mouse events and wxGrid under
wxGTK, they seem to simply disappear sometimes. This results in unit tests
suite failure, so disable these tests for the next release as I just don't
understand how to fix them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71635 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows to easily test if we're running on a buildbot slave and disable
some difficult to debug test failures there.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Always use value argument for the text control contents and also override the
initial numeric value with it if it's numeric.
This seems to be the only consistent thing to do, so document this behaviour
and add a unit test checking for it.
Closes#13589.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There is a problem with the native header control still having the mouse
capture when the grid is destroyed in wxGTK and this resulted in asserts when
destroying the grid, nested asserts due to an exception being thrown from a
dtor and finally abort that prevented the rest of the tests from running.
As I failed to find the real reason for this problem, just forcefully ensure
that we don't have the mouse capture when destroying the grid. This at least
allows the complete test suite to run.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775