Commit Graph

19013 Commits

Author SHA1 Message Date
Stefan Csomor
bb40699675 macOS bugfix: overrelease in wxGetAvailableDrives
as these strings are NSStrings retrieved by autoreleasing methods, they must be retained first
2020-07-26 11:37:55 +02:00
Maarten Bent
ea102bb272 Add missing wxOVERRIDE to wxNonOwnedWindow::Reparent 2020-07-23 22:55:10 +02:00
Vadim Zeitlin
6787b0548b Merge branch 'webview-ie-fixes'
IE-based xwWebView improvements.

See https://github.com/wxWidgets/wxWidgets/pull/1987
2020-07-23 16:39:13 +02:00
atbara46
bfee44de18 Fix wrongly detecting FIFOs as directories in wxFileName
The constants for wxFILE_EXISTS_FIFO and wxFILE_EXISTS_SOCKET were
wrongly defined, mixing up their decimal and hexadecimal values,
resulting in wxFILE_EXISTS_FIFO & wxFILE_EXISTS_DIR being wrongly non
zero.

Fix this by redefining these bit masks correctly to avoid overlapping
the other values.

Closes #18846.
2020-07-23 16:30:16 +02:00
Vadim Zeitlin
d1aa3d5663 Update the version to 3.1.5
This was done by running misc/scripts/inc_release, bakefile_gen and
autoconf.
2020-07-23 16:25:39 +02:00
Vadim Zeitlin
cd2cd6a617 Avoid using IE-related symbols not present in old MinGW headers
Define INET_E_DEFAULT_ACTION ourselves and provide stand-ins for the
enums not present in MinGW SDK.

See #17893.
2020-07-21 22:44:49 +02:00
Vadim Zeitlin
a8bb796f8c Add OSXMakeDPIFromScaleFactor() helper
No real changes, just avoid repeating wxRound(scaleFactor*72) in several
places and do it in this single function instead.
2020-07-21 17:16:15 +02:00
Stefan Csomor
1deb003a7c Propagate wxEVT_DPI_CHANGED to child windows in wxOSX too 2020-07-21 17:16:15 +02:00
Stefan Csomor
668f0e7c54 Implement wxWindow::GetDPI() on macOS and iOS 2020-07-21 17:16:15 +02:00
Vadim Zeitlin
8a81391cf4 Make wx/htmllbox.h self-contained again
Fix problem with wxUSE_HTML added in 05cce8d89d (Add wxUSE_HTML check to
wxHtmlListBox header, 2020-05-28) not being defined when this header is
the first one to be included.
2020-07-20 21:09:43 +02:00
Paul Cornett
6a2005945a Avoid -Wcast-qual warning 2020-07-20 08:14:06 -07:00
Paul Cornett
de7ab5527b Avoid -Wdouble-promotion warnings in headers 2020-07-20 08:12:02 -07:00
Vadim Zeitlin
2f450733d4 Merge branch 'dpi-scaling-factor'
Add DPI scaling factor and revert content scaling factor behaviour in
wxMSW and other ports not using logical pixels to be 3.0 compatible.

See https://github.com/wxWidgets/wxWidgets/pull/1985
2020-07-20 15:55:23 +02:00
Vadim Zeitlin
086ab12eee Fix trivial spelling mistake in wxLog::PassMessages() comment
s/reenable/re-enable/
2020-07-20 15:54:10 +02:00
Vadim Zeitlin
4dd009136c Merge branch 'aui-auto-uninit'
Call wxAuiManager::UnInit() automatically.

Closes #14145.
2020-07-20 15:49:05 +02:00
Vadim Zeitlin
4552009805 Merge branch 'pr1312-no-unsafe-wxstring-conv'
Add a way to optionally disallow all implicit conversions between
wxString and "const char*".

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

See #18113.
2020-07-20 15:47:17 +02:00
Tomay
bbdd5b4984 Add wxWindow::DisableFocusFromKeyboard()
This allows to easily exclude a window from the TAB chain.

Closes https://github.com/wxWidgets/wxWidgets/pull/1516
2020-07-19 14:55:51 +02:00
michael
5c1f7733ab Mark IE-based wxWebView as being DPI aware
This makes it work (better) in high DPI.

Closes #17894.
2020-07-19 14:28:33 +02:00
michael
6023925ef6 Allow using XMLHTTP ActiveX object with custom scheme handlers
Fix the problem of the access-denied error when using a 'new
window.ActiveXObject("Microsoft.XMLHTTP")' to access URIs from custom
WebView scheme handler of the Internet Explorer WebView.

The solution here is to implement PARSE_SECURITY_URL and
PARSE_SECURITY_DOMAIN in ParseUrl of the IInternetProtocolInfo interface
of the Internet Explorer Control.

