X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FMenuBackend.C;h=c2e107f22455c1924a9e824cb3c71fd930d8366b;hb=c4320d24cd2d29c2e77958b4a8fd44f2bd587ca7;hp=44f32e0e5a9ab5657206cf3289f80b27064268aa;hpb=653c52e2d2d068c66c6127714915b0d088076b9c;p=lyx.git diff --git a/src/MenuBackend.C b/src/MenuBackend.C index 44f32e0e5a..c2e107f224 100644 --- a/src/MenuBackend.C +++ b/src/MenuBackend.C @@ -275,7 +275,7 @@ Menu & Menu::read(LyXLex & lex) // 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); @@ -349,9 +349,9 @@ Menu & Menu::read(LyXLex & lex) // 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; @@ -448,10 +448,11 @@ void expandLastfiles(Menu & tomenu) int ii = 1; for (; lfit != lf.end() && ii < 10; ++lfit, ++ii) { + string const file = lfit->absFilename(); docstring const label = convert(ii) + ". " - + makeDisplayPath((*lfit), 30) + + makeDisplayPath(file, 30) + char_type('|') + convert(ii); - tomenu.add(MenuItem(MenuItem::Command, label, FuncRequest(LFUN_FILE_OPEN, (*lfit)))); + tomenu.add(MenuItem(MenuItem::Command, label, FuncRequest(LFUN_FILE_OPEN, file))); } } @@ -486,7 +487,7 @@ void expandBookmarks(Menu & tomenu) for (size_t i = 1; i <= bm.size(); ++i) { if (bm.isValid(i)) { docstring const label = convert(i) + ". " - + makeDisplayPath(bm.bookmark(i).filename, 20) + + makeDisplayPath(bm.bookmark(i).filename.absFilename(), 20) + char_type('|') + convert(i); tomenu.add(MenuItem(MenuItem::Command, label, FuncRequest(LFUN_BOOKMARK_GOTO, convert(i)))); @@ -939,7 +940,7 @@ void MenuBackend::read(LyXLex & lex) 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 {