Commit Graph

65154 Commits

Author SHA1 Message Date
Artur Wieczorek
c606a7fc9f Store format as wxString
Using wxString here is simpler and not misleading.
2018-11-10 20:41:00 +01:00
Artur Wieczorek
7911d50335 Use locale-specific date format
There is no need to construct format string manually.
2018-11-10 20:39:57 +01:00
Artur Wieczorek
f3b6e6d3b5 Fix date format specification in wxDatePickerCtrlGeneric with wxUSE_INTL=0
Conversion specification for preferred date representation is "%x", not "x".
2018-11-10 14:59:27 +01:00
Artur Wieczorek
41898c8dc4 Compilation fix for wxUSE_INTL=0 build 2018-11-10 14:49:52 +01:00
Vadim Zeitlin
664b8c153f Don't export sorted dynamic arrays from the shared library
This shouldn't be necessary and doing it seems to result in duplicate
symbol errors when using MSVC under some not completely elucidated
circumstances.

See https://github.com/utelle/wxpdfdoc/pull/48

Closes https://github.com/wxWidgets/wxWidgets/pull/1013
2018-11-10 12:17:53 +01:00
Vadim Zeitlin
463deb03c9 Merge branch 'gtk-dpi'
A bunch of improvements for per-monitor DPI support in wxGTK and
wxGraphicsContext more generally.

