Deleting a tool from its own event handler resulted in at least in an assert
and could also lead to a crash as an already deallocated pointer was
dereferenced.
Fix this by checking if the tool with the same ID is still available after the
event handler finishes.
Closes#16762.
(this is a backport of faffaaae29 from master)
Use setDrawsBackground: to fix the background colour and adjust the text
colour whenever the control is enabled or disabled.
Closes#16807.
(this is a backport of 9bedba0bf3 from master)
This makes top and left borders for the controls inside the box the same as
right and bottom ones.
Closes#16808.
(this is a backport of bd177b0635 from master)
Explicitly disable rich text content and automatic quotation marks replacement
in normal multiline text controls to make them behave closer to single line
ones and also multiline ones on other platforms.
Closes#16805.
(this is a backport of 262ed2c133 and
3465d659fee0313a6dc650074432c3c435e4a83e from master)
For such controls (e.g. wxButton, wxChoice, wxGauge), their initial position
was different from the one specified when creating them, even though calling
SetPosition() later did position them at exactly the position passed as
argument.
Closes#16780.
(this is a backport of a4681572cc from master)
Controls with wxTE_PASSWORD style didn't send wxEVT_TEXT_ENTER even if they
also had wxTE_PROCESS_ENTER. Fix this by checking for the latter style before
mapping the enter presses to default button activation.
Closes#14930.
(this is a backport of 8e0799e3e5 from master)
Contrary to an old comment, using it seems to work, while using
secondarySelectedControlColor results in incorrect appearance, different from
the other disabled controls and, worse, makes the labels unreadable as their
colour is too close to that of the background inside nested panels.
Closes#10524.
(this is a backport of c269398588 and
e7327959e06ae051a85622cbde9d0a6b7b1fba53 from master)
Pressing it results in a control action with an empty, but not null, string.
Recognize it correctly.
Closes#16869.
(this is a backport of 7065e26fb3 from master)
This allows to properly detected numeric keypad "Enter" key in the code,
notably in wxTextCtrl inside wxWidgets itself.
Closes#16415.
(this is a backport of 4f69410cd8 from master)
Do set from and to pages if we're not asking the user to choose them,
otherwise nothing is printed at all.
Closes#16294.
(this is a backport of 896e148da5 from master)
If creating a sound object fails, delete it to ensure that it is recreated
later.
This fixes a minor bug: previously, if an invalid file was used as sound file,
only the first attempt to play it resulted in an error and all the subsequent
ones were just silently ignored. Now every attempt to play an invalid file
results in an error message, as expected.
(this is a backport of a788351eb6 from master)
Don't define a variable which is used exactly once, testing for the async flag
directly is just as, or even more, readable and shorter.
(this is a backport of 605149ed07 from master)
Don't pretend that we created wxSound object successfully without actually
doing it: this means that now passing an invalid (e.g. non-existent or using
wrong format) file to wxSound::Create()/ctor will return false/result in
IsOk() returning false later, just as in the other ports.
It also means that playing a successfully created wxSound object won't give
any error messages, as unexpectedly happened before.
(this is a backport of a6a3ad0d66 from master)
Don't assume that we can open any file as a sound, check for the return value
from AudioServicesCreateSystemSoundID().
(this is a backport of ba4d3d31a6 from master)
Implement workaround in UMAGetSystemVersion() function which produced the following
warning on the console for every application launch on OS X 10.10+:
WARNING: The Gestalt selector gestaltSystemVersion is returning 10.9.5 instead
of 10.10.5. Use NSProcessInfo's operatingSystemVersion property to get correct
system version number.*
Workaround for 3.0 branch instead of correct implementation in commit 658eca2896
2dd407609b uses wxGetTopLevelGDK() only
available in master and not in 3.0 branch, avoid it by just using the default
screen (which also avoids having to add another GTK+ version check for
gdk_window_get_screen() which is only available since 2.24).
For some reason the implementation of this method (see #12754) also put the
image on the clipboard, which was completely unexpected and unnecessary, so
just don't do it.
Closes https://github.com/wxWidgets/wxWidgets/pull/77
(cherry picked from commit 10a4d15b27)
Some native controls don't take kindly to being set setStringValue: with
a value invalid for the control (such as empty string for
NSPathControl). Don't do this if the label is empty anyway to avoid
problems with wxNativeWindow when the underlying native control is like
that.
(This is backport of db9baf9 from master)
Undo the change introduced, probably accidentally, by r11369 (12 years ago)
and skip the default handling of all events except wxEVT_SIZE and wxEVT_PAINT,
which are special for the reasons explained in the comments in the code, if
the user code has already handled the event.
This allows to customize scrolling by selectively handling some scrolling
events only and generally makes sense.
Closes#15684.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
(cherry picked from commit de54520c95)
Outlined rectangles are one pixel larger with vector-based drawing,
adjust them to get consistent behavior.
Ellipses do not appear to need adjustment.
See #17091
(cherry picked from commit 4623c5ad9c)
Check for Windows 10 was implemented as check for version 6.4 but the final
version of Windows 10 actually returns 10.0.
(this is a backport of c87c432033)
Show just the current page in the printing progress messages if the last page
has its default "infinitely big" value.
Closes#16987.
(cherry picked from commit 1cd916fc0a)
Doing this resulted in an assert from wxBitmap ctor and was useless anyhow,
just skip the drawing code if the window is reduced to empty client area.
(cherry picked from commit bede8a3296)
They are relatively important, especially the origin-related ones as
SetUserScale() can (should?) be used instead of SetLogicalScale(), but
SetLogicalOrigin() can be more convenient than SetDeviceOrigin(), so provide
at least skeletal documentation for them.
(cherry picked from commit 394b04b7e4)
This seems to be unnecessary and generates GTK+ warnings as it results in
passing rectangle with negative (after accounting for padding/margins) size to
gtk_paint_box() in wxAuiGtkTabArt, as could be seen e.g. when closing
"wxTextCtrl 2" tab in the aui sample.
(cherry picked from commit 1f16829c01)
The code was always wrong as it added the control to a new sizer when it was
still element of an old one, but this went unnoticed until the changes of
efce9b2306 which now trigger an assert.
Fix this by deleting the old sizer, and thus breaking the association between
it and the controls inside it, before adding the controls to the new one.
Closes#17080.
(cherry picked from commit 0e5f3612df)
It doesn't result in the frame floating over its parent, this is what
wxFRAME_FLOAT_ON_PARENT style is for, it just means that the frame is
minimized/restored when its parent is.
(cherry picked from commit 6339837ffa)
Just refer to Move(), this is trivial but necessary as otherwise Doxygen
"helpfully" reuses the first comment in the section for the otherwise
undocumented SetPosition() which didn't make any sense at all.
(cherry picked from commit 949d2eeaa5)
It seems like it was never really needed as we always delete the archive
before creating it anyhow and there is no advantage in "updating" it if it
doesn't exist. Worse, with recent ar versions (like the one from binutils 2.25
in Debian Sid), using "u" results in a somewhat unclear warning
ar: `u' modifier ignored since `D' is the default (see `U')
so just get rid of it to avoid the warning.
(cherry picked from commit 004b5a4f49)