Commit Graph

60111 Commits

Author SHA1 Message Date
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
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
bf712f05ac Generate wxEVT_SPINCTRL of the correct wxSpinEvent type.
Handlers for this event expect to get wxSpinEvent but wxMSW, wxGTK1 and wxQT
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().

Closes #16948.
2015-04-10 16:38:31 +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
Vadim Zeitlin
cbc3a5bbf2 Export wxTranslateFromUnicodeFormat() from DLL to allow testing it.
This should fix the build after adding the unit tests for this function in
adbc9863b2.

Closes #16118.
2015-04-10 16:15:56 +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
e44df8e12f Improve sizer flags validation in the XRC schema.
Validate flags for 1D horizontal and vertical sizers and grid sizers
separately to allow checking for invalid flag combinations.

Also try to make the regex patterns used in the schema itself and the error
messages generated when matching them fails slightly more readable.
2015-04-08 23:36:32 +02:00
Vadim Zeitlin
770bb3822c Update XRC version to the latest one in all XRC sample files.
The version doesn't really matter as the only change in 2.5.3.0 compared to
2.3.0.1 seems to be the handling of "\\" which doesn't occur in any of these
files anyhow, but use the latest one just in case anybody takes one of these
files as a starting point.
2015-04-08 23:35:20 +02:00
Vadim Zeitlin
45effb085a Fix XRC sample main frame initial and minimal size.
The size hints must be explicitly set if tool and/or status bars are added to
the frame after loading its contents from XRC. This didn't matter before
because the (only) item of the frame sizer effectively had wxGROW style and so
adjusted to the frame size even if it was less than the minimal size, but now
that wxALIGN_CENTER_VERTICAL, which was always specified in rc/frame.xrc file
but never taken into account before, is honoured, the initial frame size is
not big enough to show its contents which looks ugly, so work around this.
2015-04-08 23:35:20 +02:00