Commit Graph

58711 Commits

Author SHA1 Message Date
Artur Wieczorek
a029ac7690 Revert "Add wxABI_VERSION guard around wxFloatProperty::DoGetAttribute virtual method body."
This reverts commit 192a61b391.
2015-05-27 22:12:37 +02:00
Artur Wieczorek
192a61b391 Add wxABI_VERSION guard around wxFloatProperty::DoGetAttribute virtual method body.
To prevent compilation errors (when wxABI_VERSION < 30003) also the body of newly overridden method needs to be guarded by wxABI_VERSION.
(See 7b25b65a2f).
2015-05-27 19:43:23 +02:00
Vadim Zeitlin
7b25b65a2f Add missing wxABI_VERSION checks and version script entries.
Newly overridden virtual methods must be taken in wxABI_VERSION checks as
otherwise any program using the class deriving from the one containing this
method would reference the method in the vtbl of that class and so become
ABI-incompatible with the earlier shared library versions.

Also add wxABI_VERSION guard around the entire wxSimplebookXmlHandler class
added in 3.0.2.
2015-05-27 15:07:05 +02:00
JulianSmart
877b972d8f Use OnEndSession/OnQueryEndSession events instead of calling the functions directly. 2015-05-26 12:10:07 +01:00
JulianSmart
ab4b7674c0 Fixed clipped borders on scaled-to-fit images, and fixed a floating image layout bug. 2015-05-26 11:47:54 +01:00
Paul Cornett
0ed1e641d2 backport mouse capture fixes 00cc023 and dc555a9
this change was supposed to be part of 69c7a8c405
2015-05-13 20:19:45 -07:00
Paul Cornett
69c7a8c405 backport mouse capture fixes 00cc023 and dc555a9
00cc023 "fix releasing mouse capture before showing modal dialog"
dc555a9 "notify all windows in capture stack about capture lost, and empty the stack"
closes #16647
2015-05-13 10:13:49 -07:00
Paul Cornett
a2f1bc1fde Fix wxPrintDialog when used directly, see #16821 2015-05-11 10:14:34 -07:00
Iwbnwif Yiw
3f4304f6ab Update wxGrid correctly in presence of hidden rows/columns.
Use GetRowHeight()/GetColWidth() instead of accessing m_rowHeights/m_colWidths
arrays directly as the functions handle the hidden rows/columns correctly.

This fixes bug with corruption of wxGrid appearance if any rows/columns were
inserted into or deleted from a grid containing some hidden rows/columns.

Closes #16980.
2015-05-10 03:17:53 +02:00
Kevin B. McCarty
8277848a5f Don't assert in wxGenericFileCtrl if there is no selected file.
Don't use the list control item if there is no selection in it.

Closes #16684.
2015-05-09 18:57:42 +02:00
Knut Petter Lehre
d1f3be5846 Fix adding blocks to existing selection in wxGrid by Ctrl-drag.
Allow using Ctrl-dragging to add more blocks to the existing selection,
similarly to how spreadsheets work.

Closes #14141.
2015-05-09 18:03:06 +02:00
Vaclav Slavik
7c108690e5 Add LANG_FRISIAN win32 record for wxLANGUAGE_FRISIAN 2015-05-01 11:38:51 +02:00
Vadim Zeitlin
56b30625d0 Guard against NULL m_fileHistory in wxDocManager::OnMRUFile().
Don't crash if wxDocManager was created with "initialize = false" ctor
argument in which case m_fileHistory remains false.

