X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9b26a198ce442caff6a46196b97d25e60e1193f0..fe104ff925ac53779d25280112401874089276b0:/src/common/stockitem.cpp diff --git a/src/common/stockitem.cpp b/src/common/stockitem.cpp index 28d720a047..1d0e914631 100644 --- a/src/common/stockitem.cpp +++ b/src/common/stockitem.cpp @@ -205,16 +205,17 @@ wxString wxGetStockLabel(wxWindowID id, long flags) #undef STOCKITEM - // we assume that buttons use the same labels as menu items but unlike them - // they should never use ellipsis - if ( flags & wxSTOCK_FOR_BUTTON ) + if ( flags & wxSTOCK_WITHOUT_ELLIPSIS ) { wxString baseLabel; if ( stockLabel.EndsWith("...", &baseLabel) ) stockLabel = baseLabel; + // accelerators only make sense for the menu items which should have + // ellipsis too while wxSTOCK_WITHOUT_ELLIPSIS is mostly useful for + // buttons which shouldn't have accelerators in their labels wxASSERT_MSG( !(flags & wxSTOCK_WITH_ACCELERATOR), - "button labels never use accelerators" ); + "labels without ellipsis shouldn't use accelerators" ); } #ifdef __WXMSW__