using std::string;
namespace lyx {
+
+using support::FileName;
+
namespace frontend {
ControlLog::ControlLog(Dialog & parent)
lex.setStream(is);
string logtype, logfile;
- lex >> logtype >> logfile;
+ lex >> logtype;
+ if (lex.isOK()) {
+ lex.next(true);
+ logfile = lex.getString();
+ }
if (!lex)
// Parsing of the data failed.
return false;
else
return false;
- logfile_ = logfile;
+ logfile_ = FileName(logfile);
return true;
}
}
-string const ControlLog::title() const
+docstring const ControlLog::title() const
{
- string t;
+ docstring t;
switch (type_) {
case LatexLog:
- t = _("LyX: LaTeX Log");
+ t = _("LaTeX Log");
break;
case LiterateLog:
- t = _("LyX: Literate Programming Build Log");
+ t = _("Literate Programming Build Log");
break;
case Lyx2lyxLog:
- t = _("LyX: lyx2lyx error Log");
+ t = _("lyx2lyx Error Log");
break;
case VCLog:
t = _("Version Control Log");
void ControlLog::getContents(std::ostream & ss) const
{
- std::ifstream in(logfile_.c_str());
+ std::ifstream in(logfile_.toFilesystemEncoding().c_str());
bool success = false;
switch (type_) {
case LatexLog:
- ss << _("No LaTeX log file found.");
+ ss << lyx::to_utf8(_("No LaTeX log file found."));
break;
case LiterateLog:
- ss << _("No literate programming build log file found.");
+ ss << lyx::to_utf8(_("No literate programming build log file found."));
break;
case Lyx2lyxLog:
- ss << _("No lyx2lyx error log file found.");
+ ss << lyx::to_utf8(_("No lyx2lyx error log file found."));
break;
case VCLog:
- ss << _("No version control log file found.");
+ ss << lyx::to_utf8(_("No version control log file found."));
break;
}
}