Closes #16973.
2015-04-29 14:08:14 +02:00
Paul Cornett
acc9d5db2f Fix GTK warnings after 92c45ba when TLW is closed while editor is still shown, see #16850 2015-04-26 11:02:26 -07:00
Paul Cornett
92c45ba41d Fix drawing of cell editing controls with GTK3
Get rid of the ugly and unnecessary hack of making the control a child
of the GtkTreeView "behind its back", which was a terrible idea and
bound to cause problems.
See #16850
2015-04-24 09:50:53 -07:00
Vadim Zeitlin
82d4f005d3 Measure wxBitmapComboBox height correctly if it has images.
This fixes a regression introduced in 45e216b (see #14279):
wxBitmapComboBox must be higher than a normal wxComboBox if it has big
enough bitmaps. Closes #16690.

This is the backport of 7e869a5 from master.
2015-04-24 03:53:41 +04:00
Dimitri Schoolwerth
52975d72fd 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.

This is the backport of 2d5ce25373 from
master.
2015-04-23 00:39:41 +04:00
Vadim Zeitlin
03adb6fd2e Ensure that wxTestableFrame is shown on the (main) screen.
Undo the accidental commit of local modifications in
13a119cca8 .

This is the backport of 498f07a5b2 from
master.
2015-04-22 17:05:35 +04:00
Vadim Zeitlin
12b857a329 Fix infinite loop when deleting columns from wxTreeListCtrl.
Wrong variable was checked in the loop adjusting the columns values resulting
in an infinite loop.

Closes #16955.
2015-04-22 14:50:33 +02:00
Vadim Zeitlin
35a3ca5a1e Disable wxSleep() test case for buildbot builds.
This test keeps failing just because the buildbot machine are too heavily
loaded. This is not really an error, so just avoid running this test there.

This is the backport of f641dfd7 from master.
2015-04-22 14:27:06 +02:00
Vadim Zeitlin
5f003c9ffb Avoid using negative width in generic wxTimePickerCtrl.
If there is not enough space for the text, make it of size 0, not negative.

Closes #16960.
2015-04-22 14:15:22 +02:00
Paul Cornett
eb4aab5639 Avoid "Gtk-Message: GtkDialog mapped without a transient parent", closes #16863 2015-04-21 21:44:35 -07:00
Vadim Zeitlin
c2543cd474 Fix using custom paper format in wxOSX.
Do actually use the custom paper object the code creates.

Closes #16959.
2015-04-21 15:56:52 +02:00
Vaclav Slavik
b6d3a64fae Don't check for always-available CGColorCreateGenericRGB
This function is available on OS X since 10.5, which is the minimum
supported version of wx 3.0.

Fixes Xcode 6.3 warning triggered by checking availability of a symbol
that wasn't marked as weak_import.
2015-04-19 13:15:09 +02:00
Vadim Zeitlin
52c8a3684c 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.

This is the backport of 0bb7676889 from master.
2015-04-19 01:45:20 +02:00
Paul Cornett
0c02b05d92 Avoid freeze count mismatches with GTK 2.18+ when impl_window changes while frozen, see #16795 2015-04-17 08:45:55 -07:00
Vadim Zeitlin
84f6686e39 Avoid warnings about not checking chdir() result in wxGTK.
Give error if changing directory when wxFD_CHANGE_DIR or wxDIRP_CHANGE_DIR
flags are used, this is a good idea generally speaking and it also avoids
warnings about not checking chdir() return value that we got under Ubuntu.

This is the backport of 3f6741a770 from master
with the changes of cb06ecb9eb and
de27f4b08f too.
2015-04-17 13:36:04 +02:00
Vadim Zeitlin
feef92f3e2 Avoid warnings about not checking read() result in wxJoystick code.
Explicitly ignore errors if we can't read from the associated FD.

This is mostly done to avoid -Wunused-result warning about not checking read()
return value under Ubuntu.

This is the backport of a74d2faf3a from master.
2015-04-17 13:34:36 +02:00
Vadim Zeitlin
ce62dc893a 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).

This is the backport of 7af8598903 from master.
2015-04-17 13:33:18 +02:00
Vadim Zeitlin
f3fb8fa7c6 Fix harmless warning in ownerdrw sample.
Don't define an unused variable.

Also don't use wxT() unnecessarily.

This is the backport of cd6fb7a9bd and
a1902c1456 from master.
2015-04-17 13:31:24 +02:00
Vadim Zeitlin
210040016e Fix harmless warning in wxCommandProcessor::IsDirty().
This fixes the warning for MSVC, which warned about "forcing value to bool
'true' or 'false'", without introducing one for gcc which would complain if we
compared the value, of compatibility_iterator type, with NULL.

