aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/qtmaildir
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-19 10:01:49 +0200
committerDanilo M. <danix@danix.xyz>2026-10-19 10:01:49 +0200
commitd9c9c30865330b24349438e4e20579fd76dafbd5 (patch)
tree6dd01b16f51a1bda83e0a2f066c3bbd9218a4f69 /desktop/modules/qtmaildir
parent26653d3cb8d2a9b19133a8c2bc981a669a3f81bd (diff)
downloadquickshell-d9c9c30865330b24349438e4e20579fd76dafbd5.tar.gz
quickshell-d9c9c30865330b24349438e4e20579fd76dafbd5.zip
desktop: report save results in the SaveBar, not at the page's foot
A save's outcome sat at the bottom of the page, out of sight on a long one, while "unsaved changes" was already in the header. SaveBar gains notice, shown once the page is clean, and error, shown in red over the unsaved mark, since a refused or failed write leaves the draft dirty. Wired for notifications, HyprIdle, Sunset, Wallpaper and the four Mail pages, with their longer messages shortened to fit the header. Messages that are not save results stay in their pages: the icon theme's immediate apply, Sunset's location detection, the assistant restart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/modules/qtmaildir')
-rw-r--r--desktop/modules/qtmaildir/MailAccountsModule.qml2
-rw-r--r--desktop/modules/qtmaildir/MailComposeModule.qml2
-rw-r--r--desktop/modules/qtmaildir/MailGeneralModule.qml2
-rw-r--r--desktop/modules/qtmaildir/MailTagsKeysModule.qml2
-rw-r--r--desktop/modules/qtmaildir/Note.qml11
-rw-r--r--desktop/modules/qtmaildir/Qtm.qml4
6 files changed, 8 insertions, 15 deletions
diff --git a/desktop/modules/qtmaildir/MailAccountsModule.qml b/desktop/modules/qtmaildir/MailAccountsModule.qml
index a77dbac..11cfecb 100644
--- a/desktop/modules/qtmaildir/MailAccountsModule.qml
+++ b/desktop/modules/qtmaildir/MailAccountsModule.qml
@@ -32,7 +32,7 @@ Module {
title: "Accounts"
// One draft behind all four Mail pages: Save writes them all.
actions: Component {
- SaveBar { dirty: Qtm.dirty; valid: Qtm.valid; onSave: Qtm.save(); onDiscard: Qtm.discard() }
+ SaveBar { dirty: Qtm.dirty; valid: Qtm.valid; error: Qtm.error; onSave: Qtm.save(); onDiscard: Qtm.discard() }
}
AccountsPage { width: parent.width }
}
diff --git a/desktop/modules/qtmaildir/MailComposeModule.qml b/desktop/modules/qtmaildir/MailComposeModule.qml
index 6a9a198..f97f9ef 100644
--- a/desktop/modules/qtmaildir/MailComposeModule.qml
+++ b/desktop/modules/qtmaildir/MailComposeModule.qml
@@ -33,7 +33,7 @@ Module {
title: "Compose"
// One draft behind all four Mail pages: Save writes them all.
actions: Component {
- SaveBar { dirty: Qtm.dirty; valid: Qtm.valid; onSave: Qtm.save(); onDiscard: Qtm.discard() }
+ SaveBar { dirty: Qtm.dirty; valid: Qtm.valid; error: Qtm.error; onSave: Qtm.save(); onDiscard: Qtm.discard() }
}
ComposePage { width: parent.width }
}
diff --git a/desktop/modules/qtmaildir/MailGeneralModule.qml b/desktop/modules/qtmaildir/MailGeneralModule.qml
index 02ecd5a..87ebeb9 100644
--- a/desktop/modules/qtmaildir/MailGeneralModule.qml
+++ b/desktop/modules/qtmaildir/MailGeneralModule.qml
@@ -43,7 +43,7 @@ Module {
title: "Mail"
// One draft behind all four Mail pages: Save writes them all.
actions: Component {
- SaveBar { dirty: Qtm.dirty; valid: Qtm.valid; onSave: Qtm.save(); onDiscard: Qtm.discard() }
+ SaveBar { dirty: Qtm.dirty; valid: Qtm.valid; error: Qtm.error; onSave: Qtm.save(); onDiscard: Qtm.discard() }
}
GeneralPage { width: parent.width }
}
diff --git a/desktop/modules/qtmaildir/MailTagsKeysModule.qml b/desktop/modules/qtmaildir/MailTagsKeysModule.qml
index 0c1eade..c414a71 100644
--- a/desktop/modules/qtmaildir/MailTagsKeysModule.qml
+++ b/desktop/modules/qtmaildir/MailTagsKeysModule.qml
@@ -31,7 +31,7 @@ Module {
title: "Tags & shortcuts"
// One draft behind all four Mail pages: Save writes them all.
actions: Component {
- SaveBar { dirty: Qtm.dirty; valid: Qtm.valid; onSave: Qtm.save(); onDiscard: Qtm.discard() }
+ SaveBar { dirty: Qtm.dirty; valid: Qtm.valid; error: Qtm.error; onSave: Qtm.save(); onDiscard: Qtm.discard() }
}
TagsKeysPage { width: parent.width }
}
diff --git a/desktop/modules/qtmaildir/Note.qml b/desktop/modules/qtmaildir/Note.qml
index 56b8208..94213c1 100644
--- a/desktop/modules/qtmaildir/Note.qml
+++ b/desktop/modules/qtmaildir/Note.qml
@@ -12,7 +12,8 @@
import QtQuick
import "../.."
-// The top of every Mail page: when changes apply, and any write error.
+// The top of every Mail page: when changes apply. A refused or failed
+// write is reported in the SaveBar.
Column {
width: parent ? parent.width : 0
spacing: 4
@@ -24,12 +25,4 @@ Column {
color: Qtm.running ? Theme.yellow : Theme.subtext
font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 4 }
}
- Text {
- width: parent.width
- visible: Qtm.error !== ""
- wrapMode: Text.Wrap
- text: Qtm.error
- color: Theme.red
- font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 4 }
- }
}
diff --git a/desktop/modules/qtmaildir/Qtm.qml b/desktop/modules/qtmaildir/Qtm.qml
index 3f6175b..554841b 100644
--- a/desktop/modules/qtmaildir/Qtm.qml
+++ b/desktop/modules/qtmaildir/Qtm.qml
@@ -82,7 +82,7 @@ Singleton {
// here (AGENTS.md: it writes nothing for empty text on an unloaded path).
function save() {
if (root.text !== root.base) {
- root.error = "qtmaildir.conf changed on disk since these edits began. Discard to load it, then redo them.";
+ root.error = "changed on disk: Discard to load it, then redo";
return;
}
root.error = "";
@@ -119,7 +119,7 @@ Singleton {
if (!root.dirty) { root.base = root.text; root.draft = root.text; }
}
onLoadFailed: if (!root.dirty) { root.text = ""; root.base = ""; root.draft = ""; }
- onSaveFailed: err => root.error = "Cannot write " + root.path + ": " + FileViewError.toString(err)
+ onSaveFailed: err => root.error = "cannot write: " + FileViewError.toString(err)
}
Process {