Commit Graph

71678 Commits

Author SHA1 Message Date
Maarten Bent
248927a090 CMake: Never add static runtime flags on macOS
This option is disabled in the GUI, but users can still specify it on the
command-line. Never add the linker flags to prevent errors (unsupported option
'-static-libgcc') or warnings (argument unused during compilation:
'-static-libstdc++').

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

Closes #19330.
2021-12-09 19:59:15 +01:00
Richard Gibson
c3d5853faa Fix handling symlinks in wxOSX wxFileSystemWatcher
Set the correct file path for symlink creation/deletion events.

Closes https://github.com/wxWidgets/wxWidgets/pull/2611
2021-12-09 19:57:00 +01:00
Simon Stone
0fc936ca41 Add wxIntegerValidatorctor ctor taking minimum and maximum value
Using this ctor is more convenient than using the default ctor and then
calling SetMin() and SetMax().

Document the new ctor and add tests showing that minimum and maximum
values are actually respected.

Closes https://github.com/wxWidgets/wxWidgets/pull/2610
2021-12-09 19:55:44 +01:00
Marco DeFreitas
a2389fc512 Add wxApp::GTKSuppressDiagnostics()
This allows to avoid GTK messages that are often more annoying and
confusing than useful.

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

Closes #19347.
2021-12-09 19:52:07 +01:00
Scott Talbert
a0eb355e12 Add wxDF_UNICODETEXT to wxDataFormat standard format docs
Closes https://github.com/wxWidgets/wxWidgets/pull/2608
2021-12-09 19:51:07 +01:00
Vadim Zeitlin
9bdce3077c Avoid MSVC bool conversion warning in wxBitmapBundle::IsOk()
This avoids C4800 from MSVC if this warning is enabled (it is disabled
by default in recent versions of the compiler).
2021-12-08 20:27:46 +01:00
Jouk
f9b1d71dab add bmpsvg.cpp for compilation on OpenVMS 2021-12-06 13:31:54 +01:00
Artur Wieczorek
67752c3870 Validate the value in the first and last property of wxPropertyGrid
wxPGProperty value edited in the first or last property of wxPropertyGrid
should be validated while attempting to navigate to the previous/next
property.

Closes #19315.
2021-12-04 12:18:20 +01:00
Vadim Zeitlin
552c9dd4ff Fix wxMSW wxDateTimePickerCtrl build with wxUSE_UNICODE_UTF8
Don't use the ternary operator as t_str() doesn't return a pointer in
this build configuration.

Also remove outdated (and maybe even wrong) comment about MinGW headers,
as it's better to use a temporary variable just to avoid writing the
cast explicitly anyhow.

Closes #19338.
2021-12-03 15:49:30 +01:00
novak
cb3f8f3a5c Fix printing framework compilation with wxUSE_VALIDATORS=0
Include wx/textctrl.h, required here because wxTextCtrl is used as the
base class of wxPrintPageTextCtrl, explicitly instead of relying on it
being implicitly included by something else, as it happens in the
default build but not when validators are disabled.

Closes #19337.
2021-12-03 15:46:43 +01:00
novak
c498d6d090 Fix wxBusyInfo compilation when wxUSE_MARKUP=0
Just use SetLabelText() instead of SetLabelMarkup() in this case, as
it's already done elsewhere.

Closes #19336.
2021-12-03 15:44:52 +01:00
Vadim Zeitlin
8311951f03 Don't use wxVector<T>::clear() when T is an incomplete type
At least the OpenVMS compiler doesn't like it and we can easily avoid
doing this by simply moving ClearExtraAccels() definition to the source
file.
2021-12-03 15:37:11 +01:00
Vadim Zeitlin
149db36bc8 Fix memset_s() compilation errors under macOS with some SDKs
Define __STDC_WANT_LIB_EXT1__ as early as possible to ensure that it's
defined before string.h is included by some other header without it.

Closes #19334.
2021-12-03 15:23:26 +01:00
Vadim Zeitlin
30fceb1d92 Merge branch 'define-use-svg-in-features.h'
Move wxUSE_SVG definition to wx/defs.h and work around OpenVMS
compilation problems.

See https://github.com/wxWidgets/wxWidgets/pull/2606
2021-12-03 15:20:51 +01:00
Vadim Zeitlin
35e97d9d50 Use wxDPIChangedEvent::ScaleX() for a horizontal coordinate
This doesn't really change anything as the scaling factor is always the
same in both directions currently, but is more consistent with the other
places where Scale[XY]() are used.

This slightly amends the changes of 3787f55a6b (Add
wxDPIChangedEvent::Scale() and use it in this event handlers,
2021-07-11).
2021-12-03 15:20:31 +01:00
Vadim Zeitlin
9e050fb1c5 Include NanoSVG headers before including (almost) any wx headers
OpenVMS C++ compiler can't compile NanoSVG headers after including
wx/unichar.h, so include them as soon as possible, i.e. right after
wx/wxprec.h but before anything else.

