Commit Graph

65027 Commits

Author SHA1 Message Date
Paul Cornett
d200f19c02 Fix non-unicode build after 82881d6b03
wxChar overload of wxTmemcpy() is not defined. Just use memcpy() directly
as wxStrlcpy() does not use wxChar.
2018-08-22 08:12:11 -07:00
Paul Cornett
1f8481eabc Fix restoring locale in SetArguments()
The string returned by setlocale() can be overwritten by subsequent calls,
so make a copy of it. See #18203
2018-08-22 00:00:43 -07:00
Vadim Zeitlin
14c121b469 Merge branch 'grid-mouse'
Improve mouse event handling in wxGrid during drag operations.

See https://github.com/wxWidgets/wxWidgets/pull/891

Closes #18186.
2018-08-21 13:03:09 +02:00
Steven Lamerton
b61123cd7d Allow distinguishing user- from script-opened wxWebView windows
Add wxWebViewEvent::GetNavigationAction() returning a value that can be
either wxWEBVIEW_NAV_ACTION_USER for the links opened by the user, or
wxWEBVIEW_NAV_ACTION_OTHER for the other ones (e.g. opened from
JavaScript code on the page).

Closes #15402.
2018-08-19 22:27:34 +02:00
Stefan Csomor
91aa6ba36e OSX using ref data for colour and NSColor native support (#878)
* First attempt using ref data for colour and spliting implementation for CGColorRef and NSColor

* correcting SDK dependency

* Implementing feedback suggestions
2018-08-19 18:02:06 +02:00
Igor Korot
36d21ce6c8 Implement strike-through support for wxDataViewCtrl in wxGTK too
Previously it was supported in the generic version only, see #18180 and
the changes of 09124932eb

Closes https://github.com/wxWidgets/wxWidgets/pull/892
2018-08-19 12:06:32 +02:00
Vadim Zeitlin
617a15d418 Improve wxNotebook themed background drawing
Use GetThemeBackgroundContentRect() to properly draw the themed notebook
background in all configurations.

Closes #18156.
2018-08-18 15:44:43 +02:00
Vadim Zeitlin
151309b2e4 Improve wxDataViewModel::HasDefaultCompare() documentation
Document that returning true from it means that Compare() can (and will)
be called with -1 as the column index when the default sort order is
being used.

Closes #18190.
2018-08-18 15:28:16 +02:00
Vadim Zeitlin
2a3e3bb533 Merge branch 'clang-msw' of https://github.com/MaartenBent/wxWidgets
Fixes for clang under MSW and support in CMake build system.

See https://github.com/wxWidgets/wxWidgets/pull/887
2018-08-18 15:17:48 +02:00
Vadim Zeitlin
48da21619e Merge branch 'treectrl-delete-events'
See https://github.com/wxWidgets/wxWidgets/pull/881
2018-08-18 15:07:37 +02:00
Vadim Zeitlin
fc324fd9bf Merge branch '18189-progdlg-modality'
See https://github.com/wxWidgets/wxWidgets/pull/886
2018-08-18 15:06:27 +02:00
Vadim Zeitlin
5442edbbe9 Fix wrong udata type in wxFileSystemWatcher code under NetBSD
NetBSD kqueue struct uses "intptr_t" as type of the user data pointer
and not "void*" as all the other platforms using kqueue, so account for
it in this code.

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

Closes #18199.
2018-08-18 15:05:58 +02:00
Vadim Zeitlin
65eb827c18 Merge branch '18195-sched-prio-other'
See https://github.com/wxWidgets/wxWidgets/pull/882
2018-08-18 15:04:40 +02:00
Vadim Zeitlin
6132ce85a8 Do use compiler TLS support under NetBSD
It didn't work when support for using compiler-provided TLS was added in
7beff712f0 back in 2009 but is reported to
work since 2011, so it should be safe to use unconditionally now.

Closes #18200.
2018-08-18 15:01:41 +02:00
Vadim Zeitlin
bdbd316ef1 Improve ID documentation and add more links to it
Better describe various kinds of IDs and advise not to use hard-coded
values of them.
2018-08-18 14:49:17 +02:00
Vadim Zeitlin
8dc3024514 Add wxID_{LOWEST,HIGHEST} descriptions to the documentation
Make it more clear what do these ones actually stand for.
2018-08-18 14:49:17 +02:00
Vadim Zeitlin
bb00501e77 Fix mouse event handling while dragging in wxGrid
Ignore all the mouse events other than "left up" while dragging to avoid
releasing the mouse and ending the dragging operation too soon.

This required non-trivial refactoring of the code which hopefully should
also make it slightly more clear by centralizing high level logic in
ProcessGridCellMouseEvent() itself and calling various helper functions
from it instead of spreading this logic over the entire call tree.

The code still remains pretty confusing and rewriting it to use
wxMouseEventsManager (which would need to be generalized first to become
a template class using arbitrary item type instead of just "int", as
now) would undoubtedly do it a lot of good.

Closes #18186.
2018-08-18 14:45:55 +02:00
Vadim Zeitlin
53972b17ee Add helper wxGrid::DoAfterDraggingEnd() function
No real changes, just refactor the code to extract the part of
CancelMouseCapture() which can be useful not only when the mouse capture
is lost unexpectedly, but also when we release it of our own volition,
into a separate function.
2018-08-18 14:40:48 +02:00
Vadim Zeitlin
44efb4e3a4 Fix badly formatted Doxygen references in wxStandardID
@ref label argument must be on the same line.
2018-08-18 11:11:31 +02:00
Vadim Zeitlin
ad224330c0 Improve wxID_AUTO_{LOWEST,HIGHEST} description
Explain that the values of these constants are not 0 and 1, as could be
misconstrued by just looking at the enum declaration.
2018-08-18 11:08:14 +02:00
Maarten Bent
ef7d203bf4 Fix building taskbarbutton sample with precompiled headers 2018-08-17 20:00:48 +02:00
Maarten Bent
0bf459de92 Fix typos and whitespace in CMake files. 2018-08-17 20:00:47 +02:00
Maarten Bent
61500907ee CMake: Improve precompiled headers for wxscintilla
The auto-generated header causes undefined members and identifiers in the
standard c++ headers when using clang on macOS or Windows.
Do not disable precompiled headers entirely but use the main Scintilla
header as prefix header so there is at least a small speedup.
2018-08-17 20:00:47 +02:00
Maarten Bent
41d6bc579a Enable precompiled headers for samples 2018-08-17 19:56:10 +02:00
Vadim Zeitlin
a8448b084c Remove duplicate wxGrid::m_winCapture initialization
No real changes, just remove one of 2 duplicate assignments.
2018-08-17 00:26:42 +02:00
Maarten Bent
ceda6f6815 Support clang compiler on Windows when using CMake 2018-08-16 21:18:44 +02:00
Maarten Bent
8d72f3c5f4 Fix multiple definition error when using clang on Windows 2018-08-16 21:18:43 +02:00
Maarten Bent
fd81223a2f Fix c++11-narrowing error when using clang on Windows
Case value 0xfffffd9f results in the following error:
error: case value evaluates to 4294966687, which cannot be narrowed to type
'DISPID' (aka 'long') [-Wc++11-narrowing]
2018-08-16 21:10:45 +02:00
Vadim Zeitlin
25678f6095 Don't disable main application window in wxProgressDialog
Since 58f90d36a0, the main application
window was disabled even if no parent was specified when creating
wxProgressDialog, which was a change in behaviour compared to 3.1.0 and
earlier versions.

Revert this change and don't disable any windows if neither parent nor
wxPD_APP_MODAL is given.

Closes #18189.
2018-08-16 19:57:18 +02:00
Vadim Zeitlin
6d870fe011 Improve wxPD_APP_MODAL description in the documentation
Explain the "application modality" concept.
2018-08-16 19:48:41 +02:00
Vadim Zeitlin
c6af757edb Don't use WXDLLIMPEXP_FWD_BASE in typedef to fix clang build
clang doesn't seem to like __declspec in typedefs, so declare the class
first using the macro expanding into __declspec and don't use it in the
typedef later.

Closes #18196.
2018-08-16 19:42:11 +02:00
Vadim Zeitlin
48fc60609d Use more compatible "=" in test(1) instead of "=="
The latter is not supported in all shells and results in problems under
NetBSD for example.

Closes #18198.
2018-08-16 13:45:53 +02:00
wiz
99cb097f4d Install wx-config as a script, not as a binary program
Installing it using INSTALL_PROGRAM results in problems under NetBSD
where INSTALL_PROGRAM tries to strip it. Use INSTALL_SCRIPT instead.

Closes #18197.
2018-08-16 13:40:28 +02:00
Vadim Zeitlin
cec14a334c Document that wxThread::SetPriority() is broken under Unix
The code setting thread priority doesn't work without changing the
scheduling policy as thread priorities are simply ignored when using the
default SCHED_OTHER (at least under Linux and NetBSD, but probably other
systems too).

See #18195.
2018-08-16 13:14:19 +02:00
Vadim Zeitlin
51c8496087 Don't change thread priority if it is default under Unix
Skip all the code dealing with the priority/scheduling parameters if the
priority is just wxPRIORITY_DEFAULT anyhow, as it's unnecessary to do
anything in this case and it can result in spurious errors.

Also extract this code into a separate SetThreadPriority() function to
make wxThreadInternal::Create() itself shorter and more clear.

Closes #18195.
2018-08-16 13:08:52 +02:00
Vadim Zeitlin
29c218f1b4 Slightly de-uglify Unix version of wxThreadInternal::Create()
Just use wxUnusedVar() instead of defining and using the ugly
WXUNUSED_STACKSIZE() macro.

Also change an out of date comment as the thread priority is not the
only attribute being changed here.

No real changes.
2018-08-16 12:46:09 +02:00
Artur Wieczorek
606dc18e5f Don't switch NSCell to single-line mode (wxOSX)
NSCell of a single-line wxTextCtrl cannot be just switched
to the single-line mode because apart from restricting layout to a single
line this also effectively blocks processing of the Return key.

To restrict the contents of the cell to a single line we need to replace
in wxTextEntryFormatter every new line character with space (this simulates
what is done when NSCell works in native single-line mode).

Closes #18183.
Closes #18179.
Closes #18101.
See #12693.
2018-08-15 21:56:33 +02:00
Vadim Zeitlin
51de736a58 Merge branch 'test-improvements' of https://github.com/MaartenBent/wxWidgets
Fixes for CMake, AppVeyor, Travis and MinGW.

See https://github.com/wxWidgets/wxWidgets/pull/869
2018-08-14 23:25:23 +02:00
approach
09124932eb Add strike-through support to wxDataViewItem attributes
Implement support for this attribute only in the generic version so far,
it will hopefully be implemented for the natives ones in the future.

Also add a new toggle column to the dataview sample to check how it
works: checking the items in this column enables using this attribute
for some other ones.

Closes #18180.
2018-08-14 18:04:31 +02:00
Vadim Zeitlin
3c8b9589d8 Test that wxTreeCtrl::DeleteAllItems() does send events
This seems to be the case under all still supported MSW versions, so
remove the note saying that the events might not be sent from the
documentation and add a unit test verifying that they are indeed sent.
2018-08-14 17:50:28 +02:00
Vadim Zeitlin
d9d05bc221 Document that wxTreeCtrl::DeleteChildren() does send events
Contrary to what the documentation stated previously, this function does
generate the wxEVT_TREE_DELETE_ITEM events for all the items being
deleted, in both MSW and generic implementations.

Update the documentation and add a new unit test checking that the
behaviour really conforms to it.
2018-08-14 17:48:46 +02:00
Blake-Eryx
e1a7f56040 Fix spelling and punctuation errors in comments and documentation
Fix several occurrences of misspelling "trivial" as "trival"; use "from"
rather than "than"; add missing articles and commas.

Closes https://github.com/wxWidgets/wxWidgets/pull/874
2018-08-14 17:15:39 +02:00
Paul Cornett
de1322a02d Fix DrawItemSelectionRect() for focused state 2018-08-11 11:51:49 -07:00
Stefan Csomor
e09d11c7ac silence warning about unused var in SDK < 10.14 2018-08-08 08:07:59 +02:00
Stefan Csomor
71ad5ba545 turning of undefined macros warning, force to using gnu++11 and libc++ as we do in command line builds 2018-08-08 08:04:02 +02:00
Vadim Zeitlin
47c2623282 Fix documentation URLs in wxMSW installation instructions
HTTPS URLs are not valid for docs.wxwidgets.org domain, so use HTTP.
2018-08-07 12:02:16 +02:00
Cătălin Răceanu
5349d48c38 dll build fix for WXQT, DoEnableSystemTheme
removing 'inline' did fix:
warning: 'virtual void wxSystemThemedControlBase::DoEnableSystemTheme(bool, wxWindow*)' redeclared without dllimport attribute after being referenced with dll linkage

but introduced
multiple definition of `wxSystemThemedControlBase::DoEnableSystemTheme(bool, wxWindow*)'.

The proposed form gets no complaints
2018-08-05 15:46:50 +03:00
Stefan Csomor
e136f34944 Removing extra semicola 2018-08-05 14:21:50 +02:00
Paul Cornett
85bdd1be9f Update Cairo version check.
Should presumably have been part of 3f18576dee.
2018-08-03 09:53:36 -07:00
Paul Cornett
6907a59bc3 Remove unneeded compile-time Cairo version checks.
The code will compile with any Cairo version.
2018-08-03 09:39:38 -07:00