X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fcontrollers%2FControlTexinfo.C;h=040192ce35becb13c33de9872a43035b0bc661fc;hb=435d527581277fab8b1aa67888f17d8439d07693;hp=361f5a0cd82ad6ffd16eff848a829d993fb67cd3;hpb=ec8da0035d02a3b6c9e01aea71a5d8da916a45f4;p=lyx.git diff --git a/src/frontends/controllers/ControlTexinfo.C b/src/frontends/controllers/ControlTexinfo.C index 361f5a0cd8..040192ce35 100644 --- a/src/frontends/controllers/ControlTexinfo.C +++ b/src/frontends/controllers/ControlTexinfo.C @@ -1,5 +1,5 @@ /* This file is part of - * ====================================================== + * ====================================================== * * LyX, The Document Processor * @@ -21,30 +21,33 @@ #include "ButtonControllerBase.h" #include "ControlTexinfo.h" #include "Dialogs.h" -#include "LyXView.h" +#include "frontends/LyXView.h" #include "BufferView.h" #include "gettext.h" #include "support/filetools.h" // FileSearch -#include "support/syscall.h" +#include "support/systemcall.h" #include "support/path.h" #include "helper_funcs.h" #include "support/lstrings.h" extern string user_lyxdir; // home of *Files.lst + ControlTexinfo::ControlTexinfo(LyXView & lv, Dialogs & d) : ControlDialogBI(lv, d) { d_.showTexinfo.connect(SigC::slot(this, &ControlTexinfo::show)); } + // build filelists of all availabe bst/cls/sty-files. done through // kpsewhich and an external script, saved in *Files.lst void ControlTexinfo::rescanStyles() const { // Run rescan in user lyx directory Path p(user_lyxdir); - Systemcalls one(Systemcalls::System, + Systemcall one; + one.startscript(Systemcall::Wait, LibFileSearch("scripts", "TeXFiles.sh")); p.pop(); } @@ -56,9 +59,11 @@ void ControlTexinfo::runTexhash() const Path p(user_lyxdir); //path to texhash through system - Systemcalls one(Systemcalls::System,"texhash"); + Systemcall one; + one.startscript(Systemcall::Wait, "texhash"); + p.pop(); -// Alert::alert(_("texhash run!"), +// Alert::alert(_("texhash run!"), // _("rebuilding of the TeX-tree could only be successfull"), // _("if you have had user-write-permissions to the tex-dir.")); } @@ -69,10 +74,10 @@ namespace { string const sortEntries(string & str_in) { std::vector dbase = getVectorFromString(str_in,"\n"); - std::sort(dbase.begin(), dbase.end()); // sort entries - std::vector::iterator p = - std::unique(dbase.begin(), dbase.end()); // compact - dbase.erase(p, dbase.end()); // shrink + std::sort(dbase.begin(), dbase.end()); // sort entries + std::vector::iterator p = + std::unique(dbase.begin(), dbase.end()); // compact + dbase.erase(p, dbase.end()); // shrink return getStringFromVector(dbase,"\n"); } @@ -88,7 +93,7 @@ ControlTexinfo::getContents(texFileSuffix type, bool withFullPath) const string filename; switch (type) { - case bst: + case bst: filename = bstFilename; break; case cls: @@ -122,9 +127,3 @@ void ControlTexinfo::viewFile(string const filename) const { lv_.getDialogs()->showFile(filename); } - - -void ControlTexinfo::help() const -{ - lv_.getDialogs()->showFile(i18nLibFileSearch("help","Texinfo.hlp")); -}