Timeout for KMessageBox (Was: Patch for KMessageBox)

Reinhold Kainhofer reinhold at kainhofer.com
Mon May 12 12:42:48 BST 2003


Nicolas Hadacek wrote:
> here is a patch that factors some code in KMessageBox.
> Furthermore, it provides API for using the "don't show again
> functionnality" outside a KMessageBox dialog (which is what I needed).

Speaking about KMessageBox, sometimes there is a need to have a timeout for
the message box. After some given time (like 30 seconds or so), the message
box should be cancelled if the user does not react to it. We use this e.g.
in KPilot to ask the user if the username of KPilot and the handheld don't
match when doing a sync. Currently, we just copied the whole method from
KMessageBox and added a timer which we connect to the cancel slot. Of
course, this is a lot of code duplication, and  any changes to KMessageBox
are not applied to our own boxes, so I'd like to have it in KMessageBox
directly.

Is this a functionality that would be handy somewhere else so that it
justifies extending KMessageBox? If so, I'd prepare a patch to KMessageBox
in the next few weeks.

Reinhold




More information about the kde-core-devel mailing list