Commit Graph

60070 Commits

Author SHA1 Message Date
Dimitri Schoolwerth
d15bfe8794
Fix wrong printf() format specifiers in the screenshotgen util.
Use "%ld" for long values, not "%d".
2015-04-26 14:46:49 +04:00
Dimitri Schoolwerth
2f3d0d9629 Fix invalid use of wxSizer flags in samples and utils.
Remove alignment flags that result in asserts because of being used in
combinations that don't make sense.

Also use wxSizerFlags in the lines that were changed.
2015-04-25 21:26:40 +04:00
Paul Cornett
4b9485a497 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:52:47 -07:00
Vadim Zeitlin
a634aab571 Fix progress logging in the console socket server sample.
Output the total amount written so far.

Closes #16964.
2015-04-24 00:20:33 +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
Vadim Zeitlin
ef96bd6af1 Compilation fix for wxOSX/wxGTK3 after FromDIP() changes.
100d2a5 didn't update the inline FromDIP() version for these ports.
2015-04-23 19:25:21 +02:00
Vadim Zeitlin
af01ef1bb0 Make default wxSizer border DPI-aware.
Scale the (still hard-coded) border in pixels by the content scale factor for
the platforms where this needs to be done, i.e. not wxGTK nor wxOSX where the
underlying toolkit already does it.
2015-04-23 19:18:10 +02:00
Vadim Zeitlin
277b848364 Handle all pixel values in XRC as being DPI-independent.
Pixel values in XRC can never be correct for high resolution displays, unlike
the pixel values passed to wxWidgets API, which could be already adjusted to
account for the resolution or obtained from resolution-dependent text metrics,
so scale them by the factor appropriate for the current resolution
automatically.
2015-04-23 19:18:09 +02:00
Vadim Zeitlin
100d2a5819 Make wxWindow::FromDIP() more flexible and easier to use.
Allow calling this method with either wxSize, wxPoint or just an int.

Also provide a static overload allowing to use it even when no appropriate
wxWindow is available.
2015-04-23 02:20:02 +02:00
Vadim Zeitlin
4df7057302 Refactor: extract XRC code handling conversion from dialog units.
Factor out this code to a reusable ParseValueInPixels() function instead of
repeating it in GetSize() and GetDimension() (and using a hack to reuse it
from GetPosition()).

No real changes, just made some error messages more precise.
2015-04-23 02:20:01 +02:00
disc
2ae7ed65e3
Regenerate Xcode projects.
Update the Xcode projects to include activityindicator.cpp,
activityindicator.mm, and xh_activityindicator.cpp. Also add changes
that weren't included as part of a previous regeneration.
2015-04-23 00:26:17 +04:00
Vadim Zeitlin
eeebfdcc8c 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:49:04 +02:00
Vadim Zeitlin
b5ef2ac489 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:14:14 +02:00
Vadim Zeitlin
a49a8a3f2f Fix using custom paper format in wxOSX.
Do actually use the custom paper object the code creates.

Closes #16959.
2015-04-21 15:46:40 +02:00
Jouk
3643935097 Include activityindicator.cpp 2015-04-21 08:25:48 +02:00
Vadim Zeitlin
6d92f45385 Remove all mentions of wxGauge shadow width and bezel face.
The shadow width was only used by wxMotif and bezel face not used at all since
a very, very long time, so just remove these methods from the ports which still
had them (just doing nothing) and remove support of the corresponding XRC
attributes.
2015-04-20 18:46:55 +02:00
Jouk
13946f977d Update OpenVMS setup 2015-04-20 17:03:42 +02:00
Jouk
e9668a92d4 add xh_activityindicator.cpp for compilation on OpenVMS 2015-04-20 16:56:01 +02:00
Jouk
1fa6de80d4 Updates for OpenVMS 2015-04-20 15:30:21 +02:00
Jouk
3cb49e3ec1 Add wxUSE_ACTIVITYINDICATOR 2015-04-20 08:49:02 +02:00
Vaclav Slavik
144d03880f 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:16:38 +02:00
Dimitri Schoolwerth
3c70847bea Merge branch 'master' of https://github.com/wxWidgets/wxWidgets 2015-04-19 13:40:24 +04: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
86f94d431e Correct error messages for wrong wxBoxSizer flags in the schema.
"horizontal" and "vertical" were reversed, making things more confusing
instead of more clear.
2015-04-17 18:29:00 +02:00
Vadim Zeitlin
3673966ee3 Check GetValueFromEditorCtrl() return code in wxDataViewCtrl code.
Don't do anything when finishing editing an item if its new value couldn't be
retrieved.

