Commit Graph

65515 Commits

Author SHA1 Message Date
Artur Wieczorek
a95293d5f9 Iterate over all items of wxVector with header columns with iterator 2019-01-11 19:22:49 +01:00
Artur Wieczorek
1f739e5f82 Get rid of unused member variable 2019-01-11 19:22:48 +01:00
Artur Wieczorek
d47413697b Use wxVector<wxWindow*> instead of wxArrayPtrVoid 2019-01-11 19:22:48 +01:00
Artur Wieczorek
48bc92a72d Use wxVector<wxPropertyGridPageState*> instead of wxArrayPtrVoid 2019-01-11 19:22:47 +01:00
Artur Wieczorek
8f8955b2b9 Use wxVector<wxObject*> instead of wxArrayPGObject 2019-01-11 19:22:47 +01:00
Artur Wieczorek
eb40eb4b84 Fix horizontal scrolling of wxPropertyGrid header
wxPropertyGridHeader associated with wxPropertyGrid has to be notified about every horizontal scroll of the grid.
New position is sent with dedicated wxEVT_PG_HSCROLL event being handled by wxPropertyGridManager which in turn scrolls the header accordingly.

See #18313.
2019-01-11 19:22:34 +01:00
Maarten Bent
8555f4abb0 CMake: Fix wx-config library list with monolithic build
Closes https://github.com/wxWidgets/wxWidgets/pull/1132
2019-01-11 14:29:26 +01:00
Richard Smith
fc65bd92a6 Fix leaks/crashes related to window scrollbars in wxQt
Closes https://github.com/wxWidgets/wxWidgets/pull/1135
2019-01-11 14:28:39 +01:00
Vadim Zeitlin
dfe0c27842 Merge branch 'fix_some_valgrind_issues' of https://github.com/GeoTeric/wxWidgets
Fix a couple of uninitialized variables (as flagged by Valgrind) in wxQt.

See https://github.com/wxWidgets/wxWidgets/pull/1134
2019-01-11 14:26:58 +01:00
Graham Dawes
5d3366abb9 Fixed another unitialised field in wxBrush for wxQT 2019-01-11 08:17:49 +00:00
Graham Dawes
337879f222 Fix Copy leaving field unitialised 2019-01-10 16:54:11 +00:00
Graham Dawes
79d8c6ff0c Fix uninitialised field 2019-01-10 16:53:51 +00:00
Václav Slavík
488cbb7848 Fix flicker when reducing wxDVC width
After 841c14c37c, reducing width of a
generic wxDataViewCtrl caused flickering (horizontal scrollbar
appearing and disappearing immediately) when the columns were resized
by user code to fix exactly.

Fixed by calling AdjustScrollbars() after determining column sizes. It
doesn’t make sense to call it before, because UpdateColumnSizes() may
change required width.

See #18295.
2019-01-10 14:25:11 +01:00
Václav Slavík
7a45b7948a Move the hack for Cmd+C in wxOSX to a better place
"&Cancel" is an unfortunate label for wxID_CANCEL buttons on Macs,
because it makes Cmd+C a shortcut for the button, which in turn makes
any attempt to copy text from a text control instead abruptly close the
dialog.

There were partial hacks around it in some places made by 22bcdf0, but
it didn't even cover all uses within wx code itself, let alone user
code. Move the hack into wxButton to catch all uses of this and remove
the accelerator as the lesser evil.
2019-01-10 13:55:20 +01:00
Graham Dawes
3f2db1b027 Fix item index in wxRadioBox events in wxQt
Use 0-based index for the radio box items, as in the other ports,
instead of auto-generated values.

Closes https://github.com/wxWidgets/wxWidgets/pull/1127
2019-01-10 04:01:39 +01:00
Graham Dawes
2969cefb3a Fix crash when calling wxRadioBox::Show() before Create() in wxQt
This notable happened when the radio box was loaded from XRC.

Closes https://github.com/wxWidgets/wxWidgets/pull/1126
2019-01-10 04:00:12 +01:00
Graham Dawes
dfdbba7ebc Fix wxQT crash if wxRadioBox is created without wxRA_SPECIFY_XXX
Fall back to wxRA_SPECIFY_COLS if neither it nor wxRA_SPECIFY_ROWS is
given instead of not initializing m_qtBoxLayout at all in this case and
subsequently crashing due to it.

