]> git.lyx.org Git - lyx.git/blobdiff - src/kbsequence.C
cleanup after svn hang-up, #undef CursorShape. Should be compilable ganin now.
[lyx.git] / src / kbsequence.C
index b56f2871de34a1bef1698a6c910232573856a607..708fb99ee5b8b2b072789933fbe296131fedf603 100644 (file)
@@ -1,31 +1,33 @@
 /**
  * \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 <moz@compsoc.man.ac.uk>
+ * \author Lars Gullik Bjønnes
+ * \author Jean-Marc Lasgouttes
+ * \author John Levon
+ *
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
 
-#include "gettext.h"
+#include "kbsequence.h"
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
+#include "gettext.h"
+#include "kbmap.h"
+#include "lfuns.h"
 
-#include "frontends/mouse_state.h"
+#include "frontends/LyXKeySym.h"
 #include "frontends/LyXKeySymFactory.h"
-#include "kbsequence.h"
-#include "kbmap.h"
-#include "commandtags.h"
-#include "debug.h"
 
 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
@@ -42,7 +44,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;
 }
 
 
@@ -134,7 +137,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) {
@@ -154,7 +157,7 @@ string const kb_sequence::printOptions() const
        if (!curmap)
                return buf;
 
-       buf += _("   options: ");
+       buf += lyx::to_utf8(_("   options: "));
        buf += curmap->print();
        return buf;
 }