Expand wxStaticText controls in wxBusyInfo and centre them to avoid the
problem with their contents being truncated when using markup under wxOSX.
This should, of course, be fixed in wxStaticText itself, and when it is, this
change should be reverted. But for now this at least allows wxBusyInfo to
appear correctly under OS X.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Until this change the entire last word disappeared, presumably because it was
wrapped to the next line, which was not shown at all. Now as much of it as
fits into the available space is shown, which is not ideal, but better than
before, especially if we're only a pixel or two short.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow customizing wxBusyInfo window by passing wxBusyInfoFlags containing
information about the icon, title, colours and frame transparency to use.
Update the sample to show such "rich" busy info.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The title is not shown to the user anyhow because this frame doesn't have
wxCAPTION style. And if it were shown, it should have been translated, but as
it isn't, just remove it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78058 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
For some reason, the control always drew itself using wxSYS_COLOUR_BTNTEXT.
This is a good default, but it shouldn't ignore the explicitly set foreground
colour, so use it instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
WM_MDISETMENU handler doesn't seem to reset the last error under Windows XP
and this could result in spurious debug error messages when setting the
initial menu in which case NULL is returned to indicate that there was no
previous menu, but this doesn't indicate that an error occurred.
Explicitly reset the last error to ERROR_SUCCESS ourselves before using
WM_MDISETMENU to ensure that the last error can only be set after its return
if it was really done by the code handling it, i.e. if an error really
happened.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This reverts r78040 (see #16512) as it broke the appearance of the disabled
buttons in MSW toolbars as can be seen in the sample.
The change itself might still be correct and could have just uncovered some
other bug elsewhere, but for now still revert it just to make the toolbars
usable again.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
While wxFrame may process these events for its own purposes, it shouldn't
prevent the user-defined fall back handlers for them (e.g. at wxApp level)
from running.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Check for the absence of modifiers before intercepting the TAB key, we only
want to do it for plain TAB or Shift-TAB but not Ctrl-TAB, for example, as
this prevented the user from switching between MDI windows when focus was on
wxDataViewCtrl.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Since monochrome images are supported by wxBitmap (under MSW) there is no longer need to draw cursor image using native Win API.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Implement copying of wxStringTokenizer correctly: compiler-generated versions
didn't work as the position of the tokenizer didn't point into the correct
string after making the copy.
Fix this by adjusting the position iterator to use the copy of the string.
Closes#16339.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Include wx/msw/private.h when not using PCH to get wxZeroMemory() (this makes
it unnecessary to include wx/msw/wrapwin.h as it's already included by the
other header).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This problem was already fixed in r77649 for Windows 7 (and hopefully all the
other supported Windows versions), but it turns out that XP returns a
different error when the association is not found in the registry, so the
debug error message was still given under it.
Fix this by checking for both ERROR_NO_ASSOCIATION and ERROR_FILE_NOT_FOUND.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It didn't take long to realize that changes of r78041 did break something
(see #9053), as MsgWaitForMultipleObjects() can return indicating the message
availability even if no message is actually available in the queue. This
notably happens when the application is activated.
Fix this by calling MsgWaitForMultipleObjects() in a loop until we do get a
message. Notice that this only works correctly with the infinite timeout as we
don't update the remaining time to wait after a spurious wake-up, but this
shouldn't be a problem in practice as no such wake-ups should happen anyhow
during a small timeout duration -- and nobody typically uses long ones.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Normally it's initialized by calling Create(), but don't crash deleting an
invalid pointer in the dtor if Create() hadn't been called.
See #16630.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78044 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use a kernel event object to signal the thread wake up instead of sending
WM_NULL to one of its windows. This is simpler as we don't need to look for
any windows and doesn't suffer from the problem of overflowing the Windows
message queue if we do it too many times as signalling an already signalled
event simply doesn't do anything.
Closes#9053.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78041 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This was a wrong workaround for incorrect drawing of the icons elsewhere and
isn't needed if the destination is first AND-ed with the mask, as it should be.
See #16512.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Handle the "AND" and "XOR" masks inside monochrome icons/cursors correctly
instead of simply copying the monochrome data which didn't work at all.
See #16512.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78038 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Destroy the children of wxRichTextFieldTypeCompositeTest when updating it
instead of just clearing the list and leaking the objects in it.
Closes#14324.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78037 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Store the various parameters in wxTaskBarButton itself and reapply them when
the button is (re)created. This fixes problems with getting the "taskbar
button created" message twice, e.g. because Explorer was restarted, or getting
it too late, as now wxTaskBarButton can be configured both before and after
receiving this message.
Closes#16566.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
g++ headers only provide std::exception_ptr when __GCC_ATOMIC_INT_LOCK_FREE is
2, indicating that atomic operations on int are available, so check for this
before setting HAS_EXCEPTION_PTR as in some MinGW builds (TDM gcc 4.7) this
symbol is not defined as 2.
Closes#16634.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78035 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This avoids problems with deleting child windows which are parents of
wxMessageDialog before the dialog itself is destroyed and was already done in
wxGTK, but not in wxMSW nor wxOSX. Do it in all ports now by calling
GetParentForModalDialog() from wxMessageDialogBase ctor itself instead of
depending on the port-specific wxMessageDialog to do it.
Closes#16631.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
If wxPG dtor is invoked from within event handler then deleting its pending editor controls should be delegated to the global idle event handler.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Editor controls (and their event handlers) deleted from within wxPG event handler shouldn't by deleted in global idle event handler but only in local wxPG event handler because global idle events can be generated also by calling e.g. wxYield when wxPG is not in the real idle state.
Closes#16617
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Name of the property to be deleted with delay is changed to the some meaningless name in order to avoid conflict with other active properties.
It is enough to do this only once.
See #16617
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78029 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add EXTRALIBS_WEBVIEW similar to the existing EXTRALIBS_MEDIA and such and set
it in configure instead of adding libwebkitgtk and dependent libraries
directly to GUI_TK_LIBRARY.
This ensure that the core library doesn't have any dependencies on
libwebkitgtk which it doesn't need.
Closes#16624.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This test can't work when the in-memory representation is UTF-16, as we can't
convert surrogates to anything else in this case.
This fixes the unit tests broken since r76622, see #16298.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't stop converting subsequent chunks just because the length of one of them
was 0: this can happen if the first character of a string is a NUL or if there
are two (or more) NULs in it later.
Simply remove the check for this and continue as usual even in this case.
Also add a unit test verifying that we do translate NULs in input into NULs in
output.
Closes#16620.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78021 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxBitmap uses CGImage instead of NSImage internally and the conversion
looses NSImage metadata. In particular, it looses the "template"
attribute, which is set for files ending with "Template" and loaded
trough wxArtProvider.
This change makes it easy to use template images with native controls
such as the toolbar.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Like in wxComboBox itself, it's useful to provide these methods to avoid
problems with ambiguous IsEmpty(), inherited from both wxTextEntry and
wxItemContainer.
Closes#16618.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78015 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Properties deleted immediately in wxPropertyGridPageState::DoClear() should be first removed from the lists of pending deletions.
Closes#16617
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Document wx_local.props instead of the old and not existing any more
wx_vcN_local.props.
Also mention that wx/msw/setup.h can be linked to wx/msw/setup0.h instead of
being a copy of it.
Closes#16597.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78011 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775