Commit Graph

70710 Commits

Author SHA1 Message Date
Vadim Zeitlin
01aebc08ee Merge branch 'gtk-fix-bogus-dvc-context-menu'
Fix bogus wxDVC context menu event in wxGTK.

See https://github.com/wxWidgets/wxWidgets/pull/2362
2021-05-22 21:28:09 +01:00
Vadim Zeitlin
0b20b97704 Merge branch 'spinctrl-digits'
Improve setting the number of digits in wxSpinCtrlDouble and make it
consistent on all platforms.

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

Closes #17085.
2021-05-22 21:25:32 +01:00
Vadim Zeitlin
7a6bec389b Merge branch 'msw-fix-BCM_GETIDEALSIZE'
Fix size of the buttons when not using manifest in wxMSW.

See https://github.com/wxWidgets/wxWidgets/pull/2346
2021-05-22 21:18:23 +01:00
Vadim Zeitlin
880c50bade Avoid bogus assert failures when releasing mouse capture
Calling ReleaseMouse() from wxEVT_MOUSE_CAPTURE_LOST handler could
result in bogus asserts about ReleaseMouse() reentrancy because the
function generating "capture lost" events in wx itself wrongly set the
wxMouseCapture::changing flag, instead of just examining it, as it was
supposed to do.

This corrects a problem introduced back in b0ad1918b9 (No changes, just
use wxRecursionGuard instead of manual boolean flag., 2013-08-18) which,
contrary to the commit message, did change the behaviour by replacing a
simple test with the use of wxRecursionGuard here.
2021-05-22 16:23:53 +01:00
Vadim Zeitlin
a352dee1f1 Disable warnings inside winsock2.h when using MSVC too
We already disabled the warnings inside windows.h, but since bf5090bcf3
(Enable Winsock 2 and IPv6 build options by default, 2021-04-24) we
could get warnings from winsock2.h, so move its inclusion inside the
region where the warnings were disabled too.

For the record, the warnings were, rather surprisingly, C4668, which is
disabled by default, but apparently was enabled somewhere inside (at
least some versions of) SDK headers.

This commit is best viewed with --color-moved git option.
2021-05-19 18:51:30 +01:00
cnbatch
94b399418c Fix an issue that MSVC 2019 cannot compile with CMake
Fix using PCH with MSVC too, which notably fixes using it with vcpkg.

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

Co-Authored-By: Maarten Bent <MaartenBent@users.noreply.github.com>
2021-05-19 19:48:04 +02:00
Vadim Zeitlin
1b76ff4887 Disable wxWebRequest tests on CI platforms without Python 3
This currently means macOS 10.11 only, which is only used on Travis CI
and Python 2 installation there is broken anyhow, so this doesn't make
anything worse than it already is.
2021-05-17 01:26:32 +02:00
Maarten Bent
750bf01fe6 CMake: don't include libc.so in wx-config
Closes https://github.com/wxWidgets/wxWidgets/pull/2364
2021-05-16 22:43:50 +02:00
Vadim Zeitlin
2cd1ec668c Merge branch 'wxWidgets_cmake_macos' of https://github.com/eligovision/wxWidgets
CMake fixes for macOS.

See https://github.com/wxWidgets/wxWidgets/pull/2363
2021-05-16 22:42:18 +02:00
Vadim Zeitlin
2dc57eef4b Merge branch 'gtk-print-page-setup'
Fix saving print page setup with wxGTK.

See https://github.com/wxWidgets/wxWidgets/pull/2369
2021-05-16 16:57:46 +02:00
Vadim Zeitlin
fc2e01d9a2 Make GtkPageSetup-related functions private
These functions don't need to be members of wxGtkPrintNativeData as they
don't use this object at all, so one shouldn't be required to call them.

And rather than making them static, just make them private functions
instead.

No real changes, this is just a refactoring.
2021-05-16 00:55:04 +02:00
Vadim Zeitlin
2514945ab3 Fix retrieving paper size and orientation from GTK print dialog
The paper size and orientation in wxPrintData were never updated because
we didn't retrieve them from GTK correctly: they need to be extracted
from "default-page-setup" property and not the main GtkPrintSettings
themselves, at least with GTK 3.
2021-05-16 00:55:04 +02:00
Vadim Zeitlin
131d07b430 Update print dialog data after printing successfully
This is necessary in order to get the information entered by the user in
the dialog and was already done in PrintDialog(), but not Print()
itself -- now do it there as well.
2021-05-16 00:55:04 +02:00
Vadim Zeitlin
16ca2df0c4 Refactor return code in wxGtkPrinter::Print()
No real changes, just make it simpler to do other things before
returning successfully by handling error returns separately.

This is also more consistent with PrintDialog() method of the same
class.

