Commit graph

75481 commits

Author SHA1 Message Date
Vadim Zeitlin
30994678c4 Reduce the degree of make parallelism in examples
And add a warning to not do this if it's not supported.
2023-12-12 20:10:40 +01:00
Vadim Zeitlin
1d9fe90224 Add section about building release Mac libraries
This doesn't seem to be documented anywhere else, but is rather
important to know.
2023-12-11 18:49:29 +01:00
Vadim Zeitlin
8d8ee12683 Recommend building just "minimal" sample
Don't tell people to build all the samples and demos because this takes
time and some of them are badly outdated. Do tell them to build and run
the minimal one to check that things work as intended.

Also remove links to the wiki from wxOSX instructions, there is not much
useful from non-archaeological point of view there.
2023-12-11 18:43:20 +01:00
Vadim Zeitlin
209ce24b85 Recommend using parallel make when building wxWidgets
This should help at least some people spend less time waiting.
2023-12-11 18:38:22 +01:00
Vadim Zeitlin
be4c71f74b Default to arm64 + x86_64 universal binaries for wxOSX
Using i386 by default isn't useful any more -- but using arm64 is.
2023-12-11 18:30:09 +01:00
Paul Cornett
5ef4c1062a Replace zero-as-null with nullptr 2023-12-10 09:35:15 -08:00
Paul Cornett
c3d1618cc8 Fix transitory visual glitch with wxBORDER_NONE on GTK3
Changing the CSS after adding child to already-showing parent
can cause a fleeting glimpse of the original style.
See #24105
2023-12-10 09:10:42 -08:00
Paul Cornett
375fd2c630 Incorporate GTK preferred size into best size for non-native controls
It may be better than the default GetBestSize() result. Fixes best size
of wxStaticBox when children are narrower than label, and minimum size for
controls using a scrolled window, such as wxTreeCtrl.
2023-12-09 18:17:53 -08:00
Paul Cornett
3af16cd063 Ensure wxListBox best size is at least the minimum required by GTK3
And remove unnecessary SetInitialSize(), PostCreation() already does that.
Avoids a Gtk-CRITICAL assertion 'size >= 0' failed in GtkScrollbar
2023-12-08 08:25:40 -08:00
Vadim Zeitlin
b1cfc58e23 Merge branch 'qt-statusbar-fixes' of https://github.com/AliKet/wxWidgets
wxStatusBar fixes for wxQt.

See #24075.
2023-12-07 22:55:12 +01:00
Rick
e758d8ad80 Fix crash when processing renames in wxMSW wxFileSystemWatcher
It could (and did, albeit rarely) happen that we read only the first of
the couple events associated with a file rename and in this case the
code crashed due to dereferencing invalid iterator.

Ideal would be to delay sending the "renamed" event until we get the new
path, but for now just fix the crash by not using the invalid iterator.

Closes #24119.
2023-12-07 22:50:06 +01:00
ali kettab
c2cb80148d Fix parent/child relationship between the wxFrame and wxStatusBar under wxQt
This also fixes wxEVT_IDLE events not delivered to the wxStatusBar. because
it was not counted as a child of the frame it was added to.
2023-12-07 17:20:00 +01:00
ali kettab
5c46947c57 Fix wxStatusBar with field controls under wxQt
Postpone the creation of the QStatusBar fields until the first call to
SetStatusText(). This is to account for any field control added by the
user and also to avoid having to call UpdateFields() multiple times.

wxSTB_ELLIPSIZE_XXX and wxSTB_SHOW_TIPS supports are also implemented now.

The statbar sample is also updated: The OnSize() handler is removed because
it doesn't do much. that is: it is defined to keep the bitmap centered in the
status bar field it occupies if it is resized. but this is already done by the
wxStaticBitmap control, at least under wxMSW, wxGTK3 and wxQt.
2023-12-07 17:20:00 +01:00
ali kettab
02610d5d4b Remove trivial Init() from wxStatusBar under wxQt 2023-12-07 17:20:00 +01:00
ali kettab
d3bdf486b3 Don't override Refresh() in wxStatusBar under wxQt
This is not necessary and, more importantly, results in a crash if you try
to recreate the status bar (which can be seen in the statbar example)

Also remove leftover QList declaration
2023-12-07 17:20:00 +01:00
ali kettab
e9dd395215 Make the bitmap drawn centred inside the wxStaticBitmap control under wxQt
This the default behaviour under wxMSW and wxGTK3 ports.
2023-12-07 17:16:40 +01:00
Christian Walther
96b5c1419b Fix uniconizing hidden top level windows in wxMSW again
A window that was iconized while hidden, then uniconized while still
hidden would fail to show uniconized. The reason is that Iconize(false)
failed to update m_showCmd. What determines whether that is needed is
not whether Windows considers the window iconized but whether wxWidgets
does.

This was previously fixed in ef40bc3dae (Fix uniconizing hidden top
level windows in wxMSW., 2012-08-05), see #14539, but was broken later
by 3518f1a7d8 (Use a single wxTopLevelWindow::m_showCmd flag in wxMSW,
2018-06-22), so fix it again.

