Commit Graph

70894 Commits

Author SHA1 Message Date
Vadim Zeitlin
68a8d6a11c Remove obsolete and unnecessary wsock32.dll dynamic loading code
This is unnecessary at least since removal of Windows CE support back in
8282c1be0f (Remove Windows CE support, 2015-08-27) and probably for much
longer.
2021-04-18 21:12:09 +01:00
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
Vadim Zeitlin
11967af49f Make wxSpinCtrl::GetTextValue() pure virtual
It is now implemented in all ports.
2021-04-18 13:09:51 +02:00
Vadim Zeitlin
e5042a6a53 Implement wxSpinCtrl::GetTextValue() for wxQt too 2021-04-18 13:09:43 +02:00
Vadim Zeitlin
f2d3589d88 Also implement wxSpinCtrl::GetTextValue() for wxGTK1 2021-04-18 13:09:43 +02:00
Dummy
b6f8a8cf5b Add wxSpinCtrl::GetTextValue()
This allows to retrieve the current contents of the text entry part of
wxSpinCtrl.

For now provide a stub in the base class, will be made pure virtual
later.

Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
2021-04-18 13:09:17 +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
5e53f74af1 Make wxImage ctor from XPM data explicit
This avoids accidental conversions from XPM to wxImage which can result
in the use of an expected wxBitmap ctor later.

See #19149.
2021-04-18 01:14:36 +01:00
Vadim Zeitlin
72500faf7c Add wxCursor ctor from XPM data to all ports
This just uses the existing wxImage ctor from XPM data and wxCursor ctor
from wxImage, but will allow the code creating cursors from XPM to still
work even when wxImage ctor from XPM is made explicit.

Add a trivial test just to check that the new ctor can be used.
2021-04-18 01:14:36 +01: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
Vadim Zeitlin
9c6e67cac0 Rename Mac wxCursor::CreateFromImage() to InitFromImage()
Use the same name as in the other ports for the function doing the same
thing, there doesn't seem to be any good reason to name it differently.

Also avoid declaring it when wxUSE_IMAGE==0 as it's not defined in this
case (again, consistently with the other ports).
2021-04-18 00:59:52 +01:00
Vadim Zeitlin
b26fd44c77 Consistently declare wxCursor(wxImage) ctor when wxUSE_IMAGE==1
wxGTK already did it like this, but also only declared ctor not taking
wxImage in this case, while wxMSW and wxMac declared this ctor in any
case, even when wxUSE_IMAGE==0, but didn't define it then.

This doesn't matter much anyhow, as the build with wxUSE_IMAGE==0 is
clearly broken and these changes are not enough to fix it, but be at
least somewhat consistent and:

1. Don't declare methods using a class which is not available at all.
2. Do define methods using wxImage only internally, even if they do
   nothing when it's not available.

No real changes.
2021-04-18 00:59:52 +01: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