Use of KMessageBox::warningYesNo for continue/cancel questions.

Waldo Bastian bastian at
Fri Jun 20 17:53:26 BST 2003

Hash: SHA1

On Friday 20 June 2003 17:41, Aaron J. Seigo wrote:
> On Friday 20 June 2003 05:29, Waldo Bastian wrote:
> > As I hopefully explained on irc already I think that the use of
> > KMessageBox::warningYesNo for confirmation dialogs is broken. If the
> so that everyone else is aware of the details, let me fill them in:
> in Konqueror file management mode, if you go to delete a file or files you
> get a confirmation dialog (until you check the "Don't show this again" box,
> of course). the default action in this dialog was "Delete", which is a
> destructive action that is exceptionally difficult for the user to undo (if
> at all possible in some situations). such destructive actions should never
> be the default action, even if, as it is in this case, the message box is a
> confirmation. so i added KMessageBox::warningYesNo, made it default to the
> "No" button and made konq_operations use that instead of
> KMessageBox::warningContinueCancel.
> > default for confirmation dialogs should be "Cancel" then that should be
> > changed in KMessageBox::warningContinueCancel.
> i've been running with exactly that patch locally and i can say
> definitively that it is a non-starter: too many applications use warning*
> as means to get confirmation for non-destructive actions. for instance,
> KMail uses such a KMessageBox to confirm sending (if you have that turned
> on). putting the focus on the Cancel button makes many areas of KDE harder
> to use, as you noted would be the case on irc. this is why i didn't commit
> that change. note that this was also my initial feeling, and why i added
> warningYesNo that defaults to "No" and didn't simply change
> warningContinueCancel's behaviour.

You mention KMail but KMail uses warnngYesNoCancel to confirm sending. It will 
surely not be affected by a change in  warningContinueCancel's behaviour.

> most usages of the warning* message boxes in KDE are not confirming
> destructive actions or actions that otherwise should be guarded against.
> changing that default would result in a much less pleasing KDE usage
> experience (one i suffered through for a few days already ;)
> > Will you revert your changes yourself?
> if that's the wish of the project, sure...
> in the case of deleting files, which was the only thing affected by my
> commit, reverting would be a step backwards IMHO. Waldo, perhaps you could
> elucidate on why you feel that this change is broken...

The case at hand is a matter of confirming an action and warningContinueCancel 
is the appropriate action for that. The Yes/No variants are for situations 
where you have two more or less equally-likely possibilities. (E.g. KMail 
asking you whether to Send Now or Send Later) Using the Yes/No variant simply 
because it happens to put the default on a button of your liking ignores the 

Konqueror should use warningContinueCancel in the cases that you changed, and 
if that doesn't give the desired result then warningContinueCancel should be 

- -- 
bastian at -=|[ SuSE, The Linux Desktop Experts ]|=- bastian at
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see


More information about the kde-core-devel mailing list