mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
Fix bug #157. See ChangeLog.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3308 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9c4446b159
commit
cbfe82a689
@ -1,5 +1,10 @@
|
||||
2002-01-07 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* FormDocument.C:
|
||||
* forms/form_document.fd: change the labels and variable names of
|
||||
left_margin, right_margin to inner_margin, outer_margin, in line
|
||||
with bugzilla bug #157.
|
||||
|
||||
* FormFiledialog.C (Reread): used locally stored modtime variable
|
||||
rather than make repeated calls to fileInfo.getModificationTime().
|
||||
|
||||
|
@ -109,15 +109,15 @@ void FormDocument::build()
|
||||
"| Very small Margins "
|
||||
"| Very wide Margins "));
|
||||
|
||||
fl_set_input_return(paper_->input_custom_width, FL_RETURN_CHANGED);
|
||||
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);
|
||||
fl_set_input_return(paper_->input_top_margin, FL_RETURN_CHANGED);
|
||||
fl_set_input_return(paper_->input_bottom_margin, FL_RETURN_CHANGED);
|
||||
fl_set_input_return(paper_->input_left_margin, FL_RETURN_CHANGED);
|
||||
fl_set_input_return(paper_->input_right_margin, FL_RETURN_CHANGED);
|
||||
fl_set_input_return(paper_->input_head_height, FL_RETURN_CHANGED);
|
||||
fl_set_input_return(paper_->input_head_sep, FL_RETURN_CHANGED);
|
||||
fl_set_input_return(paper_->input_foot_skip, FL_RETURN_CHANGED);
|
||||
fl_set_input_return(paper_->input_inner_margin, FL_RETURN_CHANGED);
|
||||
fl_set_input_return(paper_->input_outer_margin, FL_RETURN_CHANGED);
|
||||
fl_set_input_return(paper_->input_head_height, FL_RETURN_CHANGED);
|
||||
fl_set_input_return(paper_->input_head_sep, FL_RETURN_CHANGED);
|
||||
fl_set_input_return(paper_->input_foot_skip, FL_RETURN_CHANGED);
|
||||
|
||||
// Set input filters on width and height to make them accept only
|
||||
// unsigned numbers.
|
||||
@ -129,9 +129,9 @@ void FormDocument::build()
|
||||
fl_unsigned_float_filter);
|
||||
fl_set_input_filter(paper_->input_bottom_margin,
|
||||
fl_unsigned_float_filter);
|
||||
fl_set_input_filter(paper_->input_left_margin,
|
||||
fl_set_input_filter(paper_->input_inner_margin,
|
||||
fl_unsigned_float_filter);
|
||||
fl_set_input_filter(paper_->input_right_margin,
|
||||
fl_set_input_filter(paper_->input_outer_margin,
|
||||
fl_unsigned_float_filter);
|
||||
fl_set_input_filter(paper_->input_head_height,
|
||||
fl_unsigned_float_filter);
|
||||
@ -154,8 +154,8 @@ void FormDocument::build()
|
||||
fl_addto_choice(paper_->choice_custom_height_units, units.c_str());
|
||||
fl_addto_choice(paper_->choice_top_margin_units, units.c_str());
|
||||
fl_addto_choice(paper_->choice_bottom_margin_units, units.c_str());
|
||||
fl_addto_choice(paper_->choice_left_margin_units, units.c_str());
|
||||
fl_addto_choice(paper_->choice_right_margin_units, units.c_str());
|
||||
fl_addto_choice(paper_->choice_inner_margin_units, units.c_str());
|
||||
fl_addto_choice(paper_->choice_outer_margin_units, units.c_str());
|
||||
fl_addto_choice(paper_->choice_head_height_units, units.c_str());
|
||||
fl_addto_choice(paper_->choice_head_sep_units, units.c_str());
|
||||
fl_addto_choice(paper_->choice_foot_skip_units, units.c_str());
|
||||
@ -170,8 +170,8 @@ void FormDocument::build()
|
||||
bc().addReadOnly (paper_->input_custom_height);
|
||||
bc().addReadOnly (paper_->input_top_margin);
|
||||
bc().addReadOnly (paper_->input_bottom_margin);
|
||||
bc().addReadOnly (paper_->input_left_margin);
|
||||
bc().addReadOnly (paper_->input_right_margin);
|
||||
bc().addReadOnly (paper_->input_inner_margin);
|
||||
bc().addReadOnly (paper_->input_outer_margin);
|
||||
bc().addReadOnly (paper_->input_head_height);
|
||||
bc().addReadOnly (paper_->input_head_sep);
|
||||
bc().addReadOnly (paper_->input_foot_skip);
|
||||
@ -504,15 +504,15 @@ bool FormDocument::input( FL_OBJECT * ob, long data )
|
||||
|
||||
setEnabled(paper_->input_top_margin, use_geom);
|
||||
setEnabled(paper_->input_bottom_margin, use_geom);
|
||||
setEnabled(paper_->input_left_margin, use_geom);
|
||||
setEnabled(paper_->input_right_margin, use_geom);
|
||||
setEnabled(paper_->input_inner_margin, use_geom);
|
||||
setEnabled(paper_->input_outer_margin, use_geom);
|
||||
setEnabled(paper_->input_head_height, use_geom);
|
||||
setEnabled(paper_->input_head_sep, use_geom);
|
||||
setEnabled(paper_->input_foot_skip, use_geom);
|
||||
setEnabled(paper_->choice_top_margin_units, use_geom);
|
||||
setEnabled(paper_->choice_bottom_margin_units, use_geom);
|
||||
setEnabled(paper_->choice_left_margin_units, use_geom);
|
||||
setEnabled(paper_->choice_right_margin_units, use_geom);
|
||||
setEnabled(paper_->choice_inner_margin_units, use_geom);
|
||||
setEnabled(paper_->choice_outer_margin_units, use_geom);
|
||||
setEnabled(paper_->choice_head_height_units, use_geom);
|
||||
setEnabled(paper_->choice_head_sep_units, use_geom);
|
||||
setEnabled(paper_->choice_foot_skip_units, use_geom);
|
||||
@ -543,11 +543,11 @@ bool FormDocument::input( FL_OBJECT * ob, long data )
|
||||
if (strip(fl_get_input(paper_->input_bottom_margin)).empty())
|
||||
fl_set_choice(paper_->choice_bottom_margin_units,
|
||||
default_unit);
|
||||
if (strip(fl_get_input(paper_->input_left_margin)).empty())
|
||||
fl_set_choice(paper_->choice_left_margin_units,
|
||||
if (strip(fl_get_input(paper_->input_inner_margin)).empty())
|
||||
fl_set_choice(paper_->choice_inner_margin_units,
|
||||
default_unit);
|
||||
if (strip(fl_get_input(paper_->input_right_margin)).empty())
|
||||
fl_set_choice(paper_->choice_right_margin_units,
|
||||
if (strip(fl_get_input(paper_->input_outer_margin)).empty())
|
||||
fl_set_choice(paper_->choice_outer_margin_units,
|
||||
default_unit);
|
||||
if (strip(fl_get_input(paper_->input_head_height)).empty())
|
||||
fl_set_choice(paper_->choice_head_height_units,
|
||||
@ -579,15 +579,15 @@ bool FormDocument::input( FL_OBJECT * ob, long data )
|
||||
|
||||
setEnabled(paper_->input_top_margin, false);
|
||||
setEnabled(paper_->input_bottom_margin, false);
|
||||
setEnabled(paper_->input_left_margin, false);
|
||||
setEnabled(paper_->input_right_margin, false);
|
||||
setEnabled(paper_->input_inner_margin, false);
|
||||
setEnabled(paper_->input_outer_margin, false);
|
||||
setEnabled(paper_->input_head_height, false);
|
||||
setEnabled(paper_->input_head_sep, false);
|
||||
setEnabled(paper_->input_foot_skip, false);
|
||||
setEnabled(paper_->choice_top_margin_units, false);
|
||||
setEnabled(paper_->choice_bottom_margin_units, false);
|
||||
setEnabled(paper_->choice_left_margin_units, false);
|
||||
setEnabled(paper_->choice_right_margin_units, false);
|
||||
setEnabled(paper_->choice_inner_margin_units, false);
|
||||
setEnabled(paper_->choice_outer_margin_units, false);
|
||||
setEnabled(paper_->choice_head_height_units, false);
|
||||
setEnabled(paper_->choice_head_sep_units, false);
|
||||
setEnabled(paper_->choice_foot_skip_units, false);
|
||||
@ -607,15 +607,15 @@ bool FormDocument::input( FL_OBJECT * ob, long data )
|
||||
bool const use_geom = fl_get_button(paper_->check_use_geometry);
|
||||
setEnabled(paper_->input_top_margin, use_geom);
|
||||
setEnabled(paper_->input_bottom_margin, use_geom);
|
||||
setEnabled(paper_->input_left_margin, use_geom);
|
||||
setEnabled(paper_->input_right_margin, use_geom);
|
||||
setEnabled(paper_->input_inner_margin, use_geom);
|
||||
setEnabled(paper_->input_outer_margin, use_geom);
|
||||
setEnabled(paper_->input_head_height, use_geom);
|
||||
setEnabled(paper_->input_head_sep, use_geom);
|
||||
setEnabled(paper_->input_foot_skip, use_geom);
|
||||
setEnabled(paper_->choice_top_margin_units, use_geom);
|
||||
setEnabled(paper_->choice_bottom_margin_units, use_geom);
|
||||
setEnabled(paper_->choice_left_margin_units, use_geom);
|
||||
setEnabled(paper_->choice_right_margin_units, use_geom);
|
||||
setEnabled(paper_->choice_inner_margin_units, use_geom);
|
||||
setEnabled(paper_->choice_outer_margin_units, use_geom);
|
||||
setEnabled(paper_->choice_head_height_units, use_geom);
|
||||
setEnabled(paper_->choice_head_sep_units, use_geom);
|
||||
setEnabled(paper_->choice_foot_skip_units, use_geom);
|
||||
@ -804,16 +804,16 @@ void FormDocument::paper_apply(BufferParams & params)
|
||||
paper_->choice_custom_height_units);
|
||||
|
||||
params.leftmargin =
|
||||
getLengthFromWidgets(paper_->input_left_margin,
|
||||
paper_->choice_left_margin_units);
|
||||
getLengthFromWidgets(paper_->input_inner_margin,
|
||||
paper_->choice_inner_margin_units);
|
||||
|
||||
params.topmargin =
|
||||
getLengthFromWidgets(paper_->input_top_margin,
|
||||
paper_->choice_top_margin_units);
|
||||
|
||||
params.rightmargin =
|
||||
getLengthFromWidgets(paper_->input_right_margin,
|
||||
paper_->choice_right_margin_units);
|
||||
getLengthFromWidgets(paper_->input_outer_margin,
|
||||
paper_->choice_outer_margin_units);
|
||||
|
||||
params.bottommargin =
|
||||
getLengthFromWidgets(paper_->input_bottom_margin,
|
||||
@ -1140,11 +1140,11 @@ void FormDocument::paper_update(BufferParams const & params)
|
||||
setEnabled(paper_->input_custom_height, useCustom);
|
||||
setEnabled(paper_->choice_custom_height_units, useCustom);
|
||||
|
||||
updateWidgetsFromLengthString(paper_->input_left_margin,
|
||||
paper_->choice_left_margin_units,
|
||||
updateWidgetsFromLengthString(paper_->input_inner_margin,
|
||||
paper_->choice_inner_margin_units,
|
||||
params.leftmargin, default_unit);
|
||||
setEnabled(paper_->input_left_margin, useGeom);
|
||||
setEnabled(paper_->choice_left_margin_units, useGeom);
|
||||
setEnabled(paper_->input_inner_margin, useGeom);
|
||||
setEnabled(paper_->choice_inner_margin_units, useGeom);
|
||||
|
||||
updateWidgetsFromLengthString(paper_->input_top_margin,
|
||||
paper_->choice_top_margin_units,
|
||||
@ -1152,11 +1152,11 @@ void FormDocument::paper_update(BufferParams const & params)
|
||||
setEnabled(paper_->input_top_margin, useGeom);
|
||||
setEnabled(paper_->choice_top_margin_units, useGeom);
|
||||
|
||||
updateWidgetsFromLengthString(paper_->input_right_margin,
|
||||
paper_->choice_right_margin_units,
|
||||
updateWidgetsFromLengthString(paper_->input_outer_margin,
|
||||
paper_->choice_outer_margin_units,
|
||||
params.rightmargin, default_unit);
|
||||
setEnabled(paper_->input_right_margin, useGeom);
|
||||
setEnabled(paper_->choice_right_margin_units, useGeom);
|
||||
setEnabled(paper_->input_outer_margin, useGeom);
|
||||
setEnabled(paper_->choice_outer_margin_units, useGeom);
|
||||
|
||||
updateWidgetsFromLengthString(paper_->input_bottom_margin,
|
||||
paper_->choice_bottom_margin_units,
|
||||
|
@ -124,7 +124,7 @@ FD_form_doc_paper * FormDocument::build_doc_paper()
|
||||
|
||||
fdui->group_radio_orientation = fl_bgn_group();
|
||||
{
|
||||
char const * const dummy = N_("Portrait|#o");
|
||||
char const * const dummy = N_("Portrait|#r");
|
||||
fdui->radio_portrait = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 255, 40, 120, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
@ -180,27 +180,27 @@ FD_form_doc_paper * FormDocument::build_doc_paper()
|
||||
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Left:|#e");
|
||||
fdui->input_left_margin = obj = fl_add_input(FL_NORMAL_INPUT, 80, 260, 55, 30, idex(_(dummy)));
|
||||
char const * const dummy = N_("Inner:|#I");
|
||||
fdui->input_inner_margin = obj = fl_add_input(FL_NORMAL_INPUT, 80, 260, 55, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
|
||||
fdui->choice_left_margin_units = obj = fl_add_choice(FL_NORMAL_CHOICE, 140, 260, 55, 30, "");
|
||||
fdui->choice_inner_margin_units = obj = fl_add_choice(FL_NORMAL_CHOICE, 140, 260, 55, 30, "");
|
||||
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Right:|#R");
|
||||
fdui->input_right_margin = obj = fl_add_input(FL_NORMAL_INPUT, 80, 295, 55, 30, idex(_(dummy)));
|
||||
char const * const dummy = N_("Outer:|#u");
|
||||
fdui->input_outer_margin = obj = fl_add_input(FL_NORMAL_INPUT, 80, 295, 55, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, INPUT);
|
||||
fdui->choice_right_margin_units = obj = fl_add_choice(FL_NORMAL_CHOICE, 140, 295, 55, 30, "");
|
||||
fdui->choice_outer_margin_units = obj = fl_add_choice(FL_NORMAL_CHOICE, 140, 295, 55, 30, "");
|
||||
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Headheight:|#i");
|
||||
char const * const dummy = N_("Headheight:|#H");
|
||||
fdui->input_head_height = obj = fl_add_input(FL_NORMAL_INPUT, 300, 225, 55, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
|
@ -54,10 +54,10 @@ struct FD_form_doc_paper {
|
||||
FL_OBJECT *choice_top_margin_units;
|
||||
FL_OBJECT *input_bottom_margin;
|
||||
FL_OBJECT *choice_bottom_margin_units;
|
||||
FL_OBJECT *input_left_margin;
|
||||
FL_OBJECT *choice_left_margin_units;
|
||||
FL_OBJECT *input_right_margin;
|
||||
FL_OBJECT *choice_right_margin_units;
|
||||
FL_OBJECT *input_inner_margin;
|
||||
FL_OBJECT *choice_inner_margin_units;
|
||||
FL_OBJECT *input_outer_margin;
|
||||
FL_OBJECT *choice_outer_margin_units;
|
||||
FL_OBJECT *input_head_height;
|
||||
FL_OBJECT *choice_head_height_units;
|
||||
FL_OBJECT *input_head_sep;
|
||||
|
@ -353,7 +353,7 @@ alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Portrait|#o
|
||||
label: Portrait|#r
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
@ -533,11 +533,11 @@ alignment: FL_ALIGN_LEFT
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Left:|#e
|
||||
label: Inner:|#I
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: input_left_margin
|
||||
name: input_inner_margin
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
argument: INPUT
|
||||
|
||||
@ -555,7 +555,7 @@ label:
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: choice_left_margin_units
|
||||
name: choice_inner_margin_units
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
argument: 0
|
||||
|
||||
@ -569,11 +569,11 @@ alignment: FL_ALIGN_LEFT
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Right:|#R
|
||||
label: Outer:|#u
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: input_right_margin
|
||||
name: input_outer_margin
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
argument: INPUT
|
||||
|
||||
@ -591,7 +591,7 @@ label:
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: choice_right_margin_units
|
||||
name: choice_outer_margin_units
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
argument: 0
|
||||
|
||||
@ -605,7 +605,7 @@ alignment: FL_ALIGN_LEFT
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Headheight:|#i
|
||||
label: Headheight:|#H
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
|
Loading…
Reference in New Issue
Block a user