InsetInfo: Make the display of multiple shortcuts less clumsy by using A, B instead of [A][B]. This is safe, but a bit contraversial.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20913 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Bo Peng 2007-10-11 16:03:21 +00:00
parent 5d2cb28b0a
commit a412733f65

View File

@ -276,11 +276,18 @@ void KeyMap::defkey(KeySequence * seq, FuncRequest const & func, unsigned int r)
docstring const KeyMap::printbindings(FuncRequest const & func) const
{
odocstringstream res;
Bindings bindings = findbindings(func);
for (Bindings::const_iterator cit = bindings.begin();
cit != bindings.end() ; ++cit)
res << '[' << cit->print(true) << ']';
if (bindings.empty())
return docstring();
odocstringstream res;
Bindings::const_iterator cit = bindings.begin();
Bindings::const_iterator cit_end = bindings.end();
// prin the first item
res << cit->print(true);
// more than one shortcuts?
for (++cit; cit != cit_end; ++cit)
res << ", " << cit->print(true);
return res.str();
}