code compactification

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7128 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2003-06-06 16:07:07 +00:00
parent 2013762dc3
commit 2bbbde73a1
3 changed files with 12 additions and 23 deletions

View File

@ -1,3 +1,8 @@
2003-06-06 André Pönitz <poenitz@gmx.net>
* insetwrap.[Ch]: code compactification
2003-06-06 Alfredo Braunstein <abraunst@libero.it>
* mailinset.C (updateDialog): use Dialogs::visible

View File

@ -75,22 +75,14 @@ InsetWrap::InsetWrap(BufferParams const & bp, string const & type)
}
InsetWrap::InsetWrap(InsetWrap const & in)
: InsetCollapsable(in), params_(in.params_)
{}
InsetWrap::~InsetWrap()
{
InsetWrapMailer mailer(*this);
mailer.hideDialog();
InsetWrapMailer(*this).hideDialog();
}
dispatch_result InsetWrap::localDispatch(FuncRequest const & cmd)
{
Inset::RESULT result = UNDISPATCHED;
switch (cmd.action) {
case LFUN_INSET_MODIFY: {
InsetWrapParams params;
@ -100,21 +92,16 @@ dispatch_result InsetWrap::localDispatch(FuncRequest const & cmd)
params_.width = params.width;
cmd.view()->updateInset(this);
result = DISPATCHED;
return DISPATCHED;
}
break;
case LFUN_INSET_DIALOG_UPDATE: {
InsetWrapMailer mailer(*this);
mailer.updateDialog(cmd.view());
}
break;
case LFUN_INSET_DIALOG_UPDATE:
InsetWrapMailer(*this).updateDialog(cmd.view());
return DISPATCHED;
default:
result = InsetCollapsable::localDispatch(cmd);
return InsetCollapsable::localDispatch(cmd);
}
return result;
}
@ -261,8 +248,7 @@ bool InsetWrap::showInsetDialog(BufferView * bv) const
{
if (!inset.showInsetDialog(bv)) {
InsetWrap * tmp = const_cast<InsetWrap *>(this);
InsetWrapMailer mailer(*tmp);
mailer.showDialog(bv);
InsetWrapMailer(*tmp).showDialog(bv);
}
return true;
}

View File

@ -39,8 +39,6 @@ public:
///
InsetWrap(BufferParams const &, string const &);
///
InsetWrap(InsetWrap const &);
///
~InsetWrap();
///
virtual dispatch_result localDispatch(FuncRequest const & cmd);