From 262d125471c7d5a06da33af8d7995570dda8f97d Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 26 Nov 2026 11:25:19 +0100 Subject: feat(mimeapps): stage edits behind Save and Discard Picks and removes went straight to mimeapps.list, unlike every other settings page, which edits a draft and commits from the SaveBar in the header. The page now edits a draft of the file text; Save writes it, Discard drops it, and the sidebar marks unsaved changes through dirty. The draft follows the file while nothing is pending, so an outside change still shows. Co-Authored-By: Claude Opus 5.5 --- desktop/modules/mimeapps/MimeAppsPage.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'desktop/modules/mimeapps/MimeAppsPage.qml') diff --git a/desktop/modules/mimeapps/MimeAppsPage.qml b/desktop/modules/mimeapps/MimeAppsPage.qml index 6103e5c..8ebe880 100644 --- a/desktop/modules/mimeapps/MimeAppsPage.qml +++ b/desktop/modules/mimeapps/MimeAppsPage.qml @@ -62,7 +62,7 @@ Column { .slice(0, 10); } function pick(mimes, id) { - page.ma.write(mimes.reduce((t, m) => M.set(t, m, id), page.ma.text)); + page.ma.stage(mimes.reduce((t, m) => M.set(t, m, id), page.ma.draft)); page.editing = ""; page.query = ""; page.all = false; @@ -168,7 +168,7 @@ Column { anchors { right: parent.right; verticalCenter: parent.verticalCenter } text: "Remove" danger: true - onClicked: page.ma.write(M.remove(page.ma.text, assoc.mimes[0])) + onClicked: page.ma.stage(M.remove(page.ma.draft, assoc.mimes[0])) } } @@ -245,7 +245,7 @@ Column { Small { width: parent.width wrapMode: Text.Wrap - text: "What xdg-open uses, from " + page.ma.file + ". Applies at once." + text: "What xdg-open uses, from " + page.ma.file + ". Nothing is written until Save." } Text { -- cgit v1.2.3