This backports the changes of r75445 and r75653 from master.
2015-04-17 13:27:49 +02:00
Vadim Zeitlin
669c5cd64c Replace anonymous namespace with a named one in the test helpers.
This should avoid clang warnings about the function in anonymous namespace
being unused.

This is the backport of r76928 from master.
2015-04-17 13:26:20 +02:00
Stefan Csomor
b6c6afad93 Fix warning due to wrong use of NULL in wxOSX wxSound.
This is the backport of the old r76862 from trunk.
2015-04-17 13:20:47 +02:00
Vadim Zeitlin
4ed9b1e244 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:56:46 +02:00
Vadim Zeitlin
a19e20d36e 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-13 00:13:28 +02:00
Vadim Zeitlin
597ec59a0b 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-13 00:05:41 +02:00
Vadim Zeitlin
ea07bb0beb Fix libtiff warnings about int to pointer conversions.
As with the previous commit, make an exception to the usual rule of not
changing 3rd party code to get rid of the annoying warnings appearing in each
buildbot libtiff rebuild.
2015-04-13 00:03:39 +02:00
Vadim Zeitlin
1eb2d9f6fe Fix annoying and otherwise unavoidable libtiff warning.
This warning appears in each buildbot build (which is wrong on its own as
libtiff configure shouldn't forcefully regenerate its output config.h every
time neither -- but currently it does) and is annoying as it distracts from
the other warnings, so suppress it even if usually we don't do it for the
warnings in 3rd party code.
2015-04-13 00:03:25 +02:00
Vadim Zeitlin
02f7f0dd32 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:46:46 +02:00
Vadim Zeitlin
0f17babfd9 Disable TextCtrlTestCase::LongText() for non-MSW platforms.
At least under GTK SetMaxLength(), tested by this test, can't be used with
multiline text controls at all, so running it fails. Keep the test for MSW
only where SetMaxLength() works with controls of all kinds.
2015-04-12 19:41:41 +02:00
Vadim Zeitlin
114223fbbb 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:50:21 +02:00
Vadim Zeitlin
c9a2a685cf 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:52:34 +02:00
Vadim Zeitlin
fc2eab62aa 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:52:33 +02:00
Vadim Zeitlin
f99cd0b2e1 Accept wxALIGN_CENTRE_HORIZONTAL in wxStaticText XRC handler.
In addition to wxALIGN_CENTRE, also accept this one (and its US variant).

Closes #16943.
2015-04-12 17:27:23 +02:00
Vadim Zeitlin
5a00ab896b Accept wxALIGN_CENTRE_HORIZONTAL in wxMSW wxStaticText too.
Previously it only handled wxALIGN_CENTRE, also the documentation switched to
wxALIGN_CENTRE_HORIZONTAL in 72e88d8ea3 and
preceding commits.

See #16943.
2015-04-12 17:26:43 +02:00
Vadim Zeitlin
6dba08aead 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.

This is a backport of 5de9b53902 from trunk.
2015-04-10 19:49:46 +02:00
Vadim Zeitlin
46c335c8ef Generate wxEVT_SPINCTRL of the correct wxSpinEvent type.
Handlers for this event expect to get wxSpinEvent but wxMSW and wxGTK1 sent an
object of base wxCommandEvent class which resulted in invalid memory access in
the handlers when using the derived class methods such as Veto().

See #16948.
2015-04-10 16:37:46 +02:00
Vadim Zeitlin
fa44ff601e Fix wxVector3f ctor in the propgrid sample.
Even if this code is not used, it was still wrong as it didn't initialize the
(shadowed) member variables, so fix it to actually do it.

See #16342.
2015-04-07 00:09:14 +02:00
Vadim Zeitlin
95d8daae1a No real changes, just removed unused variables from samples.
Don't define constants which are never used to avoid clang
-Wunused-const-variable warnings.
2015-04-07 00:08:11 +02:00
Vadim Zeitlin
b6d0e176c0 Use NULL, not false, for a pointer.
No real changes, just fix clang warning about returning "false" from a
function returning a pointer.
2015-04-07 00:04:49 +02:00