Commit Graph

64010 Commits

Author SHA1 Message Date
Vadim Zeitlin
76c75d87f5 Describe the available files better in the release notes
Also mention that GitHub-provided links to the source code should _not_
be used.
2018-02-05 23:29:31 +01:00
Vadim Zeitlin
6961bcb43f Update 3.1.1-rc binaries SHA-1 checksums 2018-02-05 23:21:25 +01:00
Vadim Zeitlin
562e7c4427 Update release notes for 3.1.1-rc
Update MinGW versions used for the binaries and provide links to the
working compilers.

Add "-rc" to some links to make them work.

Also update the binaries file names.
2018-02-05 15:51:11 +01:00
Vadim Zeitlin
05a2945048 Update sha1sums for 3.1.1-rc archives
Done by running "./build/tools/post-release.sh 3.1.1-rc".
2018-02-05 15:44:19 +01:00
Vadim Zeitlin
35d2823601 Tweak post-release script and documentation
For the release candidates, allow passing the version (e.g. "3.1.1-rc")
to post-release.sh on the command line and document this.

Also don't commit automatically, this is annoying, especially as the
script doesn't check for errors.

Finally, fix the problem with the CHM file name: it must be zipped,
presumably to avoid problems with some firewalls blocking downloading
CHM files (as there is really no advantage in compressing the already
compressed CHM file otherwise).
2018-02-05 15:44:19 +01:00
Vadim Zeitlin
08ea09c7fe Update various READMEs for 3.1.1 release
Update the list of changes and the dates.
2018-02-05 15:10:35 +01:00
Arrigo Marchiori
1c14c2ce9e Fix disabled owner-drawn buttons look with classic MSW theme
Don't grey out the buttons text when they're implicitly disabled because
the parent TLW is disabled by MSW while showing a modal dialog, this
looked bad. Only grey the buttons text when they're really disabled at
wx level.

Closes #18011.
2018-02-05 14:29:20 +01:00
Vadim Zeitlin
eee4f5969f Merge branch 'dvc-more-fixes'
More, mostly event-related, wxDataViewCtrl fixes.

See https://github.com/wxWidgets/wxWidgets/pull/718
2018-02-05 14:04:42 +01:00
Scott Talbert
1f2173b9be Fix custom scheme handling in wxWebView WebKit2 implementation
The custom scheme handling implementation had been inherited from the
original WebKit1 implementation.  It attempted to intercept navigation
and resource load requests and then inject the resources.  It seems that
this method doesn't work in WebKit2, but fortunately, there is native
support in WebKit2 for custom URI schemes through the
webkit_web_context_register_uri_scheme() API.

Also extend wxGtkError to allow creating it from an existing GError
object as a side-effect of these changes.

See https://github.com/wxWidgets/wxWidgets/pull/716
2018-02-05 14:04:41 +01:00
Vadim Zeitlin
33cbefd739 Send wxEVT_DATAVIEW_ITEM_EDITING_DONE for all renderers in wxGTK
Previously this event was not sent for the standard renderers, such as
wxDataViewTextRenderer, at all in wxGTK because the base class
FinishEditing() class didn't do anything if m_editorCtrl was null, as it
was always the case for non-custom renderers.

Fix this by refactoring the base class code in yet another way and
extracting the part which can be reused by both the generic and GTK
implementation in a new DoHandleEditingDone() function and call it from
wxGTK code.

Finally, check "editing-canceled" property to also correctly generate
the event with IsEditCancelled() returning true when editing is canceled
by e.g. pressing Esc in a standard renderer too.

And, as a final bonus, this makes the (just introduced) slightly
artificial DoFinishOrCancelEditing() unnecessary, so it can be removed,
without reintroducing any code duplication.

See #17835.
2018-02-05 01:05:16 +01:00
Vadim Zeitlin
a00b8dec8b Reduce code duplication in wxGTK wxDataViewRenderer classes
The code was more complicated than necessary, with the base class
providing both virtual GtkOnCellChanged() and GtkOnTextEdited() that
were both overridden to achieve the same thing, namely customizing how
the value entered by user is converted to wxVariant, in different
derived classes.

