Commit Graph

67780 Commits

Author SHA1 Message Date
Vadim Zeitlin
eb7b84f781 Fix build of plugin libraries after recent *FLAGS changes
Since ec091c9f2b building plugin libraries
such as webkit2_ext and sound_sdl was broken, as they didn't use the
correct CPPFLAGS any longer.

Fix this by explicitly inheriting from "common_settings" template which
adds the use of WX_CPPFLAGS etc now.
2020-02-19 22:11:20 +01:00
Vadim Zeitlin
108e18ee24 Merge branch 'msw-univ-fix'
Build fixes for wxUniv/MSW.

Closes #18670.

See https://github.com/wxWidgets/wxWidgets/pull/1736
2020-02-19 14:14:40 +01:00
Vadim Zeitlin
89229b7090 Move src/msw/ole/access.cpp to low-level MSW sources
This file should be used even in wxUniv builds.

This fixes linking of wxCore when using wxUniv/MSW.
2020-02-17 19:49:38 +01:00
Vadim Zeitlin
80141760e8 Avoid harmless unused parameter warning in wxUniv build
Just add wxUnusedVar() to suppress it.
2020-02-17 19:49:35 +01:00
Vadim Zeitlin
3a15e9f943 Fix cast in wxWindowMSW code in wxUniv build
Cast "this" to wxWindowMSW, which is always its correct type, even in
wxUniv builds.

Closes #18670.
2020-02-17 19:49:24 +01:00
Vadim Zeitlin
a4906f1222 Change wxGetTopLevelParent() to take wxWindowBase
This makes it more convenient to use when building wxUniv, when
wxWindow$TOOLKIT objects are wxWindowBase but not actually wxWindow.

No real changes.
2020-02-17 19:49:23 +01:00
Vadim Zeitlin
482426f4fc Use correct toolkit name in wxUniv error message in configure
$TOOLKIT refers to the underlying toolkit, while the error message
should really indicate that the missing functionality is in wxUniv.
2020-02-17 19:29:26 +01:00
Vadim Zeitlin
c6f4c5b4c1 Merge branch 'cmake-output-name' of https://github.com/MaartenBent/wxWidgets
CMake: Improve output filenames, add flavour option.

See https://github.com/wxWidgets/wxWidgets/pull/1735
2020-02-17 15:58:38 +01:00
Eduard Ereza Martínez
51d73c52c4 Bring Catalan translation up to date 2020-02-17 15:44:50 +01:00
Maarten Bent
016061311a CMake: Add wxBUILD_FLAVOUR option
It is similar to --with-flavour option from configure.

Mark some build options as advanced.
2020-02-16 21:33:44 +01:00
Maarten Bent
4196c67b72 CMake: Create wx-config for MinGW builds
Use the same output folder for setup.h and wx-config as configure does.
2020-02-16 16:35:24 +01:00
Vadim Zeitlin
08db475a7f Process queued events with higher priority than idle ones
In the port using wxEventLoopManual, such as wxMSW, an idle event
handler calling wxIdleEvent::RequestMore() prevented any queued events
from being handled until the next "real" event (i.e. originating from
the underlying toolkit) was received. This was unexpected and
incompatible with the behaviour of wxGTK, where queued events were still
processed immediately even when RequestMore() was being constantly
called, so change wxEventLoopManual to also give higher priority to
these events by stopping calling ProcessIdle() if a queued event is
available.

Closes #18667.
2020-02-15 18:26:09 +01:00
Maarten Bent
10abcc0f78 CMake: Improve consistency in names of output files
Match the filenames used by configure (gcc, clang) and the visual studio
solutions. The biggest difference is that wxARCH_SUFFIX (e.g. _64) is not
included in the dll names, and the position of the version number in the
libraries.
2020-02-12 22:30:32 +01:00
Artur Wieczorek
5bc020e844 Implement getters for members of wxPGWindowList
There is no reason to expose wxPGWindowList member variables. They should
be set in ctors and retrieved with getters.
2020-02-12 17:09:25 +01:00
Artur Wieczorek
489cc1cb36 Fix drawing empty wxPropertyGrid
If wxPG doesn't contain any visible items it's entire area should
be erased so we need to return -1 as a last drawn line index to ensure
that painted area will be clared from 0 y-coordinate.

