]> git.lyx.org Git - features.git/commitdiff
make the error description read only but selectable (fix Bug: 699)
authorAlfredo Braunstein <abraunst@lyx.org>
Mon, 26 May 2003 09:15:29 +0000 (09:15 +0000)
committerAlfredo Braunstein <abraunst@lyx.org>
Mon, 26 May 2003 09:15:29 +0000 (09:15 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7045 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/xforms/ChangeLog
src/frontends/xforms/FormErrorList.C

index 7e4a25f4ab1cfa2c6d81a84ddf875e1f81b9c6b0..37f44db9152207bd10f0237e3e36c27e313bedcc 100644 (file)
@@ -1,3 +1,9 @@
+
+2003-05-25  Alfredo Braunstein  <abraunst@libero.it>
+
+       * FormErrorList.C: make the error description read-only but
+       selectable. Fix a bug on the initial state.
+
 2003-05-23  Angus Leeming  <leeming@lyx.org>
 
        * FormExternal.C (update): the default template is the first one
index dea9ead658761aea8442dd71740edbcfca76f8ac..0e9b72e0538dc6775cca961c8361b8e7b00ea7b0 100644 (file)
@@ -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);
 }