X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0c606d1239c589ef094b9a969aee4aef0fe98d87..74a8f67d96591cec101def2a7d47c64072aff7fd:/src/gtk/mnemonics.cpp diff --git a/src/gtk/mnemonics.cpp b/src/gtk/mnemonics.cpp index f87f5638a0..12891c4b9d 100644 --- a/src/gtk/mnemonics.cpp +++ b/src/gtk/mnemonics.cpp @@ -24,10 +24,23 @@ #endif #include "wx/log.h" -#include "wx/private/stattext.h" // for wxMarkupEntities - #include "wx/gtk/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 &&