Commit Graph

58723 Commits

Author SHA1 Message Date
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
Vadim Zeitlin
b46b5a2a06 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.
2015-04-03 16:42:31 +02:00
Vadim Zeitlin
9a9ea0c295 Fix bug with clearing shared alpha channel in wxImage::ClearAlpha().
Allocate our own exclusive copy of the data before modifying it, otherwise
calling ClearAlpha() would clear alpha not only for the image it was called on
but also for all the other images sharing data with it.
2015-04-01 14:38:14 +02:00
Vadim Zeitlin
62f8950e0e Fix vertical alpha adjustment in wxPixelData<wxImage>::Offset().
Handle "y" parameter correctly when offsetting m_pAlpha, it was just ignored
before, i.e. Offset(x, y) and OffsetY(y) always behaved as if y were 1.
2015-04-01 14:20:10 +02:00
Stefan Csomor
2a13ad64d8 Fix wxOSX build under 10.10.
Use proper types for webkit variants.

Closes #16329.
2015-03-22 01:01:47 +01:00
Vadim Zeitlin
41e459627e Fix format specifiers used in wxLog::LogLastRepeatIfNeeded().
Use "%u", not "%lu", for an unsigned parameter to fix asserts under 64 bit
platforms.

Closes #16918.
2015-03-22 01:00:36 +01:00
Vadim Zeitlin
2efa1da0d2 Fix regression in wxMSW wxDC::SetAxisOrientation().
Don't mix signed/unsigned integers in arithmetic operations when normalizing
wxDC scale factors: variable holding GCD value should be of the same type as
variables holding devExt and logExt to avoid wrong results of /= operation
when dividend is a negative value.

Closes #16908.
2015-03-20 00:23:56 +01:00
Vadim Zeitlin
f05b626b3b Don't use wxLog from wxWakeUpMainThread() in wxMSW.
This can result in infinite recursion as wxLog calls wxWakeUpIdle() which
calls wxWakeUpMainThread() again if PostThreadMessage() fails.

See #16841.
2015-03-12 16:38:10 +01:00
Scott Talbert
5d33768022 Ensure the PangoFontFace type is loaded.
This works around problems with using wxFontDialog from wxPython.

Closes #16820.
2015-03-12 15:22:52 +01:00
Vadim Zeitlin
c4f569ed60 Avoid refreshing not currently visible items in generic wxListCtrl.
This is useless at best and resulted in GTK+ warnings because we ended up
(somehow -- is there another bug lurking here?) with negative items height in
this case.

Closes #16862.
2015-03-02 14:39:45 +01:00
Vadim Zeitlin
c477605bda Fix TZ handling in wxDateTime::ParseRfc822Date().
When the TZ offset specified in the RFC 822 string was equal to the local TZ
offset but the date fell in the DST period, the result was one hour off.

Fix this by converting the date to the UTC explicitly, and then converting it
back to the local TZ to ensure that the DST is taken into effect.

See #15370.
2015-02-26 00:55:33 +01:00
Vadim Zeitlin
7ffa1c4d3a Fix typo in DateTimeTestCase::TestParseRFC822() method name.
No real changes, just s/Parce/Parse/
2015-02-26 00:54:59 +01:00
Vadim Zeitlin
8bbe683f61 Fix using RegisterHotKey() with negative IDs in wxMSW.
This was broken due to a wrong cast from WPARAM (i.e. 32 bit unsigned int in
Win32) value containing the ID to WORD (i.e. 16 bit unsigned short) which
truncated the ID value.

Notice that MSDN documents the requirement for the IDs to be positive, but
negative IDs seem to work, at least with Windows 7, after this fix.

Closes #16880.
2015-02-25 19:44:48 +01:00
Artur Wieczorek
82106a9d9e Allow use of all wxPG colours.
Restore original list of wxPG-specific colours. wxPG-specific colours are added to the colour database when wxColourProperty is created (already existing colours are not overwritten by wxPG ones).

This is the backport of r76893 and r76894.
See #15597.
2015-02-22 22:50:45 +01:00
Artur Wieczorek
baf965ef30 Fix wxPGChoices::Set method.
There is no need to check if referenced array with values is valid since "reference cannot be bound to dereferenced null pointer in well-defined C++ code". Moreover, conditional call of wxPGChoices::Add() methods (one with explicit parameter and one with default one) is not necessary.

This is the backport of r78343.
See #16759 (http://trac.wxwidgets.org/ticket/16759).
2015-02-21 12:15:26 +01:00
Artur Wieczorek
2d8da317c1 Initialize wxPGChoices object properly in its copy ctor if source object has no data.
Internal data must be always initialized whether the source object contains choices data or not.

This is the backport of r78484.
See #16855.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-17 20:52:59 +00:00
Artur Wieczorek
f6bf3de76d Refresh property grid when property is switched to read-only state.
Property grid is refreshed to reflect the new state of the property.

This is the backport of r76875.
See #16306.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-17 20:42:15 +00:00
Robin Dunn
0225897079 Add some missing default ctors and Create methods.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-16 21:42:16 +00:00
Artur Wieczorek
a3735c8cc1 When drawing wxPG items (with double buffering) use the same layout direction as the window uses.
Memory DC used for double buffering purposes should inherit layout direction from the window DC to ensure that texts are rendered correctly.

This is the backport of r76931.
See #15797.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78509 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-16 20:50:07 +00:00
Artur Wieczorek
63e678d978 Fix saving edited property value when wxPG property is in the 'invalid value' state.
When wxPGProperty is loosing focus in 'invalid value' state its pending value should be stored before resetting property to 'normal' state because this operation (wxPG::OnValidationFailureReset) also resets pending value.

