[PATCH] Fix KMessageBox::warningYesNoCancel message box creation

Sébastien Laoût sebastien.laout at tuxfamily.org
Wed Jun 9 06:53:41 BST 2004

> What i mean is that the dialog should be shown or hiden depending the state do 
> the "don't show again"  checkbox.   
> Not the result of the message box (i.e if the user pressed [Yes] or [No] )
> if the "don't show again" is checked, then, the next time, the dialog is not 
> shown, and the result is the same as the previous one.

But theire are cases when the MessageBox is a warning and it make no
sense to always click "No".
Such as : "Do you want to delete those files ?
           [ ] Do not show again
           [ Yes ]   [ No ]"
If the user clicked Do not show again he expect the next time the
files/items will be deleted without confirmation.

So, we should have both behaviours !
(first: save the action user has done and re-do it
 secund: always consider the dialog is accepted)

> There is AFAIK no API to show again a messagebox if the user selected "do not 
> show again".  That's maybe a flaw.

Yes, we can do it by switching to true the keys in the [Notification
Messages] KConfig group but have an API such as
KMessageBox::reenableRialog(const QString &dialog);
would be cool to put in the configuration dialog of each apps.

More information about the kde-core-devel mailing list