Make GtkOnTextEdited() non-virtual and remove GtkOnCellChanged()
completely and add a new simple GtkGetValueFromString() which is called
from GtkOnTextEdited() to do the conversion.

This removes the existing code duplication and will make it simpler to
modify this code in the future, without changing the behaviour.
2018-02-05 00:01:52 +01:00
Vadim Zeitlin
0972dece27 Catch EDITING_{STARTED,DONE} for all pages in dataview sample
This is useful to allow checking that the expected events are sent for
the custom editor in the second page of the sample too, in addition to
the standard ones used in the first page.
2018-02-04 23:43:47 +01:00
Vadim Zeitlin
1e3e5b7253 Send wxEVT_DATAVIEW_ITEM_EDITING_DONE after cancelling too
Previously this event was not sent at all if editing the item was
cancelled, e.g. by pressing Esc.

Do send it now from the generic implementation and update the sample to
show this event.

See #17835.
2018-02-04 22:58:03 +01:00
Vadim Zeitlin
7e3d28e79f Rename wxDataViewEvent::SetEditCanceled() and remove its argument
This method should be only used when the edit is really cancelled, so it
doesn't need to take a boolean argument.

It should also use the same spelling as IsEditCancelled() (and for
consistency with the rest of wxWidgets API which uses British English).

Also remove this method from the documentation, it is not part of the
public API.
2018-02-04 22:36:14 +01:00
Vadim Zeitlin
77231f5907 Make wxDataViewRendererBase::DestroyEditControl() private
This method is only supposed to be used by this class and not any
derived classes, so prevent it from being used accidentally.

No real changes.
2018-02-04 22:20:22 +01:00
Maarten
aaf58e2b49 Set Unicode definitions for third party libraries in CMake build
See https://github.com/wxWidgets/wxWidgets/pull/717

See #18077.
2018-02-04 18:51:22 +01:00
PB
a342582eb1 Don't build samples that cannot be built with CMake
When using CMake to generate project files, do not create projects for
samples that rely on a feature that is not available. For example, do
not create a project for the AUI sample when wxUSE_AUI=0.

Closes https://github.com/wxWidgets/wxWidgets/pull/713
2018-02-04 15:53:09 +01:00
Vadim Zeitlin
48fb2b42b1 Send wxEVT_DATAVIEW_COLUMN_REORDERED in generic wxDataViewCtrl
Simply translate wxEVT_HEADER_END_REORDER into this event, which was
previously only sent by the macOS version.

GtkTreeView doesn't seem to support column drag-and-drop at all, so this
event is still never generated by wxGTK.

Closes #14297.
2018-02-04 15:45:23 +01:00
Vadim Zeitlin
f33f1f2078 Fix a typo in EVT_DATAVIEW_COLUMN_REORDERED documentation
See #14297.
2018-02-04 15:32:01 +01:00
Vadim Zeitlin
af78ad3b49 Add wxDataViewCtrlBase::SetAlternateRowColour()
Previously this method was only available in the generic wxDataViewCtrl,
move it to the base class to make it possible calling it in portable
code and document it.

Closes #14617.
2018-02-04 15:27:02 +01:00
Vadim Zeitlin
da4e125db4 Merge branch 'dvc-misc'
Several bug fixes to (mostly generic, but not only) wxDataViewCtrl.

See https://github.com/wxWidgets/wxWidgets/pull/715
2018-02-04 15:11:48 +01:00
Vadim Zeitlin
5b8670f3ca Merge branch 'gtk-combo-focus'
Fix spurious focus loss events for wxGTK comboboxes.

See https://github.com/wxWidgets/wxWidgets/pull/714
2018-02-04 14:52:27 +01:00
Vadim Zeitlin
508a409f7e Suppress focus loss on opening combobox popup in wxGTK
Make GTKHandleFocusOut() virtual and override it in wxChoice in order to
avoid generating wxEVT_KILL_FOCUS events when the combobox dropdown
button is clicked.

This is important because it allows fatal problems when using a
combobox-based in-place editor in wxDataViewCtrl as getting these events
totally broke the UI before.

