Yet another tweak from J�rgen.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3463 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2002-01-30 19:36:39 +00:00
parent 97962a2040
commit 27652900a6
2 changed files with 8 additions and 9 deletions

View File

@ -1,3 +1,7 @@
2002-01-30 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* FormGraphics.C: Fix MAXDIGIT values for height and width.
2002-01-30 Angus Leeming <a.leeming@ic.ac.uk>
* forms/form_citation: a few tweaks of my own.

View File

@ -37,8 +37,8 @@ namespace {
// Bound the number of input characters
int const SCALE_MAXDIGITS = 3;
int const WIDTH_MAXDIGITS = 3;
int const HEIGHT_MAXDIGITS = 3;
int const WIDTH_MAXDIGITS = 10;
int const HEIGHT_MAXDIGITS = 10;
int const ROTATE_MAXCHARS = 4;
int const FILENAME_MAXCHARS = 1024;
@ -432,10 +432,6 @@ ButtonPolicy::SMInput FormGraphics::input(FL_OBJECT * ob, long)
} else if (ob == dialog_->button_help) {
controller().help();
}
// Put verifications that the dialog shows some sane values,
// if not disallow clicking on ok/apply.
// Possibly use a label in the bottom of the dialog to give the reason.
ButtonPolicy::SMInput activate = ButtonPolicy::SMI_VALID;
// check if the input is valid
bool invalid = !isValid(bbox_->input_bb_x0);
@ -461,13 +457,12 @@ ButtonPolicy::SMInput FormGraphics::input(FL_OBJECT * ob, long)
fl_set_object_label(dialog_->text_warning,
_("Warning: Invalid Length!"));
fl_show_object(dialog_->text_warning);
activate = ButtonPolicy::SMI_INVALID;
return ButtonPolicy::SMI_INVALID;
} else {
fl_hide_object(dialog_->text_warning);
activate = ButtonPolicy::SMI_VALID;
}
return activate;
}
return checkInput();
}