mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-06 11:23:45 +00:00
Do not hardcode launching of lyxpaperview script.
This commit is contained in:
parent
71332820d1
commit
44ede7ef4b
@ -245,7 +245,7 @@ public:
|
|||||||
/// command to run chktex incl. options
|
/// command to run chktex incl. options
|
||||||
std::string chktex_command = "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38";
|
std::string chktex_command = "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38";
|
||||||
// Name of external script, which searches for file corresponding to a
|
// 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.
|
// (search for pdf based on author+year), but we can generalize if requested.
|
||||||
// Citation context menu item "Open Citation Content" will be always enabled
|
// Citation context menu item "Open Citation Content" will be always enabled
|
||||||
// if the name of this script in nonempty (last resort when citation entry
|
// if the name of this script in nonempty (last resort when citation entry
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "FuncRequest.h"
|
#include "FuncRequest.h"
|
||||||
#include "Language.h"
|
#include "Language.h"
|
||||||
#include "LyX.h"
|
#include "LyX.h"
|
||||||
|
#include "LyXRC.h"
|
||||||
#include "LyXAction.h"
|
#include "LyXAction.h"
|
||||||
#include "TextClass.h"
|
#include "TextClass.h"
|
||||||
|
|
||||||
@ -300,9 +301,12 @@ void showDirectory(FileName const & directory)
|
|||||||
void showTarget(string const & target){
|
void showTarget(string const & target){
|
||||||
LYXERR(Debug::INSETS, "Showtarget:" << target << "\n");
|
LYXERR(Debug::INSETS, "Showtarget:" << target << "\n");
|
||||||
if (prefixIs(target,"EXTERNAL ")) {
|
if (prefixIs(target,"EXTERNAL ")) {
|
||||||
|
if (lyxrc.citation_search_view.empty())
|
||||||
|
return;
|
||||||
string tmp,tar;
|
string tmp,tar;
|
||||||
tar = split(target, tmp, ' ');
|
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);
|
lyx::dispatch(cmd);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user