Learn
Closing Documents and Save Prompts
Closing Documents and Save Prompts
Alpha status: XiKey Write is in Alpha (0.7.0). This page describes the generated desktop application in the repository.
XiKey Write scales its close behavior to match what actually changed: untouched documents close immediately with no prompt, a single modified document opens a small confirmation dialog, and two or more modified documents open the batch close review.
1. Untouched Documents Close Silently
A document is considered untouched (dirty == false) when:
- You opened an existing file and made no edits.
- You created a new blank document or a new document from a template and did not edit it.
- You edited a document and then used Undo (
Ctrl+Z) all the way back to its last saved state (or initial clean state).
When you close an untouched tab—or close the window while only untouched documents are open—XiKey Write closes it immediately without showing a confirmation dialog or creating a deferred recovery entry.
2. One Changed Document: Small Close Dialog
When you close a single modified document—or close the application window while exactly one open document has unsaved edits (even if other open tabs are untouched)—XiKey Write closes any untouched tabs silently first and shows a compact modal dialog for the edited document:
- English prompt:
Do you want to save changes to {name}?(for example,Do you want to save changes to «Untitled 1»?) - Arabic prompt:
هل تريد حفظ التغييرات في «{name}»؟(for example,هل تريد حفظ التغييرات في «الاسم»؟)
Dialog Actions
| Button (English) | Button (Arabic) | Action |
|---|---|---|
| Save | حفظ | Saves the document (opening Save As if the document has never been saved to disk) and finishes closing. |
Don't Save (Don't save) |
عدم الحفظ | Discards the unsaved changes and closes the document immediately. |
| Cancel | إلغاء | Keeps the document open and returns focus to the editor (Esc also cancels). |
In the Arabic interface, the dialog layout and button order are mirrored right-to-left (حفظ on the right, عدم الحفظ in the middle, إلغاء on the left). This single-document prompt has no countdown timer, no Decide later button, and no inline rename field.
3. Several Changed Documents: Close Review
When you close the application window (or choose File > Exit / Quit XiKey Write) while two or more open documents have unsaved edits:
- Any untouched tabs close silently first.
- XiKey Write opens the multi-document close review listing only the modified documents.
- For each modified document—or for all of them at once—you can choose:
- Save (
حفظ) or Save As (حفظ باسم) to write the changes to disk, with an inline filename field for untitled documents. - Decide later (
القرار لاحقًا), which carries a 10-second automatic countdown when closing the window: if the timer finishes or you click Decide later, XiKey Write keeps a local recovery copy so you can reopen or discard it later under File > History / File > Recovery (ملف > السجل/ملف > استرداد). - Don't Save (
عدم الحفظ) to discard the changes for that document. - Cancel (
إلغاء) to abort closing and return to your open documents.
- Save (