Commit Graph

72330 Commits

Author SHA1 Message Date
Vadim Zeitlin
24970061fa Add wxBitmap(wxImage, wxDC) ctor to all ports
This ctor was previously present only in wxMSW, make it available in all
ports to allow the same code to compile everywhere.

In most of them wxDC argument is simply ignored, but in wxGTK and wxOSX
it is used to assign the appropriate scale factor for the new bitmap.

Enable previously wxMSW-only unit test checking for this.
2022-04-12 19:08:56 +01:00
Vadim Zeitlin
b185186ebf Handle scale factor in another wxMSW wxBitmap ctor taking wxDC
This is similar to db6d565fad (Handle wxDC scale factor in wxBitmap ctor
taking wxDC in wxMSW, 2022-04-10), but for the constructor taking
wxImage and wxDC -- it should also use the DC scale factor, even if it
is not used for scaling the bitmap size in this case.

Add a unit test checking for this.
2022-04-12 17:57:49 +01:00
Vadim Zeitlin
558a300996 Create bitmaps from image and a wxDC without an HDC in wxMSW
This is similar to 7382e99bbb (Create bitmaps even when given a wxDC
without an HDC in wxMSW, 2022-04-10) and does the same change to
wxBitmap ctor from wxImage and wxDC -- and also extends the unit test to
check for this under wxMSW, which is the only port in which this ctor is
currently available.
2022-04-12 17:30:42 +01:00
Vadim Zeitlin
db6d565fad Handle wxDC scale factor in wxBitmap ctor taking wxDC in wxMSW
When using wxBitmap ctor taking wxDC, the bitmap should inherit the
scale factor of the DC, both because it's already the case in the other
ports and because it makes sense to do it.

Add a unit test checking that this is the case in all ports now.
2022-04-10 19:45:59 +01:00
Vadim Zeitlin
7382e99bbb Create bitmaps even when given a wxDC without an HDC in wxMSW
It seems wrong to just fail to create the bitmap entirely if a not
wxMSWDCImpl-derived wxDC is provided to wxBitmap::Create(size, wxDC)
overload, especially because no check is done to see if the associated
HDC is non-null for wxMSWDCImpl-derived classes.

Instead, simply create a DIB-based bitmap with the specified size, as
this seems more useful and less surprising and was already the behaviour
in the other ports.

