Commit Graph

71161 Commits

Author SHA1 Message Date
Artur Wieczorek
5cb255cc8d Demonstrate drawing on wxGCDC in renderer sample
This is to demonstrate how wxRendererNative works with various
wxGraphicsRenderers.
2021-06-27 23:47:23 +02:00
Artur Wieczorek
0939130158 Refactor wxGCDC to delegate acquiring/releasing HDC to wxGraphicsContext
Instead of implementing MSW-specific code to handle HDC for GDI+ context
directly in wxGCDC delegate acquiring/releasing HDC to underlying
wxGraphicsContext. Decoupling GDI+-specific code from wxGCDC will allow
us to implement handling HDC in other graphics renderers in a clean way.
2021-06-27 23:46:21 +02:00
Kvaz1r
2209ec29f7 Add handling LEFT_UP 2021-06-27 21:50:09 +03:00
Vadim Zeitlin
769cb2e205 Add workflow for cross-building wxMSW on GitHub Actions
Use MinGW to build and Wine to run the GUI tests.
2021-06-27 13:40:10 +02:00
Vadim Zeitlin
996a981170 Merge branch 'github-ci-mac-builds'
Add wxMac and wxiOS builds to GitHub CI workflow.
2021-06-26 17:07:37 +02:00
DINAKAR T.D
2ec60e8103 Update Tamil translations 2021-06-26 17:06:29 +02:00
Vadim Zeitlin
5f3bca00c0 Skip building tests too if skip_testing flag is set
Currently it's only used for wxiOS build and the tests don't build
there.

Also set working-directory for the test building step once instead of
using "make -C" option twice.
2021-06-26 16:18:14 +02:00
Vadim Zeitlin
a5cf7f3479 Fix determining the number of logical CPUs under macOS
Use sysctrl instead of nproc which doesn't exist under Mac.
2021-06-26 16:18:14 +02:00
Vadim Zeitlin
32f2a679b4 Add wxMac and wxiOS builds to GitHub CI workflow
Run the builds under macOS 10.15.
2021-06-26 16:18:14 +02:00
Kvaz1r
05875a76e9 Fix handling mouse capture 2021-06-26 17:11:41 +03:00
Ian McInerney
fd77020792 Fix wxChoice with items too long to fit into it in wxGTK3
Enable ellipsization to show the items reasonably well even if they're
too long to fit into the available space -- without this, just the tail
of the long items was shown and shorter items could have been not shown
at all, as only the blank part of their label was visible.

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

Co-Authored-By: Kent Tessman <kent@generalcoffee.com>
Co-Authored-By: Paul Cornett <paulcor@users.noreply.github.com>
Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
2021-06-25 11:32:42 +02:00
Jouk
b5a9ef543a Correction of modification date 2021-06-25 08:05:52 +02:00
Artur Wieczorek
ffc7c036f1 Fix acquiring HDC from wxGCDC with non-GDI+ graphics context
HDC can be acquired/released only when wxGCDC is associated with GDI+
graphics context.

Closes #19207.
2021-06-24 19:50:29 +02:00
Artur Wieczorek
36f84d0257 Add missing reference to dynamically loaded Cairo API 2021-06-24 19:48:19 +02:00
Vadim Zeitlin
8e2cac22ba Add support for std::string_view to wx vararg functions
Allow using wxPrintf() etc with std::string_view arguments when using
C++17.

This is inefficient but still more convenient than not being able to use
string_view at all.
2021-06-24 14:53:05 +01:00
Tim Stahlhut
fcfe91b16d Fix warnings about inline {From,To}DIP() in wxGTK/Win32 build
Define these functions in the class declaration to avoid gcc warning
about "redeclaring them without dllimport attribute after being
referenced with dll linkage".

This commit just moves the existing code around, no real changes.

Closes https://github.com/wxWidgets/wxWidgets/pull/2400
2021-06-24 14:50:32 +01:00
Vadim Zeitlin
2d9c9d9689 Fix handling of ampersands in wxCheckListBox under MSW
They were incorrectly interpreted as mnemonics when drawing
wxCheckListBox items, which didn't make sense and was inconsistent with
the other ports and even wxListBox in wxMSW itself.

It also affected wxRearrangeCtrl under MSW, which uses wxCheckListBox
for its implementation.

Closes #19201.
2021-06-24 14:49:08 +01:00
Vadim Zeitlin
6f9826ea69 Merge branch 'library-naming' of https://github.com/MaartenBent/wxWidgets
Update the library naming convention document and make CMake build
system follow it.

See https://github.com/wxWidgets/wxWidgets/pull/2358
2021-06-24 14:46:01 +01:00
Vadim Zeitlin
c59ed10c2a Fix DPI change handling in wxGrid with hidden row/column labels
Don't reset the labels windows size to the default value, it should stay
as 0 because otherwise we break the invariants

	m_rowLabelWidth  != 0 <=> m_rowLabelWin->IsShown()
	m_colLabelHeight != 0 <=> m_colLabelWin->IsShown()

