]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiLog.cpp
GuiTabular, InsetTabular: fix http://bugzilla.lyx.org/show_bug.cgi?id=5752
[lyx.git] / src / frontends / qt4 / GuiLog.cpp
index 713544a02c5e25f81d2dafbcf6120018db354dd5..2ddadc9226af3b684354f14dc0578ebfe8d489c5 100644 (file)
 
 #include "GuiApplication.h"
 #include "qt_helpers.h"
-#include "support/gettext.h"
 #include "Lexer.h"
 
-#include <QCloseEvent>
+#include "support/docstring.h"
+#include "support/gettext.h"
+
 #include <QTextBrowser>
 #include <QSyntaxHighlighter>
 #include <QClipboard>
@@ -99,7 +100,7 @@ void LogHighlighter::highlightBlock(QString const & text)
 /////////////////////////////////////////////////////////////////////
 
 GuiLog::GuiLog(GuiView & lv)
-       : GuiDialog(lv, "log"), type_(LatexLog)
+       : GuiDialog(lv, "log", qt_("LaTeX Log")), type_(LatexLog)
 {
        setupUi(this);
 
@@ -120,16 +121,9 @@ GuiLog::GuiLog(GuiView & lv)
 }
 
 
-void GuiLog::closeEvent(QCloseEvent * e)
-{
-       slotClose();
-       e->accept();
-}
-
-
 void GuiLog::updateContents()
 {
-       setViewTitle(title());
+       setTitle(toqstr(title()));
 
        ostringstream ss;
        getContents(ss);
@@ -141,7 +135,7 @@ void GuiLog::updateContents()
 bool GuiLog::initialiseParams(string const & data)
 {
        istringstream is(data);
-       Lexer lex(0,0);
+       Lexer lex;
        lex.setStream(is);
 
        string logtype, logfile;
@@ -166,6 +160,9 @@ bool GuiLog::initialiseParams(string const & data)
                return false;
 
        logfile_ = FileName(logfile);
+
+       updateContents();
+
        return true;
 }
 
@@ -239,4 +236,4 @@ Dialog * createGuiLog(GuiView & lv) { return new GuiLog(lv); }
 } // namespace frontend
 } // namespace lyx
 
-#include "GuiLog_moc.cpp"
+#include "moc_GuiLog.cpp"