Closes https://github.com/wxWidgets/wxWidgets/pull/1125
2019-01-10 03:58:20 +01:00
Graham Dawes
aa422c6be2 Make scrollbar private to wxWindow under wxQt
Use QScrollbar directly instead of wxScrollbar for the window scrollbars
to ensure that wxWindow::GetChildren() doesn't return these scrollbars.

Closes https://github.com/wxWidgets/wxWidgets/pull/1124
2019-01-10 03:55:19 +01:00
Graham Dawes
34ecc6efc4 Generate wxWindowCreateEvent when creating windows in wxQt
Send the expected event at the very end of window creation process.

Closes https://github.com/wxWidgets/wxWidgets/pull/1119
2019-01-10 03:50:43 +01:00
Vadim Zeitlin
61b2136bee Prettify instructions for adding a new wxUSE_XXX constant
Improve translation of the file from plain text to (GitHub-flavoured)
Markdown.
2019-01-10 03:46:12 +01:00
Vadim Zeitlin
e90c6e83dd Remove stray closing brace from Connect() documentation 2019-01-08 22:59:46 +01:00
Graham Dawes
fbbdcc058a Fix client size for wxFrame under wxQt
Avoid implicitly creating the menu bar by calling menuBar() and use
menuWidget() instead which just returns NULL if there is no menu bar,
allowing to calculate correct client size for frames without menus.

Closes https://github.com/wxWidgets/wxWidgets/pull/1120
2019-01-08 00:41:34 +01:00
Vadim Zeitlin
5ff49cb2e2 Merge branch 'qt_fix_unitialised_fields' of https://github.com/GeoTeric/wxWidgets
Add missing field initialization to a number of wxQt controls.

See https://github.com/wxWidgets/wxWidgets/pull/1092
2019-01-08 00:38:53 +01:00
Vadim Zeitlin
7935dab2e8 Merge branch 'qt_fix_missing_rtti' of https://github.com/GeoTeric/wxWidgets
Add missing wx RTTI macros to many classes in wxQt.

See https://github.com/wxWidgets/wxWidgets/pull/1095
2019-01-08 00:34:30 +01:00
Graham Dawes
45fc60b549 wxBitmapToggleButton's reported base class is wxControl 2019-01-07 11:51:05 +00:00
Graham Dawes
95b3486dc0 Fix crash in wxAuiNotebook::DoGetBestSize 2019-01-07 10:38:16 +00:00
Graham Dawes
00030b56cb Fix implementation details being used as base class for RTTI in wxQT 2019-01-07 09:18:50 +00:00
Vadim Zeitlin
9ab3acee18 Don't allow using "-" for unsigned entries in propgrid
The changes of 36f6f8ad49 allowed using
"-" (and also "+") characters even for the unsigned properties, which
hadn't been the case before and doesn't seem desirable, so undo this
part of the changes.

See #1093.
2019-01-07 04:29:45 +01:00
Vadim Zeitlin
cfe4a10995 Add manually created MSVS 201x solutions files for wxrc
As with the tests, we don't have any way to generate these files for
now, but we should allow wxWidgets users to build wxrc for themselves
without using nmake, when using modern MSVS versions, so create the
required files manually -- this is not ideal, but better than nothing.
2019-01-07 04:26:34 +01:00
ali kettab
36f6f8ad49 wxTextValidator improvements
Improve char inclusion/exclusion support; update the sample to show more
features of this class and add a unit test for it.

Closes https://github.com/wxWidgets/wxWidgets/pull/1093
2019-01-05 23:33:35 +01:00
Vadim Zeitlin
697125dc03 Merge branch 'clang-warnings'
Fix some harmless but annoying clang warnings.

See https://github.com/wxWidgets/wxWidgets/pull/1115
2019-01-05 23:12:58 +01:00
Vadim Zeitlin
28342d7882 Fix building with wxUSE_STD_CONTAINERS=1 in C++17 mode
Don't use std::bind2nd() which doesn't exist in C++17 any longer.

Replace it with a lambda when using C++11 which is simpler and more
clear and also replace the use of functors in std::sort() calls with
lambdas.

Closes #18319.
2019-01-05 23:12:30 +01:00
Vadim Zeitlin
1d72f6af7e Fix wxMSW build in non-Unicode mode
Convert WCHAR to TCHAR explicitly in this case.

