Commit Graph

68757 Commits

Author SHA1 Message Date
Stefan Csomor
49f6370890 shared schemes, distinct naming, removing old source files 2020-07-14 17:41:16 +02:00
Artur Wieczorek
cde033df8d Save initial wxPropertyGridManager extra style
Extra style bits used while initializing wxPropertyGridManager are
not saved and therefore cannot be returned by GetExtraStyle(). We need
to save them in a standard way to make them accessible for this function.

See #18813.
2020-07-14 12:21:35 +02:00
Paul Cornett
5325ccfda6 Update generic wxTreeCtrl appearance when theme changes
See #18823
2020-07-13 20:26:59 -07:00
Hertatijanto Hartono
f1f27bc37c Checks for 3rdparty libraries availability in configure
Abort configure run with an error if a 3rd party library doesn't seem to
be present, when it's supposed to be used during the build, as this is
better than postponing the error until make runs into it much later and
also allows us to give a hopefully helpful message telling people that
they might be missing the relevant submodules.

Also add --disable-tests configure option to allow skipping building
tests entirely. In particular, this allows to avoid cloning any
submodules at all when using system libraries on a Unix system.

Closes https://github.com/wxWidgets/wxWidgets/pull/1954
2020-07-13 23:36:31 +02:00
Vadim Zeitlin
3ec166f960 Merge branch 'dos_BuildTools' of https://github.com/doscott/wxWidgets
Official build/packaging scripts fixes: specify TARGET_CPU explicitly
for 32 bit builds (and also document it); don't bother modifying
wxwidgets.props as it now works out of the box.

See https://github.com/wxWidgets/wxWidgets/pull/1960
2020-07-13 20:54:27 +02:00
dos
5ed09da80c Copy wxwidgets.props to root of *Dev.7z packages; use full source path with fciv command. 2020-07-13 13:34:02 -03:00
dos
050df54930 Add TARGET_CPU=X86 to 32 bit builds. 2020-07-13 13:32:24 -03:00
dos
db01789373 Add TARGET_CPU requirement for x86 DLL build. 2020-07-13 13:28:53 -03:00
mimi89999
87d2f35f37
Change AUI pane top and left colors to wxSYS_COLOUR_WINDOW
Closes #18820
2020-07-13 18:20:26 +02:00
Vadim Zeitlin
69e27acf0d Merge branch 'im/clipboard' of https://github.com/imciner2/wxWidgets
Ensure the clipboard contents are stored properly on GTK.

See https://github.com/wxWidgets/wxWidgets/pull/1953
2020-07-13 15:33:58 +02:00
Vadim Zeitlin
325648136c Fix system colours in wxGTK wxSysColourChangedEvent handlers
Using wxSystemSettings::GetColour() in wxSysColourChangedEvent handler
in wxGTK could return the old colour value, before the change, because
the callback for notify::gtk-theme-name signal defined in wxTLW, which
generates wxSysColourChangedEvent, could be invoked before the callback
for the same signal in wxSystemSettings, which invalidated its cache.

Fix this by registering the former using g_signal_connect_after() and
thus ensuring that wxSystemSettings callback runs before it, and the
cache is cleared before wxSysColourChangedEvent handlers can use it.

Closes #18818.
2020-07-13 14:23:42 +02:00
Stefan Csomor
f9618ebe5b Revert "disable this test when no wxMenuBar is present"
This reverts commit 769881a45b.
2020-07-13 11:24:16 +02:00
Stefan Csomor
769881a45b disable this test when no wxMenuBar is present
it just is full of calls to menubars ..
2020-07-13 11:19:52 +02:00
Vadim Zeitlin
e779450638 Merge branch 'tipwindow'
Miscellaneous wxTipWindow enhancements, including better high DPI
support.

See https://github.com/wxWidgets/wxWidgets/pull/1949
2020-07-12 22:31:08 +02:00
Vadim Zeitlin
32489c914c Merge branch 'vector-reverse-iter'
Fix wxVector reverse iterator base().

