Commit Graph

62293 Commits

Author SHA1 Message Date
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
Václav Slavík
40a04218f4 Don't remove bgcolor in selected markup in wxOSX
It does more harm than good: if an item uses background colors in the
markup, it stands to reason it's important and simply eliminating it
would result in confusing rendering. The decision how to best handle
background color in selection is application-specific.
2016-12-03 11:07:54 +01:00
Václav Slavík
e9c1f43925 Improve wxDataViewCtrl selection rendering in wxOSX
Check NSCell's backgroundStyle property to determine whether the row's
content should be rendered normally or in the appearance for selected
rows, instead of previously used isHighlighted. The latter reports the
row as selected even if the control doesn't have focus and the selection
is therefore rendered in light gray rather than blue. In that case, e.g.
reducing colors of the text is not necessary and native controls don't
do it either.

This change makes the behavior match the native one and only renders
highlighted appearance if the row background is blue/dark.

This also matches wxDATAVIEW_CELL_SELECTED to dark background rather
than being selected. This is consistent with its purpose (alternative
appearance) as well as with what the generic wxDataViewCtrl
implementation does.
2016-12-03 11:07:54 +01:00
Laurent Poujoulat
7c730334a2 Fix long long format specifier when using MinGW with ANSI STDIO
When using MinGW own, more standard-compliant, STDIO library, the correct
format specified to use for long long values is "%lld" and not "%I64d" as when
using MSVC CRT.

Closes #17736.
2016-12-02 20:47:43 +01:00
Vadim Zeitlin
a5529fc16c Improve documentation of CreateTextSizer() widthMax argument
Also fix the version since which it is available.

See 73f6f622f9
2016-12-01 14:54:08 +01:00
Tobias Schlager
73f6f622f9 Allow specifying the maximum width of static text in dialogs
This patch allows specification of the maximum width of static texts
created with wxDialog::CreateTextSizer.

The patch preserves backwards compatibility by setting the previous
width value as the default argument value.

Closes https://github.com/wxWidgets/wxWidgets/pull/355
2016-12-01 14:06:43 +01:00
Vadim Zeitlin
aad8663698 Avoid harmless warning about shadowing a parameter
Rename GetSysErrorMsg() buffer size parameter introduced in the recent commit
343318d73e to avoid clash with the local
variable of the same name.

See https://github.com/wxWidgets/wxWidgets/pull/343
2016-11-30 17:59:27 +01:00
Graham Dawes
d639e4ffce Fix wxQt build errors when using gcc 4.4
Closes #17733.
2016-11-30 16:13:46 +01:00
VZ
5551932c25 Allow using Bind() with non-public inheritance in C++11 code
Using Bind() with a method of the class deriving from wxEvtHandler
non-publicly used to result in a compile-time error, but at least with C++11
we can detect this case and allow the code to compile.

Closes #17623.
2016-11-29 19:32:40 +01:00
VZ
4212202a9a Add support for cache directory to wxStandardPaths::GetUserDir()
This has direct equivalent under macOS and when using XDG.

See #17727.
2016-11-29 19:32:14 +01:00
VZ
ac31c85901 Merge macOS version-related fixes
Notably fix build with pre-10.11 SDK.
2016-11-29 00:53:33 +01:00
scootergrisen
90bd2523d1 Danish translation improvements 2016-11-28 02:25:42 +01:00
Vadim Zeitlin
2b764a1b8a Avoid clang 4.0 -Wexpansion-to-defined warnings
It's not really clear why, but clang 4.0 has decided to start giving warnings
about using the result of an expression constructed using the preprocessor
"defined" operation in #if checks, so trivially avoid doing this.
2016-11-28 01:50:30 +01:00
Jonathan Li
713c3f9d1b Use locale name directly for Windows Vista and later
Instead of combining the language, country and codepage and passing the
resulting string to setlocale(), the locale name can be used instead for
setlocale() on Windows Vista and onwards.

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

This fixes a crash that occurs when switching locale from Korean to
Norwegian Bokmål, since the language_country.codepage string resolves to
"Norwegian Bokmål_Norway.1252" and mbstowcs trips up on the non-ASCII
character.
2016-11-28 00:55:59 +01:00
Vadim Zeitlin
fec4d61377 Merge branch 'syserrormsgstr'
Add thread-safe wxSysErrorMsgStr() to be used instead of wxSysErrorMsg().

Closes https://github.com/wxWidgets/wxWidgets/pull/343
2016-11-27 15:08:31 +01:00
Vadim Zeitlin
9e24755d00 Minor improvements to wxSysErrorMsgStr() documentation
Link to the new function, instead of wxSysErrorMsg(), from the other functions
documentation.

Also mention that this function is new since 3.1.0.
2016-11-27 15:02:53 +01:00
Vadim Zeitlin
110d1b03e5 Another blind fix for wxTextDataObject under macOS
Use the length provided to SetData() instead of assuming it is NUL-terminated
in the wxNEEDS_UTF16_FOR_TEXT_DATAOBJ case too, and not only in the
wxNEEDS_UTF8_FOR_TEXT_DATAOBJ onem, as was done by the previous attempt to fix
this in 20c130a578.

Closes #9522.
2016-11-26 18:44:00 +01:00
Vadim Zeitlin
295576f78f Fix compilation of WebView code in wxOSX with SDK < 10.11
This was broken by 05857e66c0 which introduced
dependencies on protocols only declared in 10.11 headers.

Fix build by checking if we're using 10.11 SDK and using these protocols only
in this case.
2016-11-26 17:29:27 +01:00
Vadim Zeitlin
50190395c6 Get rid of macOS 10.7 version checks, they're always true
We don't support OS X < 10.7 anyhow any more.
2016-11-26 17:28:12 +01:00
Vadim Zeitlin
2638869fc7 Move HAVE_<strfunc> definitions to wx/osx/config_xcode.h
They are not needed in wx/osx/cocoa/chkconf.h as they are detected by
configure normally, so only define them when using Xcode.
2016-11-26 17:15:54 +01:00
Vadim Zeitlin
cb2474f040 Use wxDC::GetPartialTextExtents() in wxStaticText::Wrap()
This is more efficient than calling GetTextExtent() with a growing string in a
loop as we used to do (with ~60 character string wrapped on 2 lines it brings
wrapping time down from 4ms to 600us).

It is also slightly more accurate under macOS, even though it's still off and
some text may be truncated when wrapping.
2016-11-24 02:17:41 +01:00