Commit Graph

1627 Commits

Author SHA1 Message Date
Tobias Taschner
8282c1be0f Remove Windows CE support
Windows CE doesn't seem to be supported by Microsoft any longer. Last CE
release was in early 2013 and the PocketPC and Smartphone targets supported by
wxWidgets are long gone.

The build files where already removed in an earlier cleanup this commit
removes all files, every #ifdef and all documentation regarding the Windows CE
support.

Closes https://github.com/wxWidgets/wxWidgets/pull/81
2015-09-23 00:52:30 +02:00
Vadim Zeitlin
78d09e2e90 Document and test wxDatePickerCtrl::SetRange() date-clamping behaviour.
Document that the current value of the control is adjusted if it doesn't lie
in the newly set range and add a unit test to check for this, now that it
actually passes under all platforms, after the previous commits.
2015-07-17 17:59:40 +02:00
Vadim Zeitlin
c15ae5e4a3 Add a check for wxSocketServer creation to the unit tests.
This should prevent an assert failure which happens if we call Accept() on an
invalid server below and also confirm if the server creation really failed or
not.
2015-06-23 19:11:31 +02:00
Vadim Zeitlin
853a8ef76f Avoid warnings about narrowing casts in the long long tests.
Recent g++ versions give -Wnarrowing warning when a value outside of the type
range is used to initialize a variable of this type in { }. Avoid it in the
long long tests using explicit casts as we already cast between long long and
unsigned long long values here anyhow.
2015-06-21 15:56:06 +02:00
Vadim Zeitlin
d5fda9d69b Fix g++ version test in the previous commit.
sUse the correct __GNUC_MINOR__ instead of the wrongly autocompleted
__GLIBC_MINOR__.
2015-06-21 02:42:34 +02:00
Vadim Zeitlin
052e598d09 Avoid g++ 4.8.2 bug that resulted in infinite loops in the test suite.
g++ 4.8.2, shipped with Ubuntu 14.04, generates incorrect code for checking
the loop termination condition, resulting in never ending loops in
HashMapTest().

Disable the optimizations for this function for 4.8.[012] as the bug seems to
be fixed in 4.8.4 and several similar (but not really identical) bug reports
in gcc bugzilla have been fixed in 4.8.3.

This should allow the unit tests on Linux buildbots, using 4.8.2, to run to
completion again.
2015-06-21 02:24:50 +02:00
Vadim Zeitlin
04c4e5f177 Avoid reading one char beyond the buffer end in UnicodeTestCase.
Valgrind complains about reading beyond the end of buffer when using glibc
std::string for wxString implementation under amd64 Linux. Don't suppose that
the buffer has one extra null word at its end to avoid this.
2015-06-19 20:22:11 +02:00
Vadim Zeitlin
893102b926 Fix mismatched new[]/delete in a test case.
Use wxDELETEA() as the comment said we did -- except that we didn't.
2015-06-19 16:32:14 +02:00
Vadim Zeitlin
6037ce0e6f Disable unit test sporadically failing in wxGTK buildbot builds.
This failure seems to only happen on buildbot, at least it couldn't be
reproduced after 100 runs of the test locally, so it just doesn't seem
possible to debug it.

Disable it to allow detecting when other tests fail (which would be
unexpected, unlike this one).
2015-06-12 15:57:33 +02:00
Roberto Perpuly
aa5dbad410 Use FSEvents in wxFileSystemWatcher on OS X
The FSEvents API allows for creating watches in entire trees of
directories in an efficient manner.

Closes #16969.
2015-06-06 02:37:35 +04:00
Roberto Perpuly
f0e098fa06 Re-enable running FS watcher test on OS X
Use a workaround to compensate for the differences between a non-GUI and
GUI event loop with wxOSX. This allows the FS watcher tests to pass
(previously it would hang) under OS X without having to move the tests
to the test GUI application (where the tests do pass on OS X already,
without needing this workaround).

See #16969.
2015-06-06 01:29:52 +04:00
Roberto Perpuly
bb14d8e131 Fix re-running aborted FS watcher test
If the test is interrupted and run again an assert is raised because the
temporary fswatcher_test dir has had no chance to be deleted and still
exists. Fix this by removing the dir before each test.
2015-06-06 01:29:52 +04:00
Vadim Zeitlin
ef30f6fe63 Fix recently added wxFileName::MakeRelativeTo() unit test for non-Unix.
Don't hard code the use of slashes as path separators.
2015-05-30 03:38:03 +02:00
Vadim Zeitlin
fda09f917a Fix wxFileName::MakeRelativeTo() for directory relatively to itself.
The expected result in this case is ".", but the filename became empty instead
when wxPATH_NATIVE was used.

