wxWindowID objects can be global and thus be destroyed after the library has
been uninitialized and, worse, when some of the global objects have been
already destroyed.
In particular, using wxLogTrace() in DecIdRefCount() called from the dtor
could result in using the possibly already destroyed wxConvLibc object, so
avoid this by not doing any tracing from there.
No real changes, just remove the nonsensical comment from wx/defs.h which
completely lost its meaning since wxWindowID typedef was replaced by a class 8
years ago in cf2810aa39.
In practice, almost everybody using validators also seems to use this style,
so make it the default (this hadn't been done when it was originally
introduced because of compatibility concerns, but now, 15+ years later, it's
probably safe enough to change this).
wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT is usually used on a darker background provided by wxRender::DrawItemSelectionRect so a light color makes sense. While wxSYS_COLOUR_HIGHLIGHTTEXT is used on a lighter blue shade where the dark color makes sense.
This adds an additional screen to the drawing sample showing all available wxSystemColour values. It makes sense for testing these values but also provides a convenient overview of available colours for the library user.
This seemed like a good idea many years ago when plenty of code (inside and
outside of wxWidgets) couldn't deal with the real alpha correctly, but this is
not the case since quite some time any more and producing an image without
alpha channel when loading a PNG image with transparency is more surprising
than useful now, so don't do it any more.
Closes#3019.
The implementation file for this control somehow wasn't used in wxGTK build,
fix this and, in fact, include it in common sources as there is only a generic
implementation of this control so far.
Closes#17309.
Add a helper wxLaunchBrowserParams struct with clearly distinct "url" and
"path" fields and GetPathOrURL() accessor which returns whichever is
appropriate.
This makes the code more clear and ensures that we never pass URLs (but only
file paths) to xdg-open under Unix as it doesn't handle them.
See #17227.
Ensure GTKEnableEvents() is called automatically on scope exit whenever
GTKDisableEvents() is called.
This fixes a couple of potential bugs where GTKEnableEvents() could be not
called if wxCHECK() condition failed and makes the code shorter and safer.
Don't send a wxEVT_DATAVIEW_SELECTION_CHANGED event if an already selected
item is clicked, this is unexpected and inconsistent with the other platforms.
Split SelectAllRows(bool) method in a (trivial) SelectAllRows() and a more
useful UnselectAllRows() which now can check if a particular row is selected
and leave it selected in this case, helping implementing the correct logic and
also avoiding an extra unnecessary refresh due to deselecting the item first
and then selecting it again.
Don't do anything and, in particular, don't send any events if pressing a
navigation key, such as a cursor up/down arrow, didn't actually change the
current item because it was already the first/last one.
This fixes an endless stream of wxEVT_DATAVIEW_SELECTION_CHANGED events if the
up/down arrow is simply kept pressed when the selection is on first/last item.
Double clicks over checkboxes (i.e. items using wxDataViewToggleRenderer) were
ignored because they were translated to wxEVT_DATAVIEW_ITEM_ACTIVATED events
and nothing else happened, even if the event was not processed at all.
Fix this by continuing to process double clicks as normal clicks if there is
no special handling for the activation event.
In practice this means that half of the clicks doesn't seem to be "lost" any
more when clicking a checkbox in a quick succession.
Even although ZIP specification mandates (forward) slashes, some broken
programs still use backslashes in the paths, so make an effort to accommodate
them.
Closes#16259.