From 0a1b163e7f5cd2a00457eb0c89dbea798d385546 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Mon, 1 Oct 2001 14:50:08 +0000 Subject: [PATCH] =?UTF-8?q?J=EF=BF=BDrgen=20Spitzm=EF=BF=BDller's=20patch?= =?UTF-8?q?=20to=20disable=20"Special"=20when=20appropriate.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2830 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/xforms/ChangeLog | 5 +++++ src/frontends/xforms/FormDocument.C | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 2430aa39d5..3bc5164672 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,8 @@ +2001-10-01 Jürgen Spitzmüller + + * FormDocument.C: Disable choice "Special" if landscape + is chosen to prevent senseless values. + 2001-09-28 Jürgen Spitzmüller * forms/form_preferences.fd: small tweaks. diff --git a/src/frontends/xforms/FormDocument.C b/src/frontends/xforms/FormDocument.C index 685105e02f..ddfeb59551 100644 --- a/src/frontends/xforms/FormDocument.C +++ b/src/frontends/xforms/FormDocument.C @@ -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)