See https://github.com/wxWidgets/wxWidgets/pull/1948
2020-07-12 22:30:42 +02:00
Vadim Zeitlin
98241e21cd Merge branch 'colour-as-string'
Return empty string from wxColour::GetAsString() if it's invalid.

See https://github.com/wxWidgets/wxWidgets/pull/1947
2020-07-12 22:29:09 +02:00
tm
f6cc8ff52c Add GetOpenGLScaleFactor() to abstract OpenGL coordinates scaling
The fix for OpenGL coordinates when using high DPI in b134589cbb (Fix
OpenGL samples when using HiDPI displays, 2019-08-06) did fix it for GTK
3 and macOS, but broke it for MSW and other platforms not using pixel
scaling, as window coordinates are the same as OpenGL ones there, while
GetContentScaleFactor() can still return values > 1 even on these
platforms.

Provide new GetOpenGLScaleFactor() function abstracting this platform
difference and use it in all OpenGL samples to make them work correctly
in high DPI under all platforms.

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

Closes #17391.
2020-07-12 22:28:29 +02:00
Ian McInerney
8f322ffb23 Replace g_clipboardAtom with GDK_SELECTION_CLIPBOARD
GDK_SELECTION_CLIPBOARD is the prefered way of referencing
the GdkAtom for the clipboard, and using it provides a clearer
distinction between the primary clipboard and the normal clipboard.
2020-07-12 20:14:41 +01:00
Stefan Csomor
01d7fa8116 adding utf8 as when data is read from the pasteboard 2020-07-12 20:59:32 +02:00
Stefan Csomor
1e64278150 macOS fixing potential crash in PasteboardWriter
using a pasteboard peeker tool lead to a crash when the drag pasteboard was accessed after our session has long finished. Make sure the writer is working correctly event after the data object is not valid anymore
2020-07-12 20:58:41 +02:00
Artur Wieczorek
95b5fcc0ea Use empty() function to check if vector is empty
Use this dedicated function instead of checking if size() function
returns zero/non-zero value.
2020-07-12 20:07:29 +02:00
Artur Wieczorek
c1cbc1aee7 Suppress MSVC++ performance warning
This is to prevent warning C4800: 'LRESULT': forcing value to bool 'true'
or 'false' (performance warning).
2020-07-12 20:04:59 +02:00
Artur Wieczorek
3feea201da Add tests of setting wxSpinCtrl base and range 2020-07-12 19:58:30 +02:00
Artur Wieczorek
a4928c0fde Use Catch in wxSpinCtrl unit tests
Use Catch instead of CppUnit for unit tests of wxSpinCtrl.
2020-07-12 19:58:30 +02:00
Artur Wieczorek
776b28cba7 Don't allow wxSpinCtrl range to include negative values if base != 10 (wxOSX)
For the sake of consistency with another ports only unsigned
hexadecimal numbers should be supported. To do so we need
to prevent:
- Setting a range including negative values if base == 16.
- Setting base != 10 if current range includes negative values.

Closes #18805.
2020-07-12 19:58:30 +02:00
Artur Wieczorek
845988e0ed Don't allow wxSpinCtrl range to include negative values if base != 10 (wxGTK)
Hexadecimal numbers are always unsigned in the native wxSpinCtrl
implementation under wxMSW so for the sake of consistency we need
to prevent:
- Setting a range including negative values if base == 16.
- Setting base != 10 if current range includes negative values.

See #18805.
2020-07-12 19:58:30 +02:00
Artur Wieczorek
ae1e93cbae Don't allow wxSpinCtrl range to include negative values if base != 10 (wxMSW)
In a native up-down control hexadecimal numbers are always unsigned (see
UDM_SETBASE message documentation) so we need to prevent:
- Setting a range including negative values if base == 16.
- Setting base != 10 if current range includes negative values.

