Commit Graph

2102 Commits

Author SHA1 Message Date
Tobias Taschner
f7b8fdd275 Fix wxGetOsDescription() for Windows 10.
Check for Windows 10 was implemented as check for version 6.4 but the final
version of Windows 10 actually returns 10.0.

(this is a backport of c87c432033)
2015-08-05 20:30:45 +02:00
Vadim Zeitlin
21dc1a1d4f Blind fix for wxTextDataObject trailing NUL under OS X.
Use the length provided to SetData() instead of assuming it is NUL-terminated.

Closes #9522.

(this is a backport of 20c130a578 from master)
2015-07-17 14:35:26 +02:00
Vadim Zeitlin
e62173c479 Fix using wxHTTP and wxFTP from worker thread in Unix ports.
This backports e18c8fd29a,
d421373c2e and
6c43aa90b6 from master to avoid crashes when
using wxHTTP or wxFTP from threads other than main.

See #17031.
2015-07-09 20:59:38 +02:00
Leland Lucius
0797a6f875 Fix accessibility support in wxMSW.
Return the correct result from handing WM_GETOBJECT message.

Closes #17058.

(this is a backport of 6a435345f5 from master)
2015-07-06 23:56:48 +02:00
Vadim Zeitlin
2632977f6b Don't attempt using <type_traits> with g++ 4.9.2 in C++98 mode.
g++ 4.9.2 added support of __has_include() but, unlike clang, refuses to
compile the <type_traits> header that is detected as existing now in C++98
mode, so the build was broken with it when not using configure (i.e. under
MSW).

Fix this by, first, testing for C++11 compilers separately (which seems like a
good idea anyhow as it will allow using these headers with other compilers)
and, second, not trusting g++ __has_include() for C++11 headers in C++98 mode.
2015-06-14 15:06:18 +02:00
Vadim Zeitlin
2923d95264 Fix flickering when resizing a frame with status bar in wxMSW.
The flicker was only visible under Windows XP or when using a class theme
and was due to mis-positioning the status bar initially in PositionStatusBar().
Fix this by adjusting its position by the toolbar offset before calling its
SetSize().

Closes #16705.

(this is a backport of 8d12e07453 from master)
2015-06-01 00:15:48 +02:00
Vadim Zeitlin
de891ddb03 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:25:45 +02: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
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
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
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
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
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
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
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
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
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
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
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
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
Vadim Zeitlin
c489816251 Fix wxBitmap conversion to wxImage in 64-bit wxOSX builds.
Don't assume that sizeof(long) == 4, this is just wrong.

