From: Alfredo Braunstein Date: Mon, 26 May 2003 09:15:29 +0000 (+0000) Subject: make the error description read only but selectable (fix Bug: 699) X-Git-Tag: 1.6.10~16744 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b459326fc5a9ff33b87c0bb80af1b51b30f3d555;p=features.git make the error description read only but selectable (fix Bug: 699) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7045 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 7e4a25f4ab..37f44db915 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,9 @@ + +2003-05-25 Alfredo Braunstein + + * FormErrorList.C: make the error description read-only but + selectable. Fix a bug on the initial state. + 2003-05-23 Angus Leeming * FormExternal.C (update): the default template is the first one diff --git a/src/frontends/xforms/FormErrorList.C b/src/frontends/xforms/FormErrorList.C index dea9ead658..0e9b72e053 100644 --- a/src/frontends/xforms/FormErrorList.C +++ b/src/frontends/xforms/FormErrorList.C @@ -30,10 +30,16 @@ 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); } @@ -50,7 +56,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 +70,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 +98,5 @@ void FormErrorList::updateContents() } fl_select_browser_line(dialog_->browser_errors, 1); - goTo(1); + goTo(0); }