Commit Graph

61192 Commits

Author SHA1 Message Date
Vadim Zeitlin
5e61689dbf Fix regression with MDI children accelerators
Since the changes of 8034e35391 (see #16870)
accelerators, including the standard ones such as Ctrl-F4 under MSW, didn't
work any longer inside the MDI children.

Fix this by extending IsTopNavigationDomain() to allow for checking whether
the given window should stop propagation of all keyboard events, as wxTLW
does, or only TAB navigation ones as wxMDIChildFrame and wxAuiFloatingFrame
do.
2016-02-28 01:24:20 +01:00
Vadim Zeitlin
fd738c5fdb Merge miscellaneous wxDataViewCtrl-related bug fixes
Make it possible to define custom renderers using text controls reacting to
error presses in at least wxMSW and wxGTK.

Closes https://github.com/wxWidgets/wxWidgets/pull/221
2016-02-27 18:08:12 +01:00
Vadim Zeitlin
a29928c4a5 Merge several fixes to wxGTK GUI test suite
The test suite now mostly passes for GTK+ 2 and at least doesn't crash (but
still has many failures) with GTK+ 3.

Closes https://github.com/wxWidgets/wxWidgets/pull/235
2016-02-27 18:04:17 +01:00
ARATA Mizuki
a2f0374052 Fix check for string termination in IsValidUtf8String()
The current code incorrectly returned true if the string contained
an invalid UTF-8 sequence after an embedded NUL.

Check the entire string if the length was explicitly given instead of stopping
at the first NUL.

Closes https://github.com/wxWidgets/wxWidgets/pull/236
2016-02-27 16:42:30 +01:00
John Roberts
e14b589e8e Add support for right-aligned checkboxes to wxOSX
Honour wxALIGN_RIGHT style.

Closes #17380.
2016-02-27 16:32:37 +01:00
Vadim Zeitlin
01ed444267 Avoid allocating empty size for wxGTK widgets
This suppresses warning messages from GTK+ (pixman to be more precise) if
there is really no space left for a widget and doesn't seem to have any ill
effects.

Closes #16996.
2016-02-27 02:41:18 +01:00
Vadim Zeitlin
6a7420e454 Don't try to redraw empty areas in wxGTK wxDataViewCtrl
This just results in warnings from pixman_region32_init_rect() and doesn't
seem to have any useful effects.
2016-02-27 02:41:18 +01:00
Vadim Zeitlin
9fee931d6d Work around a crash in wxGTK3 GUI test suite
The tests crashed after running ModalDialogsTestCase::FileDialog() because the
next call to wxYield() resulted in the completion of an async operation
launched by the native file dialog which tried to dereference the already
destroyed dialog.
2016-02-27 02:41:18 +01:00
Vadim Zeitlin
de491dd67f Show wxTestableFrame from its ctor
No real changes, just always show the frame as we need it to be shown for the
tests to run anyhow.

Also update the nonsensical comment about creating a hidden window just before
showing it.
2016-02-27 02:41:18 +01:00
Vadim Zeitlin
e29bfda8d8 Fix wxComboBox unit test under wxGTK after recent changes
wxEVT_COMBOBOX_CLOSEUP is sent during idle time after the changes of
a216806c99, so add wxYield() to make sure that
the unit test gets it.

See #17223.
2016-02-27 02:41:11 +01:00
Vadim Zeitlin
6c2e702357 Add another sleep to make menu unit test pass under wxGTK
At least when using GNOME, the frame containing the menu doesn't appear on
screen in time for wxUIActionSimulator to use it without this.
2016-02-27 01:14:24 +01:00
Vadim Zeitlin
cceddaf3da dd a hack to make wxBitmapComboBox Editable() unit test pass
Sleep for a little while before sending text to this control as the test often
(although not always) fails without it under wxGTK.
2016-02-27 01:14:24 +01:00
Vadim Zeitlin
ea489e1a7d Fix assertion in the HtmlParser unit test case
Use wxHtmlWinParser instead of wxHtmlParser which can't be actually used
without being initialized with the tag handlers (it's not clear whether this
is really intentional...).
2016-02-27 01:14:14 +01:00
Artur Wieczorek
2072bfa00e Fixed rescaling wxBitmap.
Create rescaled wxBitmap with the same colour depth as the source bitmap.
2016-02-26 21:22:18 +01:00
Vadim Zeitlin
5b2724c900 Fix return type of wxListCtrl::EnableCheckboxes() in the documentation
It returns bool, not void.
2016-02-26 20:08:20 +01:00
Paul Cornett
01ccff2e05 Avoid comparing address of reference to NULL
As GCC 6 points out, the compiler is free to assume a reference is never
null, and remove such a check
2016-02-26 10:06:26 -08:00
Vadim Zeitlin
fde8f93a49 Fix ellipsization unit test when using pixel scaling
When pixel doubling is in use, e.g. when using GTK+ 2 on high DPI displays,
the width of a single TAB can be greater than the hardcoded 50 width in the
test, which resulted in test failures.

