Commit graph

74984 commits

Author SHA1 Message Date
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
Vadim Zeitlin
0f73473ae6 Update Scintilla submodules to avoid warnings with -Wextra
No real changes, just suppress some warnings (that we don't really care
about as we won't be fixing warnings in 3rd party code anyhow).
2023-07-04 01:25:03 +02:00
Vadim Zeitlin
41b61aad59 Initialize base class in copy ctor in the other ports too
This was already done in wxGTK, do it in wxX11 and wxQt too as not doing
it triggers a (not very useful, but not completely specious) warning
when -Wextra is in effect.
2023-07-04 01:24:43 +02:00
Vadim Zeitlin
3b0aecf254 Disable missing initializers warnings in wxGTK webview code
Just suppress the warnings, this is better than specifying useless
initializers.
2023-07-03 21:25:48 +02:00
Vadim Zeitlin
b692eaa112 Avoid missing initializer warnings in wxrc
Just suppress the warnings because adding all the missing initializers
would make the command line initialization less readable for no real
gain.
2023-07-03 20:55:18 +02:00
Vadim Zeitlin
6881109a22 Avoid always true comparison in wxThread::SetPriority()
Don't compare unsigned priority value with wxPRIORITY_MIN which is 0,
this is useless and results in -Wtype-limits enabled by -Wextra.
2023-07-03 20:55:18 +02:00
Vadim Zeitlin
c2de3b1a5e Rewrite generic wxPaletteRefData to use vector
Don't bother with manual memory allocation of palette entries, just
store them in a vector.

No real changes.
2023-07-03 20:55:18 +02:00
Vadim Zeitlin
4ff436ecc1 Fix xkb_rule_names struct initializer
Use "{}" to initialize all struct fields to the default values instead
of "{0}" which only initializes the first of them.

This also fixes a warning given when building with -Wextra.
2023-07-03 20:51:09 +02:00
Vadim Zeitlin
aa77eb91b0 Add new test GIF image to CMake builds too
This should have been done in c2e5749443 (Fix crash when reading
truncated GIF image, 2023-07-02), but was forgotten there -- so do it
now, and add a comment reminding not to forget it the next time.

See #23409.
2023-07-03 20:20:52 +02:00
Reza Karimi
a9d2a14090 Invalidate wxOwnerDrawnComboBox best size after adding new items
The previously computed best size may become invalid after inserting new
items, so forget it.

Closes #23681.
2023-07-03 20:18:17 +02:00
Stefan Hansson
b84b45161a Implement wxRB_SINGLE support in wxGTK
Create hidden radio button in wxGTK when using wxRB_SINGLE, as
this lets us deactivate the shown button by activating the hidden one.
GTK does not allow deactivating radio buttons by calling them with
gtk_toggle_button_set_active( ..., FALSE), so we need to work around
it like this.

Also update the documentation to mention that this works in wxGTK now.

See #17022.

Closes #23652.

Closes #23677.
2023-07-03 20:14:32 +02:00
Vadim Zeitlin
c3bc4c16c5 Merge branch 'fix_no_intl_no_radiobtn' of https://github.com/matyalatte/wxWidgets
Fix compilation errors when wxUSE_INTL or wxUSE_RADIOBTN is off.

See #23663.
2023-07-03 20:05:49 +02:00
Vadim Zeitlin
39045e1ce5 Ignore keys with modifiers in wxNumValidatorBase
This allows to use accelerators, such as Alt-X, when the focus is on a
key control using numeric validator in wxGTK.
2023-07-02 22:43:15 +02:00
Vadim Zeitlin
67f634dfc4 Don't normalize the value of empty text control on focus loss
This is unexpected, as just TAB-bing in and out of the control changes
its value since the recent changes to wxNumValidator.
2023-07-02 22:40:42 +02:00