Commit Graph

65412 Commits

Author SHA1 Message Date
oleksii.vorobiov
fd5c62bc41 Make updating the value in wxEVT_SPINCTRL work in wxMSW
In wxMSW, the value of the control was modified after executing the
user-defined wxEVT_SPINCTRL handler which meant that any calls to
SetValue() there were effectively ignored.

Fix this and add a unit test checking for the described scenario.

Closes https://github.com/wxWidgets/wxWidgets/pull/1027

Closes #18187.
2018-12-08 19:51:56 +01:00
Vadim Zeitlin
b408e4c630 Update the release notes for 3.1.2
Change the version and update the list of MinGW compilers for which the
binaries are provided in this release.
2018-12-08 19:16:49 +01:00
Vadim Zeitlin
aef36f912a Fix 3.1.2 release date in the change log and the manual 2018-12-08 19:16:49 +01:00
Vadim Zeitlin
2e007cb3ec Update the list of changes before 3.1.2 release
Update both the (more detailed) README and the (shorter) announcement
message.

Also update the statistics and the cumulated changes since 3.0.
2018-12-08 19:16:27 +01:00
Pavel Kalugin
facb06a1b8 Fix wxSize member names in the documentation
wxSize members x and y were incorrectly mentioned as width and height in
the docs.

Closes https://github.com/vadz/wxWidgets/pull/6
2018-12-08 19:02:28 +01:00
Vadim Zeitlin
36aa63f2fd Slightly improve README wording
Also add direct links to the installation instructions.
2018-12-08 18:53:36 +01:00
Vadim Zeitlin
1cc6aabe09 Merge branch 'dvc-edit-right-click'
Stop editing when right mouse button is pressed in wxDataViewCtrl.

See https://github.com/wxWidgets/wxWidgets/pull/1052
2018-12-08 00:52:47 +01:00
Vadim Zeitlin
b12f391514 Merge branch 'gcdc-without-display'
Make it possible to use wxGCDC without a display.

See https://github.com/wxWidgets/wxWidgets/pull/1044
2018-12-08 00:51:33 +01:00
Graham Dawes
84f788ff89 Implement missing wxTopLevel methods for wxQt
This allows the unit test wxPersistTLW to pass.

Closes https://github.com/wxWidgets/wxWidgets/pull/1055
2018-12-08 00:50:27 +01:00
Vadim Zeitlin
b5944a0730 Fix wxAUI build with wxUSE_MDI==0
Include wx/frame.h explicitly as it's not included by wx/aui/tabmdi.h in
this case.

Closes #18291.
2018-12-08 00:47:03 +01:00
Vadim Zeitlin
0e9d190878 Fix wrong Release() call in the previous commit
The last commit had a bad bug as it called Release() on a wrong pointer.

Also use "0x" prefix for hexadecimal numbers and not "0X".

See https://github.com/wxWidgets/wxWidgets/pull/678
2018-12-07 16:19:10 +01:00
ashishmore
87bd82ab6f Fix wxMediaCtrl::SetPosition() in MSW WMP backend
Step the control one frame forward to actually show the frame at the
given position, otherwise the control only showed black screen.

Closes https://github.com/wxWidgets/wxWidgets/pull/678
2018-12-07 15:18:05 +01:00
chris2oph
3e79f903b4 Make wxListBox::SetString() actually work in wxQt
Do set the string on QListWidgetItem.

Closes https://github.com/wxWidgets/wxWidgets/pull/1047
2018-12-07 14:55:16 +01:00
Vadim Zeitlin
aee926f2d5 Make wxVector::reverse_iterator satisfy RandomAccessIterator
RandomAccessIterator requirements include LessThanComparable, so
implement the missing comparison operators for this class, as well as
for const_reverse_iterator.

This also fixes compilation problems with MSVS 2013 in debug mode, where
the CRT uses these operators to check the iterators correctness.

See https://github.com/wxWidgets/wxWidgets/pull/1048
2018-12-07 14:52:51 +01:00
jwiesemann
3d75541662 Fix bug in template selection in docview framework
Don't use the template specified by the filter in the file open dialog
if it's incapable of actually handling the current file.

This fixes a regression compared to 2.8 in docview code and allows
opening a file using the correct template for its extension even if an
incorrect (e.g. default) filter is chosen in the file open dialog.

Closes #18123.
2018-12-07 03:34:21 +01:00
Vadim Zeitlin
b650c9e536 Merge branch 'cmake-wxconfig' of https://github.com/MaartenBent/wxWidgets
Make CMake build more similar to the autotools one: install the headers
into the same directory and produce working wx-config.

See https://github.com/wxWidgets/wxWidgets/pull/1051
2018-12-07 03:23:37 +01:00
Liam Treacy
effdec75bd Fix crash when changing wxQt wxScrollBar position
wxScrollBar::SetScrollbar() now blocks the signals of QScrollBar before
setting a value, which avoids behaviour where slots are called before
the QScrollBar is displayed.

