This flag shouldn't be used in vertical sizers (in wxLongStringProperty and wxPGArrayEditorDialog) because vertical alignment flags are ignored in such sizers and the assertion message is thrown in wxBoxSizer::DoInsert. This can be observed e.g. in propgrid sample when there is launched wxLongStringProperty or ArrayDoubleProperty editor.
The expected result in this case is ".", but the filename became empty instead
when wxPATH_NATIVE was used.
Fix this by examining GetFormat(format), which takes care of mapping
wxPATH_NATIVE to its real value, instead of wxPATH_NATIVE itself.
Also add a unit test verifying that this works as expected.
Closes#17010.
Verify that repeating positional parameters does work with wxString::Format()
instead of keeping these tests commented out in wxVsnprintf() tests, which are
not run at all if we're using the compiler-provided vsprintf().
Closes#9367.
Remove second unnecessary casting from wxWindow to wxTextCtrl and use wxTextCtr::IsEmpty() function to check directly if the text control contains any text instead of examining retrieved string value.
The drag mask passed by Cocoa is conservative and doesn't include
NSDragOperationMove which was added later. Override
draggingSourceOperationMaskForLocal to include that flag if it's wanted.
This also moving of text the default behaviour.
Closes#13819.
Closes#14726.
Commit f40e8bf uncovered a problem with dragging where when the
NSDragOperationLink bit is set in the drag mask (which by default always
is the case) the result is a wxDragLink operation instead of wxDragCopy
or wxDragMove. To fix this give priority to move and copy instead when
converting the drag mask to a wxDrag result.
This fixes copying through DND in wxRichTextCtrl.
See #13819.
To reduce duplication of the same changes, merge the nearly identical
wxWidgetCocoaImpl::draggingEntered and draggingUpdated into private
function wxOnDraggingEnteredOrUpdated.
Instead of moving the frame up every time to be able to reach the
dragging section at the bottom, change the sizer proportion of the log
control in the middle to reduce the frame's height.
Currently, validation flags are initialized when post-process validation is invoked (in wxPropertyGrid::PerformValidation) and when first editing operation fails earlier on the pre-process validation (in wxPropertyGrid::DoEditorValidate) then these flags are not initialized and no validation error message is displayed.
Hence validation flags should be initialized in both validation functions.
Close the device file descriptor in the dtor instead of doing it in the thread
used to poll it, this is more straightforward and ensures that it happens even
if the thread failed to run for whatever reason.
Don't use an uninitialized pointer in wxCairoContext ctor from wxPrinterDC in
wxGTK if retrieving Cairo context of the DC failed, set m_context to NULL in
this case (not sure if this is still not going to crash when used in
cairo_translate() below though).
Don't use heap-allocated wxGIFDecoder when a stack-allocated object would do
just as well.
Don't handle errors different from the defined wxGIF_XXX constants: they can
never happen because LoadGIF() has no way of returning them.
Don't check for "ok" variable being false when it was set to true and never
changed until this check.
At least the width must be non-0 as we allocate a width-sized array below and
0 height is probably problematic -- and definitely not useful -- as well, so
just bail out if either of them is 0.
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.