X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fcontrollers%2FControlLog.C;h=1ce66963a84b65aa5c2f17512c6ca781e0df7e49;hb=534095ce9e82d0b0f875540f7306ff218df3b5aa;hp=dad828aaba69ab3502ee89751e13443e9b8239ec;hpb=2a31934f38d624bef25c0b177852233eee9768f0;p=lyx.git diff --git a/src/frontends/controllers/ControlLog.C b/src/frontends/controllers/ControlLog.C index dad828aaba..1ce66963a8 100644 --- a/src/frontends/controllers/ControlLog.C +++ b/src/frontends/controllers/ControlLog.C @@ -16,8 +16,7 @@ #include "gettext.h" #include "lyxlex.h" -#include "support/std_sstream.h" - +#include #include using std::istringstream; @@ -25,6 +24,9 @@ using std::ostream; using std::string; namespace lyx { + +using support::FileName; + namespace frontend { ControlLog::ControlLog(Dialog & parent) @@ -40,7 +42,11 @@ bool ControlLog::initialiseParams(string const & data) 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; @@ -56,7 +62,7 @@ bool ControlLog::initialiseParams(string const & data) else return false; - logfile_ = logfile; + logfile_ = FileName(logfile); return true; } @@ -67,18 +73,18 @@ void ControlLog::clearParams() } -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"); @@ -90,7 +96,7 @@ string const ControlLog::title() const void ControlLog::getContents(std::ostream & ss) const { - std::ifstream in(logfile_.c_str()); + std::ifstream in(logfile_.toFilesystemEncoding().c_str()); bool success = false; @@ -104,16 +110,16 @@ void ControlLog::getContents(std::ostream & ss) const 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; } }