Closes #24117.
2023-12-05 00:56:41 +01:00
Miguel Gimenez
0965698c58 Add support for VT_UI8 OLE VARIANT type
Convert it to and from wxULongLong, as just as we already convert
between VT_I8 and wxLongLong.

Closes #24115.
2023-12-05 00:55:28 +01:00
Blake-Madden
5ba009e861 Add Catholic Feasts holiday authority class (US observances)
This includes a static function to calculate Easter that can be used for
other authorities.

Document the wxDateTimeWorkDays and wxDateTimeHolidayAuthority classes.

Closes #24094.
2023-12-05 00:53:26 +01:00
ali kettab
2c9fee3d6f Add wxStatusBar::AddFieldControl() to simplify adding controls
This allows user codes to simply designate where their controls should
appear in the status bar without the need to handle wxEVT_SIZE
themselves.

They can still handle the event if the default positioning does not meet
their needs, but the new API is simpler and can be implemented for wxQt.

Closes #24092.
2023-12-05 00:39:04 +01:00
Martin Corino
ed02e03585 Make wxEL_ALLOW_NEW imply wxEL_ALLOW_EDIT in wxEditableListBox
Without this change, using wxEL_ALLOW_NEW without wxEL_ALLOW_EDIT
resulted in an assertion failure, so fix it by turning wxEL_ALLOW_EDIT
too in this case: this makes sense because adding a new element is
"editing" too, and there doesn't seem to be any realistic scenario in
which new items can be added but the existing items can't be changed.

Closes #24099.

Closes #24100.
2023-12-03 15:05:36 +01:00
Kumazuma
11ed91af8f Add missing default constructor of wxFileDialog in wxMSW
This ctor exists in the other ports and there is no reason for it not to
exist in wxMSW too.

Closes #24113.
2023-12-03 15:03:12 +01:00
Bill Su
d62fafe847 Add wxNativeContainerWindow to wxTopLevelWindows list
This ensures that wxDialog::ShowModal() disables wxNativeContainerWindow
too.

Closes #24112.
2023-12-03 15:01:42 +01:00
Vadim Zeitlin
6f501fd022 Merge branch 'qt-overlay' of https://github.com/AliKet/wxWidgets
Add native wxOverlay implementation under wxQt.

See #24080.
2023-12-03 15:00:34 +01:00
Paul Cornett
6f62907cae Avoid setting a negative window size 2023-12-02 16:08:46 -08:00
Paul Cornett
54ed3abdad Avoid size-allocating invisible widgets
Avoids Gtk-CRITICAL gtk_widget_set_allocation: assertion
'_gtk_widget_get_visible (widget) || _gtk_widget_is_toplevel (widget)' failed
2023-12-02 15:36:39 -08:00
Paul Cornett
d8b2fc1080 Avoid refreshing a rect with a negative size 2023-12-02 15:26:45 -08:00
Paul Cornett
2ddfcc2b28 Remove wxTextCtrl frame with wxBORDER_NONE for GTK3
This was deleted for GTK3 in 80e2264373 (Fix wxBORDER_NONE handling for
wxTextCtrl under GTK+ 3, 2017-10-31), but there was no harm in keeping it,
and it actually helps with a transitory visual glitch when the widget is
created on a parent that is already showing.
See #24105
2023-12-01 12:36:35 -08:00
ali kettab
47bc3a8b96 Try to fix unit tests systematically failing under AppVeyor
Raise the window to ensure that it gets the expected mouse events.

See #24082.

Closes #24109.
2023-11-30 16:32:48 +01:00
Vadim Zeitlin
acdeb0b7f5 Define rich edit bullet-related constants for old MinGW
Define constants not defined in MinGW 5.x headers.
2023-11-30 16:29:45 +01:00
Vadim Zeitlin
7e2b0eea19 Merge branch 'args-init-improve'
Minor improvements to command line arguments initialization.

See #24103.
2023-11-30 02:53:44 +01:00
PB
c8c3932da6 Remove obsolete options from MSVS .props files
Remove the stuff regarding no longer supported MSVS versions,
Itanium CPU architecture, and Windows XP platform toolset.

Closes #24101.
2023-11-30 02:52:25 +01:00
Vadim Zeitlin
e4f2b1eaac Clarify description of archive contents in wxMSW binaries docs
Don't say that the directory where the archives are unpacked shouldn't
contain anything else than include and lib directories, as it can/does
contain other files, such as wxwidgets.props.

Closes #24098.

Co-Authored-By: Bill Forster <billforsternz@gmail.com>
2023-11-30 02:43:52 +01:00
Vadim Zeitlin
5318637839 Merge branch 'fix_SVG_premultiply' of https://github.com/teliseo/wxWidgets
Fix wxBitmapBundle::FromSVG(), which renders incorrectly on GTK and add
wxHAS_PREMULTIPLIED_ALPHA to make the code dealing with alpha more clear
and correct.

