diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-26 11:25:19 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-26 11:25:19 +0100 |
| commit | 262d125471c7d5a06da33af8d7995570dda8f97d (patch) | |
| tree | 394442af3b33190c326cd205a138b8037289dae9 /desktop/modules/mimeapps/MimeAppsPage.qml | |
| parent | f19453f25a04b0760ff1303388d136a8b60c2c04 (diff) | |
| download | quickshell-262d125471c7d5a06da33af8d7995570dda8f97d.tar.gz quickshell-262d125471c7d5a06da33af8d7995570dda8f97d.zip | |
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 <noreply@anthropic.com>
Diffstat (limited to 'desktop/modules/mimeapps/MimeAppsPage.qml')
| -rw-r--r-- | desktop/modules/mimeapps/MimeAppsPage.qml | 6 |
1 files changed, 3 insertions, 3 deletions
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 { |
