Usage of KNotify in programs (was: Re: Sound in KMail)

Ingo Klöcker kloecker at kde.org
Sun Jul 7 10:04:37 BST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Till! Hi all!

On Sunday 07 July 2002 01:30, Till Krech wrote:
> Trivial patch and eventsrc file for kmail attached. Apply in
> kdenetwork/kmail, recompile, go to KDE Control Center / Sound /
> System Notifications and choose your preferred sound :). Beep works
> as before.

Thanks for the patch.

I think it's not very intuitive that the user has to configure some "New 
Mail" actions in the Control Center while he can configure other "New 
Mail" actions in KMail directly.

Solution #1:
Use only KNotify.
Advantages:
- - It's a clean solution and uses the powerful tools provided by KDE.
Disadvantages:
- - AFAICS KNotify doesn't support running an arbitrary command on an 
event. (wishlist item?)
- - Probably more than one "You have new mail" message box will be shown 
if multiple "New Mail" events occur (e.g. when the user is away from 
his terminal for some time). But maybe KNotify is smart enough to not 
do this.
- - The user probably won't find the place where he can configure the "New 
Mail" events (because almost no program uses this KDE feature). A 
solution for this would be to make it possible to call the System 
Notifications configuration directly from KMail.

Solution #2:
Don't use KNotify but add sound playing directly to KMail.
Advantages:
- - KMail can run arbitrary commands on "New Mail".
- - Only one "You have new mail" messages box is shown even if multiple 
"New Mail" events occur.
Disadvantages:
- - It's ugly because KNotify already supports playing of arbitrary sounds 
and makes it configurable in a centralized way.

To sum up:
Your solution is nice but it's (as is) just another work around for the 
problem of playing an arbitrary sound on "New Mail". As the patch is 
really absolutely trivial you can IMO commit it. But currently I would 
prefer Solution #2 (although it's the uglier solution) unless the 
disadvantages of Solution #1 can be overcome.

Regards,
Ingo

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9KAQmGnR+RTDgudgRAtcZAKDbyYUyuaG0P4m+G18duJVpA9RfHgCgw2Cc
8MVwBX4enBMbGV7/mmcqak8=
=EFwj
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list