See #24097.
2023-11-30 02:35:20 +01:00
Lauri Nurmi
2b0ee48ef7 Fix double negatives used with 'neither'
Replace most 'neither' words introduced after 66916c74a3 (Fix double
negatives used with 'neither' in docs and comments, 2022-08-15) with
'either'.

All changes are to comments only.

Closes #24090.
2023-11-30 02:31:42 +01:00
Ian McInerney
97cba7c0ca Restore ToCDouble compatibility with leading spaces/+ and hex
The previous ToCDouble() function accepted leading spaces, a starting +
sign, and hex strings. std::from_chars() does not accept spaces or +,
and requires a special flag to convert hex strings, so handle this
manually to preserve the old behaviour of this function.

This is similar to the changes done for ToCULong() in #24022.

Closes #24089.
2023-11-30 02:29:58 +01:00
Randalphwa
b5fea3cbf6 Fix crash in wxLogGui when wxUSE_LOG_DIALOG==0
This fixes a crash when DoShowMultipleLogMessages() is called with
wxUSE_LOG_DIALOG set to 0. The code after the #else statement gets the
size of the wxArrayString but then instead of accessing that array, it
tried to access the m_aMessages array which is empty, resulting in a
crash in the C runtime. This commit simply gets the strings from the
correct array.

Closes #24087.
2023-11-30 02:24:30 +01:00
Blake-Madden
2c1cdf9c02 Fix typos and repeated words in comments and documentation
Closes #24085.
2023-11-30 02:21:34 +01:00
Stefan Csomor
bcbc31e97f Fix clipping of scrolled windows under macOS Sonoma
We need to use a native clip view for things to behave correctly under
this OS version, otherwise scrollbars can be overdrawn by the window
contents.

Closes #24067.

Closes #24073.
2023-11-30 02:16:04 +01:00
Vadim Zeitlin
8ca312b17c Use RAII helper for cleanup in wxTIFFHandler::SaveFile()
No real changes, just put cleanup code in a single place.
2023-11-30 02:08:49 +01:00
Vadim Zeitlin
70710a7656 Remove unnecessary cast of TIFFClose() return value
It doesn't have any, so explicitly casting it to "void" is useless and
misleading.
2023-11-30 01:59:48 +01:00
BrianDelalex
614135da5b Improve error checking when saving images in TIFF format
Use TIFFFlush() in wxTIFFHandler::SaveFile() in order to check for
success when saving TIFF images, as TIFFClose() doesn't have any error
code to do it.

Closes #23214.

Closes #24072.
2023-11-30 01:58:08 +01:00
Blake-Madden
49ddc51007 Add bullet number and style support to MSW wxTextCtrl
Make bullet style-related functions in wxTextAttr work for the native
(rich) text controls too.

Closes #24069.
2023-11-30 01:53:50 +01:00
Vadim Zeitlin
a4ee2563bc Use current encoding for char command line arguments if possible
This is more consistent with the conversion in the other direction, but
here we also fall back to UTF-8 if conversion fails as it seems better
than just losing the argument entirely.

Also make the conversion a bit more efficient by stealing the pointer
from wxCharBuffer instead of using strdup() to copy the string.
2023-11-30 00:44:51 +01:00
Vadim Zeitlin
1d134338a7 Reduce the number of __WINDOWS__ preprocessor checks
No real changes, just repeat the loop line to separate non-Windows code
more clearly from the rest.
2023-11-30 00:43:35 +01:00
Vadim Zeitlin
d4484c48c4 Rename wxInitData::InitializeFromWide() to InitIfNecessary()
And do nothing in this function if the arguments had been already
initialized, as it will make it more convenient to call from other
places.

No real changes.
2023-11-30 00:41:09 +01:00
taler21
7a1c8d39f8 Fix references to wxEventLoop::YieldFor() in the documentation
It was incorrectly called wxAppConsole::YieldFor() but the function was
moved from wxAppConsole to wxEventLoopBase back in dde19c2180 (second
part of #10320: move wxApp event handling functions to wxEventLoopBase
(in particular move Yield() functions); add backward compatible
redirections to wxApp; update docs; remove global lists wxPendingEvents
and wxPendingEventsLocker, 2009-02-15).

Closes #24095.
2023-11-29 22:16:03 +01:00
Tim Eliseo
06e3e26ead Add checks to BitmapBundle::FromSVG-alpha test to catch lack of SVG premultiply. 2023-11-28 13:36:06 -08:00
Paul Cornett
8cd33455fe Fix generic wxDataViewCtrl drag hint size with GTK
Some WMs initially report incorrect frame extents for the hint window,
then correct it to 0x0 later. This interacts badly with the deferred
show mechanism, causing the hint window height to be much too small.
Issues with TLW decoration sizes can be avoided by setting the client
size rather than the overall size.
2023-11-27 23:27:43 -08:00
Paul Cornett
d2140993de Fix generic wxDataViewCtrl drag hint transparency with GTK
wxGTK requires SetTransparent() be called before Show().
See #24084
2023-11-27 23:08:22 -08:00