[Kde-pim] Notifications on KMail

Artur Souza (MoRpHeUz) asouza at kde.org
Wed Jul 14 22:56:51 BST 2010


2010/7/14 Ingo Klöcker <kloecker at kde.org>:
> Let's say the composer needs to ask the user which OpenPGP keys shall be
> used for encrypting the message. If there was a callback then the
> composer would simply call this callback. The UI component would then
> show the dialog and return the list of OpenPGP keys as return value of
> the callback. After the callback returns the composer can continue its
> work.

+1 for your solution on this use case!

> In the signal/slot scenario at least that component that connects the
> signals with the slots needs to know the provider of the signals and the
> provider of the slots.

I think that now I understood the reason behind your suggestion,
thanks for the explanation! For the use cases that you pointed out I
agree that callbacks make more sense.

However, I was talking about just the "failed()" and "success()"
signals that are already used everywhere in the composer window for
example. This signals are mainly for reporting and usually just
connected to one slot each.

I agree that when you need any kind of input from the user it's way
better to use the callback mechanism that you just explained. At first
I was just doing a comparison between the way that the failed() and
success() signals are treated in the UI (KMessageBox vs KNotify) and
tried to show the scenarios where one or another were already used.

Do you think that for this specific use case of reporting what
happened (fail/success) we still need the callback? As there is no
user interaction (it's just a mechanism to allow the user to know what
happened) I tend to think that just KNotify would be good enough for
the job and for more complex scenarios (like asking which OpenGPG key
the user wants to use) we could go with the callback mechanism.

Cheers!

Artur
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list