3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
9 * Full author contact details are available in file CREDITS.
14 #include "ControlLog.h"
22 using std::istringstream;
28 using support::FileName;
32 ControlLog::ControlLog(Dialog & parent)
33 : Dialog::Controller(parent),
38 bool ControlLog::initialiseParams(string const & data)
40 istringstream is(data);
44 string logtype, logfile;
48 logfile = lex.getString();
51 // Parsing of the data failed.
54 if (logtype == "latex")
56 else if (logtype == "literate")
58 else if (logtype == "lyx2lyx")
60 else if (logtype == "vc")
65 logfile_ = FileName(logfile);
70 void ControlLog::clearParams()
76 docstring const ControlLog::title() const
84 t = _("Literate Programming Build Log");
87 t = _("lyx2lyx Error Log");
90 t = _("Version Control Log");
97 void ControlLog::getContents(std::ostream & ss) const
99 std::ifstream in(logfile_.toFilesystemEncoding().c_str());
101 bool success = false;
104 // Our caller interprets the file contents as UTF8, but is that
116 ss << lyx::to_utf8(_("No LaTeX log file found."));
119 ss << lyx::to_utf8(_("No literate programming build log file found."));
122 ss << lyx::to_utf8(_("No lyx2lyx error log file found."));
125 ss << lyx::to_utf8(_("No version control log file found."));
130 } // namespace frontend