Commit Graph

62498 Commits

Author SHA1 Message Date
Tim S
2d0ac3d027 Added wxUSE_WXDIB guard to Toolbar sample. 2017-05-08 09:49:01 -04:00
Tim S
bd63bb49e3 Changed value of resource macros;
under Win32 when wxUSE_WXDIB=0.
  wxICON
  wxBITMAP
  wxBITMAP_PNG
2017-05-08 09:49:00 -04: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
Jouk
0c748453e7 make compile work again when wxUSE_UNICODE is not defined 2017-04-26 11:24:33 +02:00
Artur Wieczorek
37ecd7b760 Fix displaying labels of wxRadioBox items
Labels containing mnemonic prefixes (&) and literal underscore characters
have to be converted to the proper GTK labels where underscore
characters act as mnemonic markers. If label contains mnemonic then
dedicated function gtk_radio_button_new_with_mnemonic() should be used
to create radio button item.

Closes #17419.
2017-04-25 18:15:34 +02:00
Lauri Nurmi
148e8971c7 Fix the integer value in events generated by generic wxSpinCtrl
This notably fixes the problem with changing the year using spin control
arrows under macOS, where this control is used as part of
wxGenericCalendarCtrl, as not having the correct value in the event object
resulted in bogus events with dates in the year 0 there.

Closes http://trac.wxwidgets.org/ticket/17193
2017-04-25 13:08:14 +02:00
Jouk
e5f5cdb5f0 Synchronize setup for OpenVMS 2017-04-25 11:57:42 +02:00
Vadim Zeitlin
b502a5c44d Fix wxMotif build after recent argv changes
Update wxMotif too after 70a499f635.
2017-04-23 16:20:13 +02:00
Vadim Zeitlin
7fb926c664 Always use wxGTK, not wxMotif, by default under Unix systems
wxMotif is not in a shape to be really for anything currently.
2017-04-23 16:13:40 +02:00
Steven Lamerton
00ddcfa18a Add WebKit2 description to docs 2017-04-23 08:39:33 +01:00
Scott Talbert
cbe0a1f049 Add support for WebKit2GTK+ in wxWebView 2017-04-22 20:00:48 +01:00
Vadim Zeitlin
d10c600773 Add instructions for checking ABI compatibility to release HOWTO
Explain how to use abi-compliance-checker.
2017-04-22 15:58:13 +02:00
Vadim Zeitlin
7d2bc0fc89 Merge branch 'xlocale-checks'
Fix build on systems which don't have full x-locale support even though they
do have <xlocale.h>, such as OpenIndiana.

Closes https://github.com/wxWidgets/wxWidgets/pull/461
2017-04-20 15:56:05 +02:00
Vadim Zeitlin
259b55a17c Rename wx_cv_use_xlocale_local to wx_cv_func_strtod_l
No real changes, just use more standard naming convention for a variable
containing the cached value in configure.
2017-04-20 15:55:33 +02:00
Vadim Zeitlin
9c35db85d1 Use symbolic constant for DST shift
No real changes, just use DST_OFFSET constant instead of 3600 and remove the
"FIXME" comments as we're not actually going to fix anything here but will
just continue to assume 1 hour shift for DST.
2017-04-19 17:07:44 +02:00
Vadim Zeitlin
f6d9d7962e Revert wrong fix for wxDateTime timezone conversion to/from local
This reverts commit aaddf6be7f as it broke
handling of dates when local time zone is BST, whose offset not counting DST
is 0, as for UTC, but which still should be handled as local timezone,
see #17220.

With the current wxDateTime handling of time zones, FromTimezone(Local)
doesn't make much sense anyhow, so abandon attempts to try making it work as
to really do it we need to specify the time zone being converted from too, as
explained in the second point of #10445.

See #16585.
2017-04-19 17:07:44 +02:00
Vadim Zeitlin
dd134b9534 Fix wrong example using printf() in wxDateTime overview
Use wxPrintf() and remove the c_str() call which is redundant with it instead
of using printf() which can't be used with non-POD objects like wxCStrData
returned by c_str() in wx 3.0+.
2017-04-19 17:07:44 +02:00
Lauri Nurmi
9507bc430e Determine availability of the required xlocale API by compiling
Even if <xlocale.h> exists, the whole API that wx requires (specifically
strtod_l() and similar) may not be available. This is the case
on e.g. OpenIndiana (SunOS).
2017-04-19 15:31:02 +03:00
Lauri Nurmi
aa5af25870 Compile the check for ICONV_CONST as C++
On OpenIndiana (SunOS) the result is different when compiled as C,
and the C++ result is what matters to wxWidgets.

Fixes compilation of src/common/strconv.cpp on OpenIndiana.
2017-04-19 15:30:41 +03:00
Metallicow
8c8d8c4d3a Fix "ont" (instead of "one") typo in wxSTC
Correct "ont" to "one" in several places.
2017-04-18 12:25:46 +02:00
Jens Göpfert
7e530e23e1 Update selection in wxAuiNotebook correctly after tab move
Update the selected state of the tab with the index corresponding to the old
index of the tab which was moved.

Closes #16605.
2017-04-18 03:36:16 +02:00
Artur Wieczorek
06963940fb Change current font only if new graphics font is successfully created
If new graphics font couldn't be created successfully there is no need
to reset current font by updating it to wxNullGraphicsFont.

Closes #17790.
2017-04-17 18:57:31 +02:00