kb_keymap::Bindings bindings = theTopLevelKeymap().findbindings(func_);
if (bindings.size()) {
- return from_utf8(bindings.begin()->print());
+ return bindings.begin()->print();
} else {
lyxerr[Debug::KBMAP]
<< "No binding for "
// fallback to md_item
case md_item: {
lex.next(true);
- docstring const name = _(lex.getString());
+ docstring const name = translateIfPossible(lex.getDocString());
lex.next(true);
string const command = lex.getString();
FuncRequest func = lyxaction.lookupFunc(command);
// fallback to md_submenu
case md_submenu: {
lex.next(true);
- docstring const mlabel = _(lex.getString());
+ docstring const mlabel = translateIfPossible(lex.getDocString());
lex.next(true);
- docstring const mname = from_utf8(lex.getString());
+ docstring const mname = lex.getDocString();
add(MenuItem(MenuItem::Submenu, mlabel, mname,
optional));
optional = false;
int ii = 1;
for (; lfit != lf.end() && ii < 10; ++lfit, ++ii) {
+ string const file = lfit->absFilename();
docstring const label = convert<docstring>(ii) + ". "
- + makeDisplayPath((*lfit), 30)
+ + makeDisplayPath(file, 30)
+ char_type('|') + convert<docstring>(ii);
- tomenu.add(MenuItem(MenuItem::Command, label, FuncRequest(LFUN_FILE_OPEN, (*lfit))));
+ tomenu.add(MenuItem(MenuItem::Command, label, FuncRequest(LFUN_FILE_OPEN, file)));
}
}
for (size_t i = 1; i <= bm.size(); ++i) {
if (bm.isValid(i)) {
docstring const label = convert<docstring>(i) + ". "
- + makeDisplayPath(bm.bookmark(i).filename, 20)
+ + makeDisplayPath(bm.bookmark(i).filename.absFilename(), 20)
+ char_type('|') + convert<docstring>(i);
tomenu.add(MenuItem(MenuItem::Command, label, FuncRequest(LFUN_BOOKMARK_GOTO,
convert<docstring>(i))));
for (; cit != end; ++cit) {
docstring label = _(cit->gui_name);
- // frontends are not supposed to turn on/off toolbars, if they can not
+ // frontends are not supposed to turn on/off toolbars, if they cannot
// update ToolbarBackend::flags. That is to say, ToolbarsBackend::flags
// should reflect the true state of toolbars.
//
break;
case md_menu: {
lex.next(true);
- docstring const name = from_utf8(lex.getString());
+ docstring const name = lex.getDocString();
if (hasMenu(name)) {
getMenu(name).read(lex);
} else {