]> git.lyx.org Git - features.git/blobdiff - src/frontends/controllers/ControlErrorList.C
This commit creates a error_lists map member inside the Buffer class.
[features.git] / src / frontends / controllers / ControlErrorList.C
index d9e8c082ec1a1e373f914152d8a4349f4ef4701f..4ea92b835ace206d0e9891527bb272868a32ab84 100644 (file)
 #include "buffer.h"
 #include "BufferView.h"
 #include "debug.h"
+#include "gettext.h"
 #include "lyxtext.h"
 #include "paragraph.h"
 #include "pariterator.h"
 
+#include "support/lstrings.h"
+
+using lyx::support::bformat;
+
 using std::endl;
 using std::string;
 
@@ -39,10 +44,13 @@ ErrorList const & ControlErrorList::errorList() const
 }
 
 
-bool ControlErrorList::initialiseParams(string const & name)
+bool ControlErrorList::initialiseParams(string const & error_type)
 {
-       errorlist_ = kernel().bufferview()->buffer()->getErrorList();
-       name_ = name;
+       Buffer * buf = kernel().bufferview()->buffer();
+       string const title = bformat(_("%1$s Errors (%2$s)"),
+               _(error_type), buf->fileName());
+       errorlist_ = buf->errorList(error_type);
+       name_ = title;
        return true;
 }