Commit Graph

64255 Commits

Author SHA1 Message Date
Vadim Zeitlin
6037718fef Don't try building universal macOS binaries for PPC
Support for this architecture is not present in any of the still
supported SDK versions anyhow.
2018-03-08 23:21:44 +01:00
Xaviou
9cb625a223 Merge branch 'master' of github.com:wxWidgets/wxWidgets 2018-03-07 19:08:17 +01:00
VZ
e183b6d382
Fix miscellaneous build warnings
See https://github.com/wxWidgets/wxWidgets/pull/755
2018-03-07 18:25:32 +01:00
Vadim Zeitlin
66fdf49ed8 Work around a Wine bug in wxDateTimePickerCtrl sizing
Don't assume that all Vista and later systems support DTM_GETIDEALSIZE,
this is not the case under Wine even when it's emulating a Vista+
Windows version and trusting DTM_GETIDEALSIZE to always return the right
value resulted in these controls having 0 size and not being shown at
all when running wxWidgets programs under Wine.

See https://bugs.winehq.org/show_bug.cgi?id=44680
2018-03-07 15:12:21 +01:00
Vadim Zeitlin
f99d3df9c0 Fix harmless gcc -Wconversion-null warning in menu unit test
Don't compare with NULL inside CPPUNIT_ASSERT() to avoid

	warning: passing NULL to non-pointer argument 1 of
	‘Catch::BinaryExpression<T, (Catch::Internal::Operator)0u, const
	RhsT&> Catch::ExpressionLhs<T>::operator==(const RhsT&) [with
	RhsT = long int, T = wxMenuItem* const&]’ [-Wconversion-null]

gcc warning.
2018-03-07 14:59:40 +01:00
Maarten Bent
b3c25e57bc Fix warning for missing field initializers 2018-03-06 23:43:08 +01:00
Maarten Bent
ef539a68d7 Prevent use of uninitialized variable 2018-03-06 23:31:06 +01:00
Maarten Bent
3b9aeaeb2f More use of wxOVERRIDE 2018-03-06 23:31:01 +01:00
Vadim Zeitlin
fe7cb6f159 Merge branch 'gcc7-conv-warn'
See https://github.com/wxWidgets/wxWidgets/pull/754
2018-03-06 20:02:22 +01:00
Vadim Zeitlin
2c515d730a Regenerate configure after 3.1.2 version update
This was forgotten in 2ec2837f6d.
2018-03-06 20:00:54 +01:00
Vadim Zeitlin
e777f2a253 Document that wxEVT_TREE_ITEM_MENU item is always valid
Mention that wxEVT_CONTEXT_MENU can be used to show popup menus that
should be shown even when clicking outside of the client area.
2018-03-06 19:51:31 +01:00
Vadim Zeitlin
1f7a8a82c3 Round, rather than truncate, in wxSize and wxPoint operations
It seems to make more sense to round the result to int rather than to
truncate it when scaling wxSize or wxPoint coordinates by a floating
point number.
2018-03-06 16:08:01 +01:00
Vadim Zeitlin
bec7c9a161 Don't truncate to int in wxRealPoint::operator*()
wxRealPoint uses double coordinates and it makes no sense to truncate
the result of scaling it to int -- this was almost certainly a
copy-and-paste error due to copying the code of the corresponding
wxPoint method.
2018-03-06 16:06:35 +01:00
Vadim Zeitlin
9774d92e91 Change wxSize::Scale() to take double, not float
There doesn't seem to be any reason to use float here when double is
used everywhere else.

Moreover, the (implicit) conversion of int to float is not always
lossless, and resulted in -Wconversion warnings from g++ 7, which
disappear when using doubles.
2018-03-06 16:01:45 +01:00
Vadim Zeitlin
1540361e75 Avoid warnings about conversion to wxUint16 in wxUniChar code
This conversion is intentional, so suppress the -Wconversion warning
given by g++ 7 (if this warning is enabled) with an explicit cast.
2018-03-06 16:00:47 +01:00
Vadim Zeitlin
2881d9875a Fix recently broken (re-)layout in the listctrl sample
This completes changes of 0873abb836 which
replaced manual layout code with sizers, but broke layout after
recreating the control in the process.

This change notably fixes the control becoming invisible, due to having
the default too small size, in non-report modes.
2018-03-04 22:42:18 +01:00
Kolya Kosenko
eb3971c199 Move GTK+/Win32 libraries list to toolkit.cmake file 2018-03-01 01:16:06 +02:00
Stefan Csomor
c4a4d95ad1 using wx translations for window menu 2018-02-28 21:09:41 +01:00
Stefan Csomor
0fc53016a9 making NSString conversion functions available in private.h 2018-02-28 21:08:27 +01:00
Danny Scott
5e61527c04 Fix typos and shell syntax in the release instructions
Closes #18095.
2018-02-28 18:48:52 +01:00
Vadim Zeitlin
e87544ae70 Fix possible hang after clearing wxTAB_TRAVERSAL style in wxMSW
Clearing this style by calling SetWindowStyleFlag() could reset
WS_EX_CONTROLPARENT extended flags bit, breaking the invariant that the
parent of any window with this bit set has it as well and resulting in
hangs due to infinite loops inside Windows own code iterating over the
controls.

