diff options
Diffstat (limited to 'src/ui/inputwidget.c')
-rw-r--r-- | src/ui/inputwidget.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c index b910f905..b94e0c27 100644 --- a/src/ui/inputwidget.c +++ b/src/ui/inputwidget.c | |||
@@ -1163,6 +1163,12 @@ void selectAll_InputWidget(iInputWidget *d) { | |||
1163 | #endif | 1163 | #endif |
1164 | } | 1164 | } |
1165 | 1165 | ||
1166 | void validate_InputWidget(iInputWidget *d) { | ||
1167 | if (d->validator) { | ||
1168 | d->validator(d, d->validatorContext); /* this may change the contents */ | ||
1169 | } | ||
1170 | } | ||
1171 | |||
1166 | iLocalDef iBool isEditing_InputWidget_(const iInputWidget *d) { | 1172 | iLocalDef iBool isEditing_InputWidget_(const iInputWidget *d) { |
1167 | return (flags_Widget(constAs_Widget(d)) & selected_WidgetFlag) != 0; | 1173 | return (flags_Widget(constAs_Widget(d)) & selected_WidgetFlag) != 0; |
1168 | } | 1174 | } |
@@ -1653,9 +1659,7 @@ void setEatEscape_InputWidget(iInputWidget *d, iBool eatEscape) { | |||
1653 | } | 1659 | } |
1654 | 1660 | ||
1655 | static void contentsWereChanged_InputWidget_(iInputWidget *d) { | 1661 | static void contentsWereChanged_InputWidget_(iInputWidget *d) { |
1656 | if (d->validator) { | 1662 | validate_InputWidget(d); |
1657 | d->validator(d, d->validatorContext); /* this may change the contents */ | ||
1658 | } | ||
1659 | if (d->inFlags & notifyEdits_InputWidgetFlag) { | 1663 | if (d->inFlags & notifyEdits_InputWidgetFlag) { |
1660 | postCommand_Widget(d, "input.edited id:%s", cstr_String(id_Widget(constAs_Widget(d)))); | 1664 | postCommand_Widget(d, "input.edited id:%s", cstr_String(id_Widget(constAs_Widget(d)))); |
1661 | } | 1665 | } |