The direct implementation of VirtualProtocol::QueryInterface() instead
of using IMPLEMENT_IUNKNOWN_METHODS works, but is not nice. The better
approach would be probably enhancing ADD_RAW_IID to support multiple
inheritance.

Closes #17893.
2020-07-19 14:28:33 +02:00
Vadim Zeitlin
73bd293416 Revert "Implement GetContentScaleFactor for wxMSWDCImpl"
This reverts commit b0152155c0.

After changing wxWindow::GetContentScaleFactor() to return 1 on
platforms without logical pixels, such as MSW, in the grandparent
commit, make wxDC::GetContentScaleFactor() consistent with it too.
2020-07-19 13:39:27 +02:00
Vadim Zeitlin
379e718a33 Remove recently added GetOpenGLScaleFactor()
It has become unnecessary after the previous commit, as now the generic
GetContentScaleFactor() can be used instead of it on all platforms, so
revert the changes of f6cc8ff52c (Add GetOpenGLScaleFactor() to abstract
OpenGL coordinates scaling, 2020-07-10).

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

See #17391.
2020-07-18 23:51:05 +02:00
Vadim Zeitlin
cd8b2d3096 Make wxWindow::GetContentScaleFactor() return 1 under MSW again
This reverts bc492a9e6e (Make wxWindow::GetContentScaleFactor() useful
for non-OSX platforms., 2015-03-18) and restores the old behaviour from
wxWidgets 3.0, which consisted in only returning factor different from 1
from this function for the platforms distinguishing logical and physical
pixels.

After this change, the return value of this function can be portably
used on all platforms to convert between logical and physical pixels,
independently of the current DPI.
2020-07-18 23:44:58 +02:00
Vadim Zeitlin
1422991602 Add wxWindow::GetDPIScaleFactor()
This function replaces some uses of GetContentScaleFactor(), where a
factor greater than 1 must be used even under the platforms not doing
any logical/physical pixel mapping, such as MSW.

For now GetContentScaleFactor() is still unchanged, but it will return 1
for such platforms in the future and adding GetDPIScaleFactor() allows
to avoid changing the behaviour of the code which relied on its current
behaviour.
2020-07-18 23:42:44 +02:00
Hans Mackowiak
f646532889 Call wxAuiManager::UnInit() if associated frame is destroyed
Don't require the application code to explicitly do it if the frame is
destroyed before the manager itself.
2020-07-18 17:47:34 +02:00
Arrigo Marchiori
05cce8d89d Add wxUSE_HTML check to wxHtmlListBox header
Avoid compilation errors if wx/htmllbox.h gets included when wxUSE_HTML
is off.
2020-07-17 17:52:16 +02:00
Arrigo Marchiori
3aaa31e703 use wxConvWhateverWorks for translation strings
Revert the introduction of wxGet-SetInlineEncoding()
2020-07-17 17:52:16 +02:00
Arrigo Marchiori
464aeb8f84 avoid using wxNO_IMPLICIT_WXSTRING_ENCODING in utf-8-only builds 2020-07-17 17:52:16 +02:00
Arrigo Marchiori
57e136d9e1 Enforce consistency of encoding-related macros
Force wxNO_UNSAFE_WXSTRING_CONV on if wxNO_IMPLICIT_WXSTRING_ENCODING is
on, as the latter is even stronger than the former.
2020-07-17 17:52:16 +02:00
Vadim Zeitlin
f44121378e Apply implicit encoding check to wxDataFormat ctor in wxMSW too
This is similar to what had been already done in wxGTK.
2020-07-17 17:52:16 +02:00
Vadim Zeitlin
a2609429a3 Apply implicit encoding check to wxString::{starts,ends}_with() too
Don't provide the overloads taking "const char*" when compiling with
wxNO_IMPLICIT_WXSTRING_ENCODING is defined.
2020-07-17 17:52:16 +02:00
Arrigo Marchiori
860f6076b8 Explicit encoding for implicit conversion in wxGetTranslation() 2020-07-17 17:52:16 +02:00
Arrigo Marchiori
c86bcf962d Use wxASCII_STR() on string literals
Fix the build with wxNO_IMPLICIT_WXSTRING_ENCODING.
2020-07-17 17:52:16 +02:00
Arrigo Marchiori
65cbf40b7e Add wxNO_UNSAFE_WXSTRING_CONV2 macro
The macro disallows implicit conversions between wxString and const
char*
2020-07-17 17:34:38 +02:00
Stefan Csomor
051152ff95 Support GetFilterIndex() when filter choice is not shown in wxOSX
Platform native behaviour is not to show a filter, but to allow all
supported types to be selectable. Make sure GetFilterIndex still is a
valid choice (and not -1 as before).