Closes #18666.
2020-02-12 17:03:58 +01:00
Vadim Zeitlin
ee8009af64 Merge branch 'configure-user-flags'
Fixes for handling of {C,CPP,CXX,LD}FLAGS in configure, notably allowing
them to be defined when running make.

See https://github.com/wxWidgets/wxWidgets/pull/1722
2020-02-12 15:18:50 +01:00
Vadim Zeitlin
273e2e7343 Remove duplicated flags from {C,CPP,CXX,LD}FLAGS in configure
This results in much shorter compilation lines and hence much shorter
build logs, which makes examining them simpler.

There should be no real changes, as we should never use duplicated
options intentionally.
2020-02-12 04:12:04 +01:00
Vadim Zeitlin
b9df145b79 Stop using non-existent CXXWARNINGS for failing tests checks
This variable doesn't exist any more, but now it's possible to use
CPPFLAGS directly and get rid of the hack which required it to be used
in the first place.
2020-02-11 23:43:10 +01:00
Vadim Zeitlin
7db9b707b2 Ensure that include paths to 3rd party libraries come first
Rearrange wx_{lib,dll} templates definitions to put 3rd party include
paths in the beginning, before WX_CPPFLAGS inherited from wx_{lib,dll}_b
template, so that our own 3rd party libraries headers are found before
the system ones, if we're using built-in versions of the libraries.
2020-02-11 23:19:31 +01:00
Vadim Zeitlin
1250eac850 Don't use GUI 3rd party libraries for non-GUI libraries
Don't use include paths for jpeg, png and tiff libraries when building
non-GUI projects, such as base, net or xml, and don't make these
libraries depend on the GUI 3rd party libraries neither.

No real changes, just simplify things a bit.
2020-02-11 23:19:31 +01:00
Vadim Zeitlin
ec091c9f2b Don't override CFLAGS etc in configure-generated makefile
CPPFLAGS, CFLAGS, CXXFLAGS and LDFLAGS are supposed to be under
user-control and putting configure-determined options in them broke
something as simple as running "make CXXFLAGS=-Wno-some-extra-warning"
because this overrode the CXXFLAGS set by configure and required for
build.

Improve this by using WX_*FLAGS in the generated makefile and leaving
the user-controlled FLAGS alone. This is still not ideal as running
"configure CFLAGS=-DFOO" and then "make CFLAGS=-DBAR" will define both
FOO and BAR, as configure copies CFLAGS to WX_CFLAGS, and so setting it
on make command line won't override it, as it should, but this should be
a much more rare and also much less severe problem, so we should be able
to live with it for now.

Normally this commit shouldn't result in any user-visible changes, i.e.
it shouldn't break any previously working scenarios and only make some
previously broken ones work.
2020-02-11 23:19:31 +01:00
Vadim Zeitlin
13b0981eb9 Get rid of WXCONFIG_ONLY_CPPFLAGS variable in configure
This variable was set and used exactly once, so just remove it to
simplify things.

No real changes.
2020-02-11 23:19:30 +01:00
Kvaz1r
6697b576b2 Close AUI MDI children when the parent frame is closed
This ensures that the parent frame doesn't close if any of the children
can't be closed and also that all children are closed before the parent
if they do agree to close.

Closes https://github.com/wxWidgets/wxWidgets/pull/1734

Closes #15170.
2020-02-11 22:41:26 +01:00
Vadim Zeitlin
789858a4d9 Merge branch 'secret-service-check'
Check if secret service can be used under Unix.

See https://github.com/wxWidgets/wxWidgets/pull/1733
2020-02-11 22:36:03 +01:00
Vadim Zeitlin
b18169a0e4 Merge branch 'paint-debug'
Detect invalid use of wxPaintDC/wxPaintEvent better.

