Commit Graph

61422 Commits

Author SHA1 Message Date
Vadim Zeitlin
b0a6ed4262 Merge miscellaneous string-related fixes
Closes https://github.com/wxWidgets/wxWidgets/pull/237
2016-03-02 23:17:23 +01:00
Xlord2
c07523734f Disable automatic "smart" quotes substitution in wxOSX wxTextCtrl
Disable ASCII quotes substitution with "more typographically accurate"
symbols, just as we already do it for the dashes substitution.

While disabling this unconditionally might not be perfect, it's better than
unconditionally leaving this enabled (and this is on by default since OS X
10.9).

Closes #15705.

Closes https://github.com/wxWidgets/wxWidgets/pull/241
2016-03-02 22:51:10 +01:00
Xlord2
3532f48d44 Fix crash when using HTML help in 64 bit wxMSW build
HtmlHelp() function takes 64 bit ULONG_PTR, not 32 bit DWORD, in 64 bits, see
https://msdn.microsoft.com/en-us/library/windows/desktop/bb762267.aspx and
passing it a wrongly sized pointer resulted in a crash.

Closes https://github.com/wxWidgets/wxWidgets/pull/239
2016-03-02 21:47:32 +01:00
Xlord2
d053a90486 Force wxUSE_WINRT to 0 when targeting XP
The required headers such as winstring.h are not present in the SDK used when
targeting XP.

Closes https://github.com/wxWidgets/wxWidgets/pull/238
2016-03-02 21:39:49 +01:00
Kolya Kosenko
a916f7f917 Fix wxX11 build with wxUSE_STL=1
Add missing utf8_str() call as implicit conversion is not available in
wxUSE_STL=1 case (notice that this also makes wxUSE_STL=0 work correctly when
not using UTF-8 locale).

Closes #17412.
2016-03-02 14:10:00 +01:00
ARATA Mizuki
a17a3994ec Get rid of a use of wxMBSTRINGCAST
wxMBSTRINGCAST is a const-removing cast and therefore should be avoided
unless necessary.

Here, the cast was used to convert wxWX2MBbuf to const char *, which does not
involve removing const-ness.
2016-03-01 16:01:39 +09:00
ARATA Mizuki
45ff4e6b21 Get rid of a use of wxFNSTRINGCAST
Since chdir() takes a const pointer, the const-removing cast is not needed.
2016-03-01 16:01:39 +09:00
ARATA Mizuki
a2b5309f61 Get rid of some Win16 code from wxSetWorkingDirectory 2016-03-01 16:01:39 +09:00
ARATA Mizuki
381ab333b9 Get rid of a use of WXSTRINGCAST from src/msw/metafile.cpp
WXSTRINGCAST is a const-removing cast and should be avoided unless necessary.

Here, wxString::c_str() is sufficient because GetTextExtentPoint32 takes
a const pointer.
2016-03-01 16:01:39 +09:00
ARATA Mizuki
86dd0cd2a2 Fix constness of some member functions of wxUString 2016-03-01 16:01:39 +09:00
ARATA Mizuki
daf944909c Use wxChar16 instead of wxDecodeSurrogate_t for UTF-16 unit type in wxDecodeSurrogate 2016-03-01 16:01:39 +09:00
ARATA Mizuki
89745e83f3 Fix signatures of wxStringBuffer / wxStringBufferLength constructors in interface/wx/string.h
There were extra 'const's in the interface file.
2016-03-01 16:01:39 +09:00
Vadim Zeitlin
cee3188c1a Don't connect handler for wxEVT_TEXT_ENTER in wxComboCtrl unnecessarily
Connecting to wxEVT_TEXT_ENTER is not necessary if wxTE_PROCESS_ENTER style is
not used was always useless and is actively harmful since the changes of
5591a20093 as it results in an assert failure
now.

Just don't do it unless we really want, and will get, these events.
2016-02-29 18:54:18 +01:00
Danny Scott
7e493c3a3c Add script for building MSVS 2015 binaries
Closes #17408.
2016-02-29 18:44:11 +01:00
Vadim Zeitlin
ee486dba32 Fix build error in wxOSX clang C++11 build for i386
When building for i386 in C++11 mode clang warns about narrowing conversion
from double to CGFloat (== float) in the initialization.