Fix this by examining GetFormat(format), which takes care of mapping
wxPATH_NATIVE to its real value, instead of wxPATH_NATIVE itself.

Also add a unit test verifying that this works as expected.

Closes #17010.
2015-05-29 16:23:17 +02:00
Vadim Zeitlin
ee973e1fe7 Add more wxString::Format() positional parameters tests.
Verify that repeating positional parameters does work with wxString::Format()
instead of keeping these tests commented out in wxVsnprintf() tests, which are
not run at all if we're using the compiler-provided vsprintf().

Closes #9367.
2015-05-28 14:12:48 +02:00
Dimitri Schoolwerth
9a517e572e Revert "Disable wxFont::SetStrikethrough() test under wxOSX."
Enable the test again because strike-through support has been available
under wxOSX for some time.

This reverts commit 9b1aeb4c93.
2015-05-22 03:28:07 +04:00
Nick Matthews
d13278ecc3 Add support for DOCTYPE to wxXmlDocument.
Allow retrieving the DOCTYPE specified in an existing document as well as
specifying the DOCTYPE to use when writing a new one.

Closes #13779.
2015-04-26 15:36:48 +02:00
Dimitri Schoolwerth
8f8d58d193 Use wx-prefixed macros throughout the repository.
Change {DECLARE,IMPLEMENT}_*CLASS and {DECLARE,BEGIN,END}_EVENT_TABLE
occurrences to use the wx-prefixed version of the macros.
2015-04-23 22:00:35 +04:00
Vadim Zeitlin
2d3f617b34 Fix crash in BoxSizerTestCase::IncompatibleFlags().
Reset the old window sizer pointer, otherwise it was deleted again in the
window dtor (thanks buildbot for finding this one).
2015-04-23 19:31:15 +02:00
Dimitri Schoolwerth
2d5ce25373 Work around failing file watcher test under XP.
Under only Windows XP the test FileSystemWatcherTestCase::TestTrees fails
during the RmDir(treedir) call (SHFileOperation strangely returns
ERROR_DIR_NOT_EMPTY). To make the test pass remove the treedir first and
only then the singledir. This is merely a workaround while the actual
problem is still to be investigated.
2015-04-19 13:34:39 +04:00
Vadim Zeitlin
7af8598903 Yet another wxStopWatch unit test fix for buildbot.
Relax the check in RestartBug() test too, the time can be slightly smaller
than expected (by ~2ms on disc-xp machine).
2015-04-17 01:43:57 +02:00
Dimitri Schoolwerth
25fcb85590 Fix TreeCtrlTestCase assert failure under Windows.
A '-' keypress doesn't collapse a tree item with the native MSW tree
control. Instead, when not using the generic tree control, simulate a
keypress of WXK_LEFT to collapse the root item . This fixes the assert
checking if the root item is collapsed after the keypress.

Regression since 9d7a7ec556 (which
mistakenly may have had treectrltest.cpp as part of its commit).
2015-04-16 03:13:54 +04:00
Vadim Zeitlin
594dc3396a Relax another check in wxStopWatch unit test.
Increase the upper bound even further to avoid spurious failures in the
buildbot builds.
2015-04-13 15:55:33 +02:00
Vadim Zeitlin
4556179fd1 Disable ItemContainerTestCase::SimSelect() for wxBitmapComboBox on buildbot.
This test inexplicably fails when running on buildbot (but not locally), so
just disable it to get a build without test failures.
2015-04-12 23:18:59 +02:00
Vadim Zeitlin
10a727bf1d Compare scaled images approximately in the unit tests.
Comparing them exactly results in tests failures when using compiler version
different from the one that was used to generate the test fails, see
http://thread.gmane.org/gmane.comp.lib.wxwidgets.devel/151149/focus=151154
and other messages in the same thread.
2015-04-12 22:56:24 +02:00
Vadim Zeitlin
ca0c422964 Relax wxStopWatch test to make it less likely to fail on buildbot.
Be prepared for sleeping taking more time than we budget for it on a highly
loaded machine such as a buildbot slave.
2015-04-12 22:47:46 +02:00
Vadim Zeitlin
b7778beeef Give more details in GarbageTestCase unit test.
Try to find out why this test fails in the OS X buildbot builds.

Use macros to ensure that all checks provide information about the bitmap (or
animation) type they fail for, without having to repeat the same code for
doing it many times.
2015-04-12 22:30:52 +02:00
Vadim Zeitlin
2d7875c926 Restore OnRun() in the non-GUI unit test suite.
Commit 3e67b1ef68 broke the test suite in
non-GUI case, we still need to override OnRun() then to run the tests.

Also make it more clear that m_exitcode is only used in the GUI case.
2015-04-12 18:21:47 +02:00
Vadim Zeitlin
3e67b1ef68 Fix the unit test suite exit code in case of failure.
Return the program exit code from the (overridden) OnRun(), not OnExit(),
doing it from the latter didn't work since many years.

