Commit Graph

62050 Commits

Author SHA1 Message Date
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
Paul Cornett
48e6a0c851 Fix drawing header buttons with GTK3 renderer on GTK+ >= 3.20
Lines between columns were missing with default Adwaita theme
2016-12-11 23:25:45 -08:00
Paul Cornett
38246b96a4 Improve appearance of tree item button with GTK3 renderer 2016-12-11 10:54:56 -08:00
Paul Cornett
c5adf1f854 Fix drawing of splitter sash with GTK3 renderer 2016-12-11 09:16:15 -08:00
Václav Slavík
ff1dba498e Add wxDataViewValueAdjuster
Add wxDataViewRenderer:: SetValueAdjuster() and a
wxDataViewValueAdjuster class. This can be used to customize rendering
of values depending on whether they are highlighted (selection) or not,
without having to implement an entire new custom renderer.
2016-12-11 15:20:42 +01:00
Václav Slavík
13862ad8e6 Fix GetInstallPrefix availability check
Add wxHAS_STDPATHS_INSTALL_PREFIX to make checking for
wxStandardPaths::GetInstallPrefix()'s availability simpler, as the
condition under which it is compiled is nontrivial.

Fixes compilation after 2c24ee9216 on
Cygwin, which is a UNIX, but its wxStandardPaths implementation is a
Windows one.
2016-12-11 15:18:24 +01:00
Paul Cornett
c2b9f650e4 Improve appearance of text control with GTK3 renderer 2016-12-10 21:52:05 -08:00
Paul Cornett
e627970ba6 Fix rendering of check and radio buttons with GTK+ >= 3.20 2016-12-10 21:49:06 -08:00
Paul Cornett
49361b6bb8 Improve appearance of header button with GTK3 renderer
Remove the mysterious insetting by 4. Where that came from I don't know,
but it makes the button look stupid
2016-12-10 18:53:57 -08:00
Paul Cornett
d5681ee4a8 Fix infinite sizing loop caused by 3b4ee5a0
Avoid the problems 3b4ee5a0 attempted to address in a much simpler way:
when a "size-allocate" is in progress, call gtk_widget_size_allocate()
directly, rather than deferring a call to gtk_widget_queue_resize().
See #17585
2016-12-09 21:38:35 -08:00
Vadim Zeitlin
7122288416 Fix wxString::From[C]Double() unit test for MSVC 14 and later
Since MSVC 14, VC CRT uses standard-conforming 2 digits for the exponent
instead of the non-standard 3 used previously.
2016-12-09 17:44:04 +01:00
Vadim Zeitlin
fcbaf584e3 Document that using 70 as size doesn't work in wxFont ctor
Mention the workaround of using SetPointSize(70) instead.

See #12315.
2016-12-09 14:26:38 +01:00
Vadim Zeitlin
9db6f6ca1a Make wx/valnum.h self-contained by including wx/textentry.h
This header uses (i.e. forward declaration wouldn't be sufficient)
wxTextEntry, so it must include the header declaring it.
2016-12-09 01:58:14 +01:00
Cătălin Răceanu
fc2cc74530 Improve UI of the "Button" page of the widgets sample
Allow only permitted combinations of text, bitmap and command link.

Also avoid null pointer crash when combining "Bitmap only" with "Use command link button".
2016-12-07 01:32:10 +01:00
Václav Slavík
2c24ee9216 Search $PREFIX/share/locale for translations on Unix
The changes introduced in ​ea160f0 accidentally omitted this search
location, so only wx's own install prefix was searched. This probably
went undetected for so long because these two are often, but not always,
the same.

Fixes #17740.
2016-12-06 16:48:11 +01:00
Václav Slavík
60542745f6 Fix accel handling when removing item from submenu
wxMSW propagates accelerators to the top menu in wxMenu::UpdateAccel(),
but the reverse operation in wxMenu::DoRemove() didn't do it, resulting
in leaked leftover accelerator entries that could prevent the same
accelerator from working if an item using it was later added. Fix by
adding RemoveAccel() helper method that behaves analogously to
UpdateAccel().
2016-12-05 17:59:03 +01:00
Mat M
4f0c6c9a3a Amend documentation regarding image/selected image parameters
Make it clear that the "image" argument is only used if it's valid.
2016-12-05 01:30:53 +01:00
Paul Cornett
7cab4bbb20 Restore line unintentionally removed in 4b8c83cb 2016-12-04 11:55:36 -08:00
Paul Cornett
d20fb180b1 Display system colors in alphabetical order 2016-12-04 11:33:48 -08:00
Paul Cornett
4b8c83cb09 Improve wxSystemSettings::GetColour() for GTK3
Previous implementation was inadequate, particularly for GTK+ >= 3.20
2016-12-04 11:32:50 -08:00
Václav Slavík
4775853cf9 Ensure display update in wxCocoaDataViewControl::UnselectAll()
NSOutlineView deselectAll apparently doesn't repaint the control itself
(or not always), so we have to do it explicitly.
2016-12-03 18:37:28 +01:00
Václav Slavík
699d6f25ad Improve rendering custom-colored buttons on Win10
Take advantage of Windows 10's flat appearance to completely fill the
button's area with background color. This isn't as easily possible in
other versions and can't be done by e.g. enlarging the painted rectangle
because focus ring (which we don't want to override) may be thin or
thick depending on user settings.
2016-12-03 17:47:18 +01:00
Václav Slavík
7b85f232f9 Don't use custom background color in PBS_HOT state
MSW buttons are highlighted by the theme when the mouse hovers over
them. This servers as a feedback to the user that the button is
clickable, so it's desirable to preserve it even if the button uses a
custom background color.
2016-12-03 17:47:18 +01:00
Václav Slavík
c9b1ebf816 Remove ATSU-related dead code from wxOSX
ATSU was deprecated for a long time and was finally removed from OS X
SDK in 10.11. wxOSX_USE_ATSU_TEXT was unconditionally disabled already,
so the code was never used and can be safely removed.
2016-12-03 12:44:10 +01:00