QtSet{Min,Max}Size() were added for use by Set{Min,Max}Size() and
DoSetSizeHints() overrides. and since we have canceled overriding
Set{Min,Max}Size() in previous commit, there is no need to keep them
around without good reason.
This partially reverts commit 3c68696 (Make wxTopLevelWindow::SetSizeHints()
work in wxQt) because it breaks some wxSizer tests. and more importantly, it
breaks the documented behaviour of SetMinSize() which says:
Notice that calling this method doesn't prevent the program from making the
window explicitly smaller than the specified size by calling SetSize(), it just
ensures that it won't become smaller than this size during the automatic layout.
Also make it clear that wxCHOICE_{HEIGHT,WIDTH} constants are not really
used for anything.
Closes#23949.
Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>
Mark it as deprecated in the documentation without deprecating it
formally in the code, as it seems to be used in some existing code and
there is no urgency to remove it, but using it in new code still doesn't
make any sense.
Closes#23945.
The check for the line being deleted being in the visible range
prevented us from refreshing anything at all if the line which was just
deleted was the last line of the control.
When the wxWidgets sources are in a path containing '++', CMake would
show errors on the command line:
[cmake] RegularExpression::compile(): Nested *?+.
[cmake] RegularExpression::compile(): Error in compile
This happens because the full path was interpreted as a regular
expression when creating the source_groups. Without wxSOURCE_DIR the
regular expressions still match and create correct source groups, so
remove it.
Closes#22738.
Closes#23943.
Remove any remaining mouse messages from the input queue after showing
the file dialog because they somehow remain after it is destroyed and
could be processed by the application once wxFileDialog::ShowModal()
returns, resulting in phantom events being processed by the controls
that just happen to be under the button of the file dialog that was
clicked to close it.
Closes#10924, #23944.
Testing for the alpha channel support was a mistake because it is
completely common to initially have a bitmap without an alpha channel (
in which case HasAlpha() returns false ) and Qt correctly converts it to
an appropriate format when the mask is set.
Should have been part of 1e43b37 (Added QtBlendMaskWithAlpha() to
wxBitmap under wxQt).
Closes#23937.
We need to set the window type hint to COMBO in order to use a popup
window for it under Wayland and while not doing it seems to still work
with GNOME/mutter, it is required with the other compositors such as KDE
Plasma or Sway and doesn't seem to do any harm under GNOME, so do it
always and hope that it doesn't result in any problems with not
combobox-like popups.
This basically undoes 62d934aab8 (Don't set HINT_COMBO as wxPopupWindow
is used for different windows as well, 2008-10-07).
See #23931.
Closes#23908.
Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
Wait for a bit before checking for the expected event as a single
wxYield() call might apparently not be enough under load, as this test
sporadically fails in AppVeyor CI builds even though it passes locally.
Don't dereference sm_abortWindow without checking that it is non-null in
wxAbortProc(): even though it's not supposed to happen, it still somehow
does, apparently, so just log a debug message instead of crashing in
this case.
Closes#23927.
Change wxTreeCtrl style for a control used by wxGenericDirCtrl so that
wxGenericDirCtrl looks more like the folder view in File Explorer (but
still don't show expanders for root-level items).
Also update wxGenericDirCtrl screenshot in the docs.
See also 6caaf58 (Use more modern appearance for wxMSW wxTreeCtrl by
default, 2023-09-30).
Closes#23922.
The new function only returns true if the catalog could be really
loaded and not if it is considered not to be needed because the message
ID language (which is typically "en-US") happens to be present in the
preferred UI languages list (which seems to always include "en-US" in at
least Western European MSW).
This allows to distinguish, albeit in a rather awkward (but
backwards-compatible) way between having a translation for the given
language and not needed such translation.
It is still not clear if it is really correct to return "en-US" from the
list of preferred languages even if the user has never intentionally
configured the OS to indicate that English is acceptable, but at least
now we can work around this issue and use AddAvailableCatalog() in
AddStdCatalog() to make sure we only skip loading unversioned wxstd.mo
if the versioned wxstd-x.y.mo file is really found instead of never
doing it, as was the case until now (see #23886).
Also add GetBestAvailableTranslation() helper which seems more useful
than the existing GetBestTranslation() one and is similarly related to
it.
See #18227.
This test sporadically fails under AppVeyor, perhaps due to a hard-coded
sleep in it which may somehow misbehave there -- try changing it not to
rely on this sleep.
This has a nice side effect of making the test run faster, too.
Setting full size of the dialog before showing it doesn't work, but
setting its client size does.
It could be better to change wxWindow::Fit() itself to do this, but this
might have other effects, while this change should be pretty safe, i.e.
not break anything for the other platforms while fixing a big usability
problem with wxGTK/Wayland: as this dialog is not resizeable, making it
too small initially, as happened before, meant that parts of it couldn't
be used at all.
We can just use std::unique_ptr<> now as it can be stored in the vector
in C++11, unlike before.
Also use range-for loop instead of dealing with iterators.
This allows to suppress some or all GTK diagnostics even for the
programs not calling GTKSuppressDiagnostics() nor even
GTKAllowDiagnosticsControl() themselves.
Restore the correct message which was erroneously modified by the
changes of 4f4c5fcfdf (Use nullptr instead of NULL in the code and
documentation, 2022-10-16).
This got broken by the addition of GTKAllowDiagnosticsControl() in
8af645ed22 (Fix crash when using wxNotebook with glib 2.73 or later,
2022-08-29) as not calling it resulted not only in preventing wx code
from installing its own log function implicitly, but also prevented
explicit calls to GTKSuppressDiagnostics() from working neither.
Fix this by calling GTKAllowDiagnosticsControl() automatically from
GTKSuppressDiagnostics() itself.
Use older and so hopefully compatible with all MinGW versions
PathMatchSpec() instead as we don't use any of the newer function flags
and it seems to behave identically with the default flag.
Improve consistency of checkboxes in wxListCtrl between virtual and
report mode, and between the generic and MSW implementation, see #23869.
Also disable WS_EX_COMPOSITED for virtual wxListCtrl because it
generates an endless stream of cache events, see #23878.
See #23890.
wxAUI has a special window "wxTabFrame" for which GetHandle() returns nullptr.
This is a problem because this commit 3c68696 (Make wxTopLevelWindow::SetSizeHints()
work in wxQt) doesn't account for the rare situation in which a wxWindow is actually
created without the underlying handle, resulting in a crash when we try to call
Set{Min,Max}Size() for this type of windows.
Closes#23920.