72830 Commits

Author SHA1 Message Date
Simon Rozman
0ba58ce8aa Merge tag 'v3.1.7'
Some checks failed
Unix builds / Ubuntu 20.04 wxGTK with ASAN (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK3 static (push) Has been cancelled
Unix builds / Ubuntu 20.04 wxGTK ANSI (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 3 STL (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 2 UTF-8 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxMotif (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxQt (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxX11 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 2 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 3 with clang (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxDFB (push) Has been cancelled
CMake builds / macOS 10.15 wxOSX (push) Has been cancelled
CMake builds / Windows MSVC (push) Has been cancelled
CMake builds / macOS 10.15 wxIOS (push) Has been cancelled
CMake builds / Ubuntu 18.04 wxGTK 3 (push) Has been cancelled
Mac builds / wxMac ARM C++11 STL (push) Has been cancelled
Mac builds / wxMac Universal C++14 (push) Has been cancelled
Mac builds / wxiOS (push) Has been cancelled
Mac builds / wxMac macOS 10.15 (push) Has been cancelled
Mac builds / wxMac Intel C++17 (push) Has been cancelled
Mac Xcode builds / iOS static Debug (push) Has been cancelled
Mac Xcode builds / iOS Simulator static (push) Has been cancelled
Mac Xcode builds / macOS dynamic Release (push) Has been cancelled
MSW builds / wxMSW vs2022 DLL Debug x64 (push) Has been cancelled
MSW builds / wxMSW vs2019 DLL Release x64 (push) Has been cancelled
MSW builds / wxMSW vs2019 Debug Win32 (push) Has been cancelled
MSW cross-builds / wxMSW 64 bits (push) Has been cancelled
MSW cross-builds / wxMSW 32 bits (push) Has been cancelled
Code Checks / Check Spelling (push) Has been cancelled
Code Checks / Check Whitespace (push) Has been cancelled
Code Checks / Check Mixed EOL (push) Has been cancelled
Update Documentation / Update Online Documentation (push) Has been cancelled
2025-11-04 10:41:41 +01:00
Vadim Zeitlin
7ad1bffa87 Merge branch 'pre-3.1.7-updates'
Update release-related files for 3.1.7.

See #22490.
2022-06-06 16:23:45 +02:00
Vadim Zeitlin
53e08d36ff Add wxPopupTransientWindow wxOSX fix to the change log 2022-06-06 16:23:26 +02:00
Vadim Zeitlin
ec903e0f79 Update MSYS2 MinGW version to 12.1.0
This is the currently used version that will be used for the next
release.
2022-06-06 15:41:01 +02:00
Stefan Csomor
8b8c6f8af6 fixing popup-window behaviour on mac
fixes #19229, on macOS the FindFocus code which was in popupcmn before, returned the focused control on the parent window, and since that one was getting a focus lost once something got clicked on the popup, the popup was immediately dismissed …
2022-06-06 13:07:06 +02:00
Vadim Zeitlin
b87ad8a51c Update release documents for 3.1.7 release
Set release date for 2022-06-06, update versions and lists of changes in
various places.
2022-06-05 20:54:21 +02:00
Vadim Zeitlin
58f7dade1d Copy the changes in 3.1.7 from Git notes to the change log
Replace the comment explaining how the change log should be updated with
the result of actually doing just this.
2022-06-05 19:26:33 +02:00
Vadim Zeitlin
4b83ed83ec Merge branch 'tbar-bitmap-size'
Improve handling toolbar tools bitmap size.

See #22488.
2022-06-05 14:43:29 +02:00
Kvaz1r
3661975bf8 Fix memory leak in wxListBox destructor in wxUniv
wxItemContainer::Clear() must be called to actually free the client
data, and not just DoClear() (which will be called by the base class
Clear() too).

Closes #22489.
2022-06-05 14:40:28 +02:00
Vadim Zeitlin
35e982a67f Merge branch 'grid-dragmove'
Improve UI of dragging the wxGrid columns/rows to move them.

See #22457.
2022-06-05 13:39:35 +01:00
Vadim Zeitlin
31fee399ce Remove left over "#| msgid" comments
These comments are suggestions for the correct translations and are not
needed any longer after the translations had been updated to take them
into account.
2022-06-05 14:24:01 +02:00
Felipe
043ff97c91 Update Brazilian Portuguese translations for 3.1.7 2022-06-05 14:23:11 +02:00
Vadim Zeitlin
0f77418090 Merge branch 'more-icon-fixes'
More icon fixes in wxMSW: fix transparency in wxImageList and size in
wxArtProvider.

See #22487.
2022-06-05 13:16:19 +01:00
Vadim Zeitlin
56e4bb8bb4 Merge branch 'custom-file-dialog-controls'
Implement support for custom file dialog controls in new style MSW
dialogs.

See #22476.

Closes #14770.
2022-06-05 13:13:28 +01:00
Vadim Zeitlin
b5184ee539 Merge branch 'msw-gcdc'
Fix using wxGCDC with scrolled wxDC in wxMSW.

See #22485.
2022-06-05 13:12:24 +01:00
Vadim Zeitlin
72f851f6f4 Remove the size parameter of wxBitmapBundle::GetConsensusSizeFor()
It doesn't seem to be useful and wasn't really specified in 2 out of 3
existing calls to this function and was probably wrongly specified in
the remaining one, so just remove it for now, it can always be added
later if we decide what exactly should it do.
2022-06-05 03:23:41 +02:00
Vadim Zeitlin
e13b4f8833 Don't force fractional scale when toolbar bitmap size is given
The old code in wxToolBarBase::AdjustToolBitmapSize() forced the use of
the exact value of the requested bitmap size multiplied by the current
scale factor, which resulted in ugly bitmaps whenever fractional scaling
factor was used. It also used not immediately clear IncTo() call.

Simplify and improve it by handling the cases when we have a requested
bitmap size and we don't have it differently: if we do have it, just use
it directly, but only with an integer scale factor. And if we don't,
then simply use the bitmap size suitable for the current scale factor.

This seems to result in the most expected behaviour and, notably,
doesn't break the toolbar sample where the bitmap size can still be
toggled between small and big bitmaps on both normal and high DPI
monitors.

Also update the documentation: still recommend not to use
SetToolBitmapSize() at all, but don't claim that it forces fractional
scaling, as this is not the case any longer.
2022-06-05 03:23:03 +02:00
Vadim Zeitlin
907e4ea862 Add wxBitmapBundle::GetConsensusSizeFor(double) and test it
Add an overload of the existing function which can be easily tested in
the unit tests and add a trivial new test for it.
2022-06-05 03:06:10 +02:00
Vadim Zeitlin
b0ac00f359 Don't let parent frame handle wxLogFrame events
This doesn't make any sense and can prevent wxLogFrame menu items such
as "Save" from working if the parent frame defines an wxEVT_UPDATE_UI
handler for wxID_SAVE disabling it.

Closes #22486.
2022-06-04 23:25:47 +01:00
Vadim Zeitlin
e1b3d93f5a Allow upscaling 16x15 art bitmaps to multiples of 16x16 too
The default art provider has many icons of 16x15 size, suitable for use
in the standard-sized MSW toolbars (which nobody uses any more, but this
is not the point), so handle them specially and not only resize them to
16x16, which was already done as part of the normal logic here (in the
past this used to be handled specially too, but bd0db4a5f9 (Still resize
(16, 15) bitmaps to (16, 16) ones in wxArtProvider, 2022-02-05) changed
this), but also upscale them to 32x32 and other multiple-of-16 sizes by
resizing them to 16x16 first and then upscaling.

This makes the appearance of 16x15 and 16x16 icons consistent with each
other when showing them in bigger sizes in the resource browser dialog
of the artprov sample, which seems to be the right thing to do.

This commit is best viewed with Git --color-moved
--color-moved-ws=ignore-all-space options.
2022-06-04 23:15:01 +01:00
Vadim Zeitlin
054972e56b Fix adding icons with mask to wxMSW wxImageList
The changes of 6feeed9fe9 (Handle transparency to the best of our
ability in wxImageList, 2022-05-05) didn't handle the icons with mask
(and without alpha) correctly, as the native image list doesn't handle
the icon masks without ILC_MASK, so the masks were just ignored.

Fix this by handling icons as bitmaps: for them everything already works
and even it means extra unneeded conversions, it's much simpler than the
alternative of reimplementing GetImageListBitmaps() logic for the icons.

See #22349.
2022-06-04 23:02:49 +01:00
Vadim Zeitlin
34fa234f48 Merge branch 'bmpbndl-scaling'
Improve wxBitmapBundle scaling logic by limiting it to integer scaling
factors and ensure it's consistent for files and MSW resources.

See #22481.
2022-06-04 18:36:50 +01:00
Vadim Zeitlin
a8eaeb0276 Fix using wxGraphicsContext with scrolled wxDC in wxMSW
The changes of 4f9186f1a1 (Increase usable scrolling range in wxMSW by a
factor of 10,000, 2022-04-30) broke using wxGraphicsContext, and wxGCDC,
with scrolled wxDC, as GDI+ wasn't aware about the origin shift in it
any more, now that it's not done at MSW level any longer.

Fix this by shifting the origin before constructing the Graphics object
from HDC to restore the old behaviour.

Note that this means that the origin shift is still limited to 2^27
(instead of the full int range) when using wxGCDC, which is not ideal,
but better than breaking it completely (and when using wxGraphicsContext
directly, world transformation can, and should, be used to avoid this
limit).

Closes #22480.
2022-06-04 18:28:49 +01:00
Vadim Zeitlin
c66cd985dd Simplify wxGraphicsContext code by using wxDC::GetHDC()
No real changes, just use GetHDC() instead of reproducing what it does.
2022-06-04 17:37:45 +01:00
Vadim Zeitlin
b202dec93c Highlight the grid row/column being dragged on all platforms
Remove __WXGTK__ checks and highlight it everywhere, this can be useful
under other platforms too depending on the colour schema and not having
platform-specific checks is better than having them if they're not
absolutely required.

If we really want to avoid highlighting in some cases, we should check
for the contrast between the border and background colours, but it seems
to be much simpler to just always show it.
2022-06-04 16:17:10 +01:00
Vadim Zeitlin
583a9aa557 Use ternary operator instead of an "if"
No real changes, but calling wxRect::Deflate() once here with the value
depending on whether wxBORDER_NONE is used seems more clear in this
particular context.
2022-06-04 17:09:26 +02:00
Vadim Zeitlin
38dfcf05ab Handle non-default scale factor in wxBitmapBundleImplArt
The existing code only worked correctly if overridden
wxArtProvider::CreateBitmap() returned bitmaps with scale factor of 1,
but not for anything else.

Account for the bitmap scale factor when determining the default size
and available scales correctly to fix this.

Co-authored-by: Václav Slavík <vaclav@slavik.io>
2022-06-04 15:39:47 +01:00
Lauri Nurmi
83c6edcc32 Always call wxSecureZeroMemory() to wipe memory in wxSecretValue
Replaces a call to MSW native ::SecureZeroMemory(), and calls to plain
memset().
2022-06-04 15:14:09 +03:00
Vadim Zeitlin
c18486e81f Add support for custom comboboxes in wxFileDialogCustomize
Allow using simple (i.e. not editable) comboboxes, known as wxChoice in
wx API, in the dialog too.

Demonstrate their use in the dialogs sample.
2022-06-04 00:50:54 +01:00
Vadim Zeitlin
5e7b104248 Change the meaning of the radio buttons in the file dialog
No real changes, just rename the buttons to use paper size for
demonstrating something else.
2022-06-03 23:07:47 +01:00
Vadim Zeitlin
76ff441bf2 Demonstrate disabling radio buttons in the sample
Radio buttons are different from the other controls internally in
IFileDialogCustomize-based implementation, so check that disabling them
also works correctly.
2022-06-03 23:00:23 +01:00
Vadim Zeitlin
153a024492 Document the new wxFileDialog customization API
Explain its relationship to the old API and document the new classes.
2022-06-03 03:18:05 +01:00
Vadim Zeitlin
06232cd275 Make filters discussion a section in wxFileDialog documentation
Using a section looks better and prepares for adding another one in the
upcoming commit.

Also remove a note about Motif file dialog limitation, nobody cares
about it any more anyhow.
2022-06-03 01:41:30 +01:00
Vadim Zeitlin
23e9ac9d93 Fix spurious gcc warning about wxFileDialogMSWData dtor
Add unnecessary virtual dtor to this class just to avoid
-Wdelete-non-virtual-dtor from gcc (which is wrong here as this class is
never used polymorphically, i.e. never deleted via a pointer to its base
class).
2022-06-03 01:35:31 +01:00
Vadim Zeitlin
07d7dd19f8 Add support for custom radio button controls in wxFileDialog
Update the dialogs sample to show using them too.
2022-06-03 01:35:31 +01:00
Vadim Zeitlin
bf5ddc200b Improve extra controls support in wxGenericFileDialog
Update the extra controls whenever anything changes in the dialog to
make the example in the dialogs sample actually work with the generic
dialog (previously nothing was updated at all).

Also delete the extra controls earlier to make the behaviour more
consistent with the native dialogs.

Use the new customization API for the generic dialogs in the sample too.
2022-06-03 01:35:31 +01:00
Vadim Zeitlin
44b6ce4826 Implement sending events for generic custom wxFileDialog controls
Forward the events from the actual wxControls used in the generic
implementation of wxFileDialogCustomize to wxFileDialogCustomControl so
that they could be handled by the application code binding to them.
2022-06-03 01:35:31 +01:00
Vadim Zeitlin
64fb2b1202 Adjust size of custom wxStaticText in wxFileDialog to contents
This is more useful than just truncating the contents if the label is
set to a value longer than its initial one.
2022-06-03 01:35:31 +01:00
Vadim Zeitlin
8c87d90844 Fix using wxFileDialog geometry in custom controls event handlers
Keep wxFileDialog HWND valid until it's dismissed in order to allow any
operations involving the dialog geometry to work correctly while it's
shown, so that e.g. resizing windows from the custom controls event
handlers works.
2022-06-03 01:35:31 +01:00
Vadim Zeitlin
96bcd545a9 Support wxFileDialogCustomize when not using IFileDialog in wxMSW
This should be rarely needed, but it doesn't cost anything to support
the new customization API if IFileDialog is not available at either
compile- or run-time, as this just reuses the existing generic
implementation.
2022-06-03 01:35:31 +01:00
Vadim Zeitlin
ae16657426 Add generic implementation of wxFileDialogCustomize API
Add implementation of the new file dialog customization API in terms of
the old one for the non-MSW ports (or even wxMSW if IFileDialog can't be
used for whatever reasons).

Just map wxFileDialogFoo to the corresponding wxFoo.
2022-06-03 01:35:31 +01:00
Vadim Zeitlin
fdcaeb050f Move GetExtraControlSize() hack from wxFileDialogBase to MSW code
The hack with creating a dummy dialog just to get the size of the extra
controls is only used in wxMSW, so move it to MSW-specific file from the
common code.

To allow doing this there, add CreateExtraControlWithParent() helper,
which is still not really used anywhere else than in wxMSW, but at least
doesn't do anything particularly ugly and doesn't really penalize the
common code for wxMSW sins.

No real changes.
2022-06-03 01:35:31 +01:00
Vadim Zeitlin
f6a261468e Slightly change the logic of CreateExtraControl()
This will make it simpler to extend in the upcoming commits.

No real changes yet.
2022-06-03 01:35:31 +01:00
Vadim Zeitlin
096c4bf195 Remove unnecessary HasExtraControlCreator() check from wxOSX
There is no need to call this function, just call CreateExtraControl()
directly -- it will do nothing if there are no extra controls to create.

No real changes.
2022-06-03 01:35:31 +01:00
Vadim Zeitlin
751a73a2ca Add optional label to wxFileDialogCustomize::AddTextCtrl()
Creating a text with a label is a common operation and can be
implemented to look slightly better than AddStaticText() followed by
AddTextCtrl() without a label when using IFileDialog.
2022-06-03 01:35:30 +01:00
Vadim Zeitlin
095c4dfc94 Add event generation to MSW IFileDialog-based implementation
Inherit wxFileDialogCustomControl from wxEvtHandler to allow Bind()ing
to events on it and use this to handle wxEVT_BUTTON and wxEVT_CHECKBOX
in the sample.

And inherit from IFileDialogControlEvents in wxMSW code to actually
generate these events when they happen.
2022-06-03 01:35:30 +01:00
Vadim Zeitlin
359ab98cb2 Start adding new API for wxFileDialog customization
wxFileDialog::SetCustomizeHook() can be implemented in terms of
IFileDialogCustomize in wxMSW, which means that it can be used with the
new style dialogs shown by IFileDialog, unlike SetExtraControlCreator(),
which could only be supported when using older style common dialogs.

Add support for a few different controls and wxMSW implementation, more
controls, generic implementation and the documentation will be updated
later.

Also update the sample to show the new API in action and allow toggling
between using it and the old API for testing.
2022-06-03 01:35:30 +01:00
Vadim Zeitlin
f8976c3247 Implement IUnknown methods manually in wxFileDialogMSWData
Using the helper macros won't work with multiple inheritance that is
going to be used in the upcoming commits.

We also don't need real reference counting here, so simplify the code by
not using it.
2022-06-03 01:35:30 +01:00
Vadim Zeitlin
0caddb4472 Document important COM implementation macro limitation
These macros can't be used with multiple inheritance, as they don't do
anything to cast the pointer to the correct type in this case.
2022-06-03 01:35:30 +01:00
Vadim Zeitlin
c93f5350a3 Fix wxFileDialog repositioning
The calls to SetSize() were doing nothing because our own overridden
DoGet{Position,Size}() fooled it into thinking that the window already
had the correct geometry.

Return the actual position and size during MSWOnInitDone(), i.e. when we
have a correct HWND, to prevent this from happening.
2022-06-03 01:35:30 +01:00