IsDirty() still returned true even after undoing all the commands which was
wrong, as there was nothing to save in this case.
Closes#15722.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Disable setting focus in response to TVN_SELCHANGING when deleting an item in
a single selection control too -- this was already done in multi selection
case but not in this one, for some reason.
Also refactor the code to avoid duplicating TreeView_DeleteItem() calls.
Closes#15721.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
If the application launches while the parent process doesn't have an active
window, [NSApp run] won't terminate immediately, as was assumed here. Instead,
it blocks until some input arrives, e.g. clicking the Dock icon.
Work around this by adding a dummy event to the queue.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxMenu::Remove() was still broken in wxMSW after r75250, even with the fix in
r75290, as wxMSW code relied on the item still being present in
wxMenu::m_items.
Delay removing it from there until after DoRemove() call to fix this.
See #3424.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The menu items were not removed from the menu any longer when they were
deleted or destroyed after the changes in this revision.
Fix this by calling the public Remove(), which does the right thing, instead
of the private DoRemove(), which only does part of the job of removing the
item, in DoDelete() and DoDestroy().
See #3424.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Subsequent calls didn't initialize the hidden window correctly because
wxSocket::Shutdown() unregistered the window class used for it, but
wxSocket::Initialize() still kept a pointer to the previously registered class
name.
Don't remember it any longer, unlike in the other cases where we use
wxCreateHiddenWindow(), this function is only ever going to be called once
until the class is unregistered anyhow, so it doesn't have to be static.
Closes#15701.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75287 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Static event tables are search top to bottom while dynamic event tables are
searched in the most-recently-bound to the most-early-bound order.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It wasn't up to date (e.g. aui, ribbon, propgrid, richtext were not included
in it) and wasn't used anywhere anyhow.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This code probably misunderstood NSEvent documentation, where this mask is
mentioned, but setKeyEquivalentModifierMask: documentation doesn't list it as
allowed. More importantly, it causes "fn" to appear in the menu item and the
accelerator doesn't work.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use the correct file name in the version update script and version update
instructions, it is called just Doxyfile and not Doxyfile_inc now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The test for setEventCallout() was added in r34541 to work around some problem
with OS X 10.1 SDK. As we don't support this version of OS X since a very long
time, it shouldn't be needed any longer.
See #15692.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Undo the change introduced, probably accidentally, by r11369 (12 years ago)
and skip the default handling of all events except wxEVT_SIZE and wxEVT_PAINT,
which are special for the reasons explained in the comments in the code, if
the user code has already handled the event.
This allows to customize scrolling by selectively handling some scrolling
events only and generally makes sense.
Closes#15684.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The assert complained about a bug in wxMenu code itself, but actually could be
triggered by simply trying to remove a non-existent item from the menu.
Fix this by checking for the item existence, and also removing it from the
internal menu data structure, in wxMenuBase::Remove() and only dealing with
the item itself in DoRemove().
Closes#3424.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75250 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use wxUIntPtr, not long, and SetItemPtrData() instead of SetItemData(), to
ensure that we preserve the values of client data pointers in 64 bit build,
otherwise they were truncated to 32 bits.
Closes#15687.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75248 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We multiplied the number of items by the size of each element twice, once in
wxVector::reserve() itself and once in Ops::Realloc() it called, so we
allocated much more memory than actually needed.
Fix this by passing the number of elements to Ops::Realloc().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75246 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
When setting a new "Window" menu (as opposed to just modifying the existing
one which did work correctly), we shouldn't show it immediately in the menu
bar if there are no MDI children, this results in wrong UI and assert
failures.
Closes#15663.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Account for the "Window" menu (and any other foreign windows lurking in our
menu bar) correctly in wxMenuBar::Insert() instead of the old code which
apparently tried to do something similar but didn't make much sense and didn't
work when trying to insert the menu at the position actually occupied by the
"Window" menu in the menu bar.
Closes#15662, #1732.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Native OS X apps sometimes have certain app-wide comments in the
Apple/app menu ("Check for Updates" is a typical example). Make it
possible to write well-behaved OS X apps by exposing this menu to user
code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The code didn't follow the golden rule of localization and broke
user-visible string into separately translated substrings. Replace with
the same _("About %s") string already used in wxAboutDialog.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775