KMessageBox customizable cancel button

Olivier Goffart ogoffart at kde.org
Tue Mar 27 11:05:04 BST 2007


Le dimanche 25 mars 2007, Thomas Friedrichsmeier a écrit :
> Hi!
>
> I've already written about this several month ago:
> http://lists.kde.org/?l=kde-core-devel&m=115910932301884&w=2 .
> Unfortunately, the final patch wasn't well timed. It was aKademy, and
> nobody took care of it. Now I've finally taken the time to bring the patch
> back up to date. Please, somebody apply this patch (or give me an SVN
> account, if you prefer).
>
> Short summary:
> Add an argument "buttonCancel" to all KMessageBox::*Cancel* functions. This
> will allow applications to say, e.g.: "Save", "Discard", "Don't quit",
> instead of just "Save", "Discard", "Cancel" (what does cancel mean?).

Hi,
I think that this is a feature usefull to have.


Anyway, I don't like the existing API of KMessageBox with all theses argument.

An API which maybe could be nice would be

KMessageBox box(
         KMessageBox::YesNoCancel, "Message", "caption", "dontaskagainsave");
box.setYesButton( i18n("Save") );
box.setNoButton( i18n("Discard") );
box.setCancelButton( i18n("Don't quit") );
int result = box.exec();


Anyway, this represent a big change that i don't have the time to do myself.

So I have nothing to say about your patch (which seems ok, but i have not 
reviewed all details) 
-------------- 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/20070327/b213f8b7/attachment.sig>


More information about the kde-core-devel mailing list