Don't show again queuedMessageBox.

Olivier Goffart ogoffart at tiscalinet.be
Sun Oct 17 15:53:08 BST 2004


Hello.

In general, for information or error messages box (which doesn't need to 
return a button code), it's much safer to uses queuedMessageBox in place of 
usual KMessageBox accessor.

And sometimes, this is even _needed_ to don't crash.  
(This is for example the case of the message box the bug 84775 relate)

Several times in the past, I prefered to uses the KMessageBox::information 
insteads of queuedMessageBox because i wanted to have the "don't show again" 
checkbox. I take the risk no socket or users operations will left the program 
in a unstable state when this messagebox is running.

In other case where the queuedMessageBox was realy needed. I was forced to 
don't put the "Don't show again".  which may be annoying for certain users  
(example Bug 84775)

That's because queuedMessageBox doesn't have yet the possibility to have a 
dontshowagain checkbox.

A first solution could be to simply adding it.  This has already been proposed 
in the past:  http://lists.kde.org/?l=kde-core-devel&m=103391899322489&w=2
but it seems it's not so simple (quoting Ingo Kloeker in 
http://lists.kde.org/?l=kde-core-devel&m=103393796702428&w=2)
> I realized why a queuedMessageBox doesn't have dontAskAgainName 
> parameter. The reason is that the state of this checkbox will be 
> checked directly after the dialog is put in the dialog queue and not 
> when the dialog is closed by the user. In order to make a "Don't ask 
> again" checkbox work in a queuedMessageBox we would have to derive a 
> class from KDialogBase which saves the state of the checkbox in it's 
> d'tor. That should be done sometime but probably not now.


Another idea is to deprecate queuedMessageBox, and uses an flag in the Options 
of usuals KMessageBox functions.
I already proposed this, but at this time, i was not aware of the existance of 
queuedMessageBox.
http://lists.kde.org/?l=kde-core-devel&m=106354200714192&w=2
(a patch is attached at this mail)

The advantage of this is that it's IMO a better API.
It uses the same functions names as normal messages box so it is esier to 
code.
And I even think that the flag should be there by deffault for messagesbox 
that doesn't ask questions.

Anyway, that unfortunately doesn't fix the above problem.


I would like to have your suggestions or idea to know in what dirrection i 
should go to add that checkbox on queued messageboxes.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20041017/faf02e26/attachment.sig>


More information about the kde-core-devel mailing list