This is the backport of r77887.
See #16587.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-16 20:38:33 +00:00
Vadim Zeitlin
fd7ea006e9 Increase the buffer size used for the host names in wxIPaddress.
This avoids failing to set the host name if the system /etc/hosts file has any
host names that wouldn't fit in our buffer: at least under Linux/glibc,
gethostname_r() returns error if any such names exist even if we don't ask for
them.

Closes #16641.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-16 01:05:32 +00:00
Vadim Zeitlin
c2a4475d08 Fix wxDV_ROW_LINES drawing when horizontally scrolled in generic version.
Use the correct, i.e. logical, as wxDC does the translation to physical
internally, coordinates for drawing the highlighted rows.

Closes #16815.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-15 22:54:39 +00:00
Vadim Zeitlin
1cfd935c26 Use non-static reentrancy guard in wxScrollHelper::AdjustScrollbars().
This prevented calls to AdjustScrollbars() of another window from doing
anything if they were called due to a size change from AdjustScrollbars() of
an outer window.

Closes #16852.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78491 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-14 19:09:39 +00:00
Vadim Zeitlin
e22fcf204e Fix coordinates of wxSetCursorEvent in wxGTK.
The event coordinates remained in the client coordinates of the window the
initial event had been sent to, even when the event was propagated to its
parent.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-14 15:04:55 +00:00
Vadim Zeitlin
14c29db79c Correct wxInfoBar::ShowMessage() flags argument documentation.
The default value is wxICON_INFORMATION, not wxICON_NONE.

Closes #16861.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-14 14:46:28 +00:00
Dimitri Schoolwerth
5964643206 Update XML Tools URL.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-13 21:49:06 +00:00
Paul Cornett
edc127ed8d More complete fix to avoid GDK assertion "impl_window->update_freeze_count > 0" on Ubuntu.
Any frozen window in the whole TLW could be affected, not just a child of the enabled window.
Also do a more complete search for scrollbars.
Closes #16795


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-12 06:12:16 +00:00
Paul Cornett
e88904ccad build fix for __WXUNIVERSAL__
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-11 18:11:07 +00:00
Paul Cornett
66780715c0 avoid GDK assertion "impl_window->update_freeze_count > 0" on Ubuntu when enabling frozen window
closes #16795


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-11 18:05:15 +00:00
Robin Dunn
ade77e30cf Ignore code that is preventing stock data format IDs from being used
with custom data objects.
2015-02-09 20:13:34 -08:00
Paul Cornett
e19a2263bd don't assume size-allocate implies a widget is realized
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-09 18:19:14 +00:00
Bryan Petty
e1ebfd29ac Backport r78447: Updated logos in the reference manual.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-04 17:58:08 +00:00
Paul Cornett
bb3dcf85fb set transient parent for 'about' dialog, closes #16823
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-02 18:31:24 +00:00
Paul Cornett
0e6f0bd5fa use logical operator, rather than bitwise, on bools, closes #16824
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78432 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-02 17:23:55 +00:00
Paul Cornett
d988a94acb avoid passing invalid rect to Refresh(), closes #16819
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-01 18:06:06 +00:00
Artur Wieczorek
e268d561a6 Fix vertical positioning of text field in the combo box editor associated with wxPG property under wxMSW.
Vertical position of text field in wxOwnerDrawnComboBox control (instantiated at property selection) doesn't need any special adjustment.

This is a backport of r77687.
See #16556.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-01 11:14:34 +00:00
Václav Slavík
89f490a4ca Avoid unneeded use of wxLocale in wxDateTime::Format()
On OS X, wxDateTime::Format() uses wxString::Replace() to
unconditionally replace locale-specific %c, %x and %X specifiers in the
format string if present. Doing so causes three wxLocale::GetInfo()
calls that are often not necessary.

Check for the presence of these  specifiers before calling GetInfo().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78425 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-30 15:53:19 +00:00
Václav Slavík
6e35d4bc6b Handle 5+ letter codes in TranslateFromUnicodeFormat()
Unicode TR #35 v26 allows for five-letter (MMMMM) or even six-letter
(EEEEEE) forms of some of the fields, but TranslateFromUnicodeFormat()
asserts in these situations.

Fix it to fall back to short forms for MMMMM and EEEEEE that are used in
practice e.g. on OS X if the user has custom formatting settings.

Consulting the table of sensible specifiers from
http://userguide.icu-project.org/formatparse/datetime, it appears these
two were the only omissions in this function.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78424 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-30 15:53:17 +00:00
Vadim Zeitlin
f047d93c6a Fix wxEVT_TREE_STATE_IMAGE_CLICK generation in wxMSW wxTreeCtrl.
Use GET_{X,Y}_LPARAM() to extract them from the event position, which handle
negative coordinates (and coordinates can perfectly well be negative when
using multiple displays) correctly, unlike {LO,HI}WORD().

Closes #16812.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-27 11:49:44 +00:00
Václav Slavík
14f052a768 Allow disabling SetProcessDPIAware() call
Add Windows-specific wxMSWDisableSettingHighDPIAware() function then can
be called before startup (i.e. wxEntry() call) to disable wxWidgets'
handling of DPI awareness. This is useful for code embedded in non-wx
applications as well as for purely wx application that are not
HiDPI-ready (although the latter has the option of forcing
dpiAware=false in the manifest).

See also https://groups.google.com/d/msg/wx-dev/Z0VpgzCY34U/f1FfPqGDppMJ
and #16116.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-24 15:00:03 +00:00