Commit Graph

62081 Commits

Author SHA1 Message Date
Vadim Zeitlin
395d453c94 Link with oleacc.lib when using MSW gcc makefiles
This library is now required when wxUSE_ACCESSIBILITY==1, but was only linked,
using a compiler-specific pragma, when using MSVC resulting in link errors
with gcc.

Fix this by adding the library to the bakefile for non-MSVC compilers and
rebaking.
2017-01-04 11:50:18 +01:00
Tobias Taschner
e0a2e09031 Update year in copyright notices to 2017
Use 2017 instead of 2016, mostly in version info files.

Closes https://github.com/wxWidgets/wxWidgets/pull/379
2017-01-04 11:25:00 +01:00
Paul Cornett
0a5f6e07f5 build fix for wxUSE_WINRT==0 2017-01-02 20:23:33 -08:00
Vadim Zeitlin
e777bd9ebd Slightly improve comment wording in MSW wxBitmap creation code
No real changes.
2017-01-03 02:54:36 +01:00
Vadim Zeitlin
092e772848 Use wxAlphaPixelData for default native bitmaps in the unit test
The unit test added in 607b800444 didn't work on
the systems using 32 bpp screens, i.e. almost all of them, because it tried to
use 24 bpp wxNativePixelData with them.

Fix this by using wxAlphaPixelData, which won't work on non 32 bpp systems,
and so is still not ideal, but at least makes the test work on most systems by
default.

See #17666.
2017-01-03 02:51:55 +01:00
Vadim Zeitlin
e3c245c226 Select the bitmap out of wxDC before using it in the unit test
The unit test added in 607b800444 had a bug as
it tried to use the bitmap directly while it was still selected into a
wxMemoryDC, which wasn't guaranteed to work and resulted in an assert.

Fix this by destroying wxMemoryDC earlier.

See #17666.
2017-01-03 02:50:26 +01:00
Vadim Zeitlin
4b4c572d5f Make wxTextCtrl Lines() unit test more robust
Verify that the last logical line was wrapped at least once, not exactly once,
as it could be wrapped more times depending on the font size.
2017-01-03 02:39:57 +01:00
Paul Cornett
c15d804197 Different fix for GetBordersForSizer()
Try to determine the borders the same way GTK+ does it.
This seems to avoid incorrect results before widget is realized.
See #17239, #15872
2017-01-02 08:31:35 -08:00
Paul Cornett
5e906d80d8 Fix build with wxNO_RTTI
Since CreateFromUnknownDC() can return NULL anyway, just always define it,
and have it always return NULL with wxNO_RTTI
See #17765
2017-01-01 11:01:49 -08:00
Eric Jensen
caaa08be07 Disable optimizations in wxQuantize() for MSVC to avoid crash
Compiler seems to generate incorrect code for the dithering code taken from
libjpeg, where it is known to create problems too, so use the same workaround
as libjpeg uses and disable optimizations for this function.

This is unsatisfactory and it would be great to find a way to tweak the code
to avoid the problem, but it's still better than crashing.

See #17764.
2016-12-31 16:56:18 +01:00
Carl Godkin
0698da3d6b Resize name column in wxFileListCtrl to be as wide as possible
To avoid truncating the names of the files shown in this column, allocate all
the available space to it.

Closes #17757.
2016-12-27 17:23:00 +01:00
Jeff Davidson
6293d7427c Really fix event dispatching in Mac modal event loops
Manually dispatching events to eligible windows is error-prone and
should really be the responsibility of the system. But the old
approach of blocking in nextEventMatchingMask:untilDate:inMode:dequeue
seems to fail because while this blocks, events can't even enter the
queue.

Thus, revert to the old logic, but instead of blocking in
nextEventMatchingMask, first block on processing the input source via
[NSRunLoop runMode:beforeDate].

This resolves the original problem which was also fixed by the commit
4a83fd4696 but doesn't seem to introduce any
regressions, and seems to be a much cleaner fix overall.

See #17737.

Closes https://github.com/wxWidgets/wxWidgets/pull/365
2016-12-27 16:51:24 +01:00
Steve Browne
59d26b0bad Keep disabled status when wxBitmapComboBox is recreated in wxMSW
If a disabled wxBitmapComboBox had to be recreated, it lost its disabled
status and became unexpectedly enabled.

Fix this by explicitly disabling it back in RecreateControl() if necessary.

