Commit Graph

65301 Commits

Author SHA1 Message Date
jensgoe
1f0e32e485 fixed handling of NULL items 2018-12-10 13:55:04 +01:00
Vadim Zeitlin
9a91f59399 Revert the change to RefreshRows() in a recent commit
There doesn't seem to be any reason for this check to exist.
2018-12-07 04:17:16 +01:00
Vadim Zeitlin
cee89508d3 Simply destroying row heights cache
There is no reason to neither check that the pointer is non-null nor to
call Clear() on it before deleting it, so don't do it.
2018-12-07 04:17:16 +01:00
Vadim Zeitlin
39e540edb7 Fix HeightCache DLL export declaration
Use CORE, not ADV, which doesn't exist any more.
2018-12-07 04:17:16 +01:00
Vadim Zeitlin
d1b02b8dd6 Fix memory leaks in newly added unit test
There is no need to allocate neither RowRanges nor HeightCache on the
heap, just create them on the stack -- if nothing else, this ensures we
don't leak memory, unlike before.
2018-12-07 04:17:16 +01:00
Vadim Zeitlin
090491cdbc Minor style and formatting clean up of the new code
Fix typos in comments and indent them.

Wrap over-long lines.

Remove useless top-level const.
2018-12-07 04:17:16 +01:00
Vadim Zeitlin
9eea5cae23 Make RowRanges::GetSize() inline
No real changes.
2018-12-07 04:05:19 +01:00
Vadim Zeitlin
85557d818d Replace a silent "impossible" return with a wxCHECK_RET()
Instead of writing a comment saying that something is not supposed to
happen, add an assertion verifying that it actually doesn't happen.
2018-12-07 04:05:19 +01:00
Vadim Zeitlin
7a949b4566 Remove unnecessary wx/log.h from rowheightcache.cpp
Also remove commented out wxLogMessage() call.
2018-12-07 04:05:19 +01:00
jensgoe
d6a137b730 Improve wxDataViewCtrl performance with wxDV_VARIABLE_LINE_HEIGHT
Store the line heights in a cache to make the (generic) wxDataViewCtrl
usable with this style.
2018-12-07 04:05:16 +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
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
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
Stefan Csomor
58f3dcf780 fixing macOS sound crash
make sure no completion call gets triggered after this point
2018-12-03 14:42:27 +01:00
Maarten Bent
e984857b0e CMake: Improve webview checks
Try to match behavior of configure.
Fix building webview sample with STC disabled.
2018-12-03 00:20:38 +01:00
Maarten Bent
8192d507e3 CMake: Fix wx-config include dirs 2018-12-02 17:45:43 +01:00
Maarten Bent
c0544afcd7 CMake: Improve installation on Linux
Install setup header, wx-config and wxrc. Make wx-config executable.
Add renamed files and symbolic links to uninstall target.
2018-12-02 17:45:43 +01:00
Maarten Bent
c80aecbfc1 CMake: Put include and link commands on one line
Use correct check for LIBICONV.
2018-12-02 17:45:43 +01:00
Maarten Bent
29666f1d91 CMake: Fix wxscintilla with precompiled headers and clang
The problem also occurs on Linux.
2018-12-02 17:45:35 +01:00
Maarten Bent
5282f92f8f CMake: Silence OpenGL policy warning 2018-12-02 17:45:34 +01:00
Maarten Bent
271ed4d990 CMake: Support SDL audio back-end
Rename UNIX_SOUND_SRC_SDL to UNIX_SOUND_SDL_SRC to match the
signature of other variables (ending with _HDR or _SRC).
2018-12-02 17:45:32 +01:00
Maarten Bent
97f64e9941 CMake: Build the webextensions plugin 2018-12-02 03:23:02 +01:00
Maarten Bent
1c5cbe0a61 CMake: Add support for webkit2 2018-12-02 03:21:33 +01:00
Vadim Zeitlin
e9fb190ed7 Merge branch 'warnings-deprecated' of https://github.com/MaartenBent/wxWidgets
Fix some warnings; replace deprecated constants and trim white spaces.

See https://github.com/wxWidgets/wxWidgets/pull/1031
2018-11-30 16:09:24 +01:00