mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
Get it right...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6431 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
49fe972114
commit
01af900e79
@ -20,15 +20,27 @@
|
||||
#include "Lsstream.h"
|
||||
|
||||
|
||||
void MailInset::showDialog() const
|
||||
namespace {
|
||||
|
||||
BufferView * cachedBufferView(InsetBase & inset, string const & title)
|
||||
{
|
||||
BufferView * bv = inset().view();
|
||||
BufferView * const bv = inset.view();
|
||||
if (!bv) {
|
||||
lyxerr << "MailInset::showDialog:\n"
|
||||
lyxerr << "MailInset::" << title << ":\n"
|
||||
<< "The BufferView has not been cached!"
|
||||
<< std::endl;
|
||||
return;
|
||||
}
|
||||
return bv;
|
||||
}
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
||||
void MailInset::showDialog() const
|
||||
{
|
||||
BufferView * bv = cachedBufferView(inset(), "showDialog");
|
||||
if (!bv)
|
||||
return;
|
||||
|
||||
bv->owner()->getDialogs().show(name(), inset2string(), &inset());
|
||||
}
|
||||
@ -36,13 +48,9 @@ void MailInset::showDialog() const
|
||||
|
||||
void MailInset::updateDialog() const
|
||||
{
|
||||
BufferView * bv = inset().view();
|
||||
if (!bv) {
|
||||
lyxerr << "MailInset::showDialog:\n"
|
||||
<< "The BufferView has not been cached!"
|
||||
<< std::endl;
|
||||
BufferView * bv = cachedBufferView(inset(), "updateDDialog");
|
||||
if (!bv)
|
||||
return;
|
||||
}
|
||||
|
||||
bv->owner()->getDialogs().update(name(), inset2string());
|
||||
}
|
||||
@ -50,13 +58,9 @@ void MailInset::updateDialog() const
|
||||
|
||||
void MailInset::hideDialog() const
|
||||
{
|
||||
BufferView * bv = inset().view();
|
||||
if (!bv) {
|
||||
lyxerr << "MailInset::showDialog:\n"
|
||||
<< "The BufferView has not been cached!"
|
||||
<< std::endl;
|
||||
BufferView * bv = cachedBufferView(inset(), "hideDialog");
|
||||
if (!bv)
|
||||
return;
|
||||
}
|
||||
|
||||
InsetBase * cmp = bv->owner()->getDialogs().getOpenInset(name());
|
||||
if (cmp == &inset())
|
||||
|
Loading…
Reference in New Issue
Block a user