[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: [PATCH] Detecting notification popup server capabilities
From:       Aurélien Gâteau <aurelien.gateau () canonical ! com>
Date:       2009-08-31 7:47:33
Message-ID: 4A9B8015.9080005 () canonical ! com
[Download RAW message or body]

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?

Aurelien
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic