Commit Graph

67405 Commits

Author SHA1 Message Date
Vadim Zeitlin
bf43d35636 Merge branch 'socket-thread'
Add a unit test for reading from wxSocket in a thread.

See https://github.com/wxWidgets/wxWidgets/pull/1632
2019-11-05 20:02:22 +01:00
Stefan Csomor
c9c5a4d99d fixing include style 2019-11-05 19:52:53 +01:00
Stefan Csomor
9be9112392 fixing @available warning 2019-11-05 19:50:41 +01:00
Stefan Csomor
294c8a6b23 moving datatransfer.h to source files
former place in private.h broke Audacity builds
2019-11-05 19:20:51 +01:00
Stefan Csomor
f2212f2162 temporary fix for files having urls constructed as directories 2019-11-05 18:53:06 +01:00
Ian McInerney
11f8d9d478 Document unhighlight event changes 2019-11-05 12:09:51 +00:00
Ian McInerney
3a668b4d0a GTK: Use wxID_NONE for unhighlight events 2019-11-05 12:09:26 +00:00
Ian McInerney
790c1818cb Update menuitem docs with unhighlight event 2019-11-05 09:15:55 +00:00
Ian McInerney
11991137e1 Send EVT_MENU_HIGHLIGHT when menu item is unhighlighted
On OSX this only happens if no new menu item is being highlighted.
2019-11-05 08:58:11 +00:00
Ian McInerney
15909a5f7c OSX: If no menu item given, use wxID_NONE as item ID 2019-11-05 08:58:11 +00:00
Stefan Csomor
715cb66ac4 Fixing IconRef Build re adding support for reading icns files 2019-11-05 09:46:02 +01:00
Stefan Csomor
442149e723 fixing file params in wxCocoaLaunch
unfortunately the API does not work as advertised, so use a newer one if possible, fallback to individually sending an open
2019-11-05 09:39:33 +01:00
Vadim Zeitlin
6421ddb9b2 Only use underline-rgba property with GTK > 3.16
This avoids glib warnings

object class 'GtkTextTag' has no property named 'underline-rgba-set'

when calling g_object_get() with older GTK and just avoids doing useless
work.
2019-11-04 22:57:46 +01:00
Vadim Zeitlin
a03e2b8b4f Merge branch 'grid-align'
Fix value returned from wxGridCellAttr::GetNonDefaultAlignment() for the
default attribute.

See https://github.com/wxWidgets/wxWidgets/pull/1636
2019-11-04 19:33:47 +01:00
Vadim Zeitlin
8d1aae5443 Improve compatibility after wxTopLevelWindow::Layout() change
The changes of 3241e7a850 resulted in
Layout() not called any longer from wxEVT_SIZE handler for windows that
didn't use neither sizers nor constraints themselves, but did call
SetAutoLayout(true).

Fix this regression by checking for GetAutoLayout() explicitly.

See #18472.
2019-11-04 19:32:10 +01:00
Maarten Bent
fcda2beabb Let standard buttons on wxMSW have at least the height of wxBU_EXACTFIT
Closes #18563
2019-11-04 01:16:18 +01:00
Vadim Zeitlin
19844d27ac Fix default attribute wxGridCellAttr::GetNonDefaultAlignment()
This function is not supposed to overwrite the given alignment values
unless the alignment is specifically set for the given cell, but it
always overwrote them when called on m_defaultCellAttr, i.e. the
attribute used by the cells that don't have any special attribute.

This meant that custom attributes had to be set (or, more efficiently, a
custom attribute provider returning non-null attributes for all cells
had to be used) previously just to make the right alignment used by
default by number or date renderers work.

Fix this by ignoring the values set in the default attribute in this
function.

Also add a unit test (which required adding a special helper class just
to allow testing wxGrid::GetCellAttr() used by the renderers) that used
to fail but passes now.
2019-11-04 00:35:32 +01:00
Besnik Bleta
e19e9bce79 Translate more messages for Albanian 2019-11-04 00:10:51 +01:00
Maarten Bent
0e335b9dc1 Make button and searchctrl pages in widgets sample more DPI aware 2019-11-03 21:50:27 +01:00
Maarten Bent
8c0c3cc2b9 Use 'fit exactly' on button page in widgets sample to toggle wxBU_EXACTFIT 2019-11-03 21:50:27 +01:00
Maarten Bent
ced00c6231 Simplify wxSearchCtrl::DoGetBestClientSize() 2019-11-03 21:50:26 +01:00
Maarten Bent
82668e1e85 Remove FromDIP in wxGetEditHeightFromCharHeight
This caused wxTextCtrl to become to high at higher DPI.

