]> git.lyx.org Git - lyx.git/blobdiff - src/KeyMap.cpp
de.po
[lyx.git] / src / KeyMap.cpp
index 7628d0dfdbb37b9fa25d99bc6385627d4bd8cc56..e18fb74e7e4299ca221449d42ea5e65c7c57a590 100644 (file)
@@ -106,6 +106,8 @@ void KeyMap::bind(KeySequence * seq, FuncRequest const & func, unsigned int r)
        KeyModifier const mod2 = seq->modifiers[r].second;
 
        // check if key is already there
+       // FIXME perf: Profiling shows that this is responsible of 99% of the
+       // cost of GuiPrefs::applyView()
        Table::iterator end = table.end();
        for (Table::iterator it = table.begin(); it != end; ++it) {
                if (code == it->code
@@ -474,20 +476,21 @@ docstring const KeyMap::print(bool forgui) const
 
 
 docstring KeyMap::printBindings(FuncRequest const & func,
-                               KeySequence::outputFormat format) const
+                               KeySequence::outputFormat format,
+                               bool const untranslated) const
 {
        Bindings bindings = findBindings(func);
        if (bindings.empty())
                return docstring();
-       
+
        odocstringstream res;
        Bindings::const_iterator cit = bindings.begin();
        Bindings::const_iterator cit_end = bindings.end();
        // print the first item
-       res << cit->print(format);
+       res << cit->print(format, untranslated);
        // more than one shortcuts?
        for (++cit; cit != cit_end; ++cit)
-               res << ", " << cit->print(format);
+               res << ", " << cit->print(format, untranslated);
        return res.str();
 }
 
@@ -542,7 +545,7 @@ KeyMap::BindingList KeyMap::listBindings(bool unbound, KeyMap::ItemType tag) con
                                }
                        if (!has_action)
                                list.push_back(Binding(FuncRequest(action), KeySequence(0, 0), tag));
-               }       
+               }
        }
        return list;
 }