make help-open search in examples too

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27858 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2008-12-12 15:34:35 +00:00
parent c0f88a7ea5
commit e79a9fa983
2 changed files with 8 additions and 5 deletions

View File

@ -532,10 +532,10 @@ Menuset
End
Menu "examples"
Item "Linguistics Manual|L" "help-open ../examples/linguistics.lyx"
Item "Braille Manual|B" "help-open ../examples/Braille.lyx"
Item "XY-pic Manual|X" "help-open ../examples/xypic.lyx"
Item "Multicolumn Manual|M" "help-open ../examples/multicol.lyx"
Item "Linguistics Manual|L" "help-open linguistics"
Item "Braille Manual|B" "help-open Braille"
Item "XY-pic Manual|X" "help-open xypic"
Item "Multicolumn Manual|M" "help-open multicol"
End

View File

@ -1034,7 +1034,10 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
setErrorMessage(from_utf8(N_("Missing argument")));
break;
}
FileName const fname = i18nLibFileSearch("doc", arg, "lyx");
FileName fname = i18nLibFileSearch("doc", arg, "lyx");
if (fname.empty())
fname = i18nLibFileSearch("examples", arg, "lyx");
if (fname.empty()) {
lyxerr << "LyX: unable to find documentation file `"
<< arg << "'. Bad installation?" << endl;