Commit Graph

58993 Commits

Author SHA1 Message Date
Benjamin Drung
3cacee9d52 Define wxIsNaN() as std::isnan() in C++11 mode
std::isnan() is always available when using C++11, so just use it.

Also pout the test for C++11 implementations of both wxIsNaN() and wxFinite()
first, eventually the rest of the checks will become obsolete and will be
removed.

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

(cherry picked from commit bc41cbeb25)
2016-05-14 15:49:35 +02:00
Vadim Zeitlin
990ebe2dc2 Null-terminate arrays returned from wxCmdLineArgsArray
This is required for compatibility with the real argv array that this class is
supposed to emulate.

See #17531.

(cherry picked from commit 189e4c5024)
2016-05-13 15:42:45 +02:00
Jonathan Dagresta
143e55b8df Ensure wxGenericListCtrl item selected from keyboard is visible
When using the keyboard to select an item by typing the first characters of
its name, we need to make the item visible in addition to selecting it.

See #16336.

(cherry picked from commit 306597c4fa)
2016-05-13 15:34:43 +02:00
Robin Dunn
e44418ba2d Merge branch 'WX_3_0_BRANCH' into wxPy-3.0-branch 2016-05-04 21:58:48 -07:00
Robin Dunn
acaa554c71 fix line endings 2016-05-04 21:57:14 -07:00
Dimitri Schoolwerth
99262787cb Revert "Create native buttons without any label in wxOSX/Cocoa"
This change is not any longer needed since the reversion of
05862e608d in
831f360787.

This reverts commit f0f83adecf.
2016-05-01 22:05:04 +04:00
Václav Slavík
c41dee9a0d Convert more CRLF files to use LF to fix git confusion
Continuation of commit a7644e7b05 -
forcing git to normalize _all_ affected files seems impossible.
2016-05-01 18:57:11 +02:00
Václav Slavík
831f360787 Revert "Only set native label if nonempty in wxWindowMac::SetPeer()"
This reverts commit 05862e608d.

See db9baf9aa5 for the reasons.
2016-04-30 18:58:47 +02:00
Vadim Zeitlin
adb48b3c72 Fix wxMSW wxMimeTypesManager compilation in UTF-8 build
Use wxStringCharType with wxS(), not wxChar (which should be used with wxT())
to fix UTF-8 build after a487dc88c1.

Closes #17335.

(cherry picked from commit 884f3c623d)
2016-04-28 17:13:38 +00:00
Václav Slavík
fc4cfd4b9b wxMSW: Fix display of file history items in menus
Unlike other platforms, wxMSW assumes natural text directionality (i.e.
right to left under RTL locales), but absolutely filenames are always
LTR because they begin with a Latin character. It is therefore necessary
to add  an explicit directional mark in front of them on Windows.
2016-04-23 17:22:05 +02:00
Václav Slavík
59531f9616 MSW: Fix dialog default positions under RTL locales
Toplevel windows use their parent's coordinate system as the reference
frame, not desktop's, so need to be adjusted accordingly if its
mirrored. Without these changes, default-positioned wxDialogs would end
to the right side of the parent window's right border (instead of being
slightly inside the window) and changing their size would move them as
well.
2016-04-23 17:21:44 +02:00
Václav Slavík
a7644e7b05 Convert all CRLF files to use LF to fix git confusion.
Having CRLF files in the repository with eol=crlf breaks just about
everything, e.g. any rebase/merge involving these files would fail.
Try to fix this by making sure the files use LF in the repository and CRLF is
only used in the working copy.

(analogous to commit c3e5751c36)
2016-04-23 17:20:42 +02:00
Vadim Zeitlin
59078ab545 Use correct size for the notebook background bitmap in wxMSW
Using "r.x + r.width" didn't really make much sense, it just happened to be
close enough to the real value to not create any problems when using LTR
layout, but was wrong in RTL, resulting in visible vertical line being visible
in the notebook client area.

Fix this using the same GetThemeBackgroundExtent() for determining the bitmap
size as is used for drawing over it.

(cherry picked from commit 0487a3d3f1)
2016-04-10 20:53:19 +02:00
Vadim Zeitlin
53588bd970 Fix background for children of windows with RTL layout in wxMSW
To correctly compute the brush origin offset for painting background of a
child in a window using RTL layout, we need to offset it by the child origin
i.e. its _right_ top corner in this case and not the left top corner as we did
before.

Conveniently, although not very explicitly, MapWindowPoints() already takes
care of this for us if we just pass it both the left and right points, but we
wrongly passed it only a single one, so it couldn't work its magic in this
case.

Change this to fix the drawing artefacts which appeared over wxNotebook
children with transparent background (e.g. wxStaticText) due to the use of
wrong origin before.

