X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fxforms%2FFormError.C;h=a5a9fe7f2e29c4718d311abc394716416601920c;hb=eba67bc3120dc301bf193c3f3b570f51f00a4654;hp=bdc2110f9055b84ce5a502688c8d4f5c2f069c75;hpb=99083f35dee96b6d31320d38326d4b887578f2e0;p=lyx.git diff --git a/src/frontends/xforms/FormError.C b/src/frontends/xforms/FormError.C index bdc2110f90..a5a9fe7f2e 100644 --- a/src/frontends/xforms/FormError.C +++ b/src/frontends/xforms/FormError.C @@ -19,11 +19,14 @@ #include "FormError.h" #include "form_error.h" #include "insets/inseterror.h" +#include "support/LAssert.h" -FormError::FormError( LyXView * lv, Dialogs * d ) - : FormInset( lv, d, _("LaTeX Error") ), + +FormError::FormError(LyXView * lv, Dialogs * d) + : FormInset( lv, d, _("LaTeX Error"), new OkCancelPolicy), dialog_(0), inset_(0) { + Assert(lv && d); // let the dialog be shown // This is a permanent connection so we won't bother // storing a copy because we won't be disconnecting. @@ -39,7 +42,7 @@ FormError::~FormError() FL_FORM * FormError::form() const { - if ( dialog_ ) return dialog_->form; + if (dialog_) return dialog_->form; return 0; } @@ -52,9 +55,9 @@ void FormError::disconnect() } -void FormError::showInset( InsetError * inset ) +void FormError::showInset(InsetError * inset) { - if (inset == 0) return; + if (inset == 0) return; // Is this _really_ allowed? (Lgb) // If connected to another inset, disconnect from it. if (inset_) @@ -80,4 +83,8 @@ void FormError::build() // Workaround dumb xforms sizing bug minw_ = form()->w; minh_ = form()->h; + + // Manage the cancel/close button + bc_.setCancel(dialog_->button_cancel); + bc_.refresh(); }