## Background
D7714 sparked a discussion about the wording and handling of the confirmation dialog shown when closing applications with multiple tabs still open, and its consistent use within KDE. Pain points where the use of a warning icon, ambiguous checkbox wording, inconsistent warning messages, HIG violation of button wording and a redundant middle button. It was concluded to model a better dialog after the dialog Firefox uses.
### Suggested wording
(as concluded in D7714#145582, comment below if you have improvements)
- Window title: "Confirm Close — <app name>"
- Icon: question mark
- Message: "You are about to close a window with <n> tabs. Are you sure you want to continue?"
- Checkbox: "Warn me when I attempt to close a window with multiple tabs" (should be aligned horizontally below text like in Firefox)
- Buttons: "Close Window" and "Cancel"
### Remarks
- I guess Firefox chose "Close tabs", because the dialog is also used for protecting the "Close other tabs" function. I prefer "Close Window", as in the end there is no empty shell with 0 tabs left.
- "Close" instead of "Quit", because the action closes only one window and does not actually also quit all other windows
- Only two buttons, because "Close tab" should normally be triggered by other means
- "Do not ask again" does not make sense for "Cancel" (see also [bug 202106](https://bugs.kde.org/show_bug.cgi?id=202106)
### Screenshots
Firefox (slightly different wording)
{F3908986}
Okular (proposal for patch that sparked the discussion)
{F3903701}
Konsole and Dolphin (current implementation)
| {F3910099} | {F3903699} |
## Action Items
### Outreach
[x] review by VDG / UX experts (partially done in D7714#145298)
[] buy-in from other application developers (suspended for now, because of D7714#146282)
### Decide on implementation
[] (1) custom `KMessageBox::createKMessageBox` (example: [Dolphin](https://phabricator.kde.org/source/dolphin/browse/master/src/dolphinmainwindow.cpp;d1b68db1a348f22eb8f6b6ffaae5097820385e83$389)) → no changes in `KMessageBox` and no KF5 version bump needed, but code is uglier
[] (2) standard `KMessageBox::questionYesNo` (example: [Konsole](https://phabricator.kde.org/source/konsole/browse/master/src/MainWindow.cpp;c907fcea7a768bf6df4479ecaca036e1d71247d2$622)) → needs support for custom "Do not ask again" message in `KMessageBox`, but code is nicer (custom message could even be added later)
### Bugfixes/Features
(optional, i.e. non-blocking)
- custom "Do not ask again" message in `KMessageBox` (if using (2))
- {D7859} (if using (2))
- {D7828} (if using (1))
- align checkbox horizontally below text like in Firefox
- provide GUI to reset confirmation status in Okular (see examples in Dolphin's and Konsole's settings)
- [add more]
### Porting
(independent, i.e. non-blocking)
- Okular: D7714 (not yet ported to new dialog)
- Konsole
- Dolphin
- Yakuake (feature broken?)
- More?