The failures in the GUI tests will be detected by buildbot now.
2015-04-12 17:51:30 +02:00
Vadim Zeitlin
e8d969244e Check for "buildbot" user in IsAutomaticTest().
The new buildbot setup runs the code under this user, so adjust the check for
running under buildbot to detect it.
2015-04-12 17:40:10 +02:00
Vadim Zeitlin
31d1644daa Finally do fix use of wxTranslateFromUnicodeFormat() in the unit test.
Don't reference the never defined function in the test any more.

(This does) close #16118.
2015-04-10 17:51:01 +02:00
Vadim Zeitlin
806317dfcc Really really fix use of wxTranslateFromUnicodeFormat() in the unit test.
Don't build this test at all under Unix, where this function doesn't exist.

(Really really) closes #16118.
2015-04-10 17:01:29 +02:00
Vadim Zeitlin
ffcc18580e Really fix use of wxTranslateFromUnicodeFormat() in the unit test.
Update the function declaration in the test too.

(Really) closes #16118.
2015-04-10 16:24:58 +02:00
Dimitri Schoolwerth
adbc9863b2 Handle quotes in wxTranslateFromUnicodeFormat.
When parsing Unicode date formats text inside single quotes should not be
escaped and instead treated as literal text. In addition two single quotes
(either inside or outside quoted text) should be interpreted as a single
quote.

