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

Till Krech till at snafu.de
Sun Jul 7 13:24:43 BST 2002


Hi,
On Sunday 07 July 2002 11:04, Ingo Klöcker wrote:
> 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

I completely agree.
>
> 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.
>
I think it would be better to improve the configuration. This would be done 
once and any KDE program could benefit from it. All we need is an additional, 
more application centric view onto the knotify settings than the available 
global one. What about a new "Settings" entry "Configure Events..." in the 
menubar or something better ;-), which will automatically appear in any 
program which uses Knotify events ?
This would mean Solution #1 with improvements of the Knotify configuration.
I'll look into that.
The execution of commands however should be handled by kmail directly. I think 
it would perhaps be a bit dangerous to have this in the Knotify settings and 
if a program would be executed from there it could also not be parmetrized. 

I will commit the simple patch, as Ingo agreed with that. It really makes a 
big difference to be able to distinguish between vi esc key presses and the 
arrival of new mail.

greetings, till

> Regards,
> Ingo
>
> _______________________________________________
> KMail Developers mailing list
> kmail at mail.kde.org
> http://mail.kde.org/mailman/listinfo/kmail

-- 
SuSE Linux 8.0 (i386) 2.4.18-64GB-SMP
KDE: 3.0.6 (KDE 3.1 alpha1)
Qt: 3.0.4





More information about the kde-core-devel mailing list