X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FKeyMap.cpp;h=c5c387f28f8398617377225c7a102dc31d06f7f2;hb=b536759c0769dab641993347baeb62400455be04;hp=af5f5b8223eaf1c685bb7654c6672b606a010123;hpb=75bfed55079cab6b73fbea6ce4ae3f10d1af3b91;p=lyx.git diff --git a/src/KeyMap.cpp b/src/KeyMap.cpp index af5f5b8223..c5c387f28f 100644 --- a/src/KeyMap.cpp +++ b/src/KeyMap.cpp @@ -68,7 +68,7 @@ size_t KeyMap::bind(string const & seq, FuncRequest const & func) LYXERR(Debug::KBMAP, "BIND: Sequence `" << seq << "' Action `" << func.action() << '\''); - KeySequence k(0, 0); + KeySequence k(nullptr, nullptr); string::size_type const res = k.parse(seq); if (res == string::npos) { @@ -84,7 +84,7 @@ size_t KeyMap::bind(string const & seq, FuncRequest const & func) size_t KeyMap::unbind(string const & seq, FuncRequest const & func) { - KeySequence k(0, 0); + KeySequence k(nullptr, nullptr); string::size_type const res = k.parse(seq); if (res == string::npos) @@ -476,7 +476,8 @@ 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()) @@ -486,17 +487,17 @@ docstring KeyMap::printBindings(FuncRequest const & func, 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(); } KeyMap::Bindings KeyMap::findBindings(FuncRequest const & func) const { - return findBindings(func, KeySequence(0, 0)); + return findBindings(func, KeySequence(nullptr, nullptr)); } @@ -528,7 +529,7 @@ KeyMap::Bindings KeyMap::findBindings(FuncRequest const & func, KeyMap::BindingList KeyMap::listBindings(bool unbound, KeyMap::ItemType tag) const { BindingList list; - listBindings(list, KeySequence(0, 0), tag); + listBindings(list, KeySequence(nullptr, nullptr), tag); if (unbound) { LyXAction::const_iterator fit = lyxaction.func_begin(); LyXAction::const_iterator const fen = lyxaction.func_end(); @@ -543,7 +544,7 @@ KeyMap::BindingList KeyMap::listBindings(bool unbound, KeyMap::ItemType tag) con break; } if (!has_action) - list.push_back(Binding(FuncRequest(action), KeySequence(0, 0), tag)); + list.push_back(Binding(FuncRequest(action), KeySequence(nullptr, nullptr), tag)); } } return list;