Base the widths on the average character width to make sure we can always
ellipsize.
2016-02-26 15:09:39 +01:00
Vadim Zeitlin
b58c87db28 Avoid gcc deprecation warnings for wxNORMAL in the tests
We use wxNORMAL intentionally to test for its support, so we're not interested
in deprecation warnings about it.
2016-02-26 14:36:01 +01:00
Vadim Zeitlin
cb49eb5162 Fix harmless deprecation warning for g_type_init() in drawing test
Same as 3dde6ec2fe.
2016-02-26 14:34:23 +01:00
Vadim Zeitlin
7cc91cc755 Don't use "p" and "p++" in the same statement in wxOSX OpenGL code
This results in unspecified behaviour.

See #16909.
2016-02-26 13:15:08 +01:00
Vadim Zeitlin
c4907129f4 Don't export container classes from DLLs when using STL containers
Exporting these classes doesn't seem necessary as they only have inline
functions and doing it results in problems with MSVC as it also, apparently,
exports the corresponding specialization of std::vector<T> from the wxWidgets
DLLs which can clash with the use of std::vector<T> in the user code or even
in 3rd party libraries included in wx itself, such as Scintilla, so this
change fixes link errors in "DLL Debug" build configuration when using MSVC.

Closes #10884.
2016-02-26 13:10:59 +01:00
Vadim Zeitlin
07a2fd0162 More wxQt build fixes 2016-02-26 13:02:57 +01:00
Maarten Bent
e2fb055329 Fix crash in OpenGL pyramid example if context creation fails
Initialize context pointers to null so that we don't delete uninitialized junk
later.

See #16910.

Closes https://github.com/wxWidgets/wxWidgets/pull/233
2016-02-26 13:00:51 +01:00
Vadim Zeitlin
5ab459e4c7 Use information icon for notifications created using default ctor
The refactoring in https://github.com/wxWidgets/wxWidgets/pull/92 changed the
appearance of wxNotificationMessages created using default ctor under MSW:
they now had no icon instead of using the default one.

Restore the old behaviour for compatibility and also because it's compatible
with the notifications created using non-default ctor but without providing
an explicit flags parameter value.

It is a bit annoying to have to use wxICON_INFORMATION explicitly both here
and as the default parameter value in include/wx/notifmsg.h, but not annoying
enough to do anything more complicated to solve it.
2016-02-26 12:55:03 +01:00
Vadim Zeitlin
a6155cfe11 Another attempt to fix wxUIActionSimulator compilation in wxQt
Pass QWindow to {mouse,key}Event() functions for Qt 5.3+, apparently Qt
documentation is wrong and simply wasn't updated since Qt4.
2016-02-26 12:19:30 +01:00
Vadim Zeitlin
39ad5135f8 Add activityindicator.cpp to wxQt sources
Similar to ffce5b09f8 but for wxQt port.
2016-02-26 12:11:28 +01:00
Vadim Zeitlin
96a1125ad8 Add wxQt variables to upmake files list
Put them here too for consistency with all the other ports.
2016-02-26 12:07:52 +01:00
Kolya Kosenko
16468ac2ba Add missing __WXUNIVERSAL__ checks to fix wxUniv/MSW build
Only define wxHAS_SYSTEM_THEMED_CONTROL when not using wxUniv, do define
wxHAS_GENERIC_TREECTRL when using it.

