]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiErrorList.cpp
* fix spelling in comments to please John.
[lyx.git] / src / frontends / qt4 / GuiErrorList.cpp
index 746d3ed35d1fd52dd93b601e32eb8ae016154b85..f104cd2ffba1461ff9213a1ff6d639fe4b6aafc4 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "Buffer.h"
 #include "BufferView.h"
+#include "FuncRequest.h"
 #include "ParIterator.h"
 #include "Text.h"
 
@@ -41,6 +42,8 @@ GuiErrorList::GuiErrorList(GuiView & lv)
 
        connect(closePB, SIGNAL(clicked()),
                this, SLOT(slotClose()));
+       connect(viewLogPB, SIGNAL(clicked()),
+               this, SLOT(viewLog()));
        connect(errorsLW, SIGNAL(currentRowChanged(int)),
                this, SLOT(select()));
 
@@ -52,7 +55,7 @@ GuiErrorList::GuiErrorList(GuiView & lv)
 void GuiErrorList::showEvent(QShowEvent * e)
 {
        select();
-       updateContents();
+       paramsToDialog();
        e->accept();
 }
 
@@ -68,7 +71,13 @@ void GuiErrorList::select()
 }
 
 
-void GuiErrorList::updateContents()
+void GuiErrorList::viewLog()
+{
+       dispatch(FuncRequest(LFUN_DIALOG_SHOW, "latexlog"));
+}
+
+
+void GuiErrorList::paramsToDialog()
 {
        setTitle(toqstr(name_));
        errorsLW->clear();
@@ -102,6 +111,7 @@ bool GuiErrorList::initialiseParams(string const & data)
                : &bufferview()->buffer();
        name_ = bformat(_("%1$s Errors (%2$s)"), _(error_type),
                                     from_utf8(buf->absFileName()));
+       paramsToDialog();
        return true;
 }