See #18805.
2020-07-12 19:58:30 +02:00
Stefan Csomor
b2d4a9dedc adding data-transfer direction when getting native datatypes
we are publishing exactly what we have internally when data has to be get, and when setting, we might have more formats we can support
2020-07-12 17:53:10 +02:00
Ian McInerney
04ff2254a0 Ensure the clipboard contents are stored properly on GTK
GTK needs to be told the data on the clipboard can be stored
before the store is attempted.

Also, document that the clipboard behavior on GTK is very
dependent on the configuration of the user's machine.

Closes #10515
2020-07-12 00:39:33 +01:00
Maarten Bent
10ac26d6e5 Fix DPI of wxTipWindow
Take care to use the DPI of the display the window will be actually
displayed on and not that of its parent window, which can be different.
2020-07-11 19:59:40 +02:00
Vadim Zeitlin
01b0a50f8f Move wxTipWindow members used only by wxTipWindowView there
No real changes, just move m_textLines and m_heightLine from wxTipWindow
to wxTipWindowView as they were only used by the latter and so can just
as well be its members.

Also use this as an opportunity to replace wxArrayString with wxVector.
2020-07-11 19:59:40 +02:00
Vadim Zeitlin
c6d1a851da Make wxUSE_TIPWINDOW dependent on wxUSE_POPUPWIN
It doesn't seem to make sense to provide wxFrame-based implementation of
wxTipWindow, if anything we should use similar code to implement
wxPopupTransientWindow itself on the platforms not providing it.

So simplify wxTipWindow code by leaving only a single implementation,
using wxPopupTransientWindow. This should have arguably been done back
in 8962e1d938 (wxTipWindow is now a wxPopupTransientWindow instead of a
wxFrame., 2001-11-30) which introduced the use of wxPopupTransientWindow
in this code.
2020-07-11 19:59:40 +02:00
Vadim Zeitlin
b7057c336f Merge branch 'msw-dismiss-unfocused-popup'
Allow wxPopupTransientWindow to work without wxPU_CONTAINS_CONTROLS too
in wxMSW and don't use wxPU_CONTAINS_CONTROLS by default, notably
allowing wxTipWindow to be shown without stealing focus.

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

Closes #18636.
2020-07-11 19:56:32 +02:00
Vadim Zeitlin
6f7dc14801 Fix wrong iterator in wxInfoBar::RemoveButton() in wxGTK
The iterator passed to erase() was off by 1, but this worked correctly
in the default build using wxVector, and not std::vector, because its
base() implementation was off by 1 too.

Now that wxVector bug is fixed (see the parent) commit, fix the code
using it too, which makes it work both in the default and STL builds.

Closes #18765.
2020-07-11 19:33:35 +02:00
Vadim Zeitlin
5495389db5 Fix off-by-one bug in wxVector::reverse_iterator::base()
This is embarrassing, but the iterator returned by this method seems to
have always been wrong, ever since it was added back in 946954d3bf
(Added reverse iterator to wxVector<T>, 2008-09-16). Moreover, it was
also broken in its const_reverse_iterator counterpart where it was
copy-and-pasted in f7ef20685f (Add wxVector<>::const_reverse_iterator,
2013-05-08).

Finally fix this to return the correct value and add at least a simple
unit test check that this method behaves as expected.
2020-07-11 19:05:06 +02:00
Vadim Zeitlin
885ef5819e Remove CppUnit boilerplate from wxVector unit test case
No real changes.
2020-07-11 18:52:49 +02:00
Vadim Zeitlin
9890cf6bac Return empty string from wxColour::GetAsString() if it's invalid
This is consistent with wxToString(wxColour) and seems more useful than
either returning black string representation (as wxMSW used to do) or
asserting (as wxGTK did).

Document this behaviour and add a test checking for it.