Fixes #16118.
2015-04-09 04:39:35 +04:00
Vadim Zeitlin
58114f22c3 Detect the use of incompatible flags for wxGridSizer too.
Complain if wxEXPAND is combined with both horizontal and vertical alignment
flags, as this doesn't make sense and, moreover, the behaviour has changed
since the last commit: now wxEXPAND is ignored instead of overriding the
alignment flags if they are combined.
2015-04-08 23:35:19 +02:00
Vadim Zeitlin
9aaa38c7c8 Make it possible to combine wxEXPAND and alignment in wxGridSizer.
Allow overriding wxEXPAND effect in one of the directions by specifying
wxALIGN_{RIGHT,BOTTOM} or wxALIGN_CENTRE_{HORIZONTAL,VERTICAL} together with
it (unfortunately this doesn't work for wxALIGN_{LEFT,TOP} as their value is 0
and so their presence in flags can't be detected).
2015-04-08 23:35:19 +02:00
Vadim Zeitlin
7e865daa26 Add unit test for wxFlexGridSizer layout logic.
Currently just test that wxEXPAND flag works as expected.
2015-04-08 23:35:19 +02:00
Vadim Zeitlin
78b98bf00c Validate wxBoxSizer flags instead of silently ignoring invalid combinations.
Detect using flags corresponding to the major sizer direction (which doesn't
make sense as only the proportion governs the behaviour in this direction) and
also combinations of alignment flags with wxEXPAND.
2015-04-08 23:35:19 +02:00
Vadim Zeitlin
7811394694 Add WX_ASSERT_FAILS_WITH_ASSERT_MESSAGE helper.
This is similar to the existing WX_ASSERT_FAILS_WITH_ASSERT, but allows to
specify the message to give if the expected assertion is not triggered.
2015-04-08 23:35:19 +02:00
Vadim Zeitlin
636d08323f Assert if incompatible sizer flags are used.
We can't check for all the invalid combinations, but at least check for
wxALIGN_CENTER_HORIZONTAL+wxALIGN_RIGHT and wxALIGN_CENTER_VERTICAL+
wxALIGN_BOTTOM which never make sense and can be detected.
2015-04-08 23:35:18 +02:00
Dimitri Schoolwerth
66cfa40643 Deal with remaining cvs/svn keywords.
A few $Id$ references remained after commit
3f66f6a5b3 or appeared in newly added files.
Remove the lines containing svn keywords except when it concerns
third-party files. In that case keep the line as-is or collapse it to the
keyword if it had been expanded to contain wx commit information (only
occurs with src/zlib/ChangeLog).
2015-04-09 03:32:23 +04:00
Vadim Zeitlin
3ee12b2ca9 Convert all XPM files to Unix EOLs.
Just as the normal sources (*.h, *.cpp), these files should be using LF and
not CR LF.
2015-03-19 21:46:05 +01:00
Bryan Petty
164d5dbb37 Sync EOL normalization settings.
This reflects additions to .gitattributes in last commit.

See #15584
2015-03-17 13:47:20 -06:00
Vadim Zeitlin
0a8ea54125 Fix typo in DateTimeTestCase::TestParseRFC822() method name.
No real changes, just s/Parce/Parse/
2015-02-26 00:17:26 +01:00
Vadim Zeitlin
4c90d08f43 Fix the expected size of the header logo on www.wxwidgets.org.
The image has been updated in the website repository and online, update its
expected size to reflect it and fix the unit test suite.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-04 17:44:57 +00:00
Vadim Zeitlin
51404f8792 Cast size_t value when using it with printf() in a test.
Use %lu with a cast to avoid warnings in both 32 and 64 bit builds.

Closes #16720.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-10 00:14:14 +00:00
Vadim Zeitlin
069415c2a6 Fix wxStringTokenizer copy ctor and assignment operator.
Implement copying of wxStringTokenizer correctly: compiler-generated versions
didn't work as the position of the tokenizer didn't point into the correct
string after making the copy.

Fix this by adjusting the position iterator to use the copy of the string.

Closes #16339.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-20 15:08:09 +00:00
Vadim Zeitlin
0bb7676889 Disable surrogate-related unit test for MSW.
This test can't work when the in-memory representation is UTF-16, as we can't
convert surrogates to anything else in this case.

This fixes the unit tests broken since r76622, see #16298.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-14 19:36:51 +00:00
Vadim Zeitlin
f99ff49e29 Don't end converting prematurely on encountering consecutive NULs.
Don't stop converting subsequent chunks just because the length of one of them
was 0: this can happen if the first character of a string is a NUL or if there
are two (or more) NULs in it later.

Simply remove the check for this and continue as usual even in this case.

Also add a unit test verifying that we do translate NULs in input into NULs in
output.

Closes #16620.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78021 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-14 19:36:46 +00:00
Vadim Zeitlin
b9e0e606a8 Add support for 'z' size format specifier.
Assume that non-MSVC compilers support it directly and use 'I' for MSVC.

Closes #16596.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-12 20:48:41 +00:00
Vadim Zeitlin
2f51147732 Fix resource compiler include path for Borland.
Explicitly include $(BCCDIR)/include/windows/sdk directory in the resource
compiler options, as it needs it to find windows.h.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-11 16:30:00 +00:00
Vadim Zeitlin
adf8f9d0cd Handle multiple item insertion and deletion in wxSelectionStore.
Rename the existing but not implemented and never used OnItemAdd() method to
OnItemsInserted() and add OnItemsDeleted(), which is more efficient than
OnItemDelete() when many items are being removed from the control at once.

This is not used yet, but will be used in wxDataViewCtrl soon and maybe in the
other controls later.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77904 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 20:46:21 +00:00
Vadim Zeitlin
06ab4da3f3 Add wxSelectionStore::IsEmpty() helper.
Just a simple and potentially (although not right now) more efficient
equivalent to GetSelectedCount() == 0.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 20:46:18 +00:00
Vadim Zeitlin
d058c09e9f Add possibility to iterate over all selected items in wxSelectionStore.
This is necessary for retrieving all the selected items at once: while doing
this is not recommended for a control with a potentially very large number of
items, it must be possible to allow using wxSelectionStore for wxDataViewCtrl
implementation as wxDataViewCtrl must implement its GetSelections() method.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 20:46:15 +00:00
Vadim Zeitlin
98c68150ed no changes, add more specific description of these tests.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:44:45 +00:00
Vadim Zeitlin
fae6a86a49 This statement that will cause segmentation fault before. Now it ok and enable it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:44:30 +00:00
Vadim Zeitlin
42d5c34c64 x11 alrady support GetUnicodeKey() by last commit, remove these check
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77847 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:43:41 +00:00
Vadim Zeitlin
ad84d9f97d make wxKeyEvent could get unicode key under x11, add a x11 keysym--unicode char map tab
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:43:37 +00:00
Vadim Zeitlin
813c7a15c1 add wxYield to make sure all event was executed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:43:06 +00:00
Vadim Zeitlin
f6fdfe8ebc about focused window, replace static variables implementation by DoFindFocus
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:58 +00:00
Vadim Zeitlin
adf61108be wxX11 return keycode by GetKeyCode directly, not support GetUnicodeKey yet
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77833 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:54 +00:00
Vadim Zeitlin
fdbc16ed8d add wxYield() after SetFocus, make sure the all event will be executed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77832 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:51 +00:00
Vadim Zeitlin
e5123cf2f4 disable the unit test under wxUniv too. wxGrid implementation may has bug that work with simulator
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77827 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:36 +00:00
Vadim Zeitlin
31f0808ee2 reenable this tests under wxUniv/x11 port. EventPropagationTestCase::MenuEvent cause the problem, not these. MenuEvent will be fixed later
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:29 +00:00
Vadim Zeitlin
d9b0c17412 modify the listbasetest.(10,5) is not a correct position in wxUniv/x11 listbase test. (10, 10) could work both on wxUniv/x11 and other ports(already tested)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:15 +00:00
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