#include "GuiTexinfo.h"
#include "FuncRequest.h"
-#include "debug.h"
+#include "support/debug.h"
#include "support/filetools.h"
#include "support/FileName.h"
#include "support/lstrings.h"
#include "qt_helpers.h"
-#include <QCloseEvent>
#include <QCheckBox>
#include <QListWidget>
#include <QPushButton>
#include <fstream>
#include <algorithm>
-using std::string;
-using std::vector;
-using std::endl;
+using namespace std;
+using namespace lyx::support;
namespace lyx {
namespace frontend {
-using support::FileName;
-using support::contains;
-using support::split;
-using support::token;
-using support::getExtension;
-using support::libFileSearch;
-using support::onlyFilename;
static string texFileFromList(string const & file, string const & type)
{
lyxerr << "File `'" << lstfile << "' not found." << endl;
return string();
}
- string const allClasses = getFileContents(abslstfile);
+ // FIXME UNICODE
+ string const allClasses = to_utf8(abslstfile.fileContents("UTF-8"));
int entries = 0;
string classfile = token(allClasses, '\n', entries);
int count = 0;
}
-GuiTexInfo::GuiTexInfo(LyXView & lv)
- : GuiDialog(lv, "texinfo"), Controller(this)
+GuiTexInfo::GuiTexInfo(GuiView & lv)
+ : GuiDialog(lv, "texinfo", qt_("TeX Information"))
{
setupUi(this);
- setViewTitle(_("TeX Information"));
- setController(this, false);
warningPosted = false;
activeStyle = ClsType;
}
-void GuiTexInfo::closeEvent(QCloseEvent * e)
-{
- slotClose();
- e->accept();
-}
-
-
void GuiTexInfo::rescanClicked()
{
// build new *Files.lst
vector<string>::iterator it1 = data.begin();
vector<string>::iterator end1 = data.end();
for (; it1 != end1; ++it1)
- *it1 = support::onlyFilename(*it1);
+ *it1 = onlyFilename(*it1);
// sort on filename only (no path)
- std::sort(data.begin(), data.end());
+ sort(data.begin(), data.end());
fileListLW->clear();
ContentsType::const_iterator it = data.begin();
if (filename.empty())
return string();
string optionList;
- std::ifstream is(filename.toFilesystemEncoding().c_str());
+ ifstream is(filename.toFilesystemEncoding().c_str());
while (is) {
string s;
is >> s;
}
-Dialog * createGuiTexInfo(LyXView & lv) { return new GuiTexInfo(lv); }
+Dialog * createGuiTexInfo(GuiView & lv) { return new GuiTexInfo(lv); }
} // namespace frontend