summaryrefslogtreecommitdiff
path: root/src/app.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.c')
-rw-r--r--src/app.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/app.c b/src/app.c
index e2e16252..12c7dc7d 100644
--- a/src/app.c
+++ b/src/app.c
@@ -2303,6 +2303,23 @@ iBool handleCommand_App(const char *cmd) {
2303 } 2303 }
2304 setCurrent_Root(oldRoot); 2304 setCurrent_Root(oldRoot);
2305 } 2305 }
2306 else if (equal_Command(cmd, "file.delete")) {
2307 const char *path = suffixPtr_Command(cmd, "path");
2308 if (argLabel_Command(cmd, "confirm")) {
2309 makeQuestion_Widget(
2310 uiHeading_ColorEscape "${heading.file.delete}",
2311 format_CStr("${dlg.file.delete.confirm}\n%s", path),
2312 (iMenuItem[]){
2313 { "${cancel}", 0, 0, NULL },
2314 { uiTextCaution_ColorEscape "${dlg.file.delete}", 0, 0,
2315 format_CStr("!file.delete path:%s", path) } },
2316 2);
2317 }
2318 else {
2319 remove(path);
2320 }
2321 return iTrue;
2322 }
2306 else if (equal_Command(cmd, "document.request.cancelled")) { 2323 else if (equal_Command(cmd, "document.request.cancelled")) {
2307 /* TODO: How should cancelled requests be treated in the history? */ 2324 /* TODO: How should cancelled requests be treated in the history? */
2308#if 0 2325#if 0