From 9715b1d9748db4cfe49105f1a11ed10286426e4e Mon Sep 17 00:00:00 2001 From: Dekel Tsur Date: Wed, 21 Feb 2001 14:44:46 +0000 Subject: [PATCH] Activate "use geometry" button if using custom paper size/margin. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1593 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/xforms/ChangeLog | 5 +++++ src/frontends/xforms/FormDocument.C | 25 ++++++++++++------------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index bbef2c0bca..bb8bac6e05 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,8 @@ +2001-02-21 Dekel Tsur + + * FormDocument.C (checkMarginValues): Activate "use geometry" button + if using custom paper size/margin. + 2001-02-21 Allan Rae * forms/form_preferences.fd: larger, bold font for outer tabfolder diff --git a/src/frontends/xforms/FormDocument.C b/src/frontends/xforms/FormDocument.C index dfd80357dd..2953743035 100644 --- a/src/frontends/xforms/FormDocument.C +++ b/src/frontends/xforms/FormDocument.C @@ -835,19 +835,18 @@ void FormDocument::checkReadOnly() void FormDocument::checkMarginValues() { -#if 0 - int const allEmpty = (!strlen(fl_get_input(paper_->input_top_margin)) && - !strlen(fl_get_input(paper_->input_bottom_margin)) && - !strlen(fl_get_input(paper_->input_left_margin)) && - !strlen(fl_get_input(paper_->input_right_margin)) && - !strlen(fl_get_input(paper_->input_head_height)) && - !strlen(fl_get_input(paper_->input_head_sep)) && - !strlen(fl_get_input(paper_->input_foot_skip)) && - !strlen(fl_get_input(paper_->input_custom_width)) && - !strlen(fl_get_input(paper_->input_custom_height))); - if (!allEmpty) - fl_set_button(paper_->push_use_geometry, 1); -#endif + bool const not_empty = + strlen(fl_get_input(paper_->input_top_margin)) || + strlen(fl_get_input(paper_->input_bottom_margin)) || + strlen(fl_get_input(paper_->input_left_margin)) || + strlen(fl_get_input(paper_->input_right_margin)) || + strlen(fl_get_input(paper_->input_head_height)) || + strlen(fl_get_input(paper_->input_head_sep)) || + strlen(fl_get_input(paper_->input_foot_skip)) || + strlen(fl_get_input(paper_->input_custom_width)) || + strlen(fl_get_input(paper_->input_custom_height)); + if (not_empty) + fl_set_button(paper_->push_use_geometry, 1); }