summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-02-24 05:11:54 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-02-24 05:11:54 +0200
commit4dcc2d04d29a31d7a64fdcf3a94f38e96e78ce26 (patch)
tree47d0443b0452117dd55497911ef2fb678b6dae29 /src/ui
parent7284c9339449a5f022c4ba3adf40335447cb5007 (diff)
Fixed text entry dialogs closing prematurely
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/util.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/ui/util.c b/src/ui/util.c
index 04edbfd9..4f0cb2fa 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -903,7 +903,7 @@ iBool valueInputHandler_(iWidget *dlg, const char *cmd) {
903 return iFalse; 903 return iFalse;
904 } 904 }
905 if (equal_Command(cmd, "input.ended")) { 905 if (equal_Command(cmd, "input.ended")) {
906 if (hasParent_Widget(ptr, dlg)) { 906 if (argLabel_Command(cmd, "enter") && hasParent_Widget(ptr, dlg)) {
907 if (arg_Command(cmd)) { 907 if (arg_Command(cmd)) {
908 acceptValueInput_(dlg); 908 acceptValueInput_(dlg);
909 } 909 }
@@ -1005,19 +1005,6 @@ iWidget *makeValueInput_Widget(iWidget *parent, const iString *initialValue, con
1005 setId_Widget(as_Widget(input), "input"); 1005 setId_Widget(as_Widget(input), "input");
1006 updateValueInputWidth_(dlg); 1006 updateValueInputWidth_(dlg);
1007 addChild_Widget(dlg, iClob(makePadding_Widget(gap_UI))); 1007 addChild_Widget(dlg, iClob(makePadding_Widget(gap_UI)));
1008// iWidget *div = new_Widget(); {
1009// setFlags_Widget(div, arrangeHorizontal_WidgetFlag | resizeWidthOfChildren_WidgetFlag |
1010// arrangeHeight_WidgetFlag | resizeToParentWidth_WidgetFlag, iTrue);
1011// addChildFlags_Widget(div, iClob(new_Widget()), expand_WidgetFlag);
1012// addChild_Widget(div, iClob(newKeyMods_LabelWidget("Cancel", SDLK_ESCAPE, 0, "cancel")));
1013// iLabelWidget *accept = addChild_Widget(
1014// div,
1015// iClob(newKeyMods_LabelWidget(acceptLabel ? acceptLabel : uiTextAction_ColorEscape "OK",
1016// SDLK_RETURN,
1017// 0,
1018// "valueinput.accept")));
1019// setFont_LabelWidget(accept, uiLabelBold_FontId);
1020// }
1021 addChild_Widget( 1008 addChild_Widget(
1022 dlg, 1009 dlg,
1023 iClob(makeDialogButtons_( 1010 iClob(makeDialogButtons_(