Closes #18320.
2019-01-05 00:01:09 +01:00
Vadim Zeitlin
fee0decbb0 Apply g++ 4.7 workaround in hash set macros to this compiler only
This workaround was already disabled for MSVC, as it resulted in a
warning there, but it also gives a similar warning with clang and it
seems better to restrict this workaround to gcc only rather than
excluding another compiler.
2019-01-04 23:51:31 +01:00
Vadim Zeitlin
dcee3ce899 Suppress some harmless clang warnings in the test suite
Use wxCLANG_WARNING_SUPPRESS() to avoid multiple warnings in CATCH
headers as well as in some of our own tests.
2019-01-04 23:51:31 +01:00
Artur Wieczorek
3cfec773c9 Replace wxArrayPtrVoid with wxVector<void*> 2019-01-04 21:37:27 +01:00
Artur Wieczorek
b235987a69 Use dedicated functions to covert between physical and logical coordinates of the scrolled wxPropertyGrid 2019-01-04 21:32:08 +01:00
Artur Wieczorek
42b1cca8f2 Fix repositioning editors for horizontally scrolled grid
New method of calculating of the new position/size of the editor (introduced in 95461c566d) doesn't work well in all cases so we have to go back to the (modified) old method. To get the correct position of the editor cell from the absolute position of the splitter 0 we have to shift it by the origin of the scrolled view area.

See #18313.
2019-01-04 21:31:39 +01:00
Artur Wieczorek
066c422c81 Take into account scrolling while obtaining absolute mouse pointer position
See #18313.
2019-01-04 21:30:32 +01:00
Pavel Kalugin
659ab78c6d Add support for editing dates (without time) to wxGrid
Add wxGridCellDateRenderer and wxGridCellDateRenderer which can be used
for the grid cells containing only dates, without times.

Also add wxGrid::SetColFormatDate() convenience function.

Refactor wxGridCellDateTimeRenderer slightly to reuse its code.

Closes https://github.com/wxWidgets/wxWidgets/pull/1101
2019-01-04 14:14:01 +01:00
Vadim Zeitlin
ee352d79c8 Merge branch 'ipc-dde-fixes'
wxIPC fixes when using DDE

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

Closes #17900.
2019-01-04 14:12:53 +01:00
Vadim Zeitlin
22c18a107e Invalidate wxDisplay cache under MSW when the displays change
The cache added in 990c8bfd73 was not
invalidated properly, meaning that wrong information was returned when
displays were [dis]connected after the application startup.

Fix this at least for MSW by invalidating the cache on receiving
WM_DISPLAYCHANGE (which means that sometimes we will do it
unnecessarily, as the change in resolution of an existing display
doesn't require cache invalidation, but this shouldn't be a big problem
in practice as the speed with which the user can change the display
resolution is not very high).

Closes https://github.com/wxWidgets/wxWidgets/pull/1090
2019-01-04 14:09:56 +01:00
Vadim Zeitlin
7f63adde95 Merge branch 'select-after-delete'
Harmonize behaviour of wxItemContainer::Delete() for all controls and
ports when using single selection.

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

Closes #18267.
2019-01-04 14:01:02 +01:00
Cătălin Răceanu
5885b2f142 Test that selecting 'single' radio button does not reset others
Add a unit test for the expected behaviour.

Closes https://github.com/wxWidgets/wxWidgets/pull/1102
2019-01-04 13:59:06 +01:00
dghart
2cf0fcb4fd Allow setting wxTimePickerCtrlGeneric from numpad keys too
Previously the generic wxTimePickerCtrl ignored numerical numpad keypresses.
2019-01-03 22:58:14 -08:00
Vadim Zeitlin
9f270c05ff Micro optimization in wxInternetFSHandler::OpenFile()
Avoid copying the content type string unnecessarily and avoid even
calling GetContentType() in the first place in case of an error.
2019-01-03 23:15:54 +01:00
Vadim Zeitlin
e287344b78 Create wxFSFile with correct MIME type in wxInternetFSHandler
Using the entire contents of "Content-Type" header as the MIME type is
wrong, the header may have optional parameters in it as well.
2019-01-03 23:10:09 +01:00
Stefan Csomor
61c413928a iOS fixes 2019-01-03 20:04:50 +01:00
Stefan Csomor
e5e6ee7e77 macOS wxWidgetImpl constructor with flags
replacing bools with int flag
2019-01-03 20:02:24 +01:00
Stefan Csomor
66a9e55f3b macOS 10.14 adaption for launch-opening files
The previous way to stop the event loop for wx-like OnInit processing was too early for 10.14, opening files during launch was not possible, see #18305
2019-01-03 17:49:20 +01:00