[PATCH] Detecting notification popup server capabilities
Olivier Goffart
ogoffart at kde.org
Tue Sep 1 08:01:28 BST 2009
Le Monday 31 August 2009, Aurélien Gâteau a écrit :
> Olivier Goffart wrote:
> > Because the user may configure each notification not to show any popup,
> > or to do something else, the programmer may never rely on the popup
> > being show or having all the action.
> >
> > So what is the use case for this?
> >
> > If the developper of an application whish to show a popup that will
> > always be seen, and expect always an action in return, KNotification is
> > not the right thing to use, and it is better to use the visual
> > notification dirrectly to do it. (But there is no such API)
>
> Very true. What could be done is to add a member method like this:
>
> bool KNotification::supportActions() const
>
> This method would check whether the knotify plugins associated with this
> notification support actions. knotify would then do something like this:
>
> for plugin in pluginSelectedForThisNotification:
> if plugin.supportActions():
> return True
> return False
>
> In the current implementation, all plugins would return False in
> supportActions(), except NotifyByPopup which would return True if the
> current popup server supports actions.
>
> Would it make sense to implement this?
Which application would need this and what for?
More information about the kde-core-devel
mailing list