summaryrefslogtreecommitdiff
path: root/src/ui/documentwidget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2022-02-17 13:41:59 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2022-02-17 13:41:59 +0200
commitbbd7c82c7da273408ea965a9db368a35f8236943 (patch)
tree90762ffb0b9a4053053b5a6d81a0909fc5e484e4 /src/ui/documentwidget.c
parentd743f11dd80264c2ac871981fd79ef9288bde219 (diff)
Save text entered in the input prompt
Use the same mechanism as in the Upload dialog to keep the text entered in the input prompt safe, in case the dialog is accidentally closed or the app crashes.
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r--src/ui/documentwidget.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index 1f3e0e37..7c071f47 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -3273,9 +3273,11 @@ static void checkResponse_DocumentWidget_(iDocumentWidget *d) {
3273 setTextColor_LabelWidget(menu, uiTextAction_ColorId); 3273 setTextColor_LabelWidget(menu, uiTextAction_ColorId);
3274 } 3274 }
3275 } 3275 }
3276 setValidator_InputWidget(findChild_Widget(dlg, "input"), inputQueryValidator_, d); 3276 iInputWidget *input = findChild_Widget(dlg, "input");
3277 setSensitiveContent_InputWidget(findChild_Widget(dlg, "input"), 3277 setValidator_InputWidget(input, inputQueryValidator_, d);
3278 statusCode == sensitiveInput_GmStatusCode); 3278 setBackupFileName_InputWidget(input, "inputbackup.txt");
3279 setSelectAllOnFocus_InputWidget(input, iTrue);
3280 setSensitiveContent_InputWidget(input, statusCode == sensitiveInput_GmStatusCode);
3279 if (document_App() != d) { 3281 if (document_App() != d) {
3280 postCommandf_App("tabs.switch page:%p", d); 3282 postCommandf_App("tabs.switch page:%p", d);
3281 } 3283 }