that the rest of the code relies on.

Closes #18904.
2021-06-24 14:40:35 +01:00
Jouk
1cc1ddeefb Fix for OpenVMS CRTL version 8.5 2021-06-24 09:01:21 +02:00
Maarten Bent
c85a6bc4e4 Mention CMake in library naming convention documentation 2021-06-22 21:42:03 +02:00
Maarten Bent
cd9a35b997 CMake: generate build.cfg 2021-06-18 00:41:45 +02:00
Maarten Bent
980bba88aa CMake: Use .a suffix for import libraries
So it will have the same extension as the libraries created by makefile.gcc.
2021-06-17 23:16:03 +02:00
Vadim Zeitlin
2867aa9778 Merge branch 'internat-sample-coreutils'
Fix and test using coreutils message catalog in the internat sample
under Linux.

See https://github.com/wxWidgets/wxWidgets/pull/2398
2021-06-16 00:26:19 +02:00
Vadim Zeitlin
7730505852 Merge branch 'allheaders-cygwin-fix'
Fix Cygwin build after enabling IPv6 support.

See https://github.com/wxWidgets/wxWidgets/pull/2397
2021-06-16 00:25:41 +02:00
Vadim Zeitlin
f0cbb1ffdd Update all message catalogs and sort them
Regenerate the files after the changes of 232d1c1156 (Feed sorted output
to xargs when generating wxstd.pot, 2021-01-23) which added sorting.

This results in tons of changes, but had to be done sooner or later and
now seems like not the worst moment to do it.
2021-06-15 17:49:08 +02:00
Tim Stahlhut
efc6a811f5 Add wxOVERRIDE to GTK/Qt wxGUIAppTraits classes in wxMSW too
wxOVERRIDE was already used for the native MSW version, but not the
other ones, which prevented this header from compiling cleanly with
-Wsuggest-override and so broke allheaders test in these ports.

Closes https://github.com/wxWidgets/wxWidgets/pull/2396
2021-06-15 17:47:30 +02:00
Vadim Zeitlin
3d7f9877fb Predefine __USE_W32_SOCKETS for Cygwin in allheaders test
This is required to avoid warnings (and worse, probably) due to
conflicting function declarations in the platform SDK and Cygwin headers
that have started happening since 8dfcb582da (Regenerate configure after
enabling IPv6 support by default, 2021-06-15).
2021-06-15 16:44:24 +01:00
Vadim Zeitlin
c0f2430ee4 Correct misleading comment in allheaders test
We don't use any HAVE_XXX here, but we do use wxUSE_XXX.
2021-06-15 14:50:37 +02:00
Vadim Zeitlin
0a166474f8 Don't include MSW headers in allheaders test
This extends the changes of e0005c1d93 (No longer include the system
headers first, 2021-04-22) to the platform-specific headers included for
Cygwin/MinGW wxMSW builds, as this shouldn't be necessary neither any
more (but doing it for wxQt is still needed, for the reasons explained
in the new comment added by this commit).

It also incidentally fixes a problem in Cygwin build since enabling IPv6
in 8dfcb582da (Regenerate configure after enabling IPv6 support by
default, 2021-06-15) as including unistd.h directly results in warnings
if wx/defs.h, which predefines __USE_W32_SOCKETS, hadn't been included
before.
2021-06-15 14:50:37 +02:00
Vadim Zeitlin
aabfa8806b Show translation from coreutils message catalog string
Actually test using the coreutils catalog, as this was broken for many
years due to using a wrong catalog name and not adding /usr/share/locale
as a search prefix, but went unnoticed.

So add a menu item to show translation of a string in this catalog to
make testing that this works simpler.
2021-06-15 14:43:38 +02:00
Vadim Zeitlin
c880cf9872 Test for USE_COREUTILS_MO in the internat sample
This is more clear than testing for Linux and will allow enabling this
code under other systems later (as there doesn't seem to be any real
reason not to do it under other Unix systems too).

No real changes.
2021-06-15 14:42:48 +02:00
Vadim Zeitlin
bef4ccede4 Remove unnecessary wxLogNull from internat sample
There is no need to suppress wxLog messages from AddCatalog() because it
doesn't log any errors even if the catalog is not found, while tracing
messages (given only if WXTRACE is set) from it can be useful.
2021-06-15 14:32:44 +02:00
redtide
a71b3d2cd6 Update the standard catalog name used in the internat sample
What used to be called "fileutils" is called "coreutils" since many
years now, so use it to demonstrate loading of the standard catalog.

Closes https://github.com/wxWidgets/wxWidgets/pull/2395
2021-06-15 14:21:15 +02:00
Vadim Zeitlin
482eb2fa87 Merge branch 'auitoolbars19189' of https://github.com/Kvaz1r/wxWidgets
Fix handling of resizable and floating toolbar panes in AUI.

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