Closes https://github.com/wxWidgets/wxWidgets/pull/1976
2020-07-17 15:06:58 +02:00
Daniel Kulp
6d12e746e1 Fix regression with making sockets non-blocking under Unix
The refactoring in the commit 51ea713826 (Extend and rename
wxSocketImpl::UnblockAndRegisterWithEventLoop(), 2019-11-20)
accidentally inverted the test for wxSOCKET_BLOCK, restore the correct
logic to make non-blocking sockets work again.

Closes #18834.
2020-07-16 11:51:51 +02:00
Vadim Zeitlin
7687d10c51 Merge branch 'empty-text-extent'
Make Get[MultiLine]TextExtent() behave consistently for empty strings on
all platforms, in particular return (0, 0) size for them from
GetTextExtent() in wxGTK, which is an incompatible change but is needed
to make it behave in the same way as the others.

See https://github.com/wxWidgets/wxWidgets/pull/1970
2020-07-16 11:43:05 +02:00
Lauri Nurmi
e6945aeedc Eliminate public header file's dependency on CoreServices.h
wx public headers are not supposed to include platform-specific headers
defining many macros that can conflict with the identifiers defined in
the application code. In this particular case, including CoreServices.h
ultimately #included AssertMacros.h, which by default on older SDKs
(<10.12) introduces various macros whose names very easily conflict with
user code.

For example, if you #included <wx/fswatcher.h> in your own code, and
your code happened to contain a symbol called 'check', or 'verify',
compilation failed.

Fix this by using pImpl idiom to move the variable requiring a type
defined in the SDK header into the source file.

Closes https://github.com/wxWidgets/wxWidgets/pull/1666
2020-07-16 01:54:24 +02:00
Vadim Zeitlin
857bb9e806 Merge branch 'im/gridcombo' of https://github.com/imciner2/wxWidgets
Close the cell editor when the editor's combobox is closed.

See https://github.com/wxWidgets/wxWidgets/pull/1941
2020-07-15 16:15:42 +02:00
Vadim Zeitlin
1bf5e536e9 Merge branch 'generic-treectrl-cleanup'
Improve wxGenericTreeCtrl code handling system colours/theme changes.

See #18823.
2020-07-15 14:26:55 +02:00
Vadim Zeitlin
c14053c211 Merge branch 'osx-11'
Adaptations for macOS 11.0.

See https://github.com/wxWidgets/wxWidgets/pull/1940
2020-07-15 14:26:05 +02:00
Vadim Zeitlin
33e8684356 Merge branch 'ios-menu'
Add support for wxMenu under iOS.

See https://github.com/wxWidgets/wxWidgets/pull/1965
2020-07-15 14:25:30 +02:00
Vadim Zeitlin
2280e43fe9 Factor out wxTextMeasureBase::GetEmptyLineHeight()
No real changes, just refactor to extract a trivial helper function.
2020-07-15 01:16:23 +02:00
PB
88a6c8c905 Fix building wxMSW using GCC 10.1 with C++20 standard
Add comparison operator overloads using NativeFormat to wxDataFormat
to prevent ambiguous operator overload errors.

Closes https://github.com/wxWidgets/wxWidgets/pull/1962
2020-07-14 22:09:47 +02:00
Vadim Zeitlin
33038a2ce7 Remove the now unnecessary empty wxMessageDialog dtor
No real changes, just some minor cleanup after 220dfe17ea (Replace
deprecated API usage for window modal dialogs, 2020-07-09).
2020-07-14 20:16:03 +02:00
Stefan Csomor
ab858b5805 Produce NFD in wxConvFileName::FromWChar() on macOS
This ensures that fn_str() returns the string in the expected,
decomposed, format.

Also simplify the code by removing workarounds for old systems which are
not supported any more and make explicit the fact that under macOS
ToWChar() always produced NFC.
2020-07-14 20:15:04 +02:00
Stefan Csomor
74bc9b5f71 Avoid infinite recursion between wxStockGDI and wxSystemSettions
There was a possible recursion from wxStockGDI::GetFont to
wxSystemSettings::GetFont and back, resolve by using direct font
creation, adding fixed system font.
2020-07-14 20:10:46 +02:00
Stefan Csomor
220dfe17ea Replace deprecated API usage for window modal dialogs
Remove the delegate objects that are not used any longer.

Move wxGetAvailableDrives() to Objective-C code file dirdlg.mm to allow
for Cocoa implementation.
2020-07-14 20:10:46 +02:00
Stefan Csomor
dd0033d817 Removing unused obsolete code from wxFileDialog
We don't need workaround for macOS earlier than 10.6 any longer.
2020-07-14 19:49:21 +02:00
Vadim Zeitlin
5735e7227b Add checks for wxUSE_MENUBAR to wx/chkconf.h
Check that it's defined in the first place and also check that
wxUSE_MENUS is on if wxUSE_MENUBAR is.
2020-07-14 18:16:59 +02:00
Stefan Csomor
6833b0e934 adding combined macOS iOS version guards 2020-07-14 18:16:59 +02:00