+2001-02-21 Dekel Tsur <dekelts@tau.ac.il>
+
+ * FormDocument.C (checkMarginValues): Activate "use geometry" button
+ if using custom paper size/margin.
+
2001-02-21 Allan Rae <rae@lyx.org>
* forms/form_preferences.fd: larger, bold font for outer tabfolder
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);
}