mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: use FOAM_DOC_BROWSER to specify alternative html document browser
- change from 'kde-open %f' to the desktop-agnostic 'firefox %f' as the default document browser.
This commit is contained in:
@ -18,7 +18,7 @@ FoamFile
|
|||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
{
|
{
|
||||||
docBrowser "kde-open %f";
|
docBrowser "firefox %f";
|
||||||
doxyDocDirs
|
doxyDocDirs
|
||||||
(
|
(
|
||||||
"$WM_PROJECT_USER_DIR/html"
|
"$WM_PROJECT_USER_DIR/html"
|
||||||
|
|||||||
@ -881,7 +881,12 @@ void Foam::argList::displayDoc(bool source) const
|
|||||||
|
|
||||||
if (found)
|
if (found)
|
||||||
{
|
{
|
||||||
string docBrowser(docDict.lookup("docBrowser"));
|
string docBrowser = getEnv("FOAM_DOC_BROWSER");
|
||||||
|
if (docBrowser.empty())
|
||||||
|
{
|
||||||
|
docDict.lookup("docBrowser") >> docBrowser;
|
||||||
|
}
|
||||||
|
// can use FOAM_DOC_BROWSER='application file://%f' if required
|
||||||
docBrowser.replaceAll("%f", docFile);
|
docBrowser.replaceAll("%f", docFile);
|
||||||
|
|
||||||
Info<< "Show documentation: " << docBrowser.c_str() << endl;
|
Info<< "Show documentation: " << docBrowser.c_str() << endl;
|
||||||
|
|||||||
@ -37,7 +37,7 @@ Description
|
|||||||
@verbatim
|
@verbatim
|
||||||
( "file1.txt" "file2.txt" ... "fileN.txt" )
|
( "file1.txt" "file2.txt" ... "fileN.txt" )
|
||||||
@endverbatim
|
@endverbatim
|
||||||
The backslash-escaping has been used to avoid shell expansions.
|
The backslash-escaping is required to avoid interpretation by the shell.
|
||||||
|
|
||||||
@par Default command-line options
|
@par Default command-line options
|
||||||
@param -case \<dir\> \n
|
@param -case \<dir\> \n
|
||||||
@ -57,10 +57,14 @@ Description
|
|||||||
global case.
|
global case.
|
||||||
|
|
||||||
Note
|
Note
|
||||||
- Adjustment of the valid (mandatory) arguments
|
- The document browser used is defined by the @b FOAM_DOC_BROWSER
|
||||||
|
environment variable or the <tt>Documentation/docBrowser</tt> entry
|
||||||
|
in the <tt>~OpenFOAM/controlDict</tt> file.
|
||||||
|
The \%f token is used as a placeholder for the file name.
|
||||||
|
- The valid (mandatory) arguments can be adjusted
|
||||||
by directly manipulating the argList::validArgs static member.
|
by directly manipulating the argList::validArgs static member.
|
||||||
- Adjustment of the valid options
|
- The valid options can be adjusted
|
||||||
via the addOption/removeOption static methods or by directly
|
via the addOption/removeOption static methods instead of directly
|
||||||
manipulating the argList::validOptions static member.
|
manipulating the argList::validOptions static member.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
|
|||||||
Reference in New Issue
Block a user