See https://github.com/wxWidgets/wxWidgets/pull/1732
2020-02-11 22:35:33 +01:00
Vadim Zeitlin
697d494caa Merge branch 'grid-attr-smart-ptr'
Use smart pointers in wxGrid code.

See https://github.com/wxWidgets/wxWidgets/pull/1731
2020-02-11 22:35:03 +01:00
Vadim Zeitlin
1d4aaba963 Merge branch 'ribbon-imagelist'
Use image list in wxRibbonBar.

See https://github.com/wxWidgets/wxWidgets/pull/1730
2020-02-11 22:34:13 +01:00
Vadim Zeitlin
a37e15ff1f Merge branch 'webview-js-escape'
Fix JS strings escaping in wxWebView.

See https://github.com/wxWidgets/wxWidgets/pull/1727.

Closes #18602.
2020-02-11 22:32:51 +01:00
Vadim Zeitlin
8fcf46f65c Forbid creation of wxPaintEvent objects from user code
This doesn't work anyhow, so it's better to prevent the code doing this
from compiling instead of getting run-time asserts or worse.

Also simplify construction of these events inside wxWidgets by passing
the window itself to the ctor instead of passing just its ID and calling
SetEventObject() separately later.

For consistency, do the same thing for wxNcPaintEvent too.
2020-02-10 23:03:01 +01:00
Vadim Zeitlin
f7f90a6111 Mention that wxSecretStore ctor can block
At least under Unix it can show a dialog asking to create a new key
ring.
2020-02-10 18:27:38 +01:00
Vadim Zeitlin
5a454d373b Optionally return error message from wxSecretStore::IsOk()
This allows to give at least some explanation about why the secrets
can't be stored to the user, e.g. they could search for a message such
as

The name org.freedesktop.secrets was not provided by any .service files

to find out that gnome-keyring package needs to be installed on their
system.

Note that this change means that under Unix an attempt to connect to the
secret service is now made when wxSecretStore is constructed and not
just when it's used for the first time, as before.
2020-02-10 18:23:59 +01:00
Vadim Zeitlin
fd84892e62 Use secret_service_clear_sync() in wxSecretStore
There doesn't seem to be any reason to use secret_service_xxx()
functions for Save() and Load(), but use simple API function
secret_password_clearv_sync() for Delete().

Use the equivalent function from the same API layer for it too instead.
2020-02-10 18:01:09 +01:00
Vadim Zeitlin
b680ba9596 Explicitly document that wxPaintEvent ctor must not be used
Objects of this type are only supposed to be created by wxWidgets
itself and not by user code.
2020-02-10 13:42:03 +01:00
Vadim Zeitlin
452c8dcfa3 Check that wxPaintDC is created correctly in code using wxMSW
Creating wxPaintDC for a window outside of any wxEVT_PAINT handler
already resulted in assert failures and crash due to using the empty
wxDidCreatePaintDC stack, but the assert message was not really clear,
so improve it by stating explicitly that wxPaintDC can only be created
from wxEVT_PAINT handlers.

Also check that wxPaintDC is being created for the correct window: this
wasn't detected at all before, but could still result in a lot of grief,
so check for this too.

Finally, create a new private header with the paint data stack variable
declaration instead of using "extern" to declare it manually in wxDC
code.
2020-02-10 13:39:08 +01:00
Vadim Zeitlin
f6158bc343 Remove wxHAS_PAINT_DEBUG and code guarded by it
This doesn't seem to actually be doing anything useful, as it only
checks that wxPaintDCImpl is not created without creating wxPaintDC
which is impossible to do accidentally anyhow.