Prevent this from happening by always preserving this style bit if it
was previously set in MSWUpdateStyle(). This is a bit ugly, but there
doesn't seem to be any obviously better way to do it.

Closes #18091.
2018-02-28 16:58:27 +01:00
Stefan Csomor
6b3b05e5f7 fixing classname 2018-02-28 16:24:43 +01:00
Stefan Csomor
a7505356a4 supporting Window Menu as Carbon did 2018-02-28 16:10:33 +01:00
Kolya Kosenko
d6a284783a Fix wxGTK/Win32 CMake build 2018-02-27 23:47:27 +02:00
Vadim Zeitlin
9f77a4f674 Merge branch 'iter-concepts'
Make wxList and wxVector iterators really iterators from C++ point of
view, by defining all the expected types in them.

See https://github.com/wxWidgets/wxWidgets/pull/744
2018-02-26 13:20:09 +01:00
Xaviou
813fdca24c Fix Wrong method name in wxAddRemoveCtrl documentation
Use the correct CanRemove() instead of the non-existent CanRename().

Closes https://github.com/wxWidgets/wxWidgets/pull/747
2018-02-26 13:19:04 +01:00
Xaviou
b1db1bc0bb Wrong method name in wxAddRemoveCtrl documentation sample code 2018-02-25 18:39:59 +01:00
Vadim Zeitlin
cc8fccf0bc Make wxVector reverse iterators conform to iterator requirements
This is similar to a recent commit adding the missing typedefs to wxList
iterators and defines the types required by the iterator concept in
wxVector::reverse_iterator and const_reverse_iterator classes (simple
iterators are just pointers and are already covered by the standard
iterator_traits specialization).
2018-02-23 16:14:03 +01:00
Vadim Zeitlin
382a5a156e Use ptrdiff_t as wxVector::difference_type instead of size_t
difference_type must be signed, using size_t was clearly a mistake.
2018-02-23 16:10:07 +01:00
Vadim Zeitlin
7e0ca8357e Also remove wxList::const_iterator::const_reference typedef
This typedef is redundant with the "reference" one and doesn't seem to
be used anywhere.

As with the previous commit, this one could be reverted later if it
turns out it does break any existing code, but this seems unlikely.
2018-02-23 16:03:36 +01:00
Vadim Zeitlin
9edf06794e Remove ptr_type typedef from wxList iterator classes
This typedef is completely redundant with pointer_type which had been
also available in these classes since the very beginning and seems to
have been meant to be private originally, so it should be safe to just
remove it, especially because I couldn't find any existing code using
it.

If we do find such code in the wild later, this commit could be reverted
as it's not really indispensable.
2018-02-23 16:03:33 +01:00
Vadim Zeitlin
fdbe357e4b Make wxList iterators conform to input iterator requirements
Define "pointer", "reference", "difference_type" and "iterator_category"
typedefs to ensure that wxList iterator classes are seen as iterators by
the standard library in C++11 and later, as otherwise standard container
template ctors taking iterators couldn't be used with them because
they're only available if input iterator requirements are satisfied.

This notably fixes creation of std::list from wxList iterators; add a
test which didn't compile before to show it.
2018-02-23 16:00:06 +01:00
Vadim Zeitlin
0d5378fb84 Remove unnecessary "list" typedef from wxList iterators
This typedef was simply never used and, as it was private, removing it
shouldn't result in any compatibility problems.
2018-02-23 14:21:05 +01:00
Maarten Bent
3d427a1af1 Fix wxWebView::RunScript() with string containing backslashes
Escape backslashes in wxJSScriptWrapper to allow strings with
backslashes in them to work again -- this was broken while implementing
support for returning values from JavaScript to C++.

See https://github.com/wxWidgets/wxWidgets/pull/741
2018-02-22 13:44:00 +01:00
Tobias Taschner
dd2d62c703 Suppress size event when IsMaximized is called on OSX
IsMaximized internally calls [NSWindow isZoomed] which triggers a
windowWillResize call. Resize events will be ignored while calling
isZoomed.

Closes #17407.

