summaryrefslogtreecommitdiff
path: root/src/ui/documentwidget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r--src/ui/documentwidget.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index be831829..53f44868 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -2380,20 +2380,19 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd)
2380 } 2380 }
2381 } 2381 }
2382 else if (equal_Command(cmd, "document.autoreload.menu") && document_App() == d) { 2382 else if (equal_Command(cmd, "document.autoreload.menu") && document_App() == d) {
2383 iWidget *dlg = makeQuestion_Widget(uiTextAction_ColorEscape "${heading.autoreload}", 2383 iArray *items = collectNew_Array(sizeof(iMenuItem));
2384 "${dlg.autoreload}",
2385 (iMenuItem[]){ { "${cancel}", 0, 0, NULL } },
2386 1);
2387 for (int i = 0; i < max_ReloadInterval; ++i) { 2384 for (int i = 0; i < max_ReloadInterval; ++i) {
2388 insertChildAfterFlags_Widget( 2385 pushBack_Array(items, &(iMenuItem){
2389 dlg, 2386 format_CStr("%s%s", ((int) d->mod.reloadInterval == i ? "=" : "-"),
2390 iClob(new_LabelWidget(label_ReloadInterval_(i), 2387 label_ReloadInterval_(i)),
2391 format_CStr("document.autoreload.set arg:%d", i))), 2388 0,
2392 i + 1, 2389 0,
2393 resizeToParentWidth_WidgetFlag | 2390 format_CStr("document.autoreload.set arg:%d", i) });
2394 ((int) d->mod.reloadInterval == i ? selected_WidgetFlag : 0)); 2391 }
2395 } 2392 pushBack_Array(items, &(iMenuItem){ "${cancel}", 0, 0, NULL });
2396 arrange_Widget(dlg); 2393 makeQuestion_Widget(uiTextAction_ColorEscape "${heading.autoreload}",
2394 "${dlg.autoreload}",
2395 constData_Array(items), size_Array(items));
2397 return iTrue; 2396 return iTrue;
2398 } 2397 }
2399 else if (equal_Command(cmd, "document.autoreload.set") && document_App() == d) { 2398 else if (equal_Command(cmd, "document.autoreload.set") && document_App() == d) {