Commit Graph

62517 Commits

Author SHA1 Message Date
Vadim Zeitlin
9427a8ba97 No real changes, just rebake MSVC test projects
This will eliminate trivial differences when anything really changes in
test.bkl.
2017-05-15 23:27:00 +02:00
Vadim Zeitlin
84c566bb05 Minor cleanup in wxMSW wxSpinCtrl::Create()
No real changes, just explain the real reason why we can't create the windows
with the correct sizes and need to set them later (it's not because of the
font but because UDM_SETBUDDY changes them) and also use a helper
"effectiveSpinWidth" variable.
2017-05-15 22:26:15 +02:00
Cătălin Răceanu
c4b2d5c1ff Fix wxMSW wxSpinCtrl initial position
wxSpinCtrl created at the given position was always placed at (0, 0) instead
since 05b980aba1 ("Fix wxMSW wxSpinCtrl
appearance: show arrows inside the control").

Fix this in the minimally intrusive way for now by just putting it at the
right position instead of using hard-coded (0, 0) which was done before for
some reason.

See #12297.
2017-05-15 18:54:31 +02:00
Catalin
fb0a118230 Remove checks for the existence of LVCOLUMN::iImage
<https://msdn.microsoft.com/en-us/library/windows/desktop/bb774743(v=vs.85).aspx>
2017-05-14 22:35:39 +02:00
Catalin
6c9b3a8254 Improved wxListCtrl::HitTest() docs
Changes were based on the docs of LVHITTESTINFO structure
<https://msdn.microsoft.com/en-us/library/windows/desktop/bb774754(v=vs.85).aspx>
2017-05-14 22:34:31 +02:00
Catalin
2c7435a469 Fix wxListCtrl::HitTest() 2017-05-14 22:33:41 +02:00
Catalin
c4c7f12941 Do not explicitly tidy up when ending a test case 2017-05-14 22:32:59 +02:00
Catalin
640b7df69b Added a unit test for wxListCtrl::HitTest()
Run `ListBaseTestCase::HitTest()` only under MSW until proven to work with
other platforms too.
2017-05-14 22:32:08 +02:00
JulianSmart
d3687e7da3 Fixed suffix which should be @2x 2017-05-13 17:50:04 +01:00
JulianSmart
32355f7172 Implemented @2 HiDPI images for wxHTML on Mac 2017-05-13 16:10:43 +01:00
JulianSmart
c07b14332b Corrected references to bitmap size in AUI and Ribbon to take scaling into account 2017-05-12 15:59:11 +01:00
Václav Slavík
11f79cda31 Fix handling of & in wxDataViewCtrl markup on wxOSX
Follow up to 60bd6842e4. Apply equivalent
changes to wxMarkupToAttrString, add a new wxItemMarkupToAttrString
class for mnemonics-less strings and use it in wxDataViewTextRenderer.
2017-05-12 16:43:21 +02:00
Scott Talbert
f18d14ce77 Call PKG_PROG_PKG_CONFIG in configure.ac outside of any conditionals
Also, remove the other calls to PKG_PROG_PKG_CONFIG which are then no longer
necessary.

This ensures that all PKG_CHECK_MODULES() calls work correctly and, in
particular, fixes detecting cppunit under macOS and, due to this, Travis CI
build.
2017-05-12 00:54:34 +02:00
Kinaou Hervé
4e467d818b Fix retrieving page image index in wxListbook
wxListbook::GetPageImage() always returned -1. Fix this by defining the mask
properly before calling wxListCtrl::GetItem().

Closes #17858.
2017-05-10 17:49:49 +02:00
Prashantkn
bf5a564c9a Remove unused variables in svgtest.cpp Sample 2017-05-09 21:41:57 +02:00
Artur Wieczorek
de739181ba Update comment in msw/setup0.h
Since fc96ef3570 WinRT implementation of
wxNotificationMessage doesn't require wxUSE_OLE.
2017-05-09 20:51:58 +02:00
Artur Wieczorek
a17ce3debe Take COM defintions from ObjBase.h header file
Apparently combaseapi.h header file is not present in the older development
environments.
2017-05-09 20:51:41 +02:00
Artur Wieczorek
fc96ef3570 Allow build wxNotificationMessage without OLE support (wxUSE_OLE==0)
WinRT implementation of wxNotificationMessage can be decoupled from OLE
utilities because actually only IUnknown interface implementation is
required.
2017-05-09 17:27:36 +02:00
Artur Wieczorek
8d03282378 Move IUnknown implementation to the separate files
IUnknown interface is used sometimes (e.g. in WinRT implementation of
wxNotificationMessage) alone, without other OLE routines, so it is
helpful to have its code in the separate file to avoid coupling with main
OLE code when only IUnknown implementation is required.
2017-05-09 17:27:21 +02:00
Vadim Zeitlin
208d98f5dc Fix typo in wxStandardPaths::SetFileLayout() documentation
It sets the current layout, not returns it.

See #17727.
2017-05-07 14:13:58 +02:00
Vadim Zeitlin
2ed5d9f716 Mention workaround for a bug with parallel build with mingw32-make
When using -jN, setup_h needs to be created first to avoid a bug due to
missing dependencies in the current makefiles which breaks the build
otherwise.
2017-05-07 00:16:55 +02:00
Artur Wieczorek
ce7788e5ea Refactor implementation of IUnknown in wxNotificationMessage (WinRT)
Use dedicated macros to declare and define IUnknown interface in the helper
class of wxNotificationMessage implementation.
Now dependency on wxUSE_OLE is more visible, since these macros are defined
in oleutils.h (see f2e707f095).
2017-05-05 21:57:20 +02:00
Scott Talbert
69e4f491b2 Move wx/gtk/webview_webkit2_extension.h to private directory
Make it more clear that this header is private, i.e. used only by the library
itself.

Close https://github.com/wxWidgets/wxWidgets/pull/473
2017-05-04 18:23:00 +02:00
Vadim Zeitlin
d0aaea5143 Merge branch 'staging' of https://github.com/stahta01/wxWidgets
Allow building wxGTK for MSW using MSys2 and configure.

Close https://github.com/wxWidgets/wxWidgets/pull/428
2017-05-04 02:51:52 +02:00
Artur Wieczorek
f2e707f095 Add check for wxUSE_NOTIFICATION_MESSAGE dependency on wxUSE_OLE
WinRT implementation of wxNotificationMessage requires wxUSE_OLE because
one memeber variable is of type wxAutoULong which is defined in the OLE
utilities collection (oleutils.h).
2017-05-03 22:49:12 +02:00
Artur Wieczorek
83f5ba359d Add check for wxUSE_DRAG_AND_DROP dependency on wxUSE_OLE
Library itself can be built successfully when wxUSE_DRAG_AND_DROP==1 and
wxUSE_OLE==0 but several wxDropTarget functions (referred in wxWindowMSW,
wxTextDropTarget, wxFileDropTarget) are reported as missing during linking
the application.
2017-05-03 22:49:01 +02:00
Artur Wieczorek
b375d81499 Use wxDataObject methods to retrieve data from clipboard when wxUSE_OLE==0
Dedicated wxDataObject::SetData() function can be used to import raw
clipboard data to the corresponding instances of wxDataObject and hence
there is no need to duplicate data retrieval code.
2017-05-03 22:48:04 +02:00
Artur Wieczorek
1da74cbcd2 Fix setting color depth of wxBitmap created from HBITMAP
When HBITMAP is assigned to wxBitmap with SetHBITMAP(), internal data
member representing wxBitmap's color depth should be set afterwards to
the bitmap color depth, not to the number of planes.
2017-05-03 21:41:19 +02:00
jensgoe
dd4a9de048 Fix drawing background in wxDataViewCtrl with rules
wxRect to draw the background was prepared in a wrong way if wxDataView had
vertical or horizontal rules.

Fix this by adjusting the correct component of the rectangle when using
horizontal rules and by fixing an off by one bug when using vertical ones.
2017-05-03 16:05:20 +02:00
Artur Wieczorek
e958d2d8f4 Add support for unicode text in wxClipboard when wxUSE_OLE==0 (wxMSW)
wxDF_UNICODETEXT objects are handled using Win clipboard API.
2017-05-03 00:33:13 +02:00
Artur Wieczorek
670e1fe948 Allow build wxDataObject without OLE support (when wxUSE_OLE==0)
Reorganize the code by putting OLE-dependent code into the blocks
controlled by wxUSE_OLE and by sharing remaining code (like implementation
of wxDataFormat, wxBitmapDataObject, wxFileDataObject, etc.) to allow
building wxDataObject and its specializations also without OLE support.
Since wxDataObject no longer requires OLE support, corresponding check in
checkconf.h can be removed.
Thanks to this additional flexibility, it is possible to use wxClipboard
whether OLE support (wxUSE_OLE) is enabled or not, either with OLE-based
wxDataObject (OLE clipboard) or with wxDataObject decoupled from OLE (Win
clipboard API).
2017-05-03 00:12:56 +02:00
Artur Wieczorek
2dd726471f Build wxMetafileDataObject when wxUSE_DATAOBJ==1
wxMetafileDataObject is a specialization of wxDataObject and its
compilation should be controlled directly by wxUSE_DATAOBJ (like it's done
under wxOSX, see e.g. include/wx/osx/metafile.h), not by
wxUSE_DRAG_AND_DROP.
2017-05-02 23:30:30 +02:00
Artur Wieczorek
d7f70fc462 Schedule deprecated wxWindowBase functions for removal in the future
Some wxWindowBase functions were marked deprecated prior to wx 3.0 release
and therefore they should be inserted into WXWIN_COMPATIBILITY_2_8 blocks
to mark them for removal in a future wx version.
2017-05-01 14:27:42 +02:00
Artur Wieczorek
e4a1e9a27f Schedule deprecated wxSTC constants and functions for removal in the future
Insert recently deprecated wxSTC elements in WXWIN_COMPATIBILITY_3_0 blocks
to mark them for removal in a future wx version.
2017-05-01 14:27:41 +02:00
Artur Wieczorek
365f8e6f37 Fix PCH-less build
Add missing header to fix compilation after changes of
b1fad4da44 (see #17640).
2017-04-30 23:14:15 +02:00
Artur Wieczorek
6f59c756f6 Fix inserting items to wxRearrangeList (wxGTK)
Order array cannot be extended both in DoInsertItems() and DoInsertOneItem()
functions because DoInsertOneItem() is invoked indirectly from DoInsertItems()
(through the call to wxCheckListBox::DoInsertItems() and DoInsertItemsInLoop())
and therefore order array would be eventually extended by two items for one
inserted list item. To avoid this duplicated actions, we should resign from
overriding DoInsertOneItem().
2017-04-30 21:42:41 +02:00
Artur Wieczorek
15e2dcc38d Fix adding bitmap to clipboard when wxUSE_OLE == 0 (wxMSW)
When CF_DIB object is placed to the clipboard, a handle to the memory
object containing a BITMAPINFO structure followed by the bitmap bits should
be passed to SetClipboardData(), not a handle to a DIB section.
Also, wxClipboard is the owner of the wxDataObject being added, so it
should release passed object.
2017-04-30 21:39:50 +02:00
Artur Wieczorek
b1fad4da44 Convert 0RGB wxBitmaps to RGB when copying them to clipboard
Not all applications recognize properly 0RGB bitmap format so for the sake
of interoperability bitmaps in such format should be converted to plain
24 bpp RGB format prior to being copied to the clipboard.

Closes #17640.
2017-04-30 21:35:01 +02:00
Vadim Zeitlin
063681162a Merge branch 'pvs-fixes'
Closes https://github.com/wxWidgets/wxWidgets/pull/470
2017-04-29 13:56:47 +02:00
tommash
5e24bd162c Don't send unnecessary events when wxSpinCtrlDouble loses focus
Only send the event when the control loses focus if its value has really
changed.

Closes https://github.com/wxWidgets/wxWidgets/pull/436
2017-04-29 13:50:45 +02:00
Ilya Ivanov
6697a7e49a Fix wrong variable name in assignment in wxRichTextSizePage dtor
The "sm_showMinMaxSizeControls" was assigned twice, while
"sm_enablePositionAndSizeUnits" was not assigned at all, apparently by
mistake.

Thanks to PVS-Studio for finding this issue (V519 The
'sm_showMinMaxSizeControls' variable is assigned values twice successively).
2017-04-29 13:44:14 +02:00
Ilya Ivanov
ab7c39fddb Check for variable being non-NULL before using it
The "buffer" argument can apparently be null, as there is a check for this on
the next line, but it was used without checking that this is the case.

Fix this, although it's not totally clear if "buffer" can really be null at
all and maybe the check below should have been removed instead -- but prefer
to err on the side of caution.

Thanks to PVS-Studio for finding this issue (V595 The 'buffer' pointer was
utilized before it was verified against nullptr).
2017-04-29 13:39:19 +02:00
Ilya Ivanov
b65a3ad736 Use VARIANT_TRUE and VARIANT_FALSE correctly
VARIANT_TRUE (-1) must be used with VARIANTs of boolean type, instead of TRUE
(1) which has a different value and can result in interoperability problems.

Thanks to PVS-Studio for finding this issue (V721 The VARIANT_BOOL type is
utilized incorrectly).
2017-04-29 13:35:45 +02:00
Ilya Ivanov
5d7726e3f1 Fix check for wxACC_STATE_SYSTEM_MARQUEED in accessibility code
wxACC_STATE_SYSTEM_INVISIBLE was checked twice, by mistake, while
wxACC_STATE_SYSTEM_MARQUEED was never checked at all.

Thanks to PVS-Studio for finding this issue (V581: The conditional expressions
of the 'if' operators situated alongside each other are identical).
2017-04-29 13:34:12 +02:00
Artur Wieczorek
d5c46e87a6 Fix inserting multiple items to wxRearrangeList
In wxRearrangeList implementations (like wxMSW) where DoInsertItemsInLoop()
and DoInsertOneItem() are not used to insert multiple items, DoInsertItems()
has to be overriden to do this insertion.

See #17836.
2017-04-28 23:57:36 +02:00
Artur Wieczorek
2cf3a3d1c5 Update mailmap file 2017-04-28 21:06:52 +02:00
Artur Wieczorek
88b1699b69 Add demonstration of wxRearrangeList to widgets sample
Add wxRearrangeList as another option on wxListBox page.
2017-04-28 21:05:46 +02:00
Artur Wieczorek
7e1b64a2eb Order array has to have the same size as item list in wxRearrangeList
Number of indices stored in the internal order array has to be the same as
number of the items, so whenever item is added or removed, order array
has to be adjusted accordingly.

Closes #17836.
2017-04-28 21:03:23 +02:00
Vadim Zeitlin
7542632302 Fix keyboard event key codes when using Wayland
Correct the confusion between compile- and run-time checks for X11.

Closes #17848.
2017-04-26 22:30:36 +02:00
Vadim Zeitlin
0975228809 Fix build problem with "override" on wxApp::GetXVisualInfo()
This method doesn't override any virtual method in the base class, so
wxOVERRIDE can't be used here.

In fact, this method doesn't seem to be used at all, but keep it for
compatibility and in case we want to use it later, as wxGTK does.
2017-04-26 14:42:38 +02:00