Use attribute constants instead of strings when calling wxPGProperty::SetProperty and wxPGProperty::GetProperty in propgrid samples.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78401 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use attribute constants instead of strings in wxPGProperty and wxPGDefaultRenderer classes and in NumericValidation() function.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The size of the dialog in wxPreferencesEditor's generic implementation
is determined from notebook pages alone and doesn't account for label
size, which may be significantly longer in some languages (German,
Danish). If the labels don't fit into the window, some of the tabs are
hidden behind scroll buttons that are easy to overlook.
Improve usability by using wxNB_MULTILINE, which will use multiple rows
of tabs in this situation. This is what e.g. Internet Explorer does in
its preferences as well.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxEnumProperty code is refactored in order to fix a hack which purpose was (apparently) to bypass constness of these functions by caching determined indices in wxEnumProperty::ms_nextIndex static member variable for further processing. (Unclear concept of using this static member was referred in http://trac.wxwidgets.org/ticket/12779#comment:9)
Now, determined index is returned to the caller and processed there if necessary and hence caching of this index is not necessary.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
the local variable event shadowed the parameter which caused
the incorrect value to be sent
Thanks @seandepagnier
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
(remove global function to handle destroyed signal)
This is needed for applications because the global function is not exported, yet it
is used by the opengl library. An alternative is to add utils.cpp to the opengl library
Thanks @seandepagnier
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The bionic library on android does not have gethostbyname_r even
though it has gethostbyname_r. The configure script in wxwidgets
assumes if it has one it has the other. This change does the right
thing for android, but perhaps the script should instead test for both?
Thanks @seandepagnier
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Need to set the underlying qt painter up with the current pen, brush and font when a new object is selected
Thanks @seandepagnier
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The deprecated methods were always available as WXWIN_COMPATIBILITY_3_0 is
always defined, we need to check its value and not its definedness.
Closes#16782.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78371 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Rescaled bitmap must have the same alpha channel flag as the source bitmap flag in order to be properly displayed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78368 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There is not necessary to fix the color depth - everything is determined internally when converting wxImage to wxBitmap.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78367 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Call wxSelectionStore::OnItemsInserted() explicitly instead of just using our
UpdateCount() to update the count of items managed by the selection. This
needs to be done to ensure that the newly added items have the correction
selection, i.e. are always unselected, as previously this wasn't the case: if
wxSelectionStore was in the "selected by default" state as it happened e.g.
after selecting all the items in the control, the new items also ended up
being selected.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The number of items managed by selection was first decremented by our own
UpdateCount() and then, again, by an explicit call to wxSelectionStore::
OnItemDelete(), which resulted in the selection ending up in an invalid state.
Fix this by not calling UpdateCount(), and hence wxSelectionStore::
SetItemCount(), at all, just OnItemDelete() is enough.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
For some reason, the code only forwarded activation events to the current MDI
child, but not the deactivation ones. And even though this was literally
always the case (the check for the event being the activation one is there
since r9), it is clearly wrong as the focus restoring code in wxTopLevelWindow
in wxMSW doesn't work if the focus hadn't been previously saved.
This fix hopefully completes the changes started by r78340 and r78341 and
ensures that the focus is always properly restored to the last focused window
inside an MDI child.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78361 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
DefWindowProc() never preserves the focused window actually, whether we use
WM_NEXTDLGCTL (which is only handled by DefDlgProc() anyhow) or not.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
At least since the changes of r44456 (see #8378), minimal size specified in
the XRC for unknown controls didn't have any effect as it was set on
wxUnknownControlContainer itself and was overridden by the subsequent call to
SetSizerAndFit() which reset the minimal size to the best size of the control
contained in it, meaning that it was impossible to make this contained control
bigger by specifying min size greater than its best size in the XRC.
Fix this by honouring both the min size of the container and of the control
contained in it (and do the same thing for the max size for good measure).
To avoid not totally obvious interaction of overriding GetMinSize() and
DoGetBestClientSize() with sizer code, also position the child control
manually instead of using a sizer for it, it's an overkill for such a simple
case anyhow.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78359 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This control doesn't react to the keyboard at all if it doesn't have a current
row and as it doesn't have it initially, it means that there is no way to do
anything with the control without clicking it with the mouse first.
Fix this by giving it a current row, if possible, whenever it gains focus.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxST_NO_AUTORESIZE style only affects whether the control is actually resized
when its text changes, but its best size should always change, so that if the
window containing it is explicitly relaid out the size does change.
Moreover, in wxMSW and wxOSX the best size was never invalidated at all when
the label was ellipsized, so it was never updated for them, preventing, for
example, comparing the best size with the current one to check if the text is
effectively ellipsized (and so needs to be shown in a tooltip, for example).
Fix this by calling InvalidateBestSize() unconditionally, this should make
these ports behave in the same was as wxGTK already did.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78357 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There is no need to check if referenced array with values is
valid since "reference cannot be bound to dereferenced null pointer in well-defined C++ code".
Moreover, conditional call of Add() methods(one with explicit parameter and one with default one) is not necessary.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775