See #17034.
2018-02-04 14:51:58 +01:00
Paul Cornett
fa000d254d Use wxFALLTHROUGH 2018-02-03 22:38:23 -08:00
Paul Cornett
52a30cde6f Remove useless gtk_widget_set_size_request()
It won't have any effect on the best size computation, and leaving the
size set to (0,0) is really bad form
2018-02-03 22:36:44 -08:00
Paul Cornett
e2a04e1fd7 Use signal blocking rather than disconnection to temporarily disable events 2018-02-03 22:30:36 -08:00
Paul Cornett
c391cfd617 Avoid using already-destroyed parts of wxChoice/wxComboBox during destruction
When used as a wxDVC cell editor, GtkComboBox has already destroyed
it's model and child GtkEntry by the time our dtor is called.
See #17034
2018-02-03 22:28:35 -08:00
Vadim Zeitlin
3a16250303 Don't make inert toggle/choice wxDataViewCtrl cell editable in wxOSX
Don't disable all inert renderers as this results in ugly "disabled"
look for some of them (see 6e885992f5),
but do disable the renderers that would be editable otherwise, such as
wxDataViewChoiceRenderer and wxDataViewToggleRenderer, in wxOSX as it
shouldn't be possible to change value of the inert cells.

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

Closes #18056.
2018-02-04 00:35:11 +01:00
Maarten Bent
2fb4e11174 Remove "update = checkout" option for submodules
This reverts af16d8ba5c. It caused
problems with older git versions (e.g. 1.8.5) that do not recognize the
checkout option: warning: unknown update mode 'checkout' suggested for
submodule '3rdparty/catch' Skipping submodule '3rdparty/catch'

Also specify the branch for the catch submodule, to be in line with the
other submodules.
2018-02-04 00:33:08 +01:00
Maarten Bent
683185aee1 Explicitly mention build environments for Travis CI
This removes a duplicate build on Travis, cause by a change of the
default build environment.
2018-02-04 00:33:08 +01:00
Vadim Zeitlin
d44dd8caf4 Document wxDataViewCtrl::GetMainWindow()
This method can be useful, so make it part of the public API, similarly
to e.g. wxGrid::GetGridWindow().

See #17786.
2018-02-04 00:28:08 +01:00
Vadim Zeitlin
50e9984d68 Merge branch 'msw-renderer-rect'
A couple of fixes to rectangles used in wxMSW wxRenderer code

See https://github.com/wxWidgets/wxWidgets/pull/711
2018-02-04 00:16:15 +01:00
Vadim Zeitlin
d7b88827b8 Avoid spurious focus events for composite windows in wxMSW
Composite windows, i.e. wxWindows composed of several HWNDs at MSW
level, didn't handle focus events correctly and, for example, generated
wxEVT_KILL_FOCUS event when the focus simply switched from wxComboBox
itself to the EDIT control inside it, which broke using non-readonly
wxComboBox as in-place editor inside wxDataViewCtrl.

Check if the focus event notifies about the focus switching to, or from,
another HWND belonging to the same window, and suppress wx event
generation in this case as they don't make sense because the focus
doesn't change at wx level.

See #17034.
2018-02-04 00:14:31 +01:00
Hartwig Wiesmann
43c1baf1bd Fix wxDataViewColumn::SetSortOrder() under macOS
Don't check if we already sort by the column in SetSortOrder() as this
meant the sort order couldn't be changed programmatically at all.

Closes #15405.
2018-02-04 00:14:31 +01:00
Vadim Zeitlin
6c9ced9be2 Document wxDataViewListCtrl default sort order
Also explain how to change it if the default behaviour of putting all
the container items before all the leaves is undesirable.

Closes #16105.
2018-02-04 00:14:31 +01:00
Vadim Zeitlin
f7e592b335 Use wxVector for storing wxDataViewTreeStoreNodes
Replace the use of wxList macros with wxVector.

Also make wxDataViewTreeStore::Compare() slightly more efficient by
iterating over the children list only once instead of doing it twice.
2018-02-04 00:14:31 +01:00
Vadim Zeitlin
342388a456 Use wxCHECK_MSG() instead of wxLogError in wxDataViewTreeStore
This is a check for a programming error and should never be shown to the
user, so assert that the items being compared in wxDataViewTreeStore are
under the same parent instead of using wxLogError.
2018-02-04 00:14:31 +01:00
Vadim Zeitlin
bb0a2952b1 Replace macros with wxVector<> for wxDataViewModelNotifiers
Don't use deprecated macro-based linked list class, use wxVector<>
instead for m_notifiers.

