Navigating in such dialogs does not work yet, but at least the user is informed
at all that LaTeX wasn't succesful.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30209
a592a061-630c-0410-9148-
cb99ea01b6c8
-void Buffer::errors(string const & err) const
+void Buffer::errors(string const & err, bool from_master) const
+ gui_->errors(err, from_master);
tmp_result_file, FileName(absFileName()), backend_format, format,
error_list);
// Emit the signal to show the error list.
tmp_result_file, FileName(absFileName()), backend_format, format,
error_list);
// Emit the signal to show the error list.
- if (format != backend_format)
+ if (format != backend_format) {
+ // also to the children, in case of master-buffer-view
+ std::vector<Buffer *> clist = getChildren();
+ for (vector<Buffer *>::const_iterator cit = clist.begin();
+ cit != clist.end(); ++cit)
+ (*cit)->errors(error_type, true);
+ }
if (!success)
return false;
if (!success)
return false;
/// This function is called when the buffer structure is changed.
void structureChanged() const;
/// This function is called when some parsing error shows up.
/// This function is called when the buffer structure is changed.
void structureChanged() const;
/// This function is called when some parsing error shows up.
- void errors(std::string const & err) const;
+ void errors(std::string const & err, bool from_master = false) const;
/// This function is called when the buffer busy status change.
void setBusy(bool on) const;
/// This function is called when the buffer readonly status change.
/// This function is called when the buffer busy status change.
void setBusy(bool on) const;
/// This function is called when the buffer readonly status change.
/// This function is called when the buffer structure has been updated.
virtual void updateTocItem(std::string const &, DocIterator const &) = 0;
/// This function is called when some parsing error shows up.
/// This function is called when the buffer structure has been updated.
virtual void updateTocItem(std::string const &, DocIterator const &) = 0;
/// This function is called when some parsing error shows up.
- virtual void errors(std::string const &) = 0;
+ virtual void errors(std::string const &, bool from_master = false) = 0;
/// This function is called when some message shows up.
virtual void message(docstring const &) = 0;
/// This function is called when the buffer busy status change.
/// This function is called when some message shows up.
virtual void message(docstring const &) = 0;
/// This function is called when the buffer busy status change.
ErrorList const & GuiErrorList::errorList() const
{
ErrorList const & GuiErrorList::errorList() const
{
- return bufferview()->buffer().errorList(error_type_);
+ return from_master_ ?
+ bufferview()->buffer().masterBuffer()->errorList(error_type_)
+ : bufferview()->buffer().errorList(error_type_);
-bool GuiErrorList::initialiseParams(string const & error_type)
+bool GuiErrorList::initialiseParams(string const & data)
+ from_master_ = prefixIs(data, "from_master|");
+ string error_type = data;
+ if (from_master_)
+ error_type = split(data, '|');
error_type_ = error_type;
error_type_ = error_type;
- Buffer const & buf = bufferview()->buffer();
+ Buffer const * buf = from_master_ ?
+ bufferview()->buffer().masterBuffer()
+ : &bufferview()->buffer();
name_ = bformat(_("%1$s Errors (%2$s)"), _(error_type),
name_ = bformat(_("%1$s Errors (%2$s)"), _(error_type),
- from_utf8(buf.absFileName()));
+ from_utf8(buf->absFileName()));
if (err.par_id == -1)
return false;
if (err.par_id == -1)
return false;
+ if (from_master_)
+ // FIXME: implement
+ return false;
+
Buffer const & buf = buffer();
DocIterator dit = buf.getParFromID(err.par_id);
Buffer const & buf = buffer();
DocIterator dit = buf.getParFromID(err.par_id);
std::string error_type_;
/// the parent document name
docstring name_;
std::string error_type_;
/// the parent document name
docstring name_;
+ ///
+ bool from_master_;
};
} // namespace frontend
};
} // namespace frontend
-void GuiView::errors(string const & error_type)
-{
- ErrorList & el = buffer()->errorList(error_type);
+void GuiView::errors(string const & error_type, bool from_master)
+{
+ ErrorList & el = from_master ?
+ buffer()->masterBuffer()->errorList(error_type)
+ : buffer()->errorList(error_type);
+ string data = error_type;
+ if (from_master)
+ data = "from_master|" + error_type;
- showDialog("errorlist", error_type);
+ showDialog("errorlist", data);
/// GuiBufferDelegate.
///@{
void resetAutosaveTimers();
/// GuiBufferDelegate.
///@{
void resetAutosaveTimers();
- void errors(std::string const &);
+ void errors(std::string const &, bool from_master = false);
void structureChanged();
void updateTocItem(std::string const &, DocIterator const &);
///@}
void structureChanged();
void updateTocItem(std::string const &, DocIterator const &);
///@}