Closes https://github.com/wxWidgets/wxWidgets/pull/376
2016-12-27 16:40:31 +01:00
Paul Cornett
2a371515df Fix build error with wxUSE_NOTIFICATION_MESSAGE==0 2016-12-22 22:13:34 -08:00
Paul Cornett
42b2675806 Fix build error with wxUSE_DRAG_AND_DROP==0 2016-12-22 22:12:45 -08:00
Paul Cornett
64f1d760c6 Improve handling of wxUSE_FONTMAP==0 case with wxMSW
wxEncodingToCodepage() can be used when wxUSE_FONTMAP==0
Also avoid unreachable code warning with MSVC when using whole program optimization
2016-12-22 22:09:41 -08:00
Paul Cornett
2155eb2fde Fix generic wxWindow when used in toolbar
GtkToolbar uses item minimum size as actual size, so don't use 0 as minimum
for toolbar children.

See #17756, #17704
2016-12-21 10:25:32 -08:00
Vadim Zeitlin
22216b70e7 Fix wxOSX build in 32 bits
Exclude code added in 92dc929b3f from build in
32 bit mode because it fails to compile, apparently due to missing Objective-C
runtime support for per-instance variables in 32 bit runtime.
2016-12-21 00:15:15 +01:00
Vadim Zeitlin
fcde9e1f40 No real changes, just remove hard TABs from macOS wxDVC code
And some trailing spaces too for good measure.
2016-12-21 00:09:59 +01:00
Vadim Zeitlin
7cddac83a9 Merge branch 'custom-msw-class'
Allow using custom Windows class names for our windows and use this to give a
unique class name allowing to identify it in the screen readers to
wxDataViewCtrl.

Closes https://github.com/wxWidgets/wxWidgets/pull/373
2016-12-20 21:51:09 +01:00
Vadim Zeitlin
9ff563b0f8 Use special "wxDataView" Windows class name in wxMSW
This makes it possible for the screen readers to handle wxDataViewCtrl
specially and better than by default.
2016-12-20 21:50:51 +01:00
Jouk
4e1a7fa885 strerror_r is not available on OpenVMS systems 2016-12-20 10:06:32 +01:00
Jouk
d9e7553b06 Supress warning when compiling on an OpenVMS system 2016-12-20 10:04:55 +01:00
Vadim Zeitlin
2c1e6a5435 Fix not-quite-harmless warning in wxAVMediaBackend code
Take the "player" of the right type in -[wxAVView initWithFrame:player:]
method: we need a wxAVPlayer, which has a writable "playerLayer" field that we
set, and not an arbitrary AVPlayer here.

This fixes a warning which could become a problem if anything else than
wxAVPlayer was ever passed as parameter to this function.
2016-12-19 22:34:45 +01:00
Laurent Poujoulat
632997e449 Fix parsing RGBA string in wxColour::FromString()
Using "%20c" in scanf() doesn't work unless we really have exactly 20
characters, so use "%20[^)]" to take up to 20 characters until the closing
parenthesis instead.

Closes #17739.
2016-12-19 19:42:54 +01:00
Vadim Zeitlin
fa83c0eef3 Recognize CP1258 (Windows Vietnamese) encoding in wxMSW
Just handle it in wxEncodingToCodepage() as the other encodings.

Closes #17753.
2016-12-19 19:16:24 +01:00
Scott Furry
068e0f6ec4 Fix build breaking typo in wxDataViewCtrl accessibility code
Dereference the pointer before casting it to unsigned int.
2016-12-19 19:13:53 +01:00
Vadim Zeitlin
d4e595adb0 Add wxWindow::CreateUsingMSWClass() helper function
This method allows to use the Windows class to use for the window being
created instead of always using "wxWindow" or "wxWindowNR".

This can be useful to make it possible to handle some windows specially from
outside the application, e.g. use specific class names for accessibility
purposes as will be done by the next commit.
2016-12-18 22:39:06 +01:00
Vadim Zeitlin
842c441f01 Allow registering only a single window class in wxMSW
Add a flag to let wxApp::GetRegisteredClassName() register just a single Win32
class instead of always registering two of them: the "normal" (but rarely used)
version and the "NR" version used unless wxFULL_REPAINT_ON_RESIZE style is
specified.

With the new RegClass_OnlyNR, only the latter is registered and used.

This is not used yet, but will be soon.
2016-12-18 22:39:04 +01:00
Vadim Zeitlin
097f8a7f14 Refactor code finding the name of the windows class to use in wxMSW
Determine which class name to use in MSWCreate() caller instead of doing it
partly there and partly in MSWCreate() itself, which used to add the "NR"
suffix if necessary -- now it doesn't do this any more and just really created
the window using the given class.

No real changes, just prepare for future enhancements.
2016-12-18 22:39:02 +01:00
Paul Cornett
30a71c39f5 Reset static widget pointers when widgets are destroyed
See #17751
2016-12-18 12:10:25 -08:00
Paul Cornett
e0bcae1257 Allow initializing wxWidgets multiple times against one instance of GTK+, episode 3
See #17751
2016-12-18 08:11:59 -08:00
Vadim Zeitlin
aac66ea877 Fix wrong value used for wxFONTENCODING_MACROMANIAN in wxMSW
The correct code page for this encoding is 10010, see

