Commit Graph

65613 Commits

Author SHA1 Message Date
Graham Dawes
b890f59bc9 Call base class Show from wxRadioBox::Show 2018-12-21 08:18:17 +00:00
Vadim Zeitlin
622deec262 Replace wxSizer::RecalcSizes() with RepositionChildren()
The new method takes minimal size just computed by RecalcSizes() as its
argument making it unnecessary to store it as a member variable in the derived
classes such as wx{Box,FlexGrid}Sizer.

The old method can still be overridden for compatibility and by the derived
class that don't need minimal size when updating children.
2018-12-20 23:36:51 +01:00
Pavel Kalugin
7d9675472d Refine documentation related to wxTimePickerCtrl
Specify event types, corresponding to EVT_TIME_CHANGED and
EVT_DATE_CHANGED macros, and update 'see also' sections.
2018-12-20 19:00:42 +01:00
Vadim Zeitlin
9877f207d1 Merge branch 'dvc-last-col-resize'
Improve resizing of the last column in generic wxDataViewCtrl.

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

Closes #18295.
2018-12-20 18:57:48 +01:00
Cătălin Răceanu
f0df737326 Update src/qt/dc.cpp
Co-Authored-By: ffa-grahamdawes <graham.dawes@geoteric.com>
2018-12-20 14:00:03 +00:00
Cătălin Răceanu
90165488f6 Update src/qt/dc.cpp
Co-Authored-By: ffa-grahamdawes <graham.dawes@geoteric.com>
2018-12-20 13:59:49 +00:00
Cătălin Răceanu
f8110c1c27 Update src/qt/dc.cpp
Co-Authored-By: ffa-grahamdawes <graham.dawes@geoteric.com>
2018-12-20 13:59:31 +00:00
Cătălin Răceanu
8f5acb341e Update src/qt/dc.cpp
Co-Authored-By: ffa-grahamdawes <graham.dawes@geoteric.com>
2018-12-20 13:59:24 +00:00
Cătălin Răceanu
ae825ecd86 Update src/qt/dc.cpp
Co-Authored-By: ffa-grahamdawes <graham.dawes@geoteric.com>
2018-12-20 13:59:18 +00:00
Cătălin Răceanu
c7425b8c64 Update src/qt/dc.cpp
Co-Authored-By: ffa-grahamdawes <graham.dawes@geoteric.com>
2018-12-20 13:59:11 +00:00
Graham Dawes
5c3ddb7a7f Prevent crash when attempting to clear a DC with not device under wxQT 2018-12-20 13:41:02 +00:00
Graham Dawes
172a97e411 Erase event now is now sent with a valid event object 2018-12-20 13:40:18 +00:00
Graham Dawes
bfb59228c1 Fix crashes due to unitialised fields 2018-12-20 10:51:03 +00:00
Graham Dawes
57b636b2d4 Fix for NULL pixmap when setting button icon in wxQT 2018-12-20 10:33:01 +00:00
Graham Dawes
bc4d3a4554 Initialise m_qtPushButton in wxAnyButton's constructor. 2018-12-20 08:06:46 +00:00
Vadim Zeitlin
b2cdd287bb Resolve change log conflict with master
Reapply the change log change manually to master version of the file to
let the CI builds merge this branch automatically.
2018-12-20 02:24:49 +01:00
Vadim Zeitlin
c922c95c96 Fix the just introduced signed/unsigned comparison warning
Cast to unsigned before comparing with an unsigned variable.
2018-12-20 02:21:53 +01:00
Jay Nabonne
c6d3b9c0b9 Fix background colour used by DrawEllipse() in wxQt
wxDC::DrawEllipse() used to use the text background for filling the
ellipses drawn with transparent pen, for some reason. According to
f9b28cd4325f42936d3122bfe7c847354bbbfee9 which changed this (this commit
was part of df13791078 merge done with
svn), this was done for compatibility with wxGTK, but wxGTK definitely
doesn't do it now and apparently never did, so there must have been some
mistake.

Simply remove the extra code using the text background for consistency
with this method behaviour in the other ports and also other methods
behaviour in the same port.

Closes https://github.com/wxWidgets/wxWidgets/pull/1087
2018-12-19 23:19:12 +01:00
jensgoe
12edcbccc8 clear height cache if model is cleared 2018-12-19 20:45:32 +01:00
jensgoe
7ab9e992b6 ensure row >= GetRowCount() if GetLineAt reaches invalid item
refactored method structure for better readability
2018-12-19 20:45:00 +01:00
Jay Nabonne
c47c7de5ea Allow overriding the label for stock buttons in wxQt
Stock label should only be used if passed label is empty. Otherwise,
passed label should override the default value.

