No real changes, just replace the code which was working around the absence of
a wxString::ToCDouble() with the call to the real thing now that we have it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64204 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
As wx/log.h is not included from wx/dynlib.h (via wx/msw/private.h) any
longer, include it from here explicitly.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64202 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Although this is not needed with most compilers (including recent MinGW),
including <shellapi.h> directly apparently doesn't work with some older MinGW
versions.
This fixes compilation after the changes of r64139.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't use m_translations directly, if the user made changes to
wxTranslations instance, it would be too confusing if calls through
wxLocale compat API did nothing.
Also don't change active wxTranslations object from wxLocale if already
done by user, only call wxTranslations::Set() from wxLocale constructor
if it wasn't already set by the user. Still do if wxTranslations
instance currently in use was set by previous wxLocale on the locale
stack.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64165 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
If a catalog with full language name ("fr_BE") doesn't exist,
wxFileTranslationsLoader tries to look for just the base language ("fr")
too. This isn't something specific to wxFileTranslationsLoader, it makes
sense to do it regardless of the loader.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The existing wxLoadUserResource() copies the resource data which is often
unnecessary. Add another overload which just returns the pointer directly to
the resource data.
Also move the function into base from core as it can be useful for the console
applications as well.
Finally, define wxUserResourceStr used by this function only in the same file
where the function itself is defined instead of datacmn.cpp.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We must define wxEventLoopBase in the same way in base and GUI code,
otherwise, even though we fool the compiler into accepting our code, it
crashes or behaves otherwise weirdly during run-time because of vtbl mismatch.
This fixes wxGTK1 which was crashing on startup since the FSWATCHER branch
merge in r62474 and associated changes to support the event loop sources.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix a typo in r62849: tooltip.cpp was used instead of toolbar.cpp resulting in
linking errors for the duplicate symbols in the former and undefined symbols
in the latter.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64144 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't duplicate the code for setting (and unsetting, which was forgotten by at
least wxGTK) the popup menu invoking window in all ports but do it in the base
class PopupMenu() itself.
Also add a helper wxMenuInvokingWindowSetter class which ensures that the
invoking window will be unset in any case.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Setting the invoking window for all submenus is unnecessary as
wxMenu::GetWindow() recurses upwards anyhow and results in assert failures
after recent menu code changes.
Simply don't do this.
OTOH do reset the invoking window to NULL after the menu is dismissed to avoid
storing a dangling pointer in the menu.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64142 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It is no longer necessary to cast between e.g. HINSTANCE and
WXHINSTANCE, they are now declared as the same type (without including
Windows SDK header).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64138 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is roughly the same as r64127 for wxGTK but for wxOSX: don't duplicate
the functionality already present in the base class in Mac-specific way. Just
use wxMenu::GetWindow() instead of painstakingly propagating invoking window
changes via the entire menu hierarchy.
Also attach the root menu used in wxOSX to the menu bar to ensure that the
correct window can be found for all its menus.
Closes#11990.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64136 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Only the top level menus have non-NULL wxMenuBar pointer too, so recurse
upwards the menu hierarchy in GetWindow() and not (just) GetInvokingWindow().
This fixes event processing for submenus broken by the recent changes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64135 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This test case keeps failing erratically resulting in too many bogus build
breakage notifications. Disable it until someone has time to fix it properly.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Include wx/frame.h header instead of casting wxFrame to wxWindow using C style
cast. Although this does work now and probably will work later too it seems
better to not use the cast nevertheless.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64130 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxGTK wxMenuBar used its own SetInvokingWindow/UnsetInvokingWindow() and
related functions instead of reusing the base class Attach/Detach() which
exist for exactly the same purpose. This resulted in unnecessary code
duplication and confusion and, since the changes of r64104, resulted in
asserts due to use of SetInvokingWindow() for non-popup menus.
Fix this by removing the wxGTK-specific functions and doing the work they used
to do in (now overridden) Attach() and Detach(). Also call Attach/Detach()
instead of these functions from wxGTK wxFrame and wxMDIParentFrame code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64127 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This simplifies the code as we don't need to walk the menu hierarchy upwards
any more (GetInvokingWindow() does it now) and also makes it work for all
menus, not just the popup ones.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64126 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Reuse the existing DoCommonMenuCallbackCode() function instead of duplicating
its code in menuitem_select() and menuitem_deselect() GTK callbacks.
No changes in behaviour.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
GetInvokingWindow() can only be used for the popup menus which have the
invoking window, so add a new function which can be used to get the window
associated with any kind of menu in all ports -- it already existed in wxMSW
but is needed elsewhere too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775