No real changes.
2021-05-16 00:55:04 +02:00
Vadim Zeitlin
1a515725b3 Suppress ASAN leak reports when using print dialog in wxGTK
There is nothing we can do about them, as memory is allocated from a
CUPS functions used by GTK itself, so suppress them.
2021-05-16 00:55:04 +02:00
Vadim Zeitlin
4a7dc31153 Improve wxUSE_DPI_AWARE_MANIFEST description in high DPI overview
Make it more clear that wx/msw/wx.rc must be included for this option to
be taken into account.
2021-05-13 18:53:42 +02:00
PB
99bcb29fce Remove wxGTK1 mentions from the documentation
GTK1 is no longer supported, so do not document control limitations when using it.
2021-05-13 06:52:09 -07:00
Ian McInerney
363216ab29 Readd accidentally deleted argument in wxConfig interface
This missing argument was removed in 0c837e5310
and causes the doxygen docs for wxConfigBase to be incorrect and miss
a lot of functions.
2021-05-13 06:49:31 -07:00
konstantin.matveyev
26671c944c config.cmake tweak for macOS: .tbd extension added 2021-05-11 11:48:08 +03:00
Konstantin S. Matveyev
edc82ffce4 config.cmake fix for macOS 2021-05-09 17:01:00 +03:00
Maarten Bent
9814d58415 CMake: Improve adding external libraries to wx-config
Don't add -l to libraries already containing it (for example -lpthread).
Change libraries with format libName.so or libName.a to -lName,
configure also uses -l for these libraries. Account for possible invalid
libraries (Name-NOTFOUND) which could happen with imported libraries,
for example OpenGL::OpenGL.

Closes https://github.com/wxWidgets/wxWidgets/pull/2359
2021-05-09 00:29:29 +02:00
Vadim Zeitlin
4b71e50094 Merge branch 'opengl-update-info' of https://github.com/PBfordev/wxWidgets
Minor updates to OpenGK-related documentation and comments.

See https://github.com/wxWidgets/wxWidgets/pull/2360
2021-05-09 00:28:16 +02:00
Vadim Zeitlin
07459e8f2f Avoid bogus context menu events in wxGTK wxDataViewCtrl
Right clicking on the column header shouldn't generate context menu
events, but it did because our gtk_dataview_button_press_callback() got
these events for both the "bin" window, containing the items, and the
"header" window.

Fix this by filtering out the events not sent to the right window.

It would be even better to not get these events in the first place, i.e.
somehow not connect to them in the first place, but it's not clear how
to do this, so settle for this solution for now.

For testing this fix, just right click any column in the dataview
sample: previously this generated both messages about the column header
right click and the context menu in wxGTK, while now it only generates
the former, as in the generic version.
2021-05-09 00:15:48 +02:00
Vadim Zeitlin
1ede92afa1 Use temporary variable in gtk_dataview_button_press_callback()
No real changes, just simplify the code a bit by using a local variable
instead of repeating the same expression a couple of times.
2021-05-09 00:15:12 +02:00
Tim Stahlhut
d85665319f Update MSys2 URLs in build documentation 2021-05-08 12:58:54 -04:00
PB
9610160c31 Remove outdated and unnecessary comment about MSVC linking pragma 2021-05-05 21:00:22 +02:00
PB
6716fcd097 Update note about enabling OpenGL support on Windows 2021-05-05 20:56:05 +02:00
Vadim Zeitlin
0585c96a3b Restore wxObject::ms_classInfo public access
This undoes accidental change of ms_classInfo from public to protected
in 95c98a0b5f (Work around -Wuggest-override for event table macros from
gcc 11, 2021-04-25).

Also add a unit test checking that using wxCLASSINFO(wxObject) compiles
and works as expected.
2021-05-04 23:14:41 +02:00
Paul Cornett
a3b7244efe Fix possible crash after 3217a4e8a2
3217a4e8a2 (Fix best size for windows which are hidden when TLW is shown
with GTK3, 2021-04-30) did not account for possibility that window needing
revalidated best size is also the TLW.
See #16088
2021-05-03 09:26:35 -07:00
Jouk
0943beb241 wxGTK1 : adding missing ctors foe wxCursor & wxBitmap 2021-05-03 08:04:00 +02:00
Paul Cornett
43beca8196 Avoid warning: g_object_ref_sink redefined with GTK2 2021-05-02 07:48:35 -07:00
PB
da581ccc1a Remove BCC makefiles (again)
All BCC makefiles were removed as a part of "Remove support for Borland
C++ compiler" PR; however, a few of them sneaked back as a part of the
newly introduced wxWebRequest.

Remove them for good.
2021-05-01 18:40:38 +02:00
Tim Stahlhut
e80ab67b54 Fix wxUniv/MSW build by defining MSW-specific wxUSE_XXX options
Add definitions of the missing MSW-specific options to wx/univ/setup.h
to avoid errors in wx/msw/chkconf.h when building wxUniv.