https://msdn.microsoft.com/en-us/library/windows/desktop/dd317756.aspx

Closes #17752.
2016-12-18 13:42:14 +01:00
Paul Cornett
d711c5c625 Remove unnecessary module variable 2016-12-17 10:26:01 -08:00
Paul Cornett
4691926791 Dispose of GtkWidgets used by wxSystemSettings 2016-12-17 10:24:29 -08:00
Paul Cornett
fbbc2170a6 Revert db9858a9 and 7d193c60, "Allow initializing wxWidgets multiple times"
See #17751
2016-12-16 23:37:48 -08:00
Paul Cornett
7d193c601d Allow initializing wxWidgets multiple times against one instance of GTK+, part 2
See #17751
2016-12-16 20:16:40 -08:00
Václav Slavík
6e885992f5 Fix rendering of inert wxDVC cells in wxOSX
Disabled appearance should only be used for disabled rows of otherwise
activable or editable renderers, not for inert ones. A typical example
is a bitmap renderer which rendered bitmaps slightly lighter due to its
disabled appearance. With this fix, the behavior is now consistent
across the three implementations.
2016-12-16 19:09:52 +01:00
Martin Srebotnjak
b13a923d0e Update Slovenian translations 2016-12-16 14:10:16 +01:00
Paul Cornett
db9858a93c Allow initializing wxWidgets multiple times against one instance of GTK+
See #17751
2016-12-15 19:37:12 -08:00
Paul Cornett
85302845ab avoid unused variable warning with GTK2 after 61c8a7ca 2016-12-14 09:32:11 -08:00
Tim Kosse
5dc97cc2ca Take alpha into account in wxImage::ResampleBicubic()
Just like in ResampleBox() (see b99ad85b6f),
ResampleBicubic() needs to also weigh pixels by their respective alpha value.

Closes #17748.
2016-12-14 15:07:49 +01:00
Vadim Zeitlin
34f8ae85e0 Simplify wxPersistentTLW code and avoid warnings in it
Use wxPoint and wxSize instead of individual "int" variables to make the code
slightly shorter and avoid clang warnings about "y" and "h" being possibly
uninitialized (which couldn't happen, but the compiler didn't understand it,
at least in non-optimized builds).
2016-12-14 02:21:40 +01:00
Václav Slavík
62a8c4f7c4 Add virtual destructor to wxIAccessible
Silence gcc warning about non-virtual destructor.
2016-12-13 18:56:20 +01:00
Václav Slavík
8b5387bc3d Enable wxUSE_ACCESSIBILITY by default (MSW)
Compile accessibility support on Windows by default now that the generic
wxDataViewCtrl control implements accessible interface. After the
changes from 7dab555f71, accessibility
support is much more lightweight and doesn't interfere with normal win32
behavior, so this change shouldn't affect accessibility-unaware code in
any way.
2016-12-13 18:56:20 +01:00
Václav Slavík
d720155910 Defer wxAccessible::NotifyEvent() to idle time
Change NotifyEvent() implementation so that it doesn't call
::NotifyWinEvent() immediately, but only in the next iteration of the
event loop. This makes it easier to write code that uses, because it
must be called after the changes it notifies about were fully made and
are visible in the corresponding window's accessible interface.
2016-12-13 18:56:20 +01:00
Václav Slavík
f7514467ae Don't use wxACC_STATE_SYSTEM_READONLY for wxDVC items
Items in wxDataViewCtrl are only read-only if there's no editable
column, in which case all items are read-only. This flag is only useful
for accessibility if only some of the items in the list are read-only;
if all of them are, it's just noise.
2016-12-13 18:56:20 +01:00
Paul Cornett
61c8a7ca60 Use "notify::gtk-theme-name" from GtkSettings to generate wxSysColourChangedEvent
"style-updated" occurs frequently for other reasons, such as switching focus between TLWs
2016-12-13 09:07:01 -08:00
nicolas-f
803d40a63f Make child process PID accessible via wxProcess in wxMSW too
For consistency with the Unix version, call wxProcess::SetPid() even when
executing the child process synchronously in wxMSW too.

This allows code dispatching events during synchronous execution to access the
PID of the child, if needed.

Closes https://github.com/wxWidgets/wxWidgets/pull/369
2016-12-13 14:19:31 +01:00
Vadim Zeitlin
04428890b7 Fix warning about undefined macro when cross-compiling with MinGW
__USE_MINGW_ANSI_STDIO is apparently not defined when using MinGW as a
cross-compiler from Linux, so 7c730334a2
resulted in -Wundef warning about this.

Fix this by checking if the macro is defined before testing its value.

See #17736.
2016-12-12 23:39:01 +01:00