Closes #19189.
2021-06-15 00:04:06 +02:00
Vadim Zeitlin
8dfcb582da Regenerate configure after enabling IPv6 support by default
This should have been part of bf5090bcf3 (Enable Winsock 2 and IPv6
build options by default, 2021-04-24), but was forgotten there.
2021-06-15 00:02:25 +02:00
Tim Stahlhut
3be6800831 Disable libdeflate when using built-in libtiff
This is another library that can be detected and used by libtiff
configure that we don't want to use, as built-in libraries shouldn't
have any external dependencies, so explicitly disable its use, just as
it was already done for libjbig, libwebp and libzstd, see ec4b71afa0
(Update tiff submodule, 2018-11-17) and b7600b0b1b (Ensure jbig support
is disabled for builtin libtiff, 2020-06-17).

Closes https://github.com/wxWidgets/wxWidgets/pull/2394
2021-06-14 23:59:06 +02:00
Kvaz1r
a0d67a3ca5 Remove redundant code 2021-06-14 15:10:46 +03:00
Kvaz1r
c452930615 Fix floating for resizable auitoolbars 2021-06-14 15:06:48 +03:00
Tomay
b52f00492e Fix checks for wxPalette index validity
Consistently check that the index is valid in all ports, instead of
using hard-coded 255 rather than the actual number of colours in some of
them and forgetting to check that the index is positive in others.

Closes #19198.
2021-06-11 00:23:46 +02:00
Andreas Falkenhahn
527bcb246b Fix item position in sorted generic wxDataViewCtrl
Compare the item whose value has changed with both the previous and the
next items, if any.

Closes #19194.
2021-06-11 00:16:12 +02:00
Vadim Zeitlin
80b3348c39 Use real wxAuiNotebook base class in its wxBEGIN_EVENT_TABLE()
This shouldn't really change anything, but is more appropriate and might
matter in the future if other event handlers are added to wxBookCtrlBase
event table.
2021-06-10 14:23:13 +02:00
milotype
cd856d66fc Update Croatian translation hr.po
Closes https://github.com/wxWidgets/wxWidgets/pull/2390
2021-06-10 01:02:49 +02:00
Vadim Zeitlin
b17e7a7640 Merge branch 'aui-notebook-rtti'
Fix down-casting from wxAuiNotebook to wxBookCtrlBase.

See https://github.com/wxWidgets/wxWidgets/pull/2388
2021-06-10 01:02:01 +02:00
Vadim Zeitlin
9324c7bfdd Fix sending wxEVT_GRID_RANGE_SELECTED from Select{All,Col,Row}()
This was broken in to 682cb8355c (Replace "sendEvent" parameter in
wxGridSelection with "eventType", 2020-08-21) which changed Select() to
take wxEventType argument but still passed it "true" in a few places.

Fix this and add a unit test verifying that this works as expected.

Ideal would, of course, be to avoid implicit conversions from bool to
wxEventType but making wxEventType anything other than int, for which
such conversions are unavoidable, is too backwards-incompatible to
seriously consider.
2021-06-09 16:09:55 +02:00
Vadim Zeitlin
75605496e8 Merge branch 'wxCtrlWayland' of https://github.com/martinetd/wxWidgets
Really fix wxMediaCtrl support when using Wayland.

See https://github.com/wxWidgets/wxWidgets/pull/2383
2021-06-09 13:36:32 +02:00
Dominique Martinet
e3db863a0e wxMediaCtrl wayland support: resize video in expose_event_callback
the Move handler apparently misses some resize events, so move the
gst_player_video_overlay_video_renderer_set_render_rectangle call
to expose_event_callback.
This is kept as a separate commit because it would be more efficient
to keep it in Move once we can catch that initial size change, so
this commit can get reverted then.
2021-06-09 15:38:33 +09:00
Dominique Martinet
0080aa6086 wxMediaCtrl wayland support: disable xvimagesink on wayland
gstreamer is known to crash on xvimagesink if the main window is
wayland-native and DISPLAY is set: try to make it not load.

Also do the same for ximagesink just in case.
2021-06-09 15:38:33 +09:00
Dominique Martinet
b16aba57b1 wxMediaCtrl wayland support: place window where we want it
without this call gstreamer + gtk wayland would just draw the video over the whole window.
There might be a better way to do that
2021-06-09 15:38:33 +09:00
Dominique Martinet
bae3f61a4e wxMediaCtrl wayland support: pass wl_display to gstreamer
gstreamer creates a new connection to the wayland display by default, and
gst_video_overlay_set_window_handle() only works if both the parent surface
(part of the gtk window) and the gstreamer surface are on the same display,
so we need to tell gstreamer about our wl_display when it asks
2021-06-09 15:05:44 +09:00