We could have ended up using (invalid) wxPLATFORM_CURRENT as an index into an
array if neither __WINDOWS__, nor __WXMAC__, nor __WXGTK__ nor __WXMOTIF__
were defined (which would be the case in e.g. wxX11 or wxQt ports). Fix this
by always falling back on wxPLATFORM_UNIX.
The value actually can't be invalid in this code as we ensure that it's never
set to Field_Max elsewhere but as we still have this value in the switch (in
order to avoid compile-time warnings about not handling some enum elements),
ensure that we don't use this invalid value if we end up here to avoid
Coverity warnings about what happens downstream in the code if we did.
Parsing a format specifier with an asterisk (e.g. "%.*s") for the 64th
argument of wxPrintf() resulted in a buffer overrun as the check for the
maximal number of arguments didn't break out from the right loop.
Fix this by inserting an extra check for this.
Thanks Coverity for finding this one.
If a font uses both underline and strike-through the user-readable
string would read "underlinedstrikethrough". Prepend a space to the
strike-through translation as is already the case for the other font
adjectives (except the very first one).
Not prepending a space outside of the translation for i18n reasons (such
as RTL though in this case that doesn't apply because of the way the
string gets concatenated).
Use existing GetFontHeight(), GetRowHeight(), GetCaptionFont(), GetMarginWidth(), HasFlag(), GetParent() functions instead of getting direct access to corresponding member variables.
Use wxPropertyGrid::SetInternalFlag and ClearInternalFlag functions to set/clear appropriate internal flags instead of doing direct modifications on the member variable.
This constant wasn't very useful as it contained the description of the OS on
the machine where the library was built, not the one on which the application
using it was running. It also wasn't used anywhere in wxWidgets and apparently
wasn't meant to be used outside of it.
Finally, putting the output of `uname -r` into it created problems with
creating reproducible builds as just a change in the kernel version changed
the build results.
Closes#17002.
- The default is actually "html" not "all", so fix comment to match
reality.
- A shell script is run in a sub-shell, and the parent's current
directory won't be affected, so it's pointless (and confusing) to
try to restore it at the end of the script.
- Remove trailing ";" from "export FOO=bar;" - it's not required,
though is valid (it means every "export" is followed by an empty
statement).
- After adjusting doxygen.log, simply use "mv" to replace the
original, rather than "cat" then "rm".
Fixes#17001
Two wxDataFormat arrays are not deleted. Use a wxScopedArray to delete
them after usage (not using delete[] in case the functions ever have
multiple exit points which makes it easier to forget adding them).
This makes the wxTextCtrl in the font sample under OS X support showing
a stricken-through font when using ATSU (which by default is used by
OSX/Carbon). It doesn't work for other controls such as a wxButton and
wxStaticText but at least it's a slight improvement from only working
with DrawText (which was added in 9ecf3170).
Not all wxNativeFontInfo::Init calls were changed to pass the
strike-through parameter, add it.
Also 'strikethrough' is not an existing enum member in the system
headers (unlike e.g. 'bold' and 'italic'). As such the strike-through
property can't be stored in the QD Style member.
Both compile errors were introduced in 79fb4e22.
By default, to prevent wxPG from stealing focus from other controls, focus is moved to the grid only if it was already in one of its child controls.
When newly introduced wxPG_EX_ALWAYS_ALLOW_FOCUS flag is set then wxPG can take focus on the entire grid area (on canvas) even if focus is moved from another control.
Default wxPG behavior remains unchanged because wxPG_EX_ALWAYS_ALLOW_FOCUS flag must be explicitly set with wxPropertyGrid::SetExtraStyle function.
Closes#16993.
In wxMSW it is possible that minimal allowed value is greater than maximal
allowed one and the native control works correctly in this case, however
wxSpinCtrl set m_oldValue to an invalid value which could result in an
infinite recursion if SetRange() was called from the wxEVT_SPINCTRL event
handler.
For example, if the control value was initially 0 and the event handler called
SetRange(1, 0), it would result setting the value to 1 because it was less
than the minimum, resulting in another call to the event handler which would
now set the value to 0 because it was more than the maximum resulting in
another call to the event handler and so forth.
Fix this by ensuring that the value lies between minimal and maximal values,
whatever is their relative order.
When re-creating a wxChoice in the widgets sample it expands vertically.
Same fix as dd740d8 (ticket #9594) but for the Choice page instead of
Combobox page.
This ensures that a dangling pointer can't be dereferenced later and fixes a
fatal bug if wxCmdLineArgsArray::operator=() was called more than once (which
is however not supposed to normally happen).
Instead of using pass-trough getter just to check the bits of internal field there are implemented dedicated HasFlag() and HasFlagsExact() methods to do so.
Because context of some texts to be translated can be unclear added some instructions for translators which can be extracted by gettext or similar tools.
Using FromDIP() in wxXRC broke creating controls whose width or height was
specified as -1 as it became -2 when sufficiently high DPI was used, and so
lost the special meaning of "unspecified" that -1 had.
Avoid this problem by never scaling -1 in FromDIP(), this is unlikely to ever
be useful and could result in more difficult to debug problems in the future.
Change a couple of translations from pull request #25.
Also change "U" usage to "u". While "U" is correct too it is less likely
to be the form that should be used here (it's used to address a holy
person or deity).
When new sub-property is added and the parent property is a container of composed values then its editor (if exists) need to be refreshed to reflect the new composed value.
Closes#16982.
Explicit cell content handling for edited label is necessary only for column other then 0 because cell handling for label in column is 0 is done inside wxPGProperty::SetLabel() function.
This doesn't work, use wxToolBar::SetToolNormalBitmap() which does.
As a side effect, don't silently ignore invalid page indices in
wxToolbook::SetPageImage() any more, they should result in an assert, which is
now going to happen inside wxToolBar::SetToolNormalBitmap() if this method is
called with an invalid index.
See #16985.
This was already mentioned in wxToolBar documentation, but mention it also in
wxToolBarToolBase and remove the modifier methods from the documentation
completely, they have nothing to do there as they are not part of the public
API at all.
See #16985.
There is no need for this, these methods are not supposed to be overridden as
they are only ever called by wxToolBar itself and making them virtual just
confused things.
See #16985.
This can result in a crash if the measuring code is called, possibly
indirectly, from a method of a cell object itself and if that cell is
displaced from the cache while caching the cell created in OnMeasureItem().
Closes#16651.
Use this dedicated function to check the type of variant value instead of calling wxVariant::GetType() function and performing explicit comparisons of returned string.
When label editing is finished then property label has to be always updated. If there is a text which is cached in the corresponding cell then it also needs to be updated.
See #16982.
Use GetRowHeight()/GetColWidth() instead of accessing m_rowHeights/m_colWidths
arrays directly as the functions handle the hidden rows/columns correctly.
This fixes bug with corruption of wxGrid appearance if any rows/columns were
inserted into or deleted from a grid containing some hidden rows/columns.
Closes#16980.