X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fkbsequence.C;h=dc1706dda6939b84980c55bc396ddbecf97b6545;hb=35204f8f33d7400a5fefeffea533fb4cb4097211;hp=aeab8ef4d03b8d4eb1556ed1bd23b50e4b48f47e;hpb=54d9f7c0226270970adf03a233096829f43bc944;p=lyx.git diff --git a/src/kbsequence.C b/src/kbsequence.C index aeab8ef4d0..dc1706dda6 100644 --- a/src/kbsequence.C +++ b/src/kbsequence.C @@ -1,27 +1,36 @@ /** * \file kbsequence.C - * Copyright 1995-2002 the LyX Team - * Read the file COPYING + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. * - * \author John Levon + * \author Lars Gullik Bjønnes + * \author Jean-Marc Lasgouttes + * \author John Levon + * + * Full author contact details are available in file CREDITS. */ #include -#include "gettext.h" - -#include "frontends/mouse_state.h" -#include "frontends/LyXKeySymFactory.h" #include "kbsequence.h" + +#include "gettext.h" #include "kbmap.h" #include "lfuns.h" -#include "debug.h" + +#include "frontends/LyXKeySym.h" +#include "frontends/LyXKeySymFactory.h" + + +namespace lyx { using std::make_pair; +using std::string; -int kb_sequence::addkey(LyXKeySymPtr key, - key_modifier::state mod, key_modifier::state nmod) +FuncRequest const & +kb_sequence::addkey(LyXKeySymPtr key, + key_modifier::state mod, key_modifier::state nmod) { // adding a key to a deleted sequence // starts a new sequence @@ -38,7 +47,8 @@ int kb_sequence::addkey(LyXKeySymPtr key, return curmap->lookup(key, mod, this); } - return LFUN_UNKNOWN_ACTION; + static FuncRequest unknown(LFUN_UNKNOWN_ACTION); + return unknown; } @@ -130,7 +140,7 @@ string const kb_sequence::print() const KeySequence::size_type i, length = sequence.size(); for (i = 0; i < length; ++i) { - buf += kb_keymap::printKeysym(sequence[i], modifiers[i].first); + buf += sequence[i]->print(modifiers[i].first); // append a blank if (i + 1 < length) { @@ -150,7 +160,7 @@ string const kb_sequence::printOptions() const if (!curmap) return buf; - buf += _(" options: "); + buf += to_utf8(_(" options: ")); buf += curmap->print(); return buf; } @@ -173,3 +183,6 @@ void kb_sequence::clear() sequence.clear(); reset(); } + + +} // namespace lyx