Commit graph

74997 commits

Author SHA1 Message Date
Vadim Zeitlin
00960b40b9 Replace obsolete AC_TRY_XXX macros with AC_XXX_IFELSE
No real changes, just avoid warnings from autoconf 2.71 when
regenerating configure.

Note that double brackets must be used around any code using brackets to
preserve them during the expansion.
2023-07-24 00:11:23 +02:00
Vadim Zeitlin
04f7e0664b Replace AM_PATH_GTK_N_0() macros with use of PKG_CHECK_MODULES()
There is no reason not to use pkg-config nowadays and this allows to get
rid of some third-party m4 files, which is always nice, and avoids
warnings about GTK 3 and 4 macros being obsolete when regenerating
configure with autoconf 2.71.
2023-07-24 00:00:18 +02:00
Vadim Zeitlin
45ab9f5646 Replace obsolete AC_PROG_CC_C99 with just AC_PROG_CC
No real changes, the macros are identical, but AC_PROG_CC_C99 warns
about it being obsolete.
2023-07-24 00:00:03 +02:00
Vadim Zeitlin
e34b5c5adc Remove unused m4 files and regenerate aclocal.m4
Some of autoconf macros are not used any longer, so get rid of them.
2023-07-23 23:59:57 +02:00
Vadim Zeitlin
57c71a4547 Only include Scintilla libraries in wx-config --libs if needed
Don't always output -lscintilla and -llexilla in wx-config --libs, as
they are not needed unless linking with wxstc library is requested but
204bc3c887 (Fix linking of wxscintilla in static monolithic build,
2017-12-06) added them unconditionally.

Improve this by putting them in a separate WXCONFIG_STC_LIBS instead of
WXCONFIG_LIBS used for all libraries (even wxbase, which is wrong on its
own).

Also see #23643.
2023-07-23 02:35:53 +02:00
Vadim Zeitlin
97546a6f0c Really fix wxProcessDialog size when the message length changes
Ensure that we only increase the dialog width but never decrease it to
prevent the dialog from jumping annoyingly to different size with each
label change.

The previous attempt to do this in 4101849b4d (Grow
wxGenericProgressDialog automatically if needed, 2017-10-27) didn't work
because it seemingly didn't take into account the fact that wxStaticText
width changes when its label changes and so calling SetLabel() could
make it smaller, meaning that the next update would call Fit() again.

So fix this by preventing the control from changing its size by using
wxST_NO_AUTORESIZE and then only resizing it manually if it really needs
more space.

See #10624, #23727.
2023-07-22 22:58:55 +02:00
Vadim Zeitlin
22a3a2fa66 Link to "getting the sources" from wxGTK build instructions
This should help people who check out the repository without submodules.

It's a bit circular, as the target of the link links back to this page
itself, but doing anything else would require much deeper reorganization
that can't be done now.

Closes #23683.
2023-07-21 20:57:12 +02:00
Vadim Zeitlin
94cd26ed0a Improve RUNTIME_LIBS build option documentation
State upfront that it only works with MSVC and also don't mention
msvcrt.dll not used any more since a couple of decades.

See #23715.
2023-07-21 20:40:43 +02:00
Scott Talbert
8b83e45f0e Check building samples out of tree in a CI job
Fixes: #23722

Closes #23723.
2023-07-21 20:38:37 +02:00
Vadim Zeitlin
b6ea233845 Fix missing "net" library in webrequest makefile.unx
"base" library must always come last in the samples bakefiles as the
list of wx libraries to link with is generated when processing it, so
putting the "net" library after it had no effect.

See #23723.
2023-07-21 20:37:00 +02:00
Aulddays
a3b0a839d6 Fix wxXRC LoadBitmapFromFS() when wxUSE_FILESYSTEM==0
Use correct parameter name "path" instead of "name".

