X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fxforms%2FFormError.C;h=0a6b5b2d1a583f3e926ddb05de99f861742dd32a;hb=9f29ab3aa5fb11baca9bc28dc3710076cb3a2645;hp=46345e92f4bc674888bf3e6b237a709795361ae0;hpb=9704a004bd76e70296a79170d43d9bce16e5121f;p=lyx.git diff --git a/src/frontends/xforms/FormError.C b/src/frontends/xforms/FormError.C index 46345e92f4..0a6b5b2d1a 100644 --- a/src/frontends/xforms/FormError.C +++ b/src/frontends/xforms/FormError.C @@ -21,10 +21,11 @@ #include "insets/inseterror.h" #include "support/LAssert.h" +using SigC::slot; FormError::FormError(LyXView * lv, Dialogs * d) - : FormInset( lv, d, _("LaTeX Error"), new OkCancelPolicy), - dialog_(0), inset_(0) + : FormInset( lv, d, _("LaTeX Error")), + inset_(0) { Assert(lv && d); // let the dialog be shown @@ -34,15 +35,9 @@ FormError::FormError(LyXView * lv, Dialogs * d) } -FormError::~FormError() -{ - delete dialog_; -} - - FL_FORM * FormError::form() const { - if (dialog_) return dialog_->form; + if (dialog_.get()) return dialog_->form; return 0; } @@ -78,13 +73,9 @@ void FormError::update() void FormError::build() { - dialog_ = build_error(); + dialog_.reset(build_error()); - // Workaround dumb xforms sizing bug - minw_ = form()->w; - minh_ = form()->h; - // Manage the cancel/close button - bc_.setCancel(dialog_->button_cancel); - bc_.refresh(); + bc().setCancel(dialog_->button_cancel); + bc().refresh(); }