This commit is best viewed with --color-moved git option.
2021-12-02 15:31:04 +01:00
Vadim Zeitlin
882a339a48 Move wxHAS_SVG definition to wx/features.h
This is more consistent with the other wxHAS_XXXs and makes it possible
to only include wx/bmpbndl.h in bmpsvg.cpp if SVG support is indeed
available.
2021-12-02 15:25:06 +01:00
Vadim Zeitlin
aef263888b Merge latest Catch v1.x branch into our version
There should be no more changes on this branch, and the ones so far are
not very important, but still update to its final version just for
consistency.
2021-12-02 15:11:04 +01:00
Tobias Taschner
bbca67df67 Implement wxFSVolume for macOS
Implement with NSFileManager and NSURL to provide basic functionality
like on MSW. Icons are not implemented for macOS.
2021-12-01 23:35:19 +01:00
David Connet
83886bf18f Update install notes with instructions for building using Xcode
Notable document the special incantation needed by Xcode to use the
inherited environment variables.

Closes https://github.com/wxWidgets/wxWidgets/pull/2603
2021-12-01 23:28:38 +01:00
Vadim Zeitlin
419a97a791 Merge branch 'svg-file'
Add wxBitmapBundle::FromSVGFile() helper.

See https://github.com/wxWidgets/wxWidgets/pull/2600
2021-12-01 23:27:33 +01:00
Scott Talbert
82735e8612 Use wxSpinCtrl best size in wxGenericCalendarCtrl::DoGetBestSize
This fixes the wxGenericCalendarCtrl on wxGTK3 where the SpinCtrl is
much wider than on other platforms and should also ensure that the
control is always big enough in all locales under Mac.

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