Add a test ensuring that this remains the case in the future.
2022-04-10 19:43:29 +01:00
Vadim Zeitlin
d08498eb16 Add wxBitmap(size, dc) ctor to all ports
Previously this ctor was only available in wxMSW and wxOSX, which was
especially strange as the equivalent Create() overload, taking wxDC, was
already available in all ports.
2022-04-10 17:17:02 +01:00
Vadim Zeitlin
bf75fe9d64 Remove redundant forward decls and headers from wx/*/bitmap.h
No real changes, just don't redeclare the classes already forward
declared in wx/bitmap.h in the files included (only) from it and don't
include redundant headers.

Also forward declare wxCursor and wxPixelDataBase in wx/bitmap.h itself
for consistency, as many (even though not all) headers use them.

Do not forward declare wxControl in wx/{msw,osx}/bitmap.h, however,
there is no reason to do it in this header.
2022-04-10 17:09:52 +01:00
DietmarSchwertberger
a6cc2c7238 Fix recent regression in grid sample
Changes of 3719ab3725 (Add support for rearranging wxGrid rows order
interactively, 2022-04-02) broke TabularGridFrame in the sample, fix it
by removing the duplicate call to wxSizer::Add().

See #22260.

Closes #22296.
2022-04-10 17:50:43 +02:00
Vadim Zeitlin
2d675acd6b Fix handling apt install errors in install script
Logging the error code reset it (as echo executed successfully), so save
it first.

Also check for the failure of the second attempt to run apt too.
2022-04-10 17:47:54 +02:00
DietmarSchwertberger
7f8f2a9aa3 Fix asserts when changing columns of wxGrid using native header
The number of columns has to be changed after updating the m_colAt and
m_colWidths arrays, as the native header uses them.

This extends the changes of a2d65663a0 (Fix assert when adding columns
to wxGrid using native header., 2013-05-31) to inserting and deleting
the columns too.

See #15225.

Closes #22294.
2022-04-10 16:14:58 +02:00
Kaya Zeren
7e34e9f572 Update Turkish translations for 3.1.6 2022-04-10 16:01:11 +02:00
Vadim Zeitlin
d981c0e43d Use canonical name and address for Gérard Durand 2022-04-10 15:53:17 +02:00
Gérard DURAND
79559dbfeb Update French translations for 3.1.6 2022-04-10 15:48:08 +02:00
Felipe
2abc5496fa Update Brazilian Portuguese translations for 3.1.6 2022-04-10 15:46:15 +02:00
Artur Wieczorek
254e1afea5 Create wxBitmap compatible with wxDC only for wxMSW
Ctor creating wxBitmap compatible with wxDC is available only for wxMSW.
2022-04-10 14:17:33 +02:00
Artur Wieczorek
891e6a26a3 Simplify wxPGPropArgCls 2022-04-10 13:43:09 +02:00
Artur Wieczorek
1a31eef189 Cleanup wxPropertyGridInterface declarations
Move definitions of GetPropertyValueAs*() functions away from class
declaration to avoid polluting the header.
2022-04-10 13:40:08 +02:00
Artur Wieczorek
ef20164efb Refactor to simplify break statements in the nested if/else blocks 2022-04-10 13:38:55 +02:00
Artur Wieczorek
69f45b31a3 Use reference instead of pointer 2022-04-10 13:37:55 +02:00
Artur Wieczorek
04bad7a720 Preserve original image in wxImageFileProperty
Rescale only the copy of the original image to preserve image quality.
2022-04-10 13:34:03 +02:00
Artur Wieczorek
6c7cf8e6d0 Simplify comparing bitmap size in wxImageFileProperty
Compare wxSize instead of comapring width and height separately.
2022-04-10 13:32:06 +02:00
Artur Wieczorek
9542e86770 Don't store wxImage/wxBitmap objects on the heap in wxImageFileProperty
To simplify managing the life cycle of the objects.
2022-04-10 13:31:14 +02:00
Artur Wieczorek
fd11c4e50a Remove from documentation reference to not implemented function 2022-04-10 13:27:58 +02:00
Artur Wieczorek
ce6123029b Don't override DoFreeze()/DoThaw() in wxPropertyGridManager
Both implementations don't add any additional features to the base
functions and therefore are not needed. wxPropertyGrid and other wxPG
controls are children of wxPropertyGridManager and DoFreeze/DoThaw calls
are forwarded directly to them in wxWindowBase::Freeze()/Thaw().

Closes #22269.
2022-04-10 13:24:35 +02:00
Vadim Zeitlin
7773c123de Merge branch 'msw-fix-focus-native-modal'
Fix focus after showing a native modal dialog in wxMSW.

See #22290.
2022-04-09 22:53:06 +02:00
Thomas Krebs
8dc27bb9dc Update German translations
Complete the translations for 3.1.6 release.
2022-04-09 22:52:28 +02:00
Vadim Zeitlin
bdad37f278 Add translations update to the pre-release list of things to do
Remind that a request to update translations should be sent to the
translators mailing list.
2022-04-09 22:51:25 +02:00
Paul Cornett
fd352f9ac7 Avoid -Wdeprecated-copy warning, see #22291 2022-04-09 07:43:16 -07:00
Vadim Zeitlin
a5a5b1bb15 Fix restoring focus after showing native modal dialogs in wxMSW
This fixes a regression introduced in d311c705d7 (Make native dialogs
application-modal in wxMSW, 2022-04-01) which resulted in a focus loss
after showing a modal dialog, as the parent window was still disabled
when the native modal dialog was closed and so focus couldn't be set to
any of its children and was simply lost as the result.

Fix this by not disabling the dialog parent ourselves, but leaving
handling the parent status to the native modal dialog, which already
takes care of disabling the parent it uses when it is shown and
re-enabling it when it is dismissed. Still use wxWindowDisabler to
disable all the other top level windows, if any, to ensure that the
modal dialogs are truly app-modal and not just window-modal, i.e. ensure
that #11887 still remains fixed.

Closes #22285.
2022-04-07 23:43:53 +01:00
Vadim Zeitlin
717e851225 Allow to leave another window enabled in wxWindowDisabler
Allow specifying another window to "skip", i.e. not to disable, in
wxWindowDisabler.

This is not used yet, but will be in the upcoming commit.
2022-04-07 23:38:16 +01:00
Lauri Nurmi
87d6763209 Generate mouse events for Aux1, Aux2 buttons on OS X
OS X supports 5-button mice out-of-the-box.

Closes #22286.
2022-04-08 00:36:02 +02:00
Vadim Zeitlin
bc81682e7f Refactor wxWindowDisabler to allow skipping more than one window
This is not implemented yet, but this commit changes DoDisable() to
disable all windows except those in the list of the windows not to be
disabled instead of explicitly checking for just a single window to
skip.

Rename m_winDisabled to m_windowsToSkip to better describe its purpose
and also because it's a vector, and so should use plural form in its
name.

Finally note that AfterDisable() is called with NULL argument from the
ctor not taking the window to skip for compatibility with the old code,
but it's not clear if it's really the right thing to do and perhaps this
shouldn't be done.

No real changes yet.
2022-04-07 23:32:05 +01:00
Vadim Zeitlin
53844108dd Make wxWindowDisabler ctors explicit
Implicitly converting a bool or a wxWindow pointer to this class makes
no sense and shouldn't be allowed, so don't allow it.
2022-04-07 23:22:55 +01:00
AliKet
68b65c7333 Fix synthetic mouse events produced by wxAutoScrollTimer
Simplify the code translating from screen to client coordinates and make
it correct by using ScreenToClient() directly instead of emulating it
manually, which doesn't work quite right, at least in wxGTK.

Closes #22289.
2022-04-08 00:14:28 +02:00
Vadim Zeitlin
e92f8cbce8 Fix wxOSX compilation problem with older SDKs
NSArray is not fully declared otherwise, at least when using Xcode 8.3.

See #22272.
2022-04-07 17:43:30 +02:00
Vadim Zeitlin
f84864dcca Merge branch 'master' of https://github.com/dghart/wxWidgets
Add a missing XPM to the xrc sample

The merge also rebakes the sample makefiles.

See #22270.
2022-04-07 17:42:05 +02:00
Vadim Zeitlin
19e3a47d98 Update version to 3.1.7 and rebake the makefiles
Make it possible to distinguish the latest master from 3.1.6 before
making any changes.

Closes #22282.
2022-04-07 17:40:13 +02:00
DietmarSchwertberger
3719ab3725 Add support for rearranging wxGrid rows order interactively
Add EnableDragRowMove() function and wxEVT_GRID_ROW_MOVE, similarly to
the existing column function and event.

Closes #22260.
2022-04-07 17:39:56 +02:00
Patriccollu
c39c392bbb Add translations for Corsican
Closes #22276.
2022-04-07 17:39:56 +02:00
Vadim Zeitlin
71426a168a Add change log section for the next 3.1.7 release
Add a placeholder for the changes in the next release, restoring the
text removed in d8ec020109 (Copy the changes in 3.1.6 from Git notes to
the change log, 2022-04-04).
2022-04-07 17:39:56 +02:00
Paul Cornett
4c375ad430 Fix wxDC::DrawRotatedText() with GTK3
Use m_sign[XY] to determine if axes are inverted, as the full device transformation
may have negative scale for things like text rotation. Broken by
eafa248117 (Avoid mirroring text when wxDC axes are inverted with GTK3, 2022-02-13)
See #22278
2022-04-06 19:22:39 -07:00
Roberto Boriotti
c8cd79696c Update Italian translations 2022-04-05 14:25:23 +02:00
dghart
cd43393654
Update xrcdemo.bkl
Add an xpm missed by commit 49fd3a22
2022-04-04 20:41:23 +00:00
dghart
101602da63
Update CMakeLists.txt
Add an xpm missed by commit 49fd3a22
2022-04-04 20:39:14 +00:00
Vadim Zeitlin
4da102f2b1 Remove mention of Trac milestones from the release instructions
Replace it with the GitHub milestones update step instead.

There is no reason to create a new version any more.
2022-04-04 20:28:41 +01:00
Vadim Zeitlin
85c8c8987e Minor docs-related updates to the release instructions
Remove the instructions for applying the cherry-picked commit on
docs.wxwidgets.org as it's not used any more.

These instructions are probably insufficiently detailed, but we'll
probably switch to using GitHub Actions for updating the documentation
soon, so they won't be necessary for much longer anyhow and it's not
worth expanding them.
2022-04-04 17:41:05 +01:00
Vadim Zeitlin
e67b25ff69 Update checksums for 3.1.6 release files again
These files correspond to v3.1.6-rc2 tag.
2022-04-04 16:04:58 +02:00
Vadim Zeitlin
35a6d7b15f Fix a typo in "security fixes" in the change log 2022-04-04 15:41:33 +02:00
Vadim Zeitlin
e4c2298e5e Use window scale factor for all MSW wxDCs associated with windows
This ensures that we use correct font sizes with the DCs and, in
particular, fixes the font size in wxAutoBufferedPaintDC when using DPI
scaling different from 100% after the changes of e3557b8c0a (Respect
bitmap content scale factor in wxMSW wxMemoryDC, 2022-03-26).

See #22234.
2022-04-04 13:30:08 +01:00
Vadim Zeitlin
543b581bca Fix type for fallback definitions of INET_E_XXX
These constants must be of type HRESULT, i.e. long, and not unsigned
long that was used for them by default.
2022-04-04 12:40:22 +02:00