Add some warning messages.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6430 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2003-03-10 17:28:15 +00:00
parent 24c39cc6cf
commit 49fe972114
2 changed files with 20 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2003-03-10 Angus Leeming <leeming@lyx.org>
* mailinset.C: warn the user if the BufferView has not been cached.
2003-03-10 Angus Leeming <leeming@lyx.org>
* inset.h, insetbase.h: move cache() and view() into InsetBase.

View File

@ -14,6 +14,7 @@
#include "mailinset.h"
#include "inset.h"
#include "BufferView.h"
#include "debug.h"
#include "frontends/LyXView.h"
#include "frontends/Dialogs.h"
#include "Lsstream.h"
@ -22,8 +23,12 @@
void MailInset::showDialog() const
{
BufferView * bv = inset().view();
if (!bv)
if (!bv) {
lyxerr << "MailInset::showDialog:\n"
<< "The BufferView has not been cached!"
<< std::endl;
return;
}
bv->owner()->getDialogs().show(name(), inset2string(), &inset());
}
@ -32,8 +37,12 @@ void MailInset::showDialog() const
void MailInset::updateDialog() const
{
BufferView * bv = inset().view();
if (!bv)
if (!bv) {
lyxerr << "MailInset::showDialog:\n"
<< "The BufferView has not been cached!"
<< std::endl;
return;
}
bv->owner()->getDialogs().update(name(), inset2string());
}
@ -42,8 +51,12 @@ void MailInset::updateDialog() const
void MailInset::hideDialog() const
{
BufferView * bv = inset().view();
if (!bv)
if (!bv) {
lyxerr << "MailInset::showDialog:\n"
<< "The BufferView has not been cached!"
<< std::endl;
return;
}
InsetBase * cmp = bv->owner()->getDialogs().getOpenInset(name());
if (cmp == &inset())