Fix it by using explicit suffixes for the float literals.
2016-02-29 18:05:02 +01:00
Vadim Zeitlin
173ecd77c4 Fix clang -Winconsistent-missing-override in wxTextCtrl
Add missing wxOVERRIDE for OnDynamicBind().
2016-02-29 16:12:53 +01:00
Tobias Taschner
3bdb4c4b21 Add micro version to wxCheckOsVersion(). 2016-02-29 10:05:51 +01:00
Tobias Taschner
84fbc12f2d Return Windows build number as micro version in wxGetOsVersion(). 2016-02-29 10:05:51 +01:00
Dimitri Schoolwerth
066f540f51 Mention micro version changes
Document the change of wxAppTraits::GetToolkitVersion which when
user-overridden in the best case leads to a compile error and worst case
when it already has been overridden (which is more likely) silently
fails as the user-override would not be called.
Also mention the micro version changes in general in changes.txt.
2016-02-29 10:05:51 +01:00
Dimitri Schoolwerth
1e78bf639e Add micro version to toolkit version functions
Support micro versions in wxAppTraits::GetToolkitVersion and
wxPlatformInfo functions related to toolkit versions.
2016-02-29 10:05:43 +01:00
Dimitri Schoolwerth
ea439c278b Add OS micro version information to wxPlatformInfo
Add GetOSMicroVersion and add other micro version references in an
unobtrusive way: don't change wxPlatformInfo's constructor and use
default parameters for CheckOSVersion and SetOSVersion. The only change
that could affect user code is the changed number of parameters for
DoCheckVersion but because that is a protected function it's less likely
to be a problem.
2016-02-29 10:05:34 +01:00
Dimitri Schoolwerth
427750e744 Detect micro version for Unix-like systems in wxGetOsVersion
Check the result of running uname -r for a micro version and use it if
available, otherwise return a micro version of 0.
2016-02-29 09:58:15 +01:00
Dimitri Schoolwerth
b1a9c6e79e Add a micro version parameter to wxGetOsVersion
In addition to getting a major and minor OS version allow a micro
version to be retrieved. In case of running on e.g. OS X 10.10.3 this
allows the "3" to be retrieved again.
2016-02-29 09:58:15 +01:00
Dimitri Schoolwerth
5983274af6 Name the parameters of wxGetOsVersion consistently
Use verMaj and verMin like almost everywhere instead of majorVsn and
minorVsn in a couple of places.
2016-02-29 09:58:15 +01:00
Vadim Zeitlin
cbb799b1ae Updates for 3.1.0 release
Update dates, changes descriptions and release preparation instructions.
2016-02-28 22:33:37 +01:00
Manuel Martin
bff80808b7 Avoid double-to-float warnings in OpenGL pyramid sample
See #16910.
2016-02-28 20:41:22 +01:00
Vadim Zeitlin
e5507c27a1 Stop using GTK_TREE_VIEW_COLUMN_AUTOSIZE in wxDataViewCtrl
Using this column type made the control even slower for a big number of items
and also prevented the user from resizing the column which was unexpected.

See #16680.
2016-02-28 20:36:03 +01:00
Vadim Zeitlin
c2821dcea0 Allow using arbitrary windows as wxDataViewCtrl editors in wxGTK
Previously the editor created by wxDataViewRenderer::CreateEditorCtrl() had to
be a native GTK+ widget implementing GtkCellEditable interface which prevented
using composite windows (e.g. a container for a text control and a button) as
editors.

Create a helper container wrapping them now and implementing GtkCellEditable
now to allow this.
2016-02-28 20:25:07 +01:00
Vadim Zeitlin
890ccf8e30 Make wxDataViewRenderer::GetEditorCtrl() const
Really no reason not to do it.
2016-02-28 18:02:26 +01:00
Vadim Zeitlin
19a6664498 wxOSX compilation fix after wxDataViewRendererBase refactoring
Restore the variable declaration accidentally removed in the changes of
235e8ebd1a
2016-02-28 02:50:53 +01:00
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