Closes https://github.com/wxWidgets/wxWidgets/pull/1050
2018-12-07 00:34:28 +01:00
Vadim Zeitlin
1ca3e264be Merge branch 'qt-listbox'
Closes https://github.com/wxWidgets/wxWidgets/pull/1049
2018-12-07 00:33:09 +01:00
Liam Treacy
10381cb94e Deselect all items in wxQt wxListBox::SetSelection(wxNOT_FOUND)
Follow wxWidgets API convention in wxQt too.
2018-12-07 00:33:01 +01:00
Liam Treacy
1f0e456620 Implement wxListBox::GetSelections() in wxQt 2018-12-07 00:32:58 +01:00
Liam Treacy
fd8248762e Add support for wxLB_SORT to wxListBox in wxQt 2018-12-07 00:32:52 +01:00
Jay Nabonne
82a66e56b2 Fix possible usage of uninitialized variable in wxQt wxDC code
Make sure rasterColourOp is always initialized, even if none of the
switch cases matches, to avoid warnings about possibly uninitialized
variable.

See https://github.com/wxWidgets/wxWidgets/pull/1048
2018-12-07 00:11:56 +01:00
Jay Nabonne
194936ab26 Fix doubly-qualified namespace in wxQt wxDC code
Avoid (almost certainly accidentally) repeating "QPainter::".

See https://github.com/wxWidgets/wxWidgets/pull/1048
2018-12-07 00:11:01 +01:00
Maarten Bent
28a13209a2 CMake: Compile and link with -pthread when using pthread 2018-12-06 23:22:33 +01:00
Vadim Zeitlin
dc1aa3097c Avoid warnings on right click in GTK wxDataViewCtrl while editing
The code handling right button click used the path of the item under
mouse without checking if there was any item, resulting in GTK+ warnings
due to the use of an invalid item.

Simply add a check for the item validity: we definitely don't want to
select it if it's invalid anyhow.
2018-12-06 22:55:42 +01:00
Vadim Zeitlin
da612f02b5 Stop editing in generic wxDataViewCtrl when any button is pressed
Previously, the editor was hidden if the left mouse button was pressed,
but not for the right (or any other) button, which could result in a
confusing situation when a user could select a command from a context
menu shown from the corresponding event handler and start editing
another item while the current one was still being edited too.
2018-12-06 22:53:28 +01:00
Maarten Bent
c28ae123c1 CMake: Set wx-config extra libraries and flags 2018-12-06 22:48:03 +01:00
Maarten Bent
12ed604cb3 CMake: Set wx-config name variables 2018-12-06 22:39:42 +01:00
Maarten Bent
33a550d97f CMake: Set wx-config base, gui and built libraries
Remove unused propagated variables.
2018-12-06 22:39:41 +01:00
Maarten Bent
bc4b56bf88 CMake: Reorder items in config.cmake
Group similar items together.
2018-12-06 22:39:41 +01:00
Maarten Bent
8cf2b683be CMake: Fix installation include directory 2018-12-06 22:39:41 +01:00
Vadim Zeitlin
2d18aaf58a Move check for mouse button down events in wxDataViewMainWindow
No real changes, just prepare for the next commit.
2018-12-06 20:48:32 +01:00
Vadim Zeitlin
aa6a8fbdf0 Document that wxGCDC takes ownership of the provided context
This is a rather important detail which the documentation completely
forgot to mention.
2018-12-06 03:43:37 +01:00
Vadim Zeitlin
507e331eb1 Improve creating wxGCDC from an existing wxGraphicsContext
Avoid creating a default wxGraphicsContext unnecessarily, only to
immediately delete it and replace it with the provided one.

This was at best unnecessary and at worst resulted in a crash if the
default context couldn't be created, as happened on a headless system
(where wxImage-based wxGraphicsContext can still be created
successfully).
2018-12-06 03:40:49 +01:00
Vadim Zeitlin
54e9150157 Remove redundant wxDFBDCImpl::m_mm_to_pix_[xy] members
The base class already has exactly the same members, so just use them
instead.

No real changes, just avoid (or at least reduce) confusion.
2018-12-06 03:30:55 +01:00
Vadim Zeitlin
3dc16a7419 Compute wxDCImpl::m_mm_to_pix_[xy] on demand
If nothing else, this avoids 2 calls to each of wxGetDisplaySize() and
wxGetDisplaySizeMM() on each and every wxGCDC construction which are
completely unnecessary as wxGCDCImpl uses its own hardcoded resolution
of 72 DPI, as do some other classes deriving from wxDCImpl.

And even for the classes which do compute these fields using the display
resolution, it may still be unnecessary to do it as they can be never
used if neither GetSizeMM() nor SetLogicalScale() are called on the
corresponding wxDC object.