Closes #11444.
2021-12-01 23:23:34 +01:00
Vadim Zeitlin
1ef8d1d48f Avoid warning about not supporting setAccessoryViewDisclosed:
We call it inside the check ensuring that it is supported, so suppress
this warning (introduced in the recent e765756555 (OSX file dialog
extensions (#2592), 2021-11-26)) by casting the receiver to the generic
type, just as it's already done elsewhere in wxOSX code.
2021-12-01 00:05:35 +01:00
Vadim Zeitlin
26c6273a70 Fix crash when setting wxGTK wxNotebook image after creation
The bug was introduced in 9d86ba11e2 (Add support for wxBitmapBundle to
wxGTK wxNotebook, 2021-11-07) after which wxGtkNotebookPage::m_image
remained uninitialized if the page didn't have an image initially, so
fix it by simply initializing this pointer to NULL in this case.

It would arguably be better if wxGtkNotebookPage initialized all its
members in the ctor, but for now just fix the critical bug.

Closes #19332.
2021-11-30 18:13:21 +01:00
Paul Cornett
1c752e24f1 doc typo 2021-11-29 08:54:41 -08:00
Paul Cornett
982a030705 Remove some incorrect ifdefs from wxGenericTreeCtrl
It's clear from the change history (relevant commits listed below) that these
are leftovers from code that is long gone.

ccdbdc8936 (Added native selection rectangle drawing., 2006-11-11)
05d9753817 (Just use the already existing wxRenderer::DrawItemSelectionRect(), 2006-11-14)
a4609ab847 (Implement wxRendererMac::DrawItemSelectionRect and move the generic wxTreeCtrl to using it to draw selected items., 2006-11-19)
2021-11-29 08:53:23 -08:00
Vadim Zeitlin
a65e5f4c1d Explain better how to add data files to a sample
Also don't duplicate this information in both how-to-add-new-sample.md
and how-to-add-files-to-build-system.md, just reference the former in
the latter instead.

Also fix some Markdown markup.
2021-11-29 13:58:52 +01:00
Vadim Zeitlin
1a0eeed0a8 Ignore commit only removing white space for git blame purposes
That commit didn't really change anything, so it's annoying to have the
changes be attributed to it.
2021-11-29 13:58:52 +01:00
Vadim Zeitlin
2435ceb2bb Add a possibility to show SVG images to the image sample too
This is useful at least for demonstrating wx SVG support.
2021-11-29 12:55:22 +00:00
Vadim Zeitlin
8adfaa37f7 Add wxBitmapBundle::FromSVGFile() helper
This is just a trivial wrapper for wxBitmapBundle::FromSVG(), but it can
still be convenient to have.
2021-11-29 12:55:22 +00:00
Vadim Zeitlin
5efcaf4e59 Fix copying testdata.fc file to the tests build directory
This file was listed in test.bkl but wasn't actually copied because the
value of <files> was overwritten by another <files> just below ever
since the changes of 21fe35aff7 (add wxImage test units to test loading
from both seekable and non-seekable streams, 2009-06-01).

Fix this by splitting this wx-data into 2 different ones, to avoid this
conflict.
2021-11-28 22:16:12 +01:00
Vadim Zeitlin
d14e035580 Fix uses of wxDEPRECATED in WXWIN_COMPATIBILITY_2_8-only code
wxDEPRECATED must be used for the entire declaration to really work,
but this wasn't the case for a few functions (and one typedef) guarded
by WXWIN_COMPATIBILITY_2_8, resulting in gcc -Wattributes warning about
the attribute being ignored and the declaration not being really marked
as deprecated.

Fix this by applying the deprecation macro to the entire declaration,
which works well for gcc and should hopefully work for MSVC too.
2021-11-28 21:42:06 +01:00
Artur Wieczorek
9febbe2b30 Explicitly cast AutoHRGN to HRGN to unify types in the statement
This seems to be required by MinGW compiler.
2021-11-28 19:32:02 +01:00
Paul Cornett
03706e9fef Fix build with WXWIN_COMPATIBILITY_2_8==1
Use wxBitmapBundle to avoid wxToolBar::AddTool() ambiguity
2021-11-28 08:48:50 -08:00
Paul Cornett
9a40669aad Fix build with WXWIN_COMPATIBILITY_2_8==1
Reverts what seems to be an unintentional change from
5ae30d2fbe (Use wxBitmapBundle() instead of wxNullBitmap as default value, 2021-11-12)
2021-11-28 08:44:13 -08:00
Artur Wieczorek
fc6bfbc0bf Add tests of clipping regions with wxDC with RTL layout enabled 2021-11-28 17:05:34 +01:00
Artur Wieczorek
288b208a0a Fix setting clipping region for wxDC with RTL enabled (wxMSW)
It turns out that region being added to DC with enabled RTL layout needs
to be defined using mirrored device x-coordinates.
So if we have DC with RTL layout we need to create a temporary mirrored
region and pass it to the DC instead of the original one.

Closes #19325.
2021-11-28 17:04:26 +01:00
Paul Cornett
b04c1ace47 Avoid integer overflow when computing image data size in wxImage::Create()
See #19326

Co-Authored-By: David Costanzo <david_costanzo@yahoo.com>
2021-11-27 17:14:28 -08:00
utelle
deef116a09 Update language database and move support for it to wxUILocale
Update the language database from the canonical sources:

- It now includes most locales supported by Windows 10.
- It now also has the following attributes for each entry:
 - BCP 47-like locale tag.
 - Reference to canonical name for generic language entries.
 - Language name in this language itself.
- Also add data file with list of language script identifiers and
  aliases based on ISO 15924.
- And update genlang.py to handle all the new attributes and data.

Also move database-related methods of wxLocale to wxUILocale and
just redirect wxLocale methods to the new wxUILocale ones (they are
still preserved for compatibility).

Closes https://github.com/wxWidgets/wxWidgets/pull/2594
2021-11-27 17:44:20 +01:00
utelle
1a4a0eee48 Update German translation of internat sample
See https://github.com/wxWidgets/wxWidgets/pull/2594
2021-11-27 17:44:20 +01:00
Stefan Csomor
e765756555
OSX file dialog extensions (#2592)
Re-introduce OpenSavePanelDelegate for filtering when wildcard is provided (Spotlight search field was not working correctly, if extension was not known)
(and on macOS 10.11 allow programmatically showing the extra panel)

see http://www.github.com/wxWidgets/wxWidgets/pull/2592 and https://trac.wxwidgets.org/ticket/19324

co-authered-by: Jeff Young <jeff at rokeby dot ie>
2021-11-26 22:26:49 +01:00
Vadim Zeitlin
c5f023a829 Fix wxGTK1 build after wxBitmapBundle changes in wxStaticBitmap
This should have been done in 3abec9254f (Take wxBitmapBundle in
wxStaticBitmap::SetBitmap(), 2021-10-21) but was forgotten there.
2021-11-26 18:31:19 +01:00
Vadim Zeitlin
7ba71ecaa2 Merge branch 'size-div-double'
Add operator/(wxSize, double) and cleanup some wxSize and related tests.

See https://github.com/wxWidgets/wxWidgets/pull/2593
2021-11-25 15:16:53 +01:00
Simon Rozman
e3535d6481 Mark MSVS *.vcxproj.filters files as using CR LF as well
For consistency with *.vcxproj and *.sln and for making
check_mixed_eol.sh happy.

Signed-off-by: Simon Rozman <simon@rozman.si>
2021-11-24 12:13:12 +01:00
Stefan Csomor
f9234531a2 initial commit of newly generated xcode project files 2021-11-22 19:41:56 +01:00
Stefan Csomor
8cae66a897 adding bundle identifiers, needed for newer systems 2021-11-22 18:49:18 +01:00
Stefan Csomor
b4c028ec82 adding workspaces 2021-11-22 18:13:03 +01:00
Stefan Csomor
1643887948 updating gitignore, adding workspace to wxcocoa_in 2021-11-22 18:03:06 +01:00
Stefan Csomor
5377d45d48 adding workspace template files 2021-11-22 18:01:32 +01:00
Artur Wieczorek
fb5be73f6f Change accelerator key for "toggle layout" menu item
Current Ctrl-L is already used by another menu item.
2021-11-22 10:54:41 +01:00