(cherry picked from commit 169fb2c7f5)
2016-04-10 20:53:15 +02:00
Micha Ahrweiler
fe7186ce88 Make OK button default in wxGTK wxMessageDialog by default
Under wxGTK the default button in wxMessageDialog with style wxOK was set to
"Cancel", whether the wxOK_DEFAULT style was specified or not.

Now it is set to "OK", as expected, and wxCANCEL_DEFAULT needs to be
explicitly specified to focus the "Cancel" one.

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

(cherry picked from commit a374801465)
2016-04-07 15:58:28 +02:00
Václav Slavík
f2c95c1d5c Fix wxCheckListBox checkbox rendering under RTL
When running under a RTL locale, checkboxes should not be mirrored, but
should keep the same appearence in both RTL and LTR layouts.

(cherry picked from commit 22f0801378)
2016-04-06 18:11:54 +02:00
Steve Browne
7b224881d0 Restore cwd even if wxFileDialog is cancelled in wxMSW
Sometimes the file dialog changes the current directory even if it is
cancelled, so restore it in any case, not only after successful return.

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

(cherry picked from commit ceaa840d7b)
2016-04-01 03:41:20 +02:00
İsmail Dönmez
f358979d35 Check for C/POSIX locale just after we truncate language string
This way we can correctly detect C.UTF-8 as C locale.

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

(cherry picked from commit 467dc72fc2)
2016-03-30 17:49:45 +02:00
Václav Slavík
34c54237fc Don't mirror wxStyleTextCtrl under RTL locales
Not onlu has Scintilla no support for RTL languages, it is rendered into
a mirrored DC on Windows and so guaranteed unreadable and unsable. Fix
it by explicitly setting the window's layout direction to LTR.

(cherry picked from commit d8a90b4606)
2016-03-28 17:41:18 +02:00
Václav Slavík
92d9101b3d Fix VC14 compiler warnings about hiding member variables 2016-03-23 14:48:19 +01:00
Václav Slavík
e744317d3a Disable warnings in the standard shlobj.h header with MSVC14
There is nothing we can do about these (harmless) warnings, so just
disable them. Also make sure that the header is included via
wx/msw/wrapshl.h  everywhere.

(backported from commit e37f1a84ce)
2016-03-23 14:47:24 +01:00
Vadim Zeitlin
2d6d4868a1 Disable warnings in the standard gdiplus.h header with MSVC14.
There is nothing we can do about these (harmless) warnings, so just disable
them.

(cherry picked from commit a2d6341e4f)
2016-03-23 14:38:09 +01:00
Vadim Zeitlin
234f7ff6e1 Suppress harmless warning in a standard header with VC14
imagehlp.h from 8.1 SDK contains an extraneous "typedef" in an enum
declaration which results in several warnings when building, avoid them.

(cherry picked from commit fbe7fc85b2)
2016-03-22 17:09:32 +01:00
Paul Cornett
a97553a939 Avoid unresizable windows on HiDPI displays when using SetSizeHints()
see #17456

(cherry picked from commit 4793e5b0a4)
2016-03-21 09:48:33 -07:00
Andreas Falkenhahn
60fd8c7a1b Fix wrong TLW size with horizontal decorations in wxGTK
Compare min/max width with m_width, not m_height, in GTKUpdateDecorSize() for
the logic to work as expected.

See #17455.

(cherry picked from commit 0777bf6b92)
2016-03-20 15:51:28 +01:00
zhivko
e9ffb3f662 Fix crash when updating art provider of a ribbon with scroll buttons
Don't leave the scroll buttons with the old, possibly soon to be deleted, art
provider pointer.

See #17441.

(cherry picked from commit 6e5a2b630a)
2016-03-15 20:24:06 +01:00
Vadim Zeitlin
8fb4e76a63 Avoid mixing code and declarations in C expat code
Some compilers, notably MSVC, don't support C99 and C89 doesn't allow this.

Fixes MSVS compilation after 02da4c8b1d.

(cherry picked from commit c7a3785a5c)
2016-03-14 00:15:42 +01:00
Václav Slavík
02da4c8b1d Update the version of Expat used to 2.1.1 2016-03-13 17:54:53 +01:00
Matthew Heinsen Egan
7c361b49e5 Report libraries in EXTRALIBS_WEBVIEW in wx-config output
These libraries should be included when "webview" appears in --libs or
--optional-libs.

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

(cherry picked from commit 037f697760)
2016-03-12 01:47:17 +01:00
Vadim Zeitlin
03903c1e45 Document wxEVT_MEDIA_XXX event types.
See #15768.

(cherry picked from commit 5c1f95bc71 on master)
2016-03-11 03:06:40 +01:00
Robin Dunn
57d31c1ae3 Merge pull request #4 from kollivier/wxPy-3.0-branch
Add custom context menu support to wxWebKitCtrl.
2016-03-03 20:48:19 -08:00
kollivier
b12644cfc9 Add custom context menu support to wxWebKitCtrl. 2016-03-01 10:56:57 -08:00
Danny Scott
966084a65a Add script for building MSVS 2015 binaries
See #17408.

