Jürgen Spitzmüller <juer...@spitzmueller.org> writes:
> Pavel Sanda wrote:
>> this is because specific manuals are in examples directory.
>> two ways how to fix it:
>> 1. move those files into doc directory. the distinction between examples
>>    or manuals is unclear in those cases.
>> 2. enhance the way how help-open lfun works, ie enhance searching
>>    of system directories.
>
> I think I'd prefer the latter.

Like that?

JMarc

svndiff src/LyXFunc.cpp lib/ui/

Index: src/LyXFunc.cpp
===================================================================
--- src/LyXFunc.cpp	(revision 27857)
+++ src/LyXFunc.cpp	(working copy)
@@ -1034,7 +1034,10 @@ void LyXFunc::dispatch(FuncRequest const
 				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;
Index: lib/ui/stdmenus.inc
===================================================================
--- lib/ui/stdmenus.inc	(revision 27857)
+++ lib/ui/stdmenus.inc	(working copy)
@@ -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
 
 

Reply via email to