fix bug #6786: InsetLayout name containing spaces is incompatible with keybindings/toolbars

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35109 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2010-08-09 20:37:31 +00:00
parent 350b82fd62
commit 920798c4d6

View File

@ -371,12 +371,12 @@ void KeyMap::write(string const & bind_file, bool append, bool unbind) const
FuncCode action = it->request.action();
string arg = to_utf8(it->request.argument());
string const cmd = lyxaction.getActionName(action)
+ (arg.empty() ? string() : " " + arg) ;
os << tag << " \""
<< to_utf8(it->sequence.print(KeySequence::BindFile))
<< "\" \""
<< lyxaction.getActionName(action)
<< (arg.empty() ? "" : " ") << arg
<< "\"\n";
<< to_utf8(it->sequence.print(KeySequence::BindFile))
<< "\" " << Lexer::quoteString(cmd)
<< "\n";
}
os << "\n";
os.close();