Commit Graph

62073 Commits

Author SHA1 Message Date
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
Cătălin Răceanu
ae845a045e Send events when deleting selected item in wxMSW wxTreeCtrl
The changes of c749d9e638 broke sending of
wxEVT_TREE_SEL_CHANGING and wxEVT_TREE_SEL_CHANGED events for the controls
without wxTR_MULTIPLE style, restore sending them now.

Closes #16926.

Closes https://github.com/wxWidgets/wxWidgets/pull/285
2016-12-12 23:33:20 +01:00
Cătălin Răceanu
4d20de73bd Describe better which windows are affected by wxWindowDisabler
It affects only windows shown on the screen and not already disabled.

Closes https://github.com/wxWidgets/wxWidgets/pull/366
2016-12-12 23:27:32 +01:00
Vadim Zeitlin
d970b802a4 Improve confusing comment in wxMSW wxExecute() implementation
The comment was difficult to understand because of the missing "in"
preposition, so add it and extend the comment further for clarity.

See https://github.com/wxWidgets/wxWidgets/pull/369
2016-12-12 23:20:08 +01:00
Tobias Taschner
159186d656 Fix AVKit availability check for OS X SDK 10.7 and 10.8
This fixes the check for older SDKs and outputs the check result.

This is a follow up to https://github.com/wxWidgets/wxWidgets/pull/337 and the
improvement of https://github.com/wxWidgets/wxWidgets/pull/342.

Closes https://github.com/wxWidgets/wxWidgets/pull/370
2016-12-12 23:10:38 +01:00
Jeff Davidson
4a83fd4696 Dequeue and dispatch events in modal event loops
This should be a no-op, as runModalSession's documentation states that
it will handle dispatch event for the modal's window. However, in
practice, it does not seem to be doing so frequently enough for modal
UI to keep up with two-finger scroll events. Dequeuing and manually
dispatching the next event seems to mitigate this.

Note that we only dispatch events that are associated with the modal
dialog's window, or with no window at all, to prevent other windows
from responding to inputs while the modal is present.

Closes #17737

Closes https://github.com/wxWidgets/wxWidgets/pull/365
2016-12-12 23:06:10 +01:00
Vadim Zeitlin
cff06eed9d Switch to using Xcode 6.4 on Travis CI
The old Xcode 6.2 image is not available any longer.
2016-12-12 23:04:53 +01:00
Paul Cornett
ccd1d40dd9 Avoid generating scroll event when our scrollbar is disabled by other software
webkitgtk apparently manipulates our scrollbar GtkAdjustment directly, setting
all members to zero to disable it. Since we never do that, those values were
unexpected. This is a better fix for the problem papered over by 45d66f592
2016-12-12 10:55:19 -08:00
Paul Cornett
c70abf23aa Draw a blank header button in any remaining space after last header column 2016-12-11 23:32:23 -08:00