Closes #18623.
2020-07-11 14:31:54 +02:00
Vadim Zeitlin
5d14346325 Replace CppUnit assertion macros with Catch ones
Also define wxColour-specific matchers to allow comparing RGB(A)
channels to the expected values, replacing the old ASSERT_EQUAL_RGB(A)
macros.

No real changes.
2020-07-11 14:24:06 +02:00
Vadim Zeitlin
e3f505afdb Merge branch 'test-fix-gtk2' of https://github.com/AliKet/wxWidgets
Fix setting focus in GUI tests using wxUIActionSimulator with GTK 2.

Fixing the actual problem allows to re-enable activating the TLW in
SetFocus() (done in d06e97e8d9 (Make sure toplevel is active in
SetFocus(), 2020-07-08), see #18783) and remove the now unnecessary
workarounds in the tests too.

See https://github.com/wxWidgets/wxWidgets/pull/1945
2020-07-11 13:57:49 +02:00
Vadim Zeitlin
0918ab679b Merge branch 'dirdialog-multi-hidden'
Add wxDD_MULTIPLE and wxDD_SHOW_HIDDEN support to wxDirDialog.

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

Closes #18736.
2020-07-11 13:52:12 +02:00
Vadim Zeitlin
617db49fda Remove support for gcc < 4
We probably could drop support for some gcc 4.x versions too, but we
definitely don't need to support gcc 3.x any longer and not doing it
simplifies the code a bit, so just assume gcc >= 4.

Closes https://github.com/wxWidgets/wxWidgets/pull/1943
2020-07-11 13:51:58 +02:00
Vadim Zeitlin
39ac04b0d0 Allow wxGTK/ARM build failures on Travis CI
ARM VMs/containers seem to be broken on Travis right now and all builds
fail, sometimes without even starting, so ignore them, at least for now.
2020-07-11 13:41:38 +02:00
ali kettab
a33a38c1ad Remove unneeded workarounds 2020-07-10 22:31:00 +01:00
ali kettab
8fd09b9382 SetInputFocusToXWindow() fixup 2020-07-10 22:29:23 +01:00
ali kettab
bca8bc13b4 fix typo 2020-07-10 21:47:05 +01:00
Vadim Zeitlin
de6bc5f062 Remove useless CppUnit test case class from wxColour unit test
No real changes, just get rid of the unnecessary legacy boilerplate.
2020-07-10 19:31:33 +02:00
Vadim Zeitlin
6c5751db4f Remove unused HEADER_HEIGHT constant
It wasn't used since f8252483ec (Applied patch [ 803473 ] wxListCtrl
header height bugfix, 2003-09-11) but remained, commented out, in the
code for some reason.
2020-07-10 18:09:16 +02:00
Vadim Zeitlin
96acdae1e6 Remove the test for y mouse position in wxListHeaderWindow
This test was apparently supposed to check if the mouse was inside the
header, vertically, but this should always be the case unless the mouse
is captured and when it is captured in this code, m_isDragging is set to
true meaning that the code in the "else" branch of the test for it can't
be executed at all, so checking the vertical position seems completely
unnecessary.

Worse, it was actively harmful when using GTK 2 with DPI scaling, as in
this case the height of the window could be different from 22 (e.g. 44
for 2x scaling).

Closes #18713.
2020-07-10 18:06:32 +02:00
Vadim Zeitlin
a47fd95e45 Avoid overriding wxDirDialog::GetPath[s]() unnecessarily
Don't duplicate practically the same code in all ports, just add m_paths
itself to the base class. The only drawback of doing this is that it's
unused in the ports not (yet) using it, but this saves enough code in
the aggregate to be worth it.
2020-07-10 03:52:15 +02:00
Vadim Zeitlin
2b0323ebc8 Avoid using wxString::Empty()
This is confusingly similar to std::string::empty() which doesn't do the
same thing, so prefer using clear() instead.

And simply remove Empty() calls before the assignment, as they're
useless.

No real changes.
2020-07-10 03:43:23 +02:00