Commit Graph

68356 Commits

Author SHA1 Message Date
Paul Cornett
6bafaeee6f Round GdkRGBA color values when converting to GdkColor
Should be slightly more accurate, and may avoid discrepancies
when converting wxColour to wxString and back again
2020-04-19 10:10:55 -07:00
Vadim Zeitlin
5ecc553afb Add wxToastNotifMsgModule dependency on wxOleInitModule
This ensures that OLE is still initialized when this module cleanup
occurs, as it must be when IToastNotificationManagerStatics COM pointer
is destroyed.

Closes #18730.
2020-04-19 17:07:04 +02:00
Vadim Zeitlin
893f3a6c00 Add wxDirect2DModule dependency on wxOleInitModule
This avoids the need for calling CoInitializeEx() and CoUninitialize()
in this module itself, it's enough to ensure that wxOleInitModule does
it before, or after, before this one is initialized, or uninitialized,
respectively.

This replaces the earlier fix of 450019dc21 (Ensure COM is still active
when Direct2D renderer is in use, 2015-12-30).

See #17308.
2020-04-19 17:04:36 +02:00
Vadim Zeitlin
05059b64f1 Remove unneeded wxOleInitialize() from wxClipboard code
There is no need to do it here when it had been already done on startup.

No real changes, just cleanup.
2020-04-19 17:02:32 +02:00
Vadim Zeitlin
071760b7f4 Move OLE initialization to a module
Previously this was done in wxMSW-specific wxApp version, which meant
that initialization was done after the modules initialization and,
especially problematically, uninitialization was done before modules
uninitialization, which resulted in problems when doing anything using
OLE from the modules OnExit().