(this is a backport of 7e493c3a3c from master)
2016-02-29 18:58:17 +01:00
Vadim Zeitlin
b010793ea8 Document wxEVT_MEDIA_XXX event types.
Closes #15768.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2016-02-27 17:32:48 -08:00
Robin Dunn
3d7d7aaea6 Merge pull request #3 from kollivier/wxPy-3.0-branch
Change the category to avoid duplicate symbol errors
2016-02-26 20:44:41 -08:00
kollivier
306deb2b6a Change the category to avoid duplicate symbol errors with the wxWebView implementation. 2016-02-26 17:29:45 -08:00
Robin Dunn
4e95f5c5f2 Merge branch 'WX_3_0_BRANCH' into wxPy-3.0-branch 2016-02-26 16:10:21 -08:00
Robin Dunn
4571f007c6 Add cairo_surface_flush 2016-02-26 15:13:15 -08:00
Paul Cornett
9dccf621c8 Avoid comparing address of reference to NULL
(backport of 01ccff2e05)
2016-02-26 10:39:02 -08:00
Paul Cornett
47fd8835cf Avoid "Gtk-WARNING **: Allocating size to ..." with GTK+ 3.19+
(cherry picked from commit 9fea81c069)
2016-02-24 23:51:56 -08:00
Paul Cornett
7afbdcd534 Avoid "Gtk-WARNING **: State doesn't match"
See https://github.com/wxWidgets/wxWidgets/pull/232
(backport of 69a13d973c)
2016-02-24 21:20:08 -08:00
Paul Cornett
0388ce8e25 Allow SetClientSize() to set correct size even when size of window decorations is not known
This should allow correct sizing of first TLW (when using SetClientSize())
with backends using client-side decorations such as Wayland.

(cherry picked from commit bc4df78421)
2016-02-22 21:16:12 -08:00
Paul Cornett
2bc3721f06 Fix GetBestSize() for GTK3 after size has been set
Need to reset size request to get actual best size.
See Fedora bug https://bugzilla.redhat.com/show_bug.cgi?id=1282142

(cherry picked from commit 6ed7e27bf2)
2016-02-22 21:08:59 -08:00
Robin Dunn
20b4aa2ef9 Merge branch 'WX_3_0_BRANCH' into wxPy-3.0-branch 2016-02-22 20:13:42 -08:00
Robin Dunn
a9ab946736 Applied PR #2 from RobinD42/wxWidgets by hand:
* Add SetSashSize to the interface for wxSplitterWindow.
 * Ensure Mac WebViews always retain their selection state, even when losing focus.
2016-02-22 19:55:11 -08:00
Artur Wieczorek
470a46dd48 Fix wxSearchCtrl vertical size in wxMSW
Don't add the borders twice, this made the control too tall.

Closes #16817.
2016-02-23 00:26:32 +01:00
Václav Slavík
d918dabb2d Fix inefficient delayed setting of wxSplitterWindow sash
If setting sash position to a value that cannot be satisfied due to
minimum size constraints, wxSplitterWindow would continue endlessly
trying and failing to set it, causing constant CPU use on OS X. This was
because delayed sash setting was invoked from idle handler and if it
failed, the code would repeat the same action again and again.

Instead, perform this delayed setting from OnSize handler. If setting
sash position failed in the first place, it must have been due to too
small size of the window. Therefore it's pointless to try again until
the size changes.

(cherry picked from commit 513fca5d4c)
2016-02-22 15:53:43 +01:00
Václav Slavík
d99d4568df wxMSW: Fix wxToolBar rendering with double-buffering
An old check - used for reasons that no longer apply - was preventing
correct rendering of wxToolBar background in wxMSW. Fix this by removing
the obsolete check.

See #9666 for the original reason for the check.

(cherry picked from commit 3a7951db2b)
2016-02-22 15:52:03 +01:00
Scott Talbert
73e9e18ea0 Fix STC compilation with GCC6
Use std::abs() from <cmath> instead of abs() from <math.h> to avoid problems
with ambiguous overloads.

Closes #17147.

Closes https://github.com/wxWidgets/wxWidgets/pull/222
2016-02-21 01:47:41 +01:00
Vadim Zeitlin
e7d27c91e6 Try to always give wxDirDialog a valid parent in wxMSW
Use the same GetParentForModalDialog() method as for the normal dialogs to
find the parent to use for this native dialog and ensure that it is shown
modally even if no parent is explicitly specified when constructing it.

See #17384.

(this is a backport of baff0c942b from master)
2016-02-20 13:44:29 +01:00