This will be replaced by a more useful check in the next commit.
2020-02-10 13:14:08 +01:00
Artur Wieczorek
5fb7f89b14 Don't use vestor::data() to get access to the raw vector data
This method is available since C++ 11 so it can't be used currently.
2020-02-09 23:12:08 +01:00
Artur Wieczorek
55daa7103e Implement wxD2DGradientStopsHelper as a wxD2DResourceHolder
There is a dedicated template class wxD2DResourceHolder<T> to support
managing backend D2D resources and wxD2DGradientStopsHelper should be
derived from wxD2DResourceHolder<ID2D1GradientStopCollection> for the
sake of consistency with other D2D resource holders.
2020-02-09 20:46:40 +01:00
Artur Wieczorek
c7c3f337c2 Check index value with CHECK_MSG to avoid crashes 2020-02-09 20:39:06 +01:00
Artur Wieczorek
0b7f1e7e91 Always show label of unspecified value item while drawing popup menu
The label of "unspecified value" shouldn't be displayed in the edit field
but it should always be shown on the popup menu list.
2020-02-09 20:38:07 +01:00
Artur Wieczorek
687f679705 Fix creating wxPGChoiceAndButtonEditor controls
Since wxPGChoiceAndButtonEditor derives from wxPGChoiceEditor so making
a call to the base class virtual function CreateControls() from the child
CreateControls() is legitimate and more clean than calling to this
function in the another instance of the base class wxPGChoiceEditor
(which may not exists).
2020-02-09 20:34:09 +01:00
Artur Wieczorek
9dbd3b4946 Use ctor with default argument instead of providing specialized ctor
We can use 2-parameter ctor with default NULL value for second parameter
instead of providing a special 1-paramater ctor.
2020-02-09 20:31:58 +01:00
Artur Wieczorek
f2f9cbe619 Get rid of unused wxPGWindowList ctor
There is no use case for wxPGWindowList initialiazed with NULL data.
2020-02-09 20:19:52 +01:00
Paul Cornett
edc47d8fed Fix appearance of GTK3 single-line wxTextCtrl with non-default background
...and more text than will fit. See #18663
2020-02-09 08:13:01 -08:00
Vadim Zeitlin
2e64ba6d6e Also add wxGridCellEditorPtr and wxGridCellRendererPtr
This is similar to the previous commit and replaces manual calls to
DecRef() on the renderers/editors with the use of smart pointers for
them too.
2020-02-08 15:14:24 +01:00
Vadim Zeitlin
5f34b1749e Use wxGridCellAttrPtr instead of manual DecRef() calls
Provide GetAttrPtr() and GetCellAttrPtr() convenience functions that can
be used instead of the original Ptr-less versions to avoid the need to
manually call DecRef() on the returned wxGridCellAttr pointers.

No real changes, just simplify the code and make it safer.
2020-02-08 14:55:36 +01:00
Ilya Sinitsyn
e0c09c8438 Only overflow left-aligned cells in wxGrid
Doing it for cells using a different alignment doesn't work correctly
and it's not clear whether it really makes sense, so just don't do it at
all for now.

Closes https://github.com/wxWidgets/wxWidgets/pull/1726
2020-02-07 19:35:35 +01:00
Ilya Sinitsyn
a40acbb28e Add CanOverflow function to wxGridCellAttr
Add function to determine whether the cell will draw the overflowed text
to neighbour cells. Note that only left aligned cells currently can overflow.
2020-02-07 19:34:50 +01:00
Vadim Zeitlin
ad552d2117 Always use wxRibbonBar image lists in wxRibbonButtonBar
Assume that we can always rely on being a child of wxRibbonBar, and
always use its image lists.
2020-02-07 19:29:04 +01:00
Vadim Zeitlin
10c49631a3 Store any number of image lists in wxRibbonBar, not just two
The same wxRibbonBar can use multiple button bars with different icon
sizes, so 2 image lists are not enough. But OTOH there is no need to
distinguish between small and large images neither, so 2 may be also 1
too many.

Instead, use however many image lists we need, depending on the size.
For now, just store them in a vector and use linear search in it,
instead of using a map or, maybe, sorted vector, as we suppose there are
never going to be more than a couple of elements in this vector anyhow.
2020-02-07 19:21:33 +01:00
Vadim Zeitlin
18e8a68c1b Move code accessing bitmaps to wxRibbonButtonBarButtonBase too
This also improves encapsulation and allows to avoid duplicating calls
to DrawButtonBarButton().
2020-02-07 19:11:52 +01:00