J�rgen Spitzm�ller's patch to disable "Special" when appropriate.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2830 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2001-10-01 14:50:08 +00:00
parent 6fa3f87ef0
commit 0a1b163e7f
2 changed files with 20 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2001-10-01 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* FormDocument.C: Disable choice "Special" if landscape
is chosen to prevent senseless values.
2001-09-28 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* forms/form_preferences.fd: small tweaks.

View File

@ -104,6 +104,8 @@ void FormDocument::build()
"| A4 small Margins (only portrait) "
"| A4 very small Margins (only portrait) "
"| A4 very wide margins (only portrait) "));
setEnabled(paper_->choice_paperpackage, true);
fl_set_input_return(paper_->input_custom_width, FL_RETURN_CHANGED);
fl_set_input_return(paper_->input_custom_height, FL_RETURN_CHANGED);
fl_set_input_return(paper_->input_top_margin, FL_RETURN_CHANGED);
@ -922,6 +924,19 @@ bool FormDocument::CheckDocumentInput(FL_OBJECT * ob, long)
if (*input && !isValidGlueLength(input))
ok = false;
}
if (ob == paper_->radio_portrait) {
setEnabled(paper_->choice_paperpackage,
fl_get_button(paper_->radio_portrait));
}
if (ob == paper_->radio_landscape) {
setEnabled(paper_->choice_paperpackage,
fl_get_button(paper_->radio_portrait));
fl_set_choice(paper_->choice_paperpackage,
BufferParams::PACKAGE_NONE + 1);
}
if ((fl_get_choice(class_->choice_doc_skip) == 4) && !*input)
ok = false;
else if (fl_get_choice(class_->choice_doc_skip) != 4)