Closes #16770.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-06 20:08:25 +00:00
Vadim Zeitlin
ef5232d289 Fix wxFileDialog::GetFilterIndex() when opening files in wxOSX.
Update m_filterIndex in the "opening" case, just as we already did in the
"saving" one (see #13158 and r67550).

Closes #16764.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-03 20:45:13 +00:00
Vadim Zeitlin
e91a996fa4 Make disabling submenus work in wxMSW.
As submenu items don't have a valid ID, we need to address them by their
position when calling EnableMenuItem() -- and for simplicity do it for all the
items.

Closes #16747.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-27 14:17:51 +00:00
Vadim Zeitlin
7a8cfc7964 Fix handling of fast clicks in wxRibbonBar under MSW.
Second click can result in a double click event instead of the usual simple
click if it happens quickly enough after the first one, so handle double
clicks in the same way as simple clicks instead of ignoring them.

Closes #16551.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-27 14:17:46 +00:00
Vadim Zeitlin
f7cf6e1e9e Fix inserting tools removed from wxToolBar back into it in wxMSW.
Make sure to reset the "to be deleted" flag we set on the tool when removing
it from the toolbar to avoid layout problems if the tool is added back later.

Closes #16735 (for 3.0).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78275 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-16 20:15:51 +00:00
Vadim Zeitlin
70f3c3023d Don't keep out of date column widths in generic wxDataViewCtrl.
The cached widths need to be invalidated whenever an item is expanded or
collapsed, whether it's done programmatically (which was already handled) or
interactively by the user (which wasn't).

Closes #16678.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-05 22:15:28 +00:00
Paul Cornett
4dccdf3749 fix crashes in wxGTK3 when running with non-X11 backend, see #16688
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78167 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-20 17:04:13 +00:00
Vadim Zeitlin
6b9910ac8c Fix size of the icon returned from wxFSVolume::GetIcon().
Calling SetHICON() is not enough, the icon size already needs to be set or,
even better, CreateFromHICON(), which does both atomically, should be used.

Closes #16672.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 00:59:13 +00:00
Vadim Zeitlin
386feaba50 Re-add wxFD_OVERWRITE_PROMPT and wxFD_FILE_MUST_EXIST to wxGenericFileDialog.
Support for these styles was accidentally removed in r48733, re-add them back.

Closes #16652.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 00:59:08 +00:00
Vadim Zeitlin
b3dc6b7ba2 Fix best size calculation for buttons with bitmaps in wxMSW.
Add the bitmap margins to the bitmap size, not the total button size.

This fixes the buttons becoming unnecessarily tall as soon as they were
assigned even a tiny bitmap.

Closes #16536.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78118 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 00:58:58 +00:00
Vadim Zeitlin
58d415807b Set the initial text value of wxSpinCtrlGeneric correctly.
The text control was left empty if the string value was not specified, but
it should use the numeric initial value instead in this case.

This notably affected wxSpinCtrlDouble under non-GTK platforms.

Closes #16621.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 00:58:52 +00:00
Paul Cornett
8d7e0d0452 fix infinite sizing loop with GTK3 when using a non-default target window, closes #16668
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-10 04:13:18 +00:00
Vadim Zeitlin
2e9888a4be Mention Borland C++ fixes in the change log.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-11 15:48:26 +00:00
Vadim Zeitlin
75ce7fb68b Fix excessive height of wxSlider with labels but no ticks in wxMSW.
We shouldn't add the label height to the control best height as the labels are
positioned at the same vertical level as the main part of the control.

See #16604.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-09 15:36:39 +00:00
Vadim Zeitlin
b01e333f89 Fix several rounding problems with float values in wxPropertyGrid.
See also r85980 in the trunk.

Closes #15625.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-06 12:35:25 +00:00
Vadim Zeitlin
f8506c65a5 Update version to 3.0.3.
Run misc/scripts/inc_release, update version.bkl and changes.txt manually.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-06 12:35:15 +00:00
Vadim Zeitlin
2d853161ef Update README and announcement for 3.0.2 release.
Fill in the release date (2014-10-06) and update the changes list.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-05 14:18:27 +00:00
Vadim Zeitlin
fb79efd531 Send events when toggling wxPropertyGrid nodes from keyboard.
Closes #15899.

[This is the backport of r75665 from trunk.]

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-03 01:52:24 +00:00
Vadim Zeitlin
b0f780439c Fix wrong wxStatusBar height in wxMSW in some circumstances.
Creating the status bar before the menu bar but associating it with the frame
after creating the menu bar resulted in a status bar of completely wrong height.
Fix this by enforcing the default height on the status bar when it's attached
to the frame.

Closes #10956.

[This is the backport of r76417 from trunk.]

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-03 01:52:19 +00:00
Vadim Zeitlin
cbc1dbab9a Allow using ESC as accelerator in wxMSW again.
This ended up being broken due to an interplay between different unrelated
changes (at least r15120 and r41134) which were both correct, but didn't work
well together and resulted in not only preventing IsDialogMessage() from
handling ESC, but also our own accelerator tables.

Fix this by doing the check for IsDialogMessage() brokenness in
MSWProcessMessage() itself, just before calling it, instead of doing it in
MSWShouldPreProcessMessage() which is (and must be) called before
MSWTranslateMessage() which checks for accelerators using ESC.

Closes #3813.

[This is the backport of r77071 from trunk.]

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-03 01:52:15 +00:00
Vadim Zeitlin
7d94e9fafd Fix handling of bitmaps with alpha channel in wxMSW wxImageList.
Don't use mask and alpha together, this results in visual artefacts and masks
are unnecessary with RGBA bitmaps anyhow.

The only potentially problematic remaining case is mixing bitmaps with alpha
and mask inside the same image list (as we need to indicate whether we use the
mask or not when creating it), but this should probably be rare and in the
meanwhile we can at least RGBA bitmaps with image lists, which includes doing
this implicitly when they are used as button bitmaps.

Also refactor wxBitmap code to extract part of CopyFromIconOrCursor() to allow
reusing it in the newly added MSWUpdateAlpha().

See #11476.

[This is the backport of r75567 from trunk.]

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-03 01:52:10 +00:00
Vadim Zeitlin
46e1b4b805 Fix generic wxSearchCtrl size/layout code.
Override DoGetBestClientSize() instead of DoGetBestSize(), as we're really
computing just the size of our contents and like this we don't need to hard
code platform-dependent border sizes in this control itself.

Also use the client size in LayoutControls() for the same reason. This also
makes it unnecessary to pass it the width and height as it can find them on
its own. And x and y were never used in the first place, so remove them too.

Finally, center the bitmaps vertically.

Closes #16422.

[This is the backport of r77083 from trunk.]

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-03 01:52:04 +00:00
Vadim Zeitlin
1f2a74014f Fix changing the label of a submenu in wxMSW.
Use position, not the ID, to find the native menu items to allow the code in
wxMenuItem::SetItemLabel() and DoSetBitmap() to also work with submenus and
not just the normal items.

Closes #16246.

[This is the backport of r76676 from trunk.]

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-03 01:51:59 +00:00
Vadim Zeitlin
a1a805d4fe Accept "default" as font family value in XRC.
Map it to wxFONTFAMILY_DEFAULT, just as we do for all other wxFontFamily enum
elements.

Closes #16549.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77685 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-12 11:31:04 +00:00