[PATCH] Detecting notification popup server capabilities

Olivier Goffart ogoffart at kde.org
Fri Sep 4 00:12:14 BST 2009


Le Friday 04 September 2009, John Tapsell a écrit :
> 2009/9/3 Marco Martin <notmart at gmail.com>:
> > they are really a model/view approach, and the model shouldn't need to
> > know about the view

exactly.

>
> I think it's reasonable for applications to optionally provide a
> second string. E.g.
>
>  KNotification *notify=new KNotification("new_message");
>  notify->setText(i18n("Download complete.  Click view to view") ,
> message->from() );
>  notify->setActions( i18n("View,Ignore").split(',') );
>  notify->setNoActionText(i18n("Download complete"));
>
>
> I can't think of a decent example where you'd want different text when
> no actions are available, but maybe also useful so that you could do
> notify->setNoActionText("")  or something for the action to be ignored
> if actions aren't supported.



Application should not do that.  
Again, they should not rely on the action being show.  The text may be use by 
another presentation (OSD, ktts, log, ...)

The action should be just additional information that may or may not be 
displayed.

Your example is wrong, and i can't think either of a good use case for it.






More information about the kde-core-devel mailing list