Closes https://github.com/wxWidgets/wxWidgets/pull/995
2018-11-10 12:15:27 +01:00
VZ
cce9ef9d53 Fix compatibility breakage with wxMask::Create() in wxOSX (#1019)
Defining a Mac-specific Create(wxMemoryBuffer) overload hid the other
Create() overloads, which are actually part of the public API, so they
couldn't be used any longer since the changes of
e7d21f6638

Fix this by renaming this Create() to OSXCreate(), to avoid hiding the
base class methods.

Also remove Mac-specific ctor taking wxMemoryBuffer, this is confusing
and can be avoided by just calling OSXCreate() directly in the only
place where it is used.
2018-11-09 17:52:58 +01:00
Stefan Csomor
e484a2db19 force subview refresh on macOS 10.14
even on dark mode not all NSViews have their own layer, therefore don’t take that as a condition, because a child of such a view still might be layer-backed and need an explicit redraw.
Avoid spurious redraws for not visible windows (especiall important for not-yet fully constructed views or views during destruction)
2018-11-08 15:04:42 +01:00
Artur Wieczorek
bf3cfe16d4 Remove irrelevant TODO note from documentation
Function is marked as deprecated so TODO note is no longer relevant.
2018-11-07 22:25:19 +01:00
Artur Wieczorek
9e378480c2 Iterate over all characters of a wxString with iterator 2018-11-07 22:12:56 +01:00
Vadim Zeitlin
3d18e1a2b4 Merge branch 'joystick-fixes'
Harmonize joystick events between different platforms.

See https://github.com/wxWidgets/wxWidgets/pull/1017
2018-11-07 18:33:26 +01:00
Paul Cornett
8929b3d3de Use a more robust check for the GNU C Library
_GNU_SOURCE alone is not definitive
2018-11-05 21:09:13 -08:00
Vadim Zeitlin
bfe11f233f Really implement wxGCDC::GetPPI()
Return the DPI of the associated window, if any, instead of the
hard-coded 72*72.
2018-11-06 03:36:53 +01:00
Vadim Zeitlin
d5c43831b5 Really implement wxGraphicsContext::GetDPI()
Return the DPI of the associated window, if any, instead of always
returning hard-coded 72*72.
2018-11-06 03:36:53 +01:00
Vadim Zeitlin
5e53b22bd4 Add wxGraphicsContext::GetWindow()
This method allows to retrieve the window this context is associated
with, if any.

Add "wxWindow*" argument to wxGraphicsContext ctor and provide the
window pointer to it when available, i.e. when creating the context from
a wxWindow directly or from wxWindowDC, which is also associated with a
window, in platform-specific code.

No real changes yet.
2018-11-06 03:36:53 +01:00
Artur Wieczorek
d735e444f1 Refer to wxPGProperty associated with wxPGComboBox editor in all drawing operations
Store wxPGProperty for which wxPGComboBox editor is activated and use
this reference in all further drawing operations instead of retrieving
each time currently selected wxPGProperty which during the entire
lifetime of the editor is the same as property selected on editor
activation.

See #18211.
2018-11-05 22:38:39 +01:00
Vadim Zeitlin
190601c47f Translate the warning shown by wxHyperlinkCtrl::SendEvent()
As anything shown to the user, this string must be translated, so use
_() around it instead of wxT().

Also reword the string a little; remove unnecessary call to .c_str() and
use a const reference instead of making a copy of the URL unnecessarily.
2018-11-05 19:38:18 +01:00
Vadim Zeitlin
3e246c767f Return true from wxHyperlinkCtrl::MSWOnNotify()
As SendEvent() not only sends the event about clicking on the link, but
also opens the link in the default browser if this event was not
processed (which wasn't really obvious from its name, so at least
mention it in its comment), the event is actually always handled and so
MSWOnNotify() must return true, not false (and definitely not 0) to
indicate it.

Closes #18266.
2018-11-05 19:35:44 +01:00
Vadim Zeitlin
ef92b92691 Add unit test for wxCTZ
Check that the new function works reasonably correctly.
2018-11-05 19:27:53 +01:00
Vadim Zeitlin
1c68979fb4 Move wxCTZ() documentation to the appropriate place
The documentation comment belongs to interface/wx/math.h, not the header
under include.

Also change the argument type to wxUint32 as the non-gcc version only
works for 32 bit values.
2018-11-05 19:27:53 +01:00
Vadim Zeitlin
b00a24af60 Document wxJoystickEvent event changes
In particular, list the incompatible change in the corresponding section
and explain how to update the existing code.
2018-11-05 19:27:53 +01:00
Vadim Zeitlin
4198107086 Fix wxJoystickEvent documentation after the last commit
Remove left over part of the old sentence.

Also add a link to GetButtonChange() to GetButtonOrdinal()
documentation.
2018-11-05 19:27:53 +01:00
Mick Phillips
291a880d0c Synchronize joystick events between all ports
Generate wxJoystickEvent with the same fields under all platforms by
making the Linux and macOS versions follow MSW convention of using
"1 << N" for the changed button.

Add GetButtonOrdinal() accessor which can be used to retrieve just N.

Closes #18233.
2018-11-05 19:27:36 +01:00
Vadim Zeitlin
cf980cf5e3 Merge branch 'cmake-gstreamer-d2d' of https://github.com/MaartenBent/wxWidgets
CMake improvements: better gstreamer and Direct2D support.

See https://github.com/wxWidgets/wxWidgets/pull/1014
2018-11-05 18:51:10 +01:00
Artur Sochirca
fdee5e7bc9 Replace another occurrence of deprecated wxUSE_GENERICDATAVIEWCTRL
Use wxHAS_GENERIC_DATAVIEWCTRL instead, to complete the changes of
bc92ed9d85, see
https://github.com/wxWidgets/wxWidgets/pull/827

Closes https://github.com/wxWidgets/wxWidgets/pull/1016
2018-11-05 18:44:59 +01:00
Václav Slavík
aaa13cf520 Fix font description for non-. decimal separators
Fix wxNativeFontInfo::ToString and FromString to work correctly under
locales that don't use '.' for decimal separator. The code incorrectly
parsed descriptions using ToCDouble and this '.', but wrote them out
using locale's native separator. Fixed by using FromCDouble for output
too.
2018-11-05 18:30:09 +01:00
Stefan Csomor
b77aa4782d Forcing paint after show on 10.14
layer-backed views do not get a refresh when shown, but wx-user code might depend on the assumption that they do
2018-11-05 14:37:54 +01:00
Maarten Bent
55c50f36dc Disable webview in static build
Prevent link errors of test_gui with webview libraries.
2018-11-04 23:44:06 +01:00
Maarten Bent
de4eecc575 Install additional packages on Travis CI
Install packages for gstreamer, webkit, opengl and libsecret.
First check if the package is available.
2018-11-04 22:00:32 +01:00
Vadim Zeitlin
baf3dda57e Merge branch 'editlbox-fixes'
Cosmetic fixes to wxEditableListBox buttons appearance and some code
modernization.

See https://github.com/wxWidgets/wxWidgets/pull/1012
2018-11-04 17:56:10 +01:00
Vadim Zeitlin
31f5f2dc08 Rename a variable in wxEditableListBox code for clarity
Rename "centered" into "flagsCentered" to make it more obvious that this
variable contains wxSizerFlags.
2018-11-04 17:54:52 +01:00
Maarten Bent
9554cb49d8 Fix build when enabling wxD2D_DEVICE_CONTEXT_SUPPORTED
Add missing GUID and function for dynamic linking.
2018-11-04 16:49:14 +01:00
Maarten Bent
e1e5169e4b CMake: enable Direct2D graphics context by default
Disable it when the d2d1.h header is not found.
When using MSVC, match the behaviour of setup.h.
2018-11-04 16:49:14 +01:00
Maarten Bent
5c4741430a CMake: move find_package for lzma and secretstore to init.cmake 2018-11-04 16:35:58 +01:00
Maarten Bent
e1b725d5be CMake: mark package variables as advanced
Silence pkg_check_modules message.
2018-11-04 16:35:58 +01:00
Maarten Bent
d293f94d95 CMake: improve finding gstreamer
Support checking for multiple versions, first check gstreamer-1.0, then gstreamer-0.10.
Add support for finding gstreamer-player.
Specify the required components, add the include directories and link with the libraries of the found components.
Set the setup variables wxUSE_GSTREAMER and wxUSE_GSTREAMER_PLAYER.
2018-11-04 16:35:57 +01:00
Vadim Zeitlin
84d3ee10cc Merge branch 'simplify-imagelist'
Merge Mac-specific and generic wxImageList versions and modernize the
code.

See https://github.com/wxWidgets/wxWidgets/pull/1001
2018-11-04 14:15:16 +01:00
Daniel Kulp
26f0e816ca Send wxEVT_AUINOTEBOOK_PAGE_CHANGED after changing the page
For consistency with the other similar events and because it is more
useful for the code handling it, send this event when the new page is
already shown instead of doing it before showing it.

Closes https://github.com/wxWidgets/wxWidgets/pull/1007
2018-11-03 22:56:15 +01:00
Blake Eryx
65827a0572 Remove unnecessary c_str() calls from the samples
Pass wxStrings directly to wxString::Format("%s") and similar
pseudo-vararg functions, there is no need for c_str() there since
wxWidgets 2.9.

Closes https://github.com/wxWidgets/wxWidgets/pull/1009
2018-11-03 22:52:57 +01:00
Vadim Zeitlin
f24892127d Remove unnecessary wxUSE_TOOLTIPS check in wxEditableListBox code
SetToolTip() is defined (as doing nothing) even if wxUSE_TOOLTIPS==0, so
just call it directly as this allows to save on both the preprocessor
check and the check for the button validity.
2018-11-03 22:45:37 +01:00
Vadim Zeitlin
397b5ff01e Use wxSizerFlags-based API in wxEditableListBox
No real changes, just make the code more clear by using wxSizerFlags.
2018-11-03 22:43:10 +01:00
Vadim Zeitlin
18e2b58e5b Remove unnecessary border around wxEditableListBox buttons
This border was added under MSW for some reason, but doesn't seem to be
necessary (any longer?).

Closes #18265.
2018-11-03 22:39:57 +01:00
Artur Wieczorek
63c602c3d2 Explicitly declare iterators in the function templates 2018-11-02 12:10:22 +01:00
Paul Cornett
dfb48b47f5 Add version checks for gtk_widget_get_scale_factor() 2018-11-01 11:06:53 -07:00
Paul Cornett
ed442cd574 Draw background before drawing toolbar bitmap.
The background may not have been painted for us.
2018-11-01 11:05:41 -07:00
Artur Wieczorek
abf9678337 Revert changes in Editor Config file made by mistake in 5fbe3cab 2018-11-01 18:37:34 +01:00
Artur Wieczorek
161bb592ce Use wxVector<int> instead of wxArrayInt 2018-11-01 18:22:22 +01:00
Artur Wieczorek
e7357eafa2 Declare array explicitly as a wxVector instead of using wxArrayPGProperty alias 2018-11-01 18:19:56 +01:00
Artur Wieczorek
5fbe3cab76 Don't reset wxPGProperty editor if focus is switched between its components
As long as focus is being switched only between subcontrols of the active editor the state of the edited wxPGProperty remains unchanged and there is no need to explicitly reset the editor.
Unwanted editor resets could happen if such internal focus changes would be captured in EVT_IDLE handler.

Closes #18162.
2018-11-01 18:11:58 +01:00
Paul Cornett
dc0cf732a2 Provide scale factor to wxGtkStyleContext where it might matter. 2018-11-01 09:58:27 -07:00