Text files in Mousepad
For an edit the user does not need to watch, edit the file directly (Read/Edit tools, sed); it is faster and exactly verifiable. Open Mousepad when the user wants the file on screen or wants to keep editing themselves.
- Open:
desktop_launchwithmousepad /path/file.txt(a new tab if Mousepad is already running). - Mousepad (GTK3) has a full accessibility tree: the document is a
textelement with the file's contents as its value.desktop_readreturns the text;desktop_element_set_textreplaces the whole document; to insert,desktop_element_clickthe document, move withdesktop_key(ctrl+End, ctrl+Home) anddesktop_type. - Save:
desktop_keyctrl+s with the window set. A new file opens the Save As dialog: its name entry and Save button are elements. - The window title shows
*while there are unsaved changes; check it before closing.
Tier: reversible (files under the snapshot root are covered by undo). Confirm before overwriting a file the user did not name.