Also make it private, as it should have been from the beginning.
2018-02-04 00:14:31 +01:00
Vadim Zeitlin
30f73aea6a Make using custom colour for wxDataViewProgressRenderer work again
This used to work in 3.0, but got broken with the switch to using a
native function for rendering the gauge in generic wxDataViewCtrl
86cf756ba9 (see #16406).

Restore it now, even if it requires not one, but two hacks: one at
wxRendererGeneric level to guess whether a custom colour is being used
or not by examining wxDC::GetBackground(), and the other one in
wxDataViewProgressRenderer itself to fall back to wxRendererGeneric if
the colour is specified. But it is arguably worth doing this to fix the
regression, even if it would be nice to provide a better API instead
(see #18076).

Closes #17885.
2018-02-04 00:14:31 +01:00
Vadim Zeitlin
4b69c1a718 Remove m_penExpander from generic wxDataViewCtrl code
This pen was never used as wxRendererNative::DrawTreeItemButton() always
uses its own colours, even in the generic version.
2018-02-04 00:14:31 +01:00
Vadim Zeitlin
2600bc34ff Put column images on the right side in generic wxDataViewCtrl
For consistency with wxListCtrl under MSW (which is the only platform
where this change has any effect, as wxHD_BITMAP_ON_RIGHT is only
supported there), put the column images on the right side in
wxDataViewCtrl too.

Closes #13350.
2018-02-04 00:14:31 +01:00
Vadim Zeitlin
fd73ae1623 Add wxHD_BITMAP_ON_RIGHT style to wxHeaderCtrl
Implement this style for wxMSW to allow putting the column images on the
right side, for consistency with wxMSW wxListCtrl.

See #13350.
2018-02-04 00:14:28 +01:00
Vadim Zeitlin
0b1acae0a7 Fix drawing of expander buttons in wxDataViewCtrl under MSW
The buttons were truncated, making them look ugly, because we didn't
allocate enough space for them. Instead of complicating generic
wxDataViewCtrl code even further with more MSW-specific code, just let
DrawItemTreeButton() center the expander itself in the space allocated
for it.

This still involves guessing the width of the expander, but this doesn't
need to be done as precisely, so it's still an advantage. Note that
previously calculating expander size involved m_lineHeight, for some
reason, but now we use GetCharWidth() for it, which is more appropriate.

Closes #17863.
2018-02-04 00:14:13 +01:00
mikek
f1087d7fd5 Fix missing selection event in generic wxDataViewCtrl
No event was sent if the selection was narrowed by clicking on an
already selected item without any key modifiers pressed.

Fix this by generating an event always on click and not only when
selecting a new item.

Closes #17881.
2018-02-04 00:14:13 +01:00
Vadim Zeitlin
0d14dd8fe0 Test disabling wxDataViewCtrl in the dataview sample
Just make it simple to verify whether disabling the control works as
expected.

See #14186.

See #17887.
2018-02-04 00:14:13 +01:00
mikek
945cec4be1 Refresh generic wxDataViewCtrl after disabling it
Grey the control out immediately, instead of waiting until the next
refresh to do it.

Closes #17887.
2018-02-04 00:14:13 +01:00
Vadim Zeitlin
bfd3f1b33f Fix some typos in wxDataViewCtrl documentation
No real changes.
2018-02-04 00:14:13 +01:00
Vadim Zeitlin
a995af6029 Merge branch 'render-vert-gauge'
Allow using DrawRender() for vertical gauges too #712.

See https://github.com/wxWidgets/wxWidgets/pull/712
2018-02-04 00:12:26 +01:00
Vadim Zeitlin
1148b2e0fe Make GTKHandleDeferredFocusOut() non-static
Slightly simplify the code by making it a member function.

No real changes.
2018-02-03 23:56:44 +01:00
Vadim Zeitlin
f8674c7ff0 Remove unnecessary check for gs_deferredFocusOut
GTKHandleDeferredFocusOut() is only ever called when gs_deferredFocusOut
is non-null, so there is no need to check for it inside this function
again.

No real changes.
2018-02-03 23:30:31 +01:00