/* This file is part of
- * ======================================================
+ * ======================================================
*
* LyX, The Document Processor
*
#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();
}
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."));
}
string const sortEntries(string & str_in)
{
std::vector<string> dbase = getVectorFromString(str_in,"\n");
- std::sort(dbase.begin(), dbase.end()); // sort entries
- std::vector<string>::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<string>::iterator p =
+ std::unique(dbase.begin(), dbase.end()); // compact
+ dbase.erase(p, dbase.end()); // shrink
return getStringFromVector(dbase,"\n");
}
string filename;
switch (type) {
- case bst:
+ case bst:
filename = bstFilename;
break;
case cls:
{
lv_.getDialogs()->showFile(filename);
}
-
-
-void ControlTexinfo::help() const
-{
- lv_.getDialogs()->showFile(i18nLibFileSearch("help","Texinfo.hlp"));
-}