Finally, this is more than an optimization as when using Cairo-based
wxGCDC without display (which is explicitly supported), calling
wxGetDisplaySize() simply doesn't work at all.
2018-12-06 03:30:55 +01:00
Stefan Ziegler
e1a702a205 Fix removing and inserting pages in wxToolbook
Removing a page from wxToolbook could result in crashes due to
dereferencing the now invalid page index. Fix this by not assuming that
the page index is the same as its tool ID, but adding functions to
explicitly map one to the other.

Also fix inserting pages into wxToolbook, which worked as appending them
before.

Closes https://github.com/wxWidgets/wxWidgets/pull/1042

Closes #18275.
2018-12-05 17:23:57 +01:00
Liam Treacy
729295d02f Set wxGauge initial value correctly in wxQt
The default value of QProgressBar is -1, while wxGauge initial value
must be 0, so set it explicitly to fix a unit test failure with wxQt.

Closes https://github.com/wxWidgets/wxWidgets/pull/1043
2018-12-05 17:19:13 +01:00
Tomay
f271cc61e8 Fall back on default margins if the theme doesn't provide them
::GetThemeMargins() may fail if the custom theme being currently used
doesn't implement the required functionality, so initialize MARGINS with
some reasonable values before calling it, if only in order to avoid
using uninitialized (and so wildly wrong) margin values in this case.

Closes https://github.com/wxWidgets/wxWidgets/pull/1036

Closes #18278.
2018-12-05 03:12:34 +01:00
Vadim Zeitlin
ce45edcc51 Merge branch 'cmake-linux' of https://github.com/MaartenBent/wxWidgets
Various CMake checks improvements.

See https://github.com/wxWidgets/wxWidgets/pull/1037
2018-12-05 03:09:36 +01:00
Liam Treacy
928b00ad55 Fix setting initial value of wxSpinCtrl in wxQt
When creating a QSpinBox, the range must be set before setting the
initial value as otherwise setting it would fail if it were outside of
the default [0, 99] range.

This fixes a test failure in the corresponding unit test.

Closes https://github.com/wxWidgets/wxWidgets/pull/1041
2018-12-05 03:05:27 +01:00
Liam Treacy
94a58121f7 Fix crash on setting the accelerator table in wxQt
Check whether m_qtShortcuts is non-null before dereferencing it.

Closes https://github.com/wxWidgets/wxWidgets/pull/1040
2018-12-05 03:04:17 +01:00
Liam Treacy
5e089badc0 Fix bitmap accessor for the buttons in wxQt
Return the bitmap previously set with SetBitmap().

This fixes unit tests using GetBitmap().

Closes https://github.com/wxWidgets/wxWidgets/pull/1035
2018-12-05 03:00:49 +01:00
Liam Treacy
29f771ab82 Add support of wxFONTSTYLE_SLANT to wxFont in wxQt
Closes https://github.com/wxWidgets/wxWidgets/pull/1034
2018-12-05 02:57:40 +01:00
Liam Treacy
16c121d4d3 Implement [GS]etLabel() for wxStaticText and wxCheckBox in wxQt
This allows the corresponding unit tests to pass.

Closes https://github.com/wxWidgets/wxWidgets/pull/1033
2018-12-05 02:55:54 +01:00
Vadim Zeitlin
7e22ddd27c Merge branch 'qt_menubar' of https://github.com/GeoTeric/wxWidgets
Improve radio menu items support in wxQt and make the menu unit tests
pass for it, although some of them had to be disabled.

See https://github.com/wxWidgets/wxWidgets/pull/1030
2018-12-05 02:53:37 +01:00
Daniel Collins
4726819484 Rotate wxNotebook tabs label under wxGTK to match other ports
wxMSW and wxOSX/Cocoa show the labels vertically for the tabs positioned
on the left- or right-hand side of wxNotebook, but wxGTK showed them
horizontally.

Bring it in sync with the other ports by rotating the labels to draw
them vertically as the other ports do in wxGTK too.

Closes https://github.com/wxWidgets/wxWidgets/pull/1032
2018-12-05 02:48:45 +01:00
Vadim Zeitlin
dbd46881e6 Fix links to installation instructions in README-GIT.md
The extensions of these files have changed from .txt to .md, see
1b5e3649e5

Closes #18282.
2018-12-04 15:18:24 +01:00
Daniel Kulp
727a100a6a Handle wxEVT_SYS_COLOUR_CHANGED in wxAUI classes
Update the colours used when the system theme changes.

This is especially important to use the colour scheme compatible with
macOS 10.14+ dark mode.

Note that this commit is best viewed with "git diff --color-moved".

Closes https://github.com/wxWidgets/wxWidgets/pull/916
2018-12-03 19:48:32 +01:00
Stefan Ziegler
974b7c0990 Add wxToolbook::EnablePage()
Add functions to enable or disable pages inside wxToolbook.

Using the new functions you can present disabled icons so that the user
can expect more functionality and you do not need to add/remove pages in
different states.

Closes https://github.com/wxWidgets/wxWidgets/pull/1038
2018-12-03 19:42:45 +01:00