X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fxforms%2FFormErrorList.C;h=20b6db069b7128b1bde4b408e5822a632eb8cbed;hb=d5443737342903de489d527802cd2cdd38987d74;hp=afb0b723b3d0846898a2553d325221e960466158;hpb=2a882902eb6a2633ed419556f6a630e0a048e154;p=lyx.git diff --git a/src/frontends/xforms/FormErrorList.C b/src/frontends/xforms/FormErrorList.C index afb0b723b3..20b6db069b 100644 --- a/src/frontends/xforms/FormErrorList.C +++ b/src/frontends/xforms/FormErrorList.C @@ -5,23 +5,21 @@ * * \author Alfredo Braunstein * - * Full author contact details are available in file CREDITS + * Full author contact details are available in file CREDITS. */ #include - -#include "errorlist.h" #include "FormErrorList.h" -#include "xformsBC.h" -#include "xforms_helpers.h" #include "ControlErrorList.h" #include "forms/form_errorlist.h" -#include "support/lstrings.h" // frontStrip, strip -#include "debug.h" -#include "gettext.h" + +#include "xformsBC.h" +#include "xforms_helpers.h" #include "lyx_forms.h" +namespace lyx { +namespace frontend { typedef FormController > base_class; @@ -30,16 +28,22 @@ FormErrorList::FormErrorList(Dialog & parent) {} +int dumb_validator(FL_OBJECT *, const char *, const char *, int) +{ + return FL_INVALID; +} + + void FormErrorList::build() { dialog_.reset(build_errorlist(this)); - setEnabled(dialog_->input_description, false); + fl_set_input_filter(dialog_->input_description, dumb_validator); } void FormErrorList::update() { - fl_set_form_title(dialog_->form, controller().name().c_str()); + setTitle(controller().name()); updateContents(); } @@ -50,7 +54,6 @@ ButtonPolicy::SMInput FormErrorList::input(FL_OBJECT * ob, long) //xforms return values 1..n int const choice = int(fl_get_browser(dialog_->browser_errors)) - 1; goTo(choice); - return ButtonPolicy::SMI_VALID; } return ButtonPolicy::SMI_VALID; @@ -65,7 +68,7 @@ void FormErrorList::goTo(int where) controller().goTo(where); fl_set_input(dialog_->input_description, errors[where].description.c_str()); - setEnabled(dialog_->input_description, false); + fl_set_input_topline(dialog_->input_description, 1); } } @@ -93,5 +96,8 @@ void FormErrorList::updateContents() } fl_select_browser_line(dialog_->browser_errors, 1); - goTo(1); + goTo(0); } + +} // namespace frontend +} // namespace lyx