Closes #23724.
2023-07-21 20:25:34 +02:00
Vadim Zeitlin
44e857c012 Explicitly disable some level 4 warnings in Windows SDK headers
Some level 4 warnings are somehow not disabled by switching to level 1,
so disable them explicitly.

Closes #23716.
2023-07-20 15:29:06 +02:00
Scott Talbert
aef7df6c9f Read Linux distribution info from os-release file
The Linux distribution community has somewhat deprecated the lsb_release
utility and has standardized on a new file, os-release, that can be
simply parsed to get the same information.  Attempt to read this file in
/etc/os-release, then /usr/lib/os-release, and finally, fall back to
using the lsb_release utility if neither of those files are found.

See: https://www.freedesktop.org/software/systemd/man/os-release.html
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2184391

Closes #23712.
2023-07-20 15:24:35 +02:00
Vadim Zeitlin
ed7f5a671c Fix wxDateTimePickerCtrl arrows redrawing with WS_EX_COMPOSITED
This is similar to 79567c83f4 (Fix wxSpinButton redrawing when using
WS_EX_COMPOSITED, 2023-07-08) and does the same thing for the spin part
of the date time picker control.

See #23656.

Closes #18231.

Closes #23705.
2023-07-20 15:20:51 +02:00
Vadim Zeitlin
340320d63c Fix using system libtiff installed in non-standard location
Add the required CFLAGS (such as the path to libtiff headers if they are
not in one of the system directories) to CXXFLAGS, not CFLAGS, as we're
using libtiff from C++ code.

This fixes a problem introduced in b9fe8ca10c (Try to use pkg-config for
detecting libtiff in configure, 2018-12-12).

Closes #23702.

Closes #23703.
2023-07-20 15:19:03 +02:00
Vadim Zeitlin
0a1b92fd31 Merge branch 'fix-samples-out-of-tree-build'
Fix building some samples in out of tree build.

See #23701.

Closes #23700.
2023-07-20 15:16:09 +02:00
Vadim Zeitlin
626f781840 Link penguin OpenGL sample with GLU too when building out of tree
This sample is the only one to use a GLU function too.

