mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-14 06:57:01 +00:00
Activate Apply,Ok buttons if the contents aren't empty.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5762 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e0f9656ce6
commit
8e511043f5
@ -18,6 +18,9 @@
|
||||
#include "ControlIndex.h"
|
||||
#include "FormIndex.h"
|
||||
#include "forms/form_index.h"
|
||||
|
||||
#include "support/lstrings.h"
|
||||
|
||||
#include FORMS_H_LOCATION
|
||||
|
||||
typedef FormCB<ControlIndex, FormDB<FD_index> > base_class;
|
||||
@ -41,14 +44,15 @@ void FormIndex::build()
|
||||
bc().setRestore(dialog_->button_restore);
|
||||
|
||||
bc().addReadOnly(dialog_->input_key);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void FormIndex::update()
|
||||
{
|
||||
fl_set_input(dialog_->input_key,
|
||||
controller().params().getContents().c_str());
|
||||
string const contents = trim(controller().params().getContents());
|
||||
fl_set_input(dialog_->input_key, contents.c_str());
|
||||
|
||||
bc().valid(!contents.empty());
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user