From e79a9fa9831fe7c7d1a97e6baf2e718defde5a5e Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 12 Dec 2008 15:34:35 +0000 Subject: [PATCH] make help-open search in examples too git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27858 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/ui/stdmenus.inc | 8 ++++---- src/LyXFunc.cpp | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/ui/stdmenus.inc b/lib/ui/stdmenus.inc index 850bdbdecd..34a0d63bb0 100644 --- a/lib/ui/stdmenus.inc +++ b/lib/ui/stdmenus.inc @@ -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 diff --git a/src/LyXFunc.cpp b/src/LyXFunc.cpp index 3a29fecedc..128feec03a 100644 --- a/src/LyXFunc.cpp +++ b/src/LyXFunc.cpp @@ -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;