It would probably be better to drop GLU dependency entirely, but until
this is done (see #23721), do link with it.

This commit is best viewed ignoring whitespace-only changes.
2023-07-20 15:14:10 +02:00
Martin Corino
4d76a87015 Make wxSearchCtrl inherit from wxTextEntry in all ports
Previously it only inherited from wxTextEntryBase in the generic
implementation (used e.g. in wxMSW).

Update the code, documentation and add new unit tests checking that
wxSearchCtrl member functions inherited from wxTextEntry behave
correctly.

Closes #23686.

Closes #23697.
2023-07-20 14:46:41 +02:00
Stefan Csomor
52a11a3a9d Remove obsolete wxOSX_USE_EXPERIMENTAL_FONTDIALOG build setting
Always turn native font dialog on and remove the never used old version.

Closes #23695.
2023-07-20 14:42:39 +02:00
Vadim Zeitlin
829fe8154b Allow "feature" attribute in XRC schema
This is just a hack because we handle "feature" as part of "platform"
when it's not really related to it, but as it has to be treated in the
same way, it's the simplest way to allow it.

This should also have been done in 3fdebc96cd (Add support for XRC
"feature" attribute, 2023-01-29) but was forgotten there.
2023-07-19 01:58:40 +02:00
Vadim Zeitlin
0ab31edc17 Use flags required for using GTK in widgets sample
As we use GTK directly in this sample, we need to use the appropriate
compiler and link flags, so add them depending on the port in the
makefile.
2023-07-11 13:40:23 +02:00
Vadim Zeitlin
2e22666db8 Compile Cocoa control example in Unix "widgets" sample makefile
Previously this was never done, as we couldn't determine if we were
using Cocoa or not at generation time, but we can determine it in the
makefile itself.
2023-07-11 13:40:21 +02:00
Vadim Zeitlin
c9c213553a Exclude some bakefiles from Whitespace code check too
Add a couple of .bkl files containing TABs in the embedded make
fragments to the list of files skipped by the whitespace check.
2023-07-11 13:39:13 +02:00
Vadim Zeitlin
033dfd2d68 Don't use GUI settings for "archive" sample
This samples used "wx_append" in its bakefile, but should be using
"wx_append_base", as it's a console application.

This fixes its build with makefile.unx, as wxUSE_GUI wasn't properly
defined as 0 before.
2023-07-11 01:59:19 +02:00
Vadim Zeitlin
db785155aa Link OpenGL samples with GL library under Unix
This is not needed when building as part of the build tree, as it's
already part of EXTRALIBS_OPENGL then, but is required when building the
samples against installed libraries.

This commit is best viewed ignoring whitespace-only changes.
2023-07-10 19:47:14 +02:00
Vadim Zeitlin
121631514c Fix building non-GUI samples out of tree
Define wxUSE_GUI=0 for them.
2023-07-10 19:37:21 +02:00
Vadim Zeitlin
44b99195bc Merge branch 'msw-spin-appearance'
Fixes for wxSpinCtrl appearance in wxMSW.

See #23696.
2023-07-10 16:37:34 +02:00
Vadim Zeitlin
6bd2b6b4db Revert "Move Cygwin __USE_W32_SOCKETS definition to wxMSW-specific file"
This reverts commit 0f2b8a2065 as it broke
Cygwin build due to problems with fd_set definition.

Closes #23674.
2023-07-09 17:05:09 +02:00
Vadim Zeitlin
1dafca9e1d Remove "automatic" dark mode support
This commit reverts cb85871831 (Add MSWShouldUseAutoDarkMode() and use
it for wxSpinButton, 2022-12-07) as, contrary to the expectations of
this commit, other controls didn't use this function and even
wxSpinButton itself doesn't need it any more after the changes of the
parent commit, which were required because automatic support was not
flexible enough.
2023-07-08 23:00:43 +01:00
Vadim Zeitlin
595e2f9326 Tweak wxSpinCtrl appearance in dark mode
Previously wxSpinButton using a buddy control had borders which were
much too bright in the dark mode. Now the entire border is perhaps a bit
too dark, but it's still better than before.
2023-07-08 23:00:43 +01:00
Vadim Zeitlin
68666d929d Invert wxSpinButton in dark mode in its own OnPaint()
This doesn't change anything yet, as the same thing was done by wxWindow
by default thanks to the overridden MSWShouldUseAutoDarkMode(), but this
will be easier to customize in the upcoming commits.

This commit is best viewed ignoring whitespace-only changes.
2023-07-08 23:00:10 +01:00
Vadim Zeitlin
79567c83f4 Fix wxSpinButton redrawing when using WS_EX_COMPOSITED
Explicitly redraw it ourselves instead of relying on DefWndProc() to do
it, as with 15e4f5b (Work around wxListCtrl repainting problems with
WS_EX_COMPOSITED, 2023-06-05) which did the same thing for wxListCtrl,
doing it seems to be enough to make the control draw correctly.

Closes #23656.
2023-07-08 23:00:10 +01:00
Vadim Zeitlin
0130a066df Make section comments in wxSpinButton more accurate
No changes whatsoever, just improve the comments to correspond to the
actual functions under them.
2023-07-08 20:15:38 +01:00
Vadim Zeitlin
83f5b6f3c6 Remove unnecessary wxSpinButton::MSWCommand()
This function did nothing, which was already exactly what the base class
version did too.
2023-07-08 20:13:44 +01:00
Vadim Zeitlin
dc7f934fb3 Don't use wxBORDER_SUNKEN for wxSpinCtrl in dark mode
This applies the change done in f5dd5eaf19 (Use darker border in wxMSW
dark mode by default, 2023-06-16) for all the other controls to
wxSpinCtrl too, as it still explicitly used wxBORDER_SUNKEN.

The border around the text part of the control is now correct, but it
looks even uglier in the dark mode due to a completely wrong border
being used around the spin button -- but this will be addressed by the
upcoming commits.
2023-07-08 19:52:57 +01:00
Vadim Zeitlin
37118da5f9 Don't give spin button used in wxSpinCtrl any border
This doesn't actually seem to change its appearance, but using border
for it doesn't make sense, so don't do it -- and explain it, to avoid
confusion.
2023-07-08 18:44:36 +01:00
Martin Corino
a5c0a81798 Make UIActionSimulator work under macOS by adding extra delay
This isn't very elegant but seems to be the only way to make this class
work under macOS at all.

Closes #23692.
2023-07-08 17:09:06 +02:00
Martin Corino
548086b20c Derive wxFontDialog from wxFontDialogBase in wxOSX too
This notably ensures that wxFontDialog has const GetFontData() accessor
in this port too, as was already the case in the other ones.

Closes #23691.
2023-07-08 17:06:50 +02:00
ollydbg
25ff038c80 Remove unnecessary variable in dataview sample
No real changes, just simplify the code.

Closes #23687.
2023-07-08 01:28:00 +01:00
Patriccollu
86e394beb2 Update Corsican translations
Closes #23690.
2023-07-08 00:38:13 +02:00
Kaya Zeren
3d5354831b Update Turkish translations
Turkish translation updates and refinements.

Closes #23688.
2023-07-08 00:37:39 +02:00
Vadim Zeitlin
d1ee86df3c Merge branch 'gcc-wextra'
Enable -Wextra for the Unix CI builds after fixing all the existing
warnings.

See #23662.
2023-07-08 00:36:47 +02:00
Stefan Ziegler
e35257d2b6 Fix possible crash in wxWindowsPrintNativeData initialization
If the printer name is specified, avoid fall back to the default printer
via the use of PRINTDLG, as the default printer DEVMODE may be
incompatible with that of the printer we're actually going to use and
could possible result in a crash if their size differs.

Use a temporary printer if necessary to retrieve the correct DEVMODE for
the given printer name.

Closes #23685.
2023-07-08 00:30:04 +02:00
Vadim Zeitlin
78760c3538 Enable -Wextra for the CI builds
Try detecting more warnings that can be useful when building the
library.

Don't use -Wextra with gcc 4.8 which generates several completely
spurious warnings not generated by later compiler versions and which are
not worth fixing/working around.
2023-07-04 02:19:14 +02:00
Vadim Zeitlin
e802eaa44d Suppress a warning for g_object_ref_sink() use in widgets sample
The glib macro always triggers this warning when -Wextra is on, so we
have no choice but to suppress it.
2023-07-04 02:19:14 +02:00
Vadim Zeitlin
4040e35f41 Use wxEVENT_HANDLER_CAST() in socket sample
This macro avoids a -Wcast-function-type from gcc 8+.
2023-07-04 02:19:07 +02:00
Vadim Zeitlin
008e72c3ac Avoid using implicit assignment operator in wxAny test
This implicitly declared operator is deprecated because MyClass has an
explicitly defined copy ctor, so we either need to define the assignment
explicitly too or just not use it at all, as done by this commit.
2023-07-04 02:08:32 +02:00
Vadim Zeitlin
b6d082a7a6 Suppress warning in tests checking legacy Connect()
This code can't be modified as it tests for compatibility with the
existing code of this form, so just disable the warnings it now triggers
with -Wextra.
2023-07-04 02:08:32 +02:00
Carlo Bramini
590cd0bd18 Fix linking with EGL under Cygwin in CMake builds
Link with OPENGL_egl_LIBRARY if OpenGL::EGL is not defined.

Closes #23673.
2023-07-04 01:37:15 +02:00
Vadim Zeitlin
9952af8e93 Define explicit copy ctor for classes with assignment operator
This avoids clang -Wdeprecated-copy enabled by -Wextra when building the
test.
2023-07-04 01:29:51 +02:00