diff --git a/src/LyXRC.h b/src/LyXRC.h index 1f32fef496..d795d345ec 100644 --- a/src/LyXRC.h +++ b/src/LyXRC.h @@ -245,7 +245,7 @@ public: /// command to run chktex incl. options std::string chktex_command = "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38"; // Name of external script, which searches for file corresponding to a - // given citation. At this moment only script "lyxpaperview" is supported + // given citation. At this moment only script lyxpaperview[.py] is supported // (search for pdf based on author+year), but we can generalize if requested. // Citation context menu item "Open Citation Content" will be always enabled // if the name of this script in nonempty (last resort when citation entry diff --git a/src/frontends/qt/qt_helpers.cpp b/src/frontends/qt/qt_helpers.cpp index 176267af8f..92ee029372 100644 --- a/src/frontends/qt/qt_helpers.cpp +++ b/src/frontends/qt/qt_helpers.cpp @@ -24,6 +24,7 @@ #include "FuncRequest.h" #include "Language.h" #include "LyX.h" +#include "LyXRC.h" #include "LyXAction.h" #include "TextClass.h" @@ -300,9 +301,12 @@ void showDirectory(FileName const & directory) void showTarget(string const & target){ LYXERR(Debug::INSETS, "Showtarget:" << target << "\n"); if (prefixIs(target,"EXTERNAL ")) { + if (lyxrc.citation_search_view.empty()) + return; string tmp,tar; tar = split(target, tmp, ' '); - FuncRequest cmd = FuncRequest(LFUN_VC_COMMAND,"U . \"lyxpaperview " + tar + "\""); + FuncRequest cmd = FuncRequest(LFUN_VC_COMMAND,"U . \"" + + lyxrc.citation_search_view + " " + tar + "\""); lyx::dispatch(cmd); return; }