Closes #17399.
2016-02-26 12:02:05 +01:00
Artur Wieczorek
08f800ab16 Fix wxSearchCtrl (generic) compilation when wxUSE_IMAGE==0
Implemented function to rescale a bitmap even if rescaling using wxImage is not possible.
2016-02-25 23:48:56 +01:00
Artur Wieczorek
2ea39a23e7 Fix wxD2DContext compilation when wxUSE_IMAGE==0 2016-02-25 23:46:50 +01:00
Artur Wieczorek
3cc8b4ae37 wxBitmap::UseAlpha can be used only on wxMSW and wxOSX.
This method is not implemented on all ports.
2016-02-25 22:56:47 +01:00
Artur Wieczorek
85bad08373 Fix wxPropertyGrid compilation when wxUSE_TOOLBAR==0
Don't use toolbar associated with wxPG in this case.
2016-02-25 21:37:27 +01:00
Paul Cornett
1e7121c776 Fix option to load image as HiDPI for GTK3
With GTK3, GetContentScaleFactor() does not return correct result until
TLW is realized, so use wxUpdateUIEvent to enable it later
2016-02-25 08:24:44 -08:00
Jouk
9819bd81a4 Add src/common/notifmsgcmn.cpp to OpenVMS Makefile 2016-02-25 09:50:16 +01:00
Paul Cornett
9fea81c069 Avoid "Gtk-WARNING **: Allocating size to ..." with GTK+ 3.19+ 2016-02-24 23:50:42 -08:00
Paul Cornett
69a13d973c Avoid "Gtk-WARNING **: State doesn't match"
See https://github.com/wxWidgets/wxWidgets/pull/232
2016-02-24 20:57:48 -08:00
Vadim Zeitlin
d3a0798bc5 Merge wxX11 build fixes
Closes https://github.com/wxWidgets/wxWidgets/pull/231
2016-02-24 23:24:20 +01:00
Vadim Zeitlin
aec2980e40 Merge fixes for building wxQt with Qt 5.3.2 2016-02-24 23:22:27 +01:00
Vadim Zeitlin
3704b45248 Fix retrieving wxMask from wxBitmap in wxMSW
In wxMask::GetBitmap() we need to create a copy of the mask bitmap and assign
it to the resulting wxBitmap. We cannot simply assign existing mask bitmap to
the resulting wxBitmap because when wxMask::GetBitmap would be called more
then once then many independent wxBitmaps would own the same bitmap.

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

Closes #17395.
2016-02-24 23:20:24 +01:00
Vadim Zeitlin
4b9dc20956 Remove or make optional tons of debug messages from wxQt
Using the library wasn't really possible with all the debug messages it
generated, so either suppress them completely or turn them into trace messages
which can be activated on demand if needed.
2016-02-24 23:12:37 +01:00
Vadim Zeitlin
67f97053bd Avoid warning about missing return value in wxCheckBox code
Handle unknown checkbox values as well, if only to silence the compiler.
2016-02-24 23:09:13 +01:00
Vadim Zeitlin
4d27a5dde3 Compilation fix for wxQt wxUIActionSimulator with Qt 5.3
QTest::mouseEvent() and keyEvent() want QWindow, not QWidget, in this version.
2016-02-24 22:58:07 +01:00
Vadim Zeitlin
9db24be496 Add missing headers to fix PCH-less wxQt build
Just include the headers of the classes being used.
2016-02-24 22:57:19 +01:00
Vadim Zeitlin
5ecda429d1 Check for Qt using PKG_CHECK_MODULES() in configure
Running pkg-config directly was wrong for many reasons and we didn't even
detect the libraries absence.
2016-02-24 22:37:30 +01:00
Vadim Zeitlin
1c9a4694ff Merge OpenGL API changes and better modern OpenGL support
Closes https://github.com/wxWidgets/wxWidgets/pull/227
2016-02-24 20:15:35 +01:00
Igor Korot
a216806c99 Allow modifying wxComboBox from its CLOSEUP handler with wxGTK2
Doing this resulted in GTK errors about invalid iterators, so postpone the
generation of the CLOSEUP event for slightly later to allow changing the
combobox contents from it with GTK+ 2 (this is not necessary with GTK+ 3).

Also add a demon of a dynamic combobox, creating and destroying its items on
the fly, to the widgets sample.

Closes #17223.
2016-02-24 20:07:34 +01:00
Vadim Zeitlin
ffce5b09f8 Include src/generic/activityindicator.cpp in wxUniv sources
This generic implementation should be used for wxUniv too, otherwise any code
using wxActivityIndicator, such as the widgets sample, simply failed to link
when using it.

Closes #17394.
2016-02-24 19:52:33 +01:00
Vadim Zeitlin
a0580b361e Fix warning about ignored attributes for wxControlRenderer
This warning was given many times and was very confusing as it wasn't given at
all in the right location, but rather for all the other, subsequent
declarations of wxControlRenderer which were correct -- unlike this one which
used wrong order for the "class" keyword and the attribute.
2016-02-24 19:39:16 +01:00
Vadim Zeitlin
3dde6ec2fe Fix harmless deprecation warning for g_type_init() in wxX11
Even if it's deprecated, it's harmless to call it, so just suppress the
warning.
2016-02-24 19:38:10 +01:00
Vadim Zeitlin
1c105a2e06 Fix harmless signed/unsigned comparison warnings in wxGenericColourDialog
Use unsigned type/casts.
2016-02-24 19:33:38 +01:00