It was added to fix appearance of wxSearchCtrl at high DPI. Remove an unneeded
FromDIP there too, so it gets the same height as a normal wxTextCtrl.
And centre the textctrl inside the searchctrl.
2019-11-03 21:50:24 +01:00
Vadim Zeitlin
f0868129c6 Fix problems with themed borders (dis)appearance in wxMSW
Ensure that all native controls get WM_NCCALCSIZE soon after creation,
so that we can tell Windows about the themed controls we draw ourselves
in WM_NCPAINT.

Otherwise we could end up without any visible borders at all and, worse,
with bad display artefacts after resizing the control.

Just call SetWindowPos(SWP_FRAMECHANGED) to ensure that WM_NCCALCSIZE is
generated, even if the control is not resized later, which happens for
controls with fixed initial size.

Closes #18549.
2019-11-02 21:40:57 +01:00
Vadim Zeitlin
41eb39b4a7 Don't activate items on Ctrl-M in generic wxListCtrl
This is unexpected, so add the check for the modifiers, as is done in
generic wxDataViewCtrl, to only accept the "real" Enter here and not
Ctrl-M sending the same key code.

Closes #17458.
2019-11-02 20:34:07 +01:00
Vadim Zeitlin
0dfafdcafb Merge branch 'pmdpi-sizers' of https://github.com/MaartenBent/wxWidgets
Update sizer borders and spacers on DPI change.

Closes #18551.

See https://github.com/wxWidgets/wxWidgets/pull/1628
2019-11-02 16:26:14 +01:00
Maarten Bent
140b138494 Use for-loop to iterate sizer and window children 2019-11-01 21:23:51 +01:00
Maarten Bent
918e102533 Support DPI change in sizers
Return the size of DoGetDefaultBorderInPx as float, so no precision is lost
when multiplying it for DoubleBorder and TripleBorder.

Closes #18551.
2019-11-01 21:07:15 +01:00
Vadim Zeitlin
fe35ddd34b Make date cells in the grid sample more readable
Add labels for the columns using date format and labels for the cells
using date renderer/editor explicitly to give a better idea about what's
going on here.

Also use the same rows numbers for date cells as for the column ones for
consistency.

No real changes.

See 659ab78c6d
2019-11-01 18:48:07 +01:00
Vadim Zeitlin
6bc30968c5 Don't create CFSocket unnecessarily when closing wxSocket
DoClose() shouldn't do anything if CFSocket hadn't been created at all
(as will be the case for blocking sockets) instead of creating it only
to destroy it immediately afterwards.
2019-11-01 16:00:22 +01:00
Vadim Zeitlin
ef224dbe41 Add unit test for reading from wxSocket in a thread
Check that reading from blocking socket in a thread works.
2019-11-01 16:00:01 +01:00
Vadim Zeitlin
02314de0ee Suppress spurious "unsupported DPI awareness" configure messages
If --with-dpi option is not specified at all, wxWITH_DPI_MANIFEST
remains empty, so take this value into account explicitly.
2019-11-01 15:39:52 +01:00
Vadim Zeitlin
be83879733 Merge branch 'always-use-wchar_t'
Remove obsolete wxUSE_WCHAR_T option, it must be always 1.

See https://github.com/wxWidgets/wxWidgets/pull/1624
2019-11-01 14:32:42 +01:00
Vadim Zeitlin
5ef1e77c79 Merge branch 'remove-mac-launch'
Remove wxMacLaunch() function unused any longer.

See https://github.com/wxWidgets/wxWidgets/pull/1629
2019-11-01 14:32:02 +01:00
Paul Cornett
4697ce23d9 Don't allow DestroyClippingRegion() to remove paint update area clipping with GTK3
See #18560
2019-10-31 23:30:18 -07:00
Vadim Zeitlin
e376e74210 Fix build-breaking typo in the GUI test suite
Fix after afe1816996.

See #17400.
2019-11-01 00:53:12 +01:00
Vadim Zeitlin
4df94771da Merge branch 'dataview_cocoa' of https://github.com/thesiv/wxWidgets
Ensure that last wxDataViewCtrl columns is always expanded to fit the
control width and a unit test checking for the scenario in which this
wasn't the case before, but is now.

