Commit Graph

70585 Commits

Author SHA1 Message Date
Vadim Zeitlin
74b2a33c69 Remove obsolete libraries from .gitignore
Remove some Watcom and, apparently, Symantec-specific files as both
compilers are not used any more since many, many years.
2021-04-18 21:03:02 +01:00
Stefan Csomor
cb8d7c533f Update MacS-M1-make.yml
try simple steps
2021-04-18 21:14:19 +02:00
Stefan Csomor
260283fc5c Update MacS-M1-make.yml
try local install to avoid sudo
2021-04-18 20:45:12 +02:00
Stefan Csomor
64446f0955 Update MacS-M1-make.yml
build both
2021-04-18 20:24:05 +02:00
Stefan Csomor
866254dda0 Update MacS-M1-make.yml
add parallel build, try running tests, skip install
2021-04-18 19:56:17 +02:00
Stefan Csomor
2e4cf11d15 launch again 2021-04-18 19:40:02 +02:00
Stefan Csomor
9c509b966c Create MacS-M1-make.yml
First Action for M1 Mac
2021-04-18 19:34:22 +02:00
Václav Slavík
15b0648041 Fix wxReadlink signature to return ssize_t
Introduced in 53bd139, wxReadlink() trivially wraps readlink(), but
returned int instead of ssize_t as defined for readlink() by POSIX.

Fixes "Implicit conversion loses integer precision: 'ssize_t' (aka
'long') to 'int'" on platforms with sizeof(ssize_t)>sizeof(int).
2021-04-18 11:00:41 +02:00
Vadim Zeitlin
c6d6ec9295 Merge branch 'msw-fix-decimal-point' of https://github.com/vslavik/wxWidgets
Fix decimal point assertions with unknown Win32 locales.

See https://github.com/wxWidgets/wxWidgets/pull/2330
2021-04-18 02:10:51 +02:00
Vadim Zeitlin
2103fd2e17 Merge branch 'xrc-paths'
Allow loading XRC from wxXmlDocument and use it to add a test for
bitmap paths URI encoding in XRC.

See https://github.com/wxWidgets/wxWidgets/pull/2325
2021-04-18 02:08:16 +02:00
Václav Slavík
b466e3c769 Restore Win32 locale in wxLocale destructor 2021-04-17 15:12:45 +02:00
Václav Slavík
c9e2143a7a Fix wxLocale::GetInfo() for unknown Windows locales
wxWidgets may be unaware of the locale being used and may be unable to
get correct information from its languages database. For example, en-AT
locale, supported by Windows 10 and using "," for decimal point, would
be interpreted as en-US by wx, and return "." here.

The other situation, when wx supports a locale that the OS doesn't,
shouldn't make a difference here because in that case, CRT wouldn't
support the locale either and CRT formatting functions wouldn't be set
to use it.

See also somewhat related 9fc78c8167.
2021-04-17 15:12:45 +02:00
Artur Wieczorek
b889f6897b Fix determining height of monochrome HICON in wxGetHiconSize()
For monochrome icons height reported by GetObject() is doubled because
icon bitmap contains both AND and XOR masks. To get actual icon height
we need to divide the value by 2.

Closes #19146.
2021-04-17 00:04:28 +02:00
Vadim Zeitlin
9ef30e728a Merge branch 'ci-cleanup'
Minor cleanup for the CI setup script.

See https://github.com/wxWidgets/wxWidgets/pull/2329
2021-04-16 23:32:21 +02:00
Vadim Zeitlin
16e0be9f26 Merge branch 'msw-thread-tls-fix-and-cleanup'
Minor cleanup in wxMSW wxThread code.

