X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b1f17bf00ff1480a50a657674b974c40da82eda1..62795f413a7222863b4aee76c08764071f94bd87:/src/gtk/mnemonics.cpp diff --git a/src/gtk/mnemonics.cpp b/src/gtk/mnemonics.cpp index e78bd5dd6d..5fc9e66860 100644 --- a/src/gtk/mnemonics.cpp +++ b/src/gtk/mnemonics.cpp @@ -3,7 +3,6 @@ // Purpose: implementation of GTK mnemonics conversion functions // Author: Vadim Zeitlin // Created: 2007-11-12 -// RCS-ID: $Id$ // Copyright: (c) 2007 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -23,10 +22,24 @@ #pragma hdrstop #endif -#include "wx/private/stattext.h" // for wxMarkupEntities - +#include "wx/log.h" #include "wx/gtk/private/mnemonics.h" +namespace +{ + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// Names of the standard XML entities. +const char *const entitiesNames[] = +{ + "&", "<", ">", "'", """ +}; + +} // anonymous namespace + // ============================================================================ // implementation // ============================================================================ @@ -66,9 +79,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 &&