X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/935919963272d114cb46da3f7393b2e3a161c8b0..51ec29ea5d1d1093bafbae27a8483211a90d9659:/src/gtk1/mnemonics.cpp diff --git a/src/gtk1/mnemonics.cpp b/src/gtk1/mnemonics.cpp index 4dd60f9e91..8533443f9c 100644 --- a/src/gtk1/mnemonics.cpp +++ b/src/gtk1/mnemonics.cpp @@ -3,7 +3,7 @@ // Purpose: implementation of GTK mnemonics conversion functions // Author: Vadim Zeitlin // Created: 2007-11-12 -// RCS-ID: $Id: mnemonics.cpp 49885 2007-11-13 02:21:12Z PC $ +// RCS-ID: $Id$ // Copyright: (c) 2007 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -24,10 +24,23 @@ #endif #include "wx/log.h" -#include "wx/private/stattext.h" // for wxMarkupEntities - #include "wx/gtk1/private/mnemonics.h" +namespace +{ + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// Names of the standard XML entities. +const char *const entitiesNames[] = +{ + "&", "<", ">", "'", """ +}; + +} // anonymous namespace + // ============================================================================ // implementation // ============================================================================ @@ -67,9 +80,9 @@ static wxString GTKProcessMnemonics(const wxString& label, MnemonicsFlag flag) size_t distanceFromEnd = label.end() - i; // is this ampersand introducing a mnemonic or rather an entity? - for (size_t j=0; j < wxMARKUP_ENTITY_MAX; j++) + for (size_t j=0; j < WXSIZEOF(entitiesNames); j++) { - const wxChar *entity = wxMarkupEntities[wxMARKUP_ELEMENT_NAME][j]; + const char *entity = entitiesNames[j]; size_t entityLen = wxStrlen(entity); if (distanceFromEnd >= entityLen &&