See https://github.com/wxWidgets/wxWidgets/pull/740
2018-02-21 17:08:45 +01:00
Vadim Zeitlin
4e5904a4cc Remove unused buildbot XML configuration files
Buildbot configuration was redone in pure Python (see master.cfg in
https://github.com/wxWidgets/buildbot repository) since several years
already, there is no need to keep these obsolete files.
2018-02-20 14:49:50 +01:00
Tobias Taschner
f3f1819daf Add archive sample
This sample shows usage of wxArchiveStream and wxArchiveFactory.
It also allows for easy testing of wxArchiveStream implementations
outside of the unit tests.

See https://github.com/wxWidgets/wxWidgets/pull/730
2018-02-20 14:39:27 +01:00
Vadim Zeitlin
2ec2837f6d Update version to 3.1.2
Run misc/scripts/inc_release and rebake.
2018-02-20 00:08:01 +01:00
Vadim Zeitlin
26c18da2e4 Fix unreadable example in wxDataViewValueAdjuster documentation
@code tag must be used to make the code readable and using @example
seems to be unnecessary and just results in the creation of an extra
"Examples" page in the documentation containing only this example and an
absolute path (apparently not affected by STRIP_FROM_PATH) to
interface/wx/dataview.h file itself in the generated documentation.
2018-02-18 22:47:46 +01:00
Vadim Zeitlin
0a10bfc63e Fix wrong @subpage usage on the main manual page
Using @subpage multiple times with the pages we wanted to just link to
resulted in them appearing twice in the tree shown in the CHM file.

Just use @ref when a link is wanted instead.
2018-02-18 22:46:35 +01:00
Vadim Zeitlin
c3be5d7550 Use relative path in Doxygen STRIP_FROM_PATH
This seems better than requiring yet another environment variable to be
defined, and should work reliably as Doxygen is always run from
docs/doxygen directory.

Leave WXWIDGETS in STRIP_FROM_INC_PATH which doesn't seem to be used
anywhere anyhow -- and so, perhaps, should be removed entirely?
2018-02-18 22:45:02 +01:00
Vadim Zeitlin
379a404f98 Update release notes for final 3.1.1
Remove all references to RC.
2018-02-18 21:30:31 +01:00
Stefano D. Mtangoo
bf418320b7 Work around crash in wxStyledTextCtrl under Mac
When not using double buffering, double-clicking to select text in the
control results in crashes.

Avoid this by using double-buffering under Mac, even though it shouldn't
be necessary.

This reverts the changes of cb799483b7
under Mac.

See #18085.
2018-02-18 21:22:41 +01:00
Vadim Zeitlin
cad824d089 Let windows with wxWANTS_CHARS have TAB presses under Mac
This notably fixes the use of TAB in wxStyledTextCtrl, where it's
supposed to be handled by the control itself and not as a navigation
key, but is more general than this.

Fixes a regression from 8bca6deda3.

Closes #17999.
2018-02-18 21:22:41 +01:00
Vadim Zeitlin
a4487c056b Preserve style changes in wxGTK wxTextEntry auto-complete code
Don't overwrite the current window style with the style that it had when
AutoComplete() was called in wxGTK code, just turn wxTE_PROCESS_ENTER
off or on, without touching the other bits.

This still can result in setting wxTE_PROCESS_ENTER bit itself
unexpectedly if it somehow is changed while the completion popup is
shown, but this shouldn't happen often (if ever) in practice and, at
least, the other bits are preserved no matter what.

See https://github.com/wxWidgets/wxWidgets/pull/729
2018-02-18 21:22:41 +01:00
Vadim Zeitlin
8278f7b618 Fix crash when changing auto-completer in wxGTK
Recent changes resulted in crashes when handling grab-notify signal in
an already deleted object.

Fix this by disconnecting our grab-notify handler when destroying the
object, unless the entire associated wxTextEntry is being destroyed (in
which case no such signals risk to be generated anyhow).

In order to be able to do this safely, store the widget to whose signal
we had connected and check that the widget is still valid before
disconnecting. This also allows to simplify the code by getting rid of
DisableCompletion() and just doing the cleanup in dtor.

Closes #18084.
2018-02-18 21:22:41 +01:00
New Pagodi
c83ddec75f Fix drawing call tips in wxSTC when using Direct2D
Use the correct window as the containing control in SurfaceD2D.

Closes #18080.
2018-02-17 19:49:48 +01:00
Vadim Zeitlin
1dc1d66fe1 Stop using Fn keys as accelerators in the widgets sample
This prevented them from being used for their usual purposes, e.g. F4
didn't open the combobox dropdown under MSW, which was annoying as it
made testing more difficult.

Just stop using the accelerators, especially as they could be only used
for less than half of pages anyhow.
2018-02-17 14:49:54 +01:00
AliKet
4179375f3e Add custom auto-completer support to wxMSW wxComboBox too
Custom auto-completers didn't work for wxComboBox as it didn't generate
wxEVT_AFTER_CHAR event that the completion code in wxTextEntry relies on
to make them work.

Add this event generation to wxComboBox::MSWProcessEditMsg() to fix
this.

Closes https://github.com/wxWidgets/wxWidgets/pull/732
2018-02-17 14:49:38 +01:00
Vadim Zeitlin
6bb45751e5 Remove redundant ShouldForwardFromEditToCombo() check
No real changes, just avoid calling ShouldForwardFromEditToCombo() in
MSWProcessEditMsg() because this function is only called when the
message should be forwarded.

Also make the comment about the return value more clear.
2018-02-17 14:17:13 +01:00