See #16912.
2015-04-17 18:28:45 +02:00
Paul Cornett
faf3e3d41f Avoid freeze count mismatches with GTK 2.18+ when impl_window changes while frozen, see #16795 2015-04-17 08:46:16 -07:00
Dimitri Schoolwerth
556632f322 Fix warning in controls sample.
Fix MSVS (performance) warning regarding converting int to bool.
2015-04-17 14:33:45 +04:00
Dimitri Schoolwerth
a1902c1456 Fix compilation error in ownerdrw sample.
A frame's title parameter is using const wxChar * and is passed a const
char * as argument. Use a wxString as parameter to fix the error.
2015-04-17 14:30:23 +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
Vadim Zeitlin
cd6fb7a9bd Avoid harmless unused variable warning in the ownerdrw sample.
MSVC8 gives

.\ownerdrw.cpp(96) : warning C4189: 'pFrame' : local variable is initialized
but not referenced

so just don't define this variable to avoid the warning.
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
c7c63590ae No changes, just rename a variable to something more reasonable.
Don't use (auto-generated?) "item0" for the local sizer variable.
2015-04-15 09:55:24 +02:00
Vadim Zeitlin
7203160a29 Fix wrong use of wxALIGN_CENTER_VERTICAL in wxPreviewFrame.
Don't use this flag in a vertical sizer, it doesn't make sense.

Also use wxSizerFlags instead of multiple argument Add() overload for clarity.

Closes #16953.
2015-04-15 09:54:17 +02: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
f995dfcc20 Better fix for libtiff warnings covering 64 bit case too.
This improves commit dd3cb24cc0 by fixing not
only the warning about casting int to a pointer, but also the (usually more
serious but still harmless in this particular case) warnings about casting
pointers to ints and doing it via the usual union cast instead of compiler-
specific pragmas.
2015-04-12 23:50:05 +02:00
Vadim Zeitlin
e2f43574f4 Improve error message for use of invalid alignment flags in XRC.
Typically to achieve horizontal alignment inside a horizontal sizer a spacer
needs to be inserted before the element, so explicitly say this instead of
advising to set proportion which wouldn't allow aligning the item.
2015-04-12 23:24:10 +02:00
Vadim Zeitlin
5bcfc58d2f Properly detect misuse of wxALIGN_CENTRE in XRC wxSizer handler too.
This flag is more difficult to deal with than the others as it can stand for
either wxALIGN_CENTRE_VERTICAL, wxALIGN_CENTRE_HORIZONTAL or both depending on
the sizer it appears in and the other flags used. It is also trickier to give
good error messages for it as we shouldn't complain about e.g.
wxALIGN_CENTRE_VERTICAL if it doesn't appear in the XRC at all and only
wxALIGN_CENTRE does.

Check for definitely invalid combinations such as wxALIGN_CENTRE|wxEXPAND or
wxALIGN_CENTRE combined with other alignment flags in both directions and
accept everything else.

Also remember the flag names with quotes now, instead of adding the quotes
when building the error message later because the latter doesn't work when we
include additional explanation for wxALIGN_CENTRE in the flag description.
2015-04-12 23:20:56 +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
dd3cb24cc0 Fix another harmless but annoying libtiff warning.
Disable the warning given by clang for converting (smaller) "int" to (larger)
"void*" in 64 bit OS X builds.
2015-04-12 18:32:06 +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
9e6fc99af0 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-12 18:05:50 +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
4803413d51 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:26:01 +02:00
Vadim Zeitlin
dee8df8610 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:23:56 +02:00
Vadim Zeitlin
6c68b0c158 Use wxSizerFlags in wxChoicebook layout code.
This makes the code more clear and, as a side effect, avoids the (harmless)
warning about using enums of different types with the ternary operator.
2015-04-11 19:51:13 +02:00