This improves the placement of the buttons by making it consistent with the
platform conventions and also fixes a regression in button placement
introduced in 2f3d0d9629Closes#17213.
Since the hack for making the alignment work with GTK+ 2 done in
4ae21c7f1a, the best size was not computed
correctly for the right aligned or centered labels and the minimum possible
size was returned instead.
Fix this by temporarily disabling ellipsization during the best size
computation to ensure that the same best size is computed for left and right
aligned labels.
See #12539.
Ever since 700256bbdb IsOk() returned true even
if setting the locale actually failed because the old locale was still set to
the null value.
Apply the minimal possible fix for this and just reset the old locale pointer
to null if initializing the locale fails to make sure IsOk() doesn't return
true in this case.
This was previously done only for wxMSW but is also necessary for wxOSX to
ensure that the icons in the list view part are arranged and shown correctly
initially, otherwise the selected item could be only partially visible.
::TlsGetValue() resets the last error code which means that the previous last
error is lost, but it shouldn't as we might be in the middle of logging it
with wxLogSysError(). So preserve the last error explicitly.
Closes#17209.
These types are of different size under Win64, so even if IDs are 32 bits,
truncating a 64 bit value to 32 bit UINT resulted in a warning. Fix this by
just using WPARAM for the variable type in the first place.
A variable was unused in wxDEBUG_LEVEL==0 build and assigning to it resulted
in a warning. Fix this by not defining this variable at all, which also makes
the check more clear.
This class is forward declared with WXDLLIMPEXP_FWD_BASE, so it should be
really declated with the matching WXDLLIMPEXP_BASE and not with
WXDLLIMPEXP_CORE used by WX_DECLARE_EXPORTED_OBJARRAY() by default too.
Somehow the mismatch between forward and real declaration doesn't seem to
create any problems, but still fix this for consistency and because it might
explain http://thread.gmane.org/gmane.comp.lib.wxwidgets.general/83980
It seems that LVS_EX_DOUBLEBUFFER is required for the system theme to work
correctly, otherwise multiple display glitches can be observed by simply
changing the selection in the list.
Closes#17177.
In principle, calling DeleteAllItems() on a virtual list control doesn't make
sense at all, but apparently people actually do it and it mostly works except
that the controls scrollbars are not updated, so add a call to Refresh() to
update them too, for consistency with DeleteItem() which similarly doesn't
make sense for virtual controls but where we also explicitly support them for
some reason.
Verify that accessing a property really succeeded before using the returned
value.
This should fix at least one crash due to the use of uninitialized BSTR in
wxWebViewIE::GetCurrentTitle().
Closes#17204.
Also reuse DoSetSelection() from OSXHandleClicked() to ensure the behaviour is
consistent when changing the selection programmatically or interactively.
Closes#17202.
According to the documentation, insertText: argument is either NSString
or NSAttributedString. The latter is not a subclass of the former, yet
the code assumed the argument is always a NSString. This caused the
following exception:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:
-[NSConcreteMutableAttributedString characterAtIndex:]: unrecognized selector sent to instance
Fix this by checking for NSAttributedString and extracting plain string
from it.
The user code may handle this event, meaning that its handler in wxNotebook
itself is never invoked, but this broke actually changing the pages.
Fix this by doing the page change in the code handling the underlying OS X
event directly.
Closes#17197.
Fix regression introduced in a49567109a: cells
without value, i.e. for which the wxVariant returned from GetValue() is not
set at all, should appear as empty, not reuse the last value used by this
renderer.
An invalid pointer was dereferenced after being deleted as ToDVI(item) checked
the item parent, i.e. used it, even though the item was already invalid.
Closes#17198.
wxSizer already has m_minSize field, use m_calculatedMinSize for the field of
the derived wxBoxSizer class to avoid confusion, just as wxFlexGridSizer
already did.
Also add a new unit test checking that GetMinSize() still works after this
change.
This seems to be just unnecessary as RecalcSizes() is only supposed to
reposition the child elements and CalcMin() will be called later again if the
min size needs to be recomputed.
Commit 7e8c2cc4a5 fixed handling of http:// URLs
but completely broke the handling of file:// ones under MSW where the file
paths contain colons and so are different in escaped and unescaped forms and
so passing the unescaped "myfullurl" to wxFileSystem::OpenFile() simply didn't
work at all.
Fix this while still continuing to use "myfullurl" by keeping "myfullurl"
itself escaped and only unescaping it right before passing it to
OnHTMLOpeningURL() so that this public virtual method is still called with the
same value as before, but "myfullurl", and hence "myurl" passed to OpenFile()
later, is kept escaped.
Closes#17148.
Even after 5aae7c7387 and
d2c1fce24e clang would still emit the
warning in code using templates via
WX_DECLARE_ANY_VALUE_TYPE(wxAnyValueTypeImpl<T>).
Silence the warning by putting the typeid() expressions into a trivial
helper function with two wxAnyValueType reference arguments, so the
class the macro is used in doesn't come into play (it shouldn't in the
previous version of the code either, but clang apparently thought it
did).
Hopefully really closes#16968.
Fix the build in wxUSE_STATBOX=0 and wxUSE_DRAG_AND_DROP=0 case:
AdjustStaticBoxZOrder() must still be defined as it's also used in
DragAcceptFiles().
Closes https://github.com/wxWidgets/wxWidgets/pull/111
This should have been done in d24f711f88 a year
ago but that commit only updated the makefile of the library itself and not
that of the sample.
See #16624