Closes https://github.com/wxWidgets/wxWidgets/pull/2355
2021-05-01 14:28:13 +02:00
Vadim Zeitlin
4a08c5f965 Document wxWebView backend name constants
Mention the constants that are used to identify the backends.

Closes #19168.
2021-05-01 14:25:18 +02:00
PB
318784fc1b Handle invalid paths better in MSW wxDirDialog
When setting a path including an invalid drive in IFileDialog-based
wxDirDialog, Windows returned ERROR_INVALID_DRIVE error. wxWidgets
treated this as an error and reverted to showing the old
ShowSHBrowseForFolder()-based dialog.

However, it is better to just ignore any errors produced when attempting
to set the default folder (as the code already did for ERROR_FILE_NOT_FOUND)
and show IFileDialog-based dialog anyway.

Closes https://github.com/wxWidgets/wxWidgets/pull/2356
2021-05-01 14:11:24 +02:00
Vadim Zeitlin
c8c55be4ab Merge branch 'cmake-wxconfig' of https://github.com/MaartenBent/wxWidgets
Fix wx-config generation in CMake build.

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

Closes #19164.
2021-05-01 14:10:21 +02:00
Vadim Zeitlin
2f86a2e82d Make helper functions used by wxImage::ApplyToAllPixels() static
Also put WeightValue inside an anonymous namespace.

No real changes.

See https://github.com/wxWidgets/wxWidgets/pull/2310
2021-05-01 14:05:14 +02:00
Tomay
0e39566b3a Add wxImage Change{Saturation,Brightness,HSV,Lightness}()
Add more functions for manipulating wxImage colours.

Show using them in the same and add new unit tests for them.

This is a squashed commit of branch 'tomay3000/image-lightness'.

Closes https://github.com/wxWidgets/wxWidgets/pull/2310
2021-05-01 14:03:04 +02:00
Paul Cornett
3217a4e8a2 Fix best size for windows which are hidden when TLW is shown with GTK3
GTK3's style cache is not updated for hidden windows until after they are shown
See #16088
2021-04-30 12:15:33 -07:00
Stefan Csomor
228f5becab
adding bridging info to our own definitions (#2354)
attempt to solve #19159
2021-04-30 18:10:21 +02:00
Vadim Zeitlin
236e77c263 Don't use variable length arrays in wxFileName::ResolveLink()
Use wxVector<> instead of relying on compiler support for VLAs which is
not standard and shouldn't be required.

This fixes compilation using OpenVMS compiler after the changes of
53bd1391f4 (Add a new wxFileName function to resolve symlinks to
absolute paths, 2021-04-01).
2021-04-30 13:43:26 +02:00
Maarten Bent
e000f0d1a8 CMake: add '-l' prefix to all library dependencies 2021-04-29 21:48:29 +02:00
Maarten Bent
dd274289bd CMake: don't define WXUSINGDLL in wx-config for static library 2021-04-29 21:48:29 +02:00
Vadim Zeitlin
1e4f0a370f Merge branch 'drop-vc7'
Remove MSVS 2003 support.

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

Closes #18821.
2021-04-27 14:10:06 +02:00
Vadim Zeitlin
1c8af332cf Only set wxLocale as active once it has been fully initialized
Previously wxLocale object was set as the global local as soon as it was
created, even when the default ctor was used, i.e. the locale wasn't
really changed at all. This was always wrong, but only started to result
in visible problems since the changes of c6d6ec9295 (Merge branch
'msw-fix-decimal-point' of https://github.com/vslavik/wxWidgets,
2021-04-18) as we now could use the existing but not yet active locale
when checking for the decimal separator mismatch, resulting in spurious
asserts.

Fix this by postponing the call to wxSetLocale() and the rest of what
was previously done in the ctor until Init() is called (which is done by
all non default ctors).

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

Closes #19154.
2021-04-27 14:09:41 +02:00
Vadim Zeitlin
17e0f23cd0 Merge branch 'listctrl-fixes'
Various generic wxListCtrl fixes and improvements.

Closes https://github.com/wxWidgets/wxWidgets/pull/2340
2021-04-27 14:08:38 +02:00
Ian McInerney
f556a34086 Remove the mentions of the native OSX wxListCtrl control
This control was removed during the Carbon code removal in commit
5ba67c67e4, so the system option
does nothing now (and was only mentioned in the documentation
and the sample).
2021-04-27 14:07:46 +02:00
Ian McInerney
48b1175f61 Update the documentation for wxListCtrl column ordering 2021-04-27 14:07:46 +02:00
Ian McInerney
797bc2c087 Introduce ABI shims for wxListCtrl column ordering functions
This way it is easier to add the functions later on without
breaking ABI.
2021-04-27 14:07:46 +02:00
Ian McInerney
e0ef3830c1 Fix centering of images in wxListCtrl items when selected
Closes #11331.
2021-04-27 14:07:36 +02:00