See https://github.com/wxWidgets/wxWidgets/pull/1313
2019-11-01 00:49:29 +01:00
Vadim Zeitlin
b761e1819e Merge branch 'test-gtk-log'
Don't output spurious empty log messages when running test suite under
GTK.

Closes https://github.com/wxWidgets/wxWidgets/pull/1625
2019-11-01 00:12:44 +01:00
Vadim Zeitlin
1439845802 Remove extra new lines after GTK log messages
This seems unnecessary as the default log handler already outputs a new
line at the end of the message anyhow and at least some messages (e.g.
debug ones in GdkPixbuf) also contain an extra new line in them, so
adding another one here resulted in having at least one and sometimes
two extra blank lines.
2019-11-01 00:10:27 +01:00
Vadim Zeitlin
afe1816996 Ignore GTK debug logs in the unit test unless they're enabled
Don't output "*** GTK log message while running" messages for every
g_debug() call when we the debug messages themselves will not be
displayed because G_MESSAGES_DEBUG is not set or its value doesn't
include the domain used by the message.

This results in much more reasonable output from the test suite.

See #17400.
2019-11-01 00:09:52 +01:00
Vadim Zeitlin
505d4cc47f Merge branch 'focus_hwnd'
Fix focus handling in wxMSW wxSpinCtrl: select all the text when it gets
focus as expected.

See https://github.com/wxWidgets/wxWidgets/pull/1627
2019-10-31 23:58:59 +01:00
Vadim Zeitlin
c0d992cf67 Improve wording of MSWGetFocusHWND() comment
No real changes, just try to explain what this function is for better.
2019-10-31 23:58:21 +01:00
Vadim Zeitlin
96da0060ca Remove MSWGetFocusHwnd() helper
It doesn't seem worth having it when it's only used in a couple of
places in a single file, unlike GetHwnd() which is used in dozens of
places across entire wxMSW.
2019-10-31 23:56:55 +01:00
Ilya Sinitsyn
58c302448f Select the number in the ranged number grid editor on edit start
Select the value of the ranged number grid editor when starting to edit
it, as is done for plain text and other editors, because this makes it
more convenient to replace the old value with the new one.

Closes https://github.com/wxWidgets/wxWidgets/pull/1626
2019-10-31 23:54:22 +01:00
Vadim Zeitlin
c75874e0d2 Remove unused wxMacLaunch() and the file defining it
This function, using Carbon API, is not used any longer since the
changes of 5b6af7002c, so remove it and
also remove the file where it was defined as there is nothing remaining
there any longer.

See https://github.com/wxWidgets/wxWidgets/pull/1561
2019-10-31 23:49:04 +01:00
Vadim Zeitlin
224f860284 Move wxOSXSocketManagerCF definition to utils_base.mm
This variable is totally unrelated to wxExecute(), so move it to generic
"utils" file (which hadn't existed when this variable was added to
utilsexc_base.cpp back in 5815e95907.

No real changes.
2019-10-31 23:43:23 +01:00
Vadim Zeitlin
9d24a13c4b Fix IO redirection for async execution in wxOSX
Don't try running non-bundled applications in wxCocoaLaunch(): this
prevents the code handling IO redirection from being used.

Check that we have a bundle, just like wxMacaunch(), used until
5b6af7002c, used to do.

Closes #18552.

See https://github.com/wxWidgets/wxWidgets/pull/1561
2019-10-31 18:59:34 +01:00
Vadim Zeitlin
d967940035 Remove trailing spaces from wxCocoaLaunch()
No real changes.
2019-10-31 18:55:29 +01:00
Ilya Sinitsyn
bfde3d3e08 Fix focus behaviour of the spin control under MSW
Override MSWGetFocusHwnd for wxSpinCtrl to focus the right subwindow.
So the correct window will be used in wxWindowMSW::SetFocusFromKbd and
the spin controls content will be selected on TAB key.
2019-11-01 00:27:43 +07:00
Ilya Sinitsyn
1b6dc0a2fb Add MSWGetFocusHWND to allow focus a subwindow
Under MSW allow override which subwindow will be focused for composite
windows which are implemented not as a set of wxControl (i.e. using only
Windows native controls).
2019-11-01 00:19:53 +07:00
Paul Kulchenko
53c5ebedca Fix copy to clipboard by flushing the updated data. (#1623) 2019-10-31 10:59:14 +01:00