[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:       John Tapsell <johnflux () gmail ! com>
Date:       2009-09-03 22:05:02
Message-ID: 43d8ce650909031505x4779b4fbn2a5a1ee3a5289a71 () mail ! gmail ! com
[Download RAW message or body]

2009/9/3 Marco Martin <notmart@gmail.com>:
> On 8/28/09, Aurélien Gâteau <aurelien.gateau@canonical.com> wrote:
>> Sebastian Trüg a écrit :
>>> sounds like a weird solution to me. What are apps supposed to do in such a
>>>
>>> case? Just not add actions? That can be handled on another level I
>>> suppose.
>>
>> I was indeed thinking about this: just letting knotify discard the
>> action if the notification server does not support them. I can easily
>> provide a patch to do this.
> that's the best way
>
>>
>> Still, I think it's useful to let applications know whether actions are
>> supported or not. This way they can switch to other means of
> they are really a model/view approach, and the model shouldn't need to
> know about the view

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.

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

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