Make sure to reset the "to be deleted" flag we set on the tool when removing
it from the toolbar to avoid layout problems if the tool is added back later.
Closes#16735.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This ensures that wxRendererGeneric::DrawGauge() is actually usable as
otherwise calling it always resulted in an assertion failure because it used
DrawTextCtrl() which was not implemented in wxRendererGeneric. So this fixes
using DrawGauge() in non-MSW ports which was added by r77023 (see #16406) but
apparently never worked.
Also remove wxRendererMSW::DrawGauge() as it's exactly the same as the version
inherited from wxRendererGeneric.
Closes#16725.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This didn't do (almost) anything, so just remove it, using MFC and wxWidgets
together works just fine without it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Take into account the possibility of using C++11 compiler with non-C++11
standard library as this may happen when targeting OS X < 10.7, in which case
C++11 libc++ can't be used.
Closes#16730.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This also fixes drawing the PG when buffer is not available and there is necessary do draw directly on window DC.
wxPropertyGrid::DrawItems method is simplified and wxPropertyGrid::DoDrawItems method is reimplemented since its 3-rd argument (isBuffered) is unneeded anymore.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78266 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Unless the table is faulty, this comparison can never fail. It is thus redundant and not needed. As optimizing compilers aren't smart enough yet to detect this, this commit removes the redundant check.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Because some event handlers are bound to the particular id's they need to be reconnected when wxPG id is the subject of change.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Remove obsolete warning about gettext 0.10, add a link to Poedit instead.
Also fix Doxygen markup: @see can't be used inside a list item.
See #16714.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Other functions that take (argc,argv) arguments (wxEntry, wxEntryStart)
take argc by reference, because they may manipulate the arguments list.
wxInitialize() used passing by value, so any modifications would be
silently lost. Make all the functions consistent in their handling of
argc by using int& everywhere.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
When converting argv[] from char* to wchar_t* in ConvertArgsToUnicode(),
keep an extra (shallow) copy of argc and the argv[] array so that it can
be safely freed in FreeConvertedArgs().
The reason is that other functions such as wxApp::Initialize() may
modify argv[] and remove some arguments from it; this is indeed exactly
what wxOSX does. After such changes, gs_initData.argv would no longer be
in the original state and could contain e.g. duplicate pointers or be
missing some of the pointers that we should free.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These files shouldn't be included in the distribution and it's simpler to just
remove them, as it is pretty unlikely that a new Expat release is going to be
made, and even less likely that it would still use CVS if it does happen, than
to filter them out from the distribution creation scripts.
Closes#16711.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78253 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Correct the "pushed" state determination in our own drawn code, it didn't work
for wxToggleButton which doesn't return BST_PUSHED from BM_GETSTATE. But it
does have BM_GETCHECK returning its state directly, so add a new virtual
MSWIsPushed() method and implement it differently for it.
Closes#13755.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix wrong signature of DoHandleMenuEvent() by getting rid of this function
entirely, it's not just a trivial wrapper for ProcessMenuEvent() anyhow, so
just use the latter directly.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78249 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Windows doesn't use the correct image for checked disabled tools, at least up
to and including Windows 7, so don't put such tools in the "checked" state at
all: this doesn't matter as they are disabled anyhow, but shows the correct
image for them.
Closes#12989.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78248 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
While calling SetToolTip(wxToolTip*) overload already worked correctly for
wxCompositeWindow, using SetToolTip(wxString) did not if a tooltip already
existed, as it didn't use the virtual DoSetToolTip() in this case, resulting
in e.g. impossibility to update wxSpinCtrlDouble tooltip using this method.
Fix this by introducing DoSetToolTipText() virtual which is used by that
overload now and overriding it in wxCompositeWindow.
Also don't override DoSetToolTip() in wxSpinCtrlGenericBase any more, it is
not necessary as it's already done by its base class wxCompositeWindow.
Closes#16595.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78245 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The cached widths need to be invalidated whenever an item is expanded or
collapsed, whether it's done programmatically (which was already handled) or
interactively by the user (which wasn't).
Closes#16678.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78244 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It can happen that more than one file type maps to the given extension, in
this case prefer the one which has an open command defined for it as it is
typically more useful.
See #16703.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Not all .desktop files are directly under /usr/share/applications, some or, in
some cases, most of them, may be under its subdirectories, so look for them
there as well.
See #16703.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78240 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This mechanism is provided as an alternative to specifying MB_RTLREADING
style, e.g. if the source code can't be modified but the [string] resource
from which the message box message is loaded can be. We don't need to do this
if we do add MB_RTLREADING however.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78237 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add helper wxApp::MSWGetDefaultLayout() static method and use it instead of
wxTheApp->GetLayoutDirection() in wxMSW code.
This serves two purposes: first, wxMessageDialog doesn't crash when it's shown
before wxTheApp is created (or after it's destroyed) any more. And second, we
use the correct layout direction if the main application has enabled it by
calling SetProcessDefaultLayout() or using two U+200E characters in the
beginning of its "FileDescription" resource field by default now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
A wxTextCtrl inside an RTL window in an otherwise LTR application should still
be considered RTL, it's not clear at all why do we need to ask the application
for the layout here, so change this for consistency.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78235 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
CheckIfCanBeUsedAsParent() used by wxMessageBox ctor shouldn't dereference
wxTheApp unconditionally, otherwise it's impossible to show a message box
before creating the application object or after destroying it without crashing.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78233 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This doesn't make any sense, this function is not related to the owner drawing
code at all and should always be available.
This corrects the changes of r70316, see #13851.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This assert was triggered after the changes of the previous commit as we can
get WM_MENUSELECT with menu bar handle as parameter from Windows and still
search for the menu with this handle -- and there is nothing wrong with this,
so just return NULL but without asserting in this case.
This corrects the changes of r67355, see #13080.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Send these events to the menu itself first, then to the menu bar containing
it or the window invoking it if it's a popup menu and, finally, to the top
level window in all of wxGTK, wxMSW and wxOSX.
In particular, this ensures that help strings are now shown in the parent MDI
frame status bar by default, even when the menus are attached to the client
MDI frame or shown as popup menus.
At the implementation level, this logic is now encapsulated in a new static
wxMenu::ProcessMenuEvent() method which can be easily modified and reused in
other ports.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Neither m_isCommandEvent nor, worse, m_propagationLevel was set correctly for
wxCommandEvent objects constructed using copy ctor -- and hence Clone(). This
means that such events were not propagated upwards the window hierarchy, quite
possibly resulting in mysterious bugs.
Fix this now by initializing these fields in both the normal and copy ctors.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78229 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This parameter is redundant, we can find out whether a menu is a popup one or
not from the menu itself, assuming that we always have a valid wxMenu pointer
for popup menus events, which really should be the case (we may not have one
for the events from system menus).
This allows to handle popup menu events case in the base class version of
MSWFindMenuFromHMENU() which will allow to reuse it from places other than
DoSendMenuOpenCloseEvent() without code duplication now.
There should be no changes to the behaviour, this is just a simplification.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is just to test how wxEVT_MENU_HIGHLIGHT events from popup menu items are
handled under the different platforms.
Also log menu events to the canvas window too as it now gets some.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775