See https://github.com/wxWidgets/wxWidgets/pull/2327
2021-04-16 22:30:38 +01:00
Vadim Zeitlin
e3691dbc13 Explain reason for invalidating gs_tlsThisThread better
Just improve a comment, no real changes.
2021-04-16 22:30:09 +01:00
Vadim Zeitlin
f3b275321c Update comment to mention GitHub CI too
No real changes.
2021-04-16 19:23:28 +02:00
Vadim Zeitlin
994400eb17 Don't dump apt preferences in the CI build logs
This doesn't seem very useful and results in a lot of output.
2021-04-16 19:13:00 +02:00
Vadim Zeitlin
15aaf9a163 Stop installing debug repository apt key manually
This shouldn't be necessary any longer, as the corresponding Ubuntu bug
(https://bugs.launchpad.net/bugs/1920640) is supposed to be fixed.
2021-04-16 19:10:16 +02:00
PB
1c15e05260 Mention example CMake file in CMake Overview 2021-04-16 12:35:12 +02:00
Vadim Zeitlin
2babb9e06c Document and test that bitmap paths in XRC are percent-encoded
These paths are actually URLs and so the special URL characters must be
percent-encoded in them.

Document this and add a test checking that this is how it works.

Closes #19142.
2021-04-15 19:20:32 +01:00
Vadim Zeitlin
b9bd932077 Micro optimize string concatenation in wxFileSystem::OpenFile()
Concatenate the string only once instead of doing it several times.
Compiler might be optimizing this anyhow in release builds, but it
definitely helps in at least the debug ones and doesn't cost anything.
2021-04-15 19:20:32 +01:00
Vadim Zeitlin
97750eb282 Don't try relative paths in wxFileSystem if current path is empty
This seems redundant, as the loop is the same as the one just below it
which is executed in any case if this one doesn't find anything.
2021-04-15 19:20:32 +01:00
Vadim Zeitlin
ebedd023f5 Use wxXmlResource::LoadDocument() in XRC unit tests
This is simpler and better than creating a temporary file unnecessarily
and also serves as a test of the just added function.
2021-04-15 19:20:32 +01:00
Vadim Zeitlin
c1cc71066f Remove gs_critsectThreadDelete which was never used
This variable was added back in 3ef22a5b02 (trying to fix race
conditions. double deletions and memory leaks on thread termination...,
2003-09-21), but not used even then, nor ever since, so just remove it.
2021-04-15 19:03:51 +01:00
Kenneth Porter
f7f874f77a Invalidate TLS slot index when shutting down the library
Not doing it could result in using the now invalid or, worse, reassigned
to some other DLL, TLS slot if the library is initialized again later.

Also add asserts checking that the index is initialized before using it.
2021-04-15 18:59:47 +01:00
Vadim Zeitlin
5b0b50f164 Use symbolic TLS_OUT_OF_INDEXES constant instead of literal one
This constant has the same value but is more readable.

No real changes.
2021-04-15 18:59:13 +01:00
Vadim Zeitlin
c16082edfe Add wxXmlResource::LoadDocument()
This allows loading XRC from anywhere, not just files and URLs.
2021-04-15 18:50:47 +01:00
Václav Slavík
db3e54b3dc macOS: Don't interfere with native views' drag and drop
wxWidgetCocoaImpl injects implementation of several
NSDraggingDestination protocol methods, but never called their base
implementations, presumably on the assumption that drag and drop is
explicitly supported and not builtin into native NSView-derived
controls.

This prevented native builtin d'n'd in e.g. NSTextView (text can be
copied and inserted by dragging it to the insertion point) from
working. Fixed by always calling base implementation.

Closes https://github.com/wxWidgets/wxWidgets/pull/2320
2021-04-14 17:59:28 +02:00
Vadim Zeitlin
dc5f1711f2 Upgrade version to 3.1.6
Run misc/scripts/inc_release, bakefile_gen and autoconf.
2021-04-14 17:57:27 +02:00
Vadim Zeitlin
bbd4eca470 Use nicer labels for wxWidgets property sheets in MSVS UI
No real changes, just use the same _PropertySheetDisplayName element as
the standard style sheets use to show a slightly more user-friendly
label in the Property Sheet manager window in MSVS.
2021-04-14 15:44:09 +01:00
Vadim Zeitlin
6fb2b9b676 Add 3.1.6 change log section 2021-04-14 16:28:27 +02:00
Vadim Zeitlin
0bbc074095 Update binaries SHA-1 sums for 3.1.5 release too 2021-04-14 16:25:27 +02:00
Vadim Zeitlin
51fb9e4720 Update SHA-1 sums for 3.1.5 release files
This is simply the result of running ./build/tools/post-release.sh
2021-04-13 00:47:05 +02:00
Vadim Zeitlin
9c0a8be1dc Merge branch 'gtk-initial-size'
Fix initial size of TLWs in wxGTK when using both sizers and explicit
SetSize() calls.

See https://github.com/wxWidgets/wxWidgets/pull/2322

See #16088, #19134.
2021-04-13 00:23:58 +02:00
Vadim Zeitlin
2e16418707 Update TLW client size in wxGTK before sending wxEVT_SHOW
If we have to change the client size, it's better to do this before
sending the event whose handler might rely on the size being already
correct.

Co-Authored-By: Paul Cornett <paulcor@users.noreply.github.com>
2021-04-12 21:27:32 +02:00
Vadim Zeitlin
b5a78fbac6 Also make SetMinSize() after wxSizer::Fit() work correctly
This fixes a problem similar to that fixed in the previous commit but
for SetMinSize(), which was also ignored if done after calling
wxSizer::Fit() and before showing the window, as the explicitly set min
size was also overwritten by the pending min size computed from the
client size corresponding to the sizer fitting size.

The fix is similar too: just invalidate the pending minimum size if
SetMinSize() is called.
2021-04-12 21:19:25 +02:00
Vadim Zeitlin
645e1d2fd0 Don't overwrite explicitly set size with pending client size
Calls to SetSize() were ignored in wxGTK if they happened after calling
wxSizer::Fit() since the changes of f655a52fba (Allow wxSizer::Fit() to
work properly when called from TLW ctor on GTK3, 2020-04-20) because we
overwrote the explicitly set size with the client size computed earlier
by the sizer.

Don't do this by explicitly forgetting the client size we were going to
set when SetSize() is called.

Closes #19134.
2021-04-12 21:19:25 +02:00
Vadim Zeitlin
fd7386ed83 Move workaround for initial TLW size to wxGTK itself
Add wxWindow::WXSetInitialFittingClientSize() instead of handling wxGTK
TLWs specially in the common wxSizer code and override it in wxGTK to
remember that we need to reset the client size once the window is shown.

This commit shouldn't result in any changes in the observed behaviour.
2021-04-12 21:19:25 +02:00
Vadim Zeitlin
d01760ae41 Ignore apt-get update error in Travis CI build
For now just ignore it, it might be better to prune the repositories we
don't need, such as https://downloads.apache.org/cassandra/debian, which
result in the errors.
2021-04-12 21:04:21 +02:00
Vadim Zeitlin
329f60d7f3 Factor out wxTopLevelWindowGTK::GTKDoAfterShow()
Just extract the code generating wxEVT_SHOW for TLWs in wxGTK in its own
function before modifying it to avoid having to do it in two places.

No real changes, this is a pure refactoring.
2021-04-12 17:27:34 +02:00
Vadim Zeitlin
ed23b47695 Merge branch 'build-docs'
Improve installation and build documentation.

See https://github.com/wxWidgets/wxWidgets/pull/2319

Closes #18720.
2021-04-11 17:34:39 +02:00
Vadim Zeitlin
cf01fe536d Don't call wxYield() after key release in wxUIActionSimulator
This breaks existing unit tests using wxUIActionSimulator that do things
similar to

	wxUIActionSimulator sim;
	sim.Char('o', wxMOD_CMD);
	wxTEST_DIALOG(wxYield(), ... expected "Open" dialog ...);

because the expected dialog would be shown from inside Char(), unlike
with the wxMSW implementation and GTK until the changes of 59ad9f46e6
(Make wxUIActionSimulator works more reliably on GTK/X11, 2020-05-07).

To still make sure there is a delay after the event, sleep, if
necessary, before simulating the next event: this is still enough for wx
test suite to pass, but allows the code like above to work with both
wxMSW and wxGTK.

In fact, doing it like this makes the code simpler and removes the need
to distinguish between press and release events or maintaining the
number of currently simulated-as-depressed buttons or keys, so it also
simplifies things as a side effect.

Also add some comments and rename Default_Delay constant to a more
accurately named MIN_DELAY_BETWEEN_EVENTS.

Closes https://github.com/wxWidgets/wxWidgets/pull/2318
2021-04-11 17:34:05 +02:00
Vadim Zeitlin
c82ff381f5 Suppress memory leak reports from GTK CSS drawing functions
We don't seem to be doing anything wrong, but ASAN detects many such
leaks as soon as we call functions such as gtk_css_style_render_icon()
(used by wxRendererGTK::DrawCheckBox()) and several others.
2021-04-11 17:34:05 +02:00
Vadim Zeitlin
8620c6e9fd Update dates and version numbers for 3.1.5 release
Also invalidate SHA-1 sums for the release files.
2021-04-11 17:28:16 +02:00
Vadim Zeitlin
39c0277942 Update README and announcement for 3.1.5
Link to the installation instructions from the README instead of
repeating them.

Also eliminate gratuitous differences between the two files.
2021-04-11 17:28:16 +02:00
Vadim Zeitlin
c64a908472 Transfer git notes since 3.1.4 to the actual change log
Also fix the release date.
2021-04-11 17:28:15 +02:00
Vadim Zeitlin
b671d230f2 Merge remote-tracking branch 'MaartenBent/bitmap_cursor_osx'
Add wxBitmap(const wxCursor &cursor) constructor to wxOSX.

See https://github.com/wxWidgets/wxWidgets/pull/2314
2021-04-11 16:46:58 +02:00
Vadim Zeitlin
8f0045b3a6 Add "Verifying the Installation" section
Briefly explain how to check that wxWidgets is installed correctly.

This is again redundant with the information already present elsewhere,
but it seems worth repeating it here.
2021-04-11 16:21:57 +02:00
Vadim Zeitlin
b963ce0583 Add new "Installation" page to the manual
Currently this simply links to the existing port-specific installation
instructions, but this should provide a less confusing and more
prominent entry point than the existing topics.
2021-04-11 14:29:21 +02:00