Closes https://github.com/wxWidgets/wxWidgets/pull/1086
2018-12-19 13:46:20 +01:00
Graham Dawes
ae20edb539 Fix several problem with wxMemoryDC in wxQt
Under wxQT, wxMemoryDC was previously rendering to a temporary image
which was only being blitted back to the original wxBitmap when either
the DC wx destroyed or a new bitmap was selected (via SelectObject).

With these change wxMemoryDCImpl now draws directly to the bitmap
managed by wxBitmap, this makes the behaviour more consistent with the
MSW and GTK implementations.

Closes https://github.com/wxWidgets/wxWidgets/pull/1083
2018-12-19 13:44:52 +01:00
Tomasz Słodkowicz
80904d1bc7 Fix crash in translations code when no translations are found
Fix another regression in wxTranslations in 3.1.2 and check that the
vector of acceptable translations is not empty before using its first
element.

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

Closes #18299.
2018-12-18 04:50:47 +01:00
Tomasz Słodkowicz
14e905858d Fix regression in wxTranslations::AddCatalog()
Do load the catalog corresponding to the language of "msgid" strings in
the source code, only skip the languages strictly less preferred than
it.

This avoids incompatibilities with pre-3.1.2 behaviour and avoids
breaking existing applications relying on the old behaviour.

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

Closes #18297.
2018-12-18 04:50:07 +01:00
Graham Dawes
b0eca3bdde Fix some more uninitialised wxCairoContext fields in wxQt
Closes https://github.com/wxWidgets/wxWidgets/pull/1084
2018-12-17 17:46:38 +01:00
Vadim Zeitlin
50e098437d Document lack of custom editors in Mac wxDataViewCtrl
wxDataViewCustomRenderer::CreateEditorCtrl() is currently never called
there.
2018-12-17 14:07:12 +01:00
Vadim Zeitlin
f9028845d8 Merge branch 'cmake-install' of https://github.com/MaartenBent/wxWidgets
Install wxrc on all platforms and other fixes, including better support
for external libraries.