This commit doesn't solve these problems yet, because it leaves modules
initialization order undefined, but the upcoming commits using it will.
2020-04-19 16:59:59 +02:00
Maarten Bent
f226fc0c76 Enable SSE2 in libpng build 2020-04-19 16:31:22 +02:00
Maarten Bent
f67a7c08f7 Allow to build libpng on more platforms
Add the hardware-specific source files to the build systems. Do not add MIPS
and PowerPC to MSVC build files, because these include <stdint.h> which is not
available for old MSVC versions.
2020-04-19 16:31:22 +02:00
Paul Cornett
82b3efb88e Set title bar decorations under Wayland
By default GTK just gives you a close button
2020-04-18 16:26:22 -07:00
Artur Wieczorek
491b68f7be Get rid of unused member variable 2020-04-19 00:43:49 +02:00
Artur Wieczorek
8e2d1fb221 Change buttons layout in propgrid sample
To make the buttons more visible.
2020-04-19 00:41:19 +02:00
Artur Wieczorek
a39aff4018 Refactor setting main frame size in propgrid sample
Determine and set main frame size on creation.
2020-04-19 00:39:38 +02:00
Artur Wieczorek
d9f8eec602 Refactor propgrid sample
Simplify implementation by creating panel and sizer holding wxPG instance
only once in FormMain ctor.
2020-04-19 00:33:52 +02:00
Artur Wieczorek
81f8e8d742 Call static member function with scope resolution operator 2020-04-19 00:23:14 +02:00
Artur Wieczorek
fbafe74414 Pass proper argument to wxFileDialog
File name only should be passed for `defaultFile' parameter otherwise
assertion in wxFileName::Assign() fails ("the file name shouldn't
contain the path").
2020-04-19 00:21:39 +02:00
Artur Wieczorek
5236801241 Simplify Boolean variable initialization 2020-04-19 00:20:14 +02:00
Jorge Moraleda
ede053def6 A DVC cell that has no value is not editable 2020-04-18 14:10:59 -07:00
Paul Cornett
48873dcbd3 Simpify wxSYS_COLOUR_HOTLIGHT implementation for GTK2
Also fixes a memory leak, and a Gtk-CRITICAL when running against 2.8
2020-04-18 12:46:30 -07:00
Vadim Zeitlin
e803408058 Document wxWindow::PopupMenu() effect on focus
This may be not obvious, so mention it explicitly.
2020-04-18 20:35:22 +02:00
Vadim Zeitlin
db3ff4e2f8 Merge branch 'pr_fix_gtk2_hotlight_color' of obfuscated/wxWidgets
Implement support for wxSYS_COLOUR_HOTLIGHT with GTK2.

See https://github.com/wxWidgets/wxWidgets/pull/1805
2020-04-18 17:58:53 +02:00
Vadim Zeitlin
1b4a5ece64 Add GTK 2.10 version checks around code using GtkLinkButton
Blindly repair compiling/running against GTK < 2.10 after the previous
commit.
2020-04-18 17:58:43 +02:00
Teodor Petrov
9c76bdefca Implement wxSYS_COLOUR_HOTLIGHT for GTK2 (requires GTK+ >= 2.10) 2020-04-18 14:17:17 +03:00
Vadim Zeitlin
1949b4e358 Remove useless wxMenu::Break() override in wxOSX
There is no real need to override a method not doing anything by default
just to do nothing in it explicitly.
2020-04-18 00:44:20 +02:00
Vadim Zeitlin
efa302c577 Improve wxMenu::Break() documentation and show it in the sample
Document that this method only actually does something in wxMSW.

Demonstrate the use of it in the menu sample.

See #18692.
2020-04-18 00:43:09 +02:00
Vadim Zeitlin
d6906719f4 Map different email addresses of Rick S to the same person 2020-04-18 00:42:43 +02:00
Rick S
14717af39c Restore wxMenu::Break() functionality in wxMSW
This was broken in da319a87cd (Make wxMSW owner drawn menu item code
more clear and correct., 2014-03-27) for non-owner-drawn menus.

Closes #18692.
2020-04-18 00:42:27 +02:00
Vadim Zeitlin
cfe8c0dea7 Use dotted pens in wxGenericTreeCtrl everywhere
There hopefully isn't any reason preventing us from using dotted pens 20
years after the commit 00e12320ca (Some debug code. Removed flicker form
wxTreeCtrl. Changes.txt update., 1999-12-22) disabling them because they
were "too slow under XFree86" was made.
2020-04-18 00:25:44 +02:00
Anton Triest
e604d01302 Use appropriate system colour for lines in wxGenericTreeCtrl
Native control seems to use wxSYS_COLOUR_GRAYTEXT, so follow it in the
generic one.

Closes #18710.

Co-authored-by: pb101 <pb101@trac.wxwidgets.org>
2020-04-18 00:18:00 +02:00
Vadim Zeitlin
42a756d5fe Merge branches 'auidemo' and 'auibarmsw' of mimi89999/wxWidgets
Improve appearance of disabled AUI buttons

Use wxSYS_COLOUR_GRAYTEXT for the disabled buttons, it works better in
non-default themes.

Also show how a disabled button looks like in the aui sample.

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

See https://github.com/wxWidgets/wxWidgets/pull/1803
2020-04-17 23:56:54 +02:00
Vadim Zeitlin
b90a74f6fe Minor formatting and code style fixes
Put braces around loop body.

Use const for local variables.

No real changes.
2020-04-17 23:30:07 +02:00
Vadim Zeitlin
736628f7a0 Fix crash due to dereferencing null pointer in list mode
TryAdvanceCurrentColumn() is called with NULL node in this case, so
avoid dereferencing it.
2020-04-17 23:30:07 +02:00
Vadim Zeitlin
c80626d33a Replace IsItemMultivalued() with IsItemSingleValued()
This allows to simplify logic when calling it by avoiding negation.

No real changes.
2020-04-17 23:30:07 +02:00
Vadim Zeitlin
84fb5f38be Don't call wxVariant::MakeNull() unnecessary
Simplify recently added code in wxDataViewModel::Compare().

No real changes.
2020-04-17 23:30:07 +02:00
Vadim Zeitlin
1fa1aa5937 Mention that wxDataViewModel::HasValue() became virtual in 3.1.4
This method existed since earlier versions, but couldn't be overridden
until now.
2020-04-17 23:30:07 +02:00
Maarten Bent
4072c0634b Scale all sizers and spacers on a DPI change
Do not only scale the first sizer of a window, but scale all its child
sizers and spacers recursively.

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

See #18649.
2020-04-16 15:07:57 +02:00
Vadim Zeitlin
f1714b3d69 Merge branches 'fix-autoconf-libdir-order' and 'autoconf-avoid-libinotify-freebsd'
Fix issues with FreeBSD build: use just built, instead of already
installed, libraries (this one is not really FreeBSD specific) and use
kqueue even if sys/inotify.h is available but inotify itself isn't (at
least without linking with an extra library).

Closes #18729.
2020-04-16 15:02:12 +02:00
Vadim Zeitlin
e5d03323f9 Rename wxGridBlockCoords::ContainsCell/Block() to just Contains()
These methods do the same thing, so it seems better to use the same name
for them.

This is not really a backwards-incompatible change, as these methods
were just added in the parent commit, so nobody is using them yet.
2020-04-15 18:37:06 +02:00
Vadim Zeitlin
a5a7641616 Merge branch 'grid-selection-refactoring'
Completely overhauled selection handling in wxGrid.

Make various ways of extending selection (using Shift-arrow keys,
Ctrl-Shift-arrows, Shift-click etc) work as expected from the user point
of view instead of producing various bizarre results. Also improve
row/column header click selection as well as Ctrl/Shift-Space handling.

Internally, store selection as just a vector of blocks, independently of
the selection mode, and provide a simple API for iterating over it which
remains usable even with selections containing millions of cells (as
long as they're still composed of only a few blocks, which is the case
in practice).

Add more tests and add display of the current selection to the sample.

See https://github.com/wxWidgets/wxWidgets/pull/1772
2020-04-15 18:10:08 +02:00
Vadim Zeitlin
0fe1146b19 Cache the result of inotify check in configure
Wrap AC_LINK_IFELSE() in AC_CACHE_CHECK() to skip it if the result is
already cached.
2020-04-15 18:04:56 +02:00
Oliver Kiddle
1eaa510c05 Check usability of inotify before selecting it
A libinotify compatibility library exists for BSD systems. If this
was installed, configure would find sys/inotify.h but the build
would fail to link unless the library was added to the link line.
By also checking for inotify_init() this problem can be avoided.

Given that there is native support for kqueue, there is no need
to handle linking with libinotify.
2020-04-15 17:28:09 +02:00
mimi89999
bc886c1e09 Change AUI bar on msw to use wxSYS_COLOUR_GRAYTEXT for disabled buttons 2020-04-15 16:18:44 +02:00
Vadim Zeitlin
44c3e626b3 Extend current selection on {Ctrl,Shift}-Space
Extend the existing selection instead of adding a new block, as there is
no reason to keep the old selection as a separate block, when it's
always a subblock of the new one, and doing it resulted in wrong
behaviour when selecting 2 horizontally adjacent cells, pressing
Ctrl-Space and then pressing Shift-Left deselected the rightmost
selected column but still left its single cell, which was part of the
originally selected block, selected, which was surprising and looked
wrong.
2020-04-15 16:16:00 +02:00
Vadim Zeitlin
ae499c43f1 Don't set focus to unfocusable windows in wxGTK
Restore IsFocusable() check that was commented out, without any real
explanation, by c7bfb76a2c (A number of focus handling improvements:
Left clicking on a window only focuses the window if not processed.
wxControlContainer::SetFocus moved to wxControlContainerBase so that a
container now focuses the first child even on wxGTK. wxAuiBook is now a
container, need for correct navigation on wxGTK., 2007-08-18).

This is needed to avoid giving focus on click to the windows that
explicitly override AcceptsFocus() to return false, as e.g.
wxGridColLabelWindow and other wxGrid subwindow classes do. From the
user point of view, previously clicking on a grid row/column label just
disabled the user of arrow keys, which was very inconvenient (and didn't
happen under MSW).
2020-04-15 16:02:43 +02:00
mimi89999
87171a103a Add disabled auibar item to auidemo 2020-04-15 14:33:09 +02:00
Jorge Moraleda
429d9d8dfc Use null as value when sorting items in a DataView control by a column for which the item does not have a value. 2020-04-14 17:48:47 -07:00
Jorge Moraleda
8b9cf87653 Added an example of overriding method HasValue in wxDataView to show how some items may not have values for some columns. 2020-04-14 17:48:47 -07:00
Jorge Moraleda
a1f90ae0de Created method to find the first column that has a value instead of assuming that the expander column is the first one. Renamed method HasItemMultipleValues with IsItemMultivalued and made it const. 2020-04-14 17:48:47 -07:00
Jorge Moraleda
8a3b0a9fd6 Consolidate common logic into a single function and revert original test for IsList() to minimize code changes. 2020-04-14 17:48:47 -07:00
Jorge Moraleda
ea4a6ec0e9 Bug fix. Ensure travis builds without errors on all platforms. 2020-04-14 17:48:47 -07:00
Jorge Moraleda
c2e4bc422c Make HasValue virtual in wxDataViewModel and have implementations use it. This addresses issue https://trac.wxwidgets.org/ticket/18724 2020-04-14 17:48:47 -07:00
Vadim Zeitlin
47d881b683 Fix order of -L options in autoconf makefiles
Put linker flags determined by configure after -L$(LIBDIRNAME) option
pointing to the directory containing the libraries being built, to
ensure that we link with these libraries rather than any wx libraries
globally installed in the system, as could be the case since the changes
of ec091c9f2b (Don't override CFLAGS etc in configure-generated
makefile, 2020-02-02).

See #18729.
2020-04-15 02:33:53 +02:00