mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
0be0fcfd59
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7598 a592a061-630c-0410-9148-cb99ea01b6c8
59 lines
1.2 KiB
C
59 lines
1.2 KiB
C
/**
|
|
* \file ControlTexinfo.C
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author Herbert Voss
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#include <config.h>
|
|
|
|
#include "ControlTexinfo.h"
|
|
#include "funcrequest.h"
|
|
|
|
|
|
void getTexFileList(ControlTexinfo::texFileSuffix type,
|
|
std::vector<string> & list)
|
|
{
|
|
string filename;
|
|
switch (type) {
|
|
case ControlTexinfo::bst:
|
|
filename = "bstFiles.lst";
|
|
break;
|
|
case ControlTexinfo::cls:
|
|
filename = "clsFiles.lst";
|
|
break;
|
|
case ControlTexinfo::sty:
|
|
filename = "styFiles.lst";
|
|
break;
|
|
}
|
|
getTexFileList(filename, list);
|
|
if (list.empty()) {
|
|
// build filelists of all availabe bst/cls/sty-files.
|
|
// Done through kpsewhich and an external script,
|
|
// saved in *Files.lst
|
|
rescanTexStyles();
|
|
getTexFileList(filename, list);
|
|
}
|
|
}
|
|
|
|
|
|
ControlTexinfo::ControlTexinfo(Dialog & parent)
|
|
: Dialog::Controller(parent)
|
|
{}
|
|
|
|
|
|
void ControlTexinfo::viewFile(string const & filename) const
|
|
{
|
|
string const arg = "file " + filename;
|
|
kernel().dispatch(FuncRequest(LFUN_DIALOG_SHOW, arg));
|
|
}
|
|
|
|
|
|
string const ControlTexinfo::getClassOptions(string const & filename) const
|
|
{
|
|
return getListOfOptions(filename, "cls");
|
|
}
|