See https://github.com/wxWidgets/wxWidgets/pull/1072
2018-12-16 23:58:04 +01:00
Vadim Zeitlin
5b2e992947 Document wxThread::Delete() behaviour more precisely
Delete() doesn't (and can't, under Unix) wait for the detached threads,
although it does do it under MSW (but arguably shouldn't), so it can't
retrieve the thread exit code there.

Document that its "rc" argument is only useful with joinable threads.

Closes #18240.
2018-12-16 00:02:07 +01:00
Vadim Zeitlin
b825c49c2e Document and test wxItemContainer::Delete() selection handling
Add test checking that selection is reset when deleting the selected
item or any item before, but not after, it.

Also explicitly document this behaviour.
2018-12-15 23:47:26 +01:00
Vadim Zeitlin
c8d2195791 Make wxSimpleHtmlListBox::Delete() consistent with wxListBox
Also remove the selection when deleting the selected item, or any item
before it, in this class, for consistency with the native wxListBox.
2018-12-15 23:45:19 +01:00
Vadim Zeitlin
abc4576ffe Invalidate selection after deleting wxListBox item with GTK+ 3
For consistency with the other ports, invalidate the selection when
deleting the selected item or any item before it.

Closes #18267.
2018-12-15 23:45:19 +01:00
Vadim Zeitlin
cdd0430b37 Remove hard TABs from documentation files
No real changes.
2018-12-15 23:45:19 +01:00
Vadim Zeitlin
e0e4f16282 Fix a typo in ItemContainerTestCase comment
No real changes, just fix a copy-and-pasto.
2018-12-15 23:04:30 +01:00
Vadim Zeitlin
4ed28f681f Add a common tag for wxItemContainer-derived classes tests
This makes it possible to run the tests for all controls implementing
wxItemContainer interface by just passing "[item-container]" on the test
command line.
2018-12-15 23:04:30 +01:00
Vadim Zeitlin
8856715d2d Use wxVector instead of wxList for wxDataViewCtrl columns storage
As wxDataViewColumnList was never public, it should be fine to not
define it any more and use a vector instead.

This makes the code more clear and also marginally more efficient.
2018-12-15 14:43:47 +01:00
Vadim Zeitlin
2340a16d18 Allow increasing the size of the last column in wxDataViewCtrl
Previously, the last column couldn't be effectively resized at all, as
its size was always automatically set to the remaining width of the
window after subtracting the widths of all the previous columns. Now
this is only done if this remaining width is greater than the width
given to the column by the user or by the program.

Effectively, this means that the user can now drag-resize the column to
increase its size (at the price of showing the horizontal scrollbar).

See #18295.
2018-12-15 14:27:52 +01:00
Graham Dawes
8fa32a40a9 Fix m_qtPainter not being initialised in wxCairoContext ctor
For some reason one of the overloads of the c'tor left the m_qtPainter
field set to NULL rather than asking the wxDC for it's painter.

The rest of the class assumes the painter is not NULL.

Closes https://github.com/wxWidgets/wxWidgets/pull/1075
2018-12-14 17:41:55 +01:00
Vadim Zeitlin
68bb67c009 Revert "Prevent the user from resizing the last wxDataViewCtrl column"
This reverts commit 24054c95d8 as it
actually should be possible to increase the size of the last column,
even if this shows the horizontal scroll bar.
2018-12-13 23:46:25 +01:00
Vadim Zeitlin
24054c95d8 Prevent the user from resizing the last wxDataViewCtrl column
This is useless as this column will be automatically expanded to fill
all the available space anyhow.

See #18295.
2018-12-13 23:42:15 +01:00
Vadim Zeitlin
841c14c37c Fix expanding last wxDataViewCtrl column in the generic version
The code added in 4156e1a5c9 didn't quite
work correctly because it used the old size of the window, before it was
resized, and not the new size. This was almost unnoticeable when
drag-resizing the window, but very noticeable when maximizing the
containing TLW, as could be seen on the 3rd page of the dataview sample,
for example, where the last column kept its size instead of expanding.

See #13904, #18295.
2018-12-13 18:50:18 +01:00
Graham Dawes
db15e99884 Fix wxBitmap::GetRawData() in wxQt
This method used to return a dangling pointer to a temporary buffer,
which resulted in a crash when using it, e.g. in the unit test.

Fix this by keeping a QImage as a member in wxBitmapRefData, so that the
pointer to its data remain valid until UngetRawData() is called.

Also check that GetRawData() returns a non-null pointer in the test.

Closes https://github.com/wxWidgets/wxWidgets/pull/1067
2018-12-13 15:24:54 +01:00
Vadim Zeitlin
013c6a6b6a Speed up inserting many items in sorted wxChoice in wxQt
Only sort the combobox once instead of doing it for every item.

See https://github.com/wxWidgets/wxWidgets/pull/1054
2018-12-13 15:17:18 +01:00
chris2oph
89e4ee1ec0 Ensure items are sorted when added to wxChoice in wxQt
Call sort() to resort the model after inserting a new item.

Closes https://github.com/wxWidgets/wxWidgets/pull/1054
2018-12-13 15:10:59 +01:00
Vadim Zeitlin
5189781072 Move wxDataViewCtrl incompatibility note to the correct section
3a24beca62 added this in a wrong place, as
this change does not result in any build errors.

See #18295.
2018-12-13 15:09:13 +01:00
Vadim Zeitlin
b9fe8ca10c Try to use pkg-config for detecting libtiff in configure
This is more reliable than checking whether we can link with the library
manually and may work even if it's installed in a non-standard location.

It also allows the user to specify PKG_CONFIG_PATH='pkg-config --static'
when running configure to link with all transitional dependencies when
linking statically.

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

See #18293.
2018-12-13 03:53:44 +01:00
Vadim Zeitlin
c95f668b21 Fix use of dangling pointer in ButtonTestCase::Disabled()
Fix the test added in dfec7aa0c0 which
deleted the button pointer used by EventCounter by simply moving
EventCounter initialization after the button re-creation.

See #16385.
2018-12-13 00:39:25 +01:00
Vadim Zeitlin
141f0cb0e4 Suppress harmless gcc missing initializers warnings in a test
Suppressing the warnings is ugly but less ugly than explicitly
specifying all the omitted elements in the array.
2018-12-12 23:45:09 +01:00
Maarten Bent
c1013d9bfc CMake: Add more option validity checks 2018-12-12 21:28:01 +01:00
Maarten Bent
5348b4fa3b CMake: Improve layout of third party libraries summary
Add more external libraries to the summary, like configure does.
2018-12-12 21:28:00 +01:00
Maarten Bent
91b6305dcd CMake: Improve checking for external libraries
Do not abort when libLZMA or libSecret can not be found, just show a warning.
Do not search for libSecret on macOS.
Disable libraries internally (not in cache) when not searching for them.
2018-12-12 21:28:00 +01:00