Notification spec issue: Ability to assign an icon *and* an image to a notification

Aurélien Gâteau aurelien.gateau at canonical.com
Thu Jun 25 06:06:48 PDT 2009


Olivier Goffart wrote:
> Le Wednesday 24 June 2009, Aurélien Gâteau a écrit :
>> Christian Hammond wrote:
>>> The proposal sounds good to me :) I'd like to hear what others think,
>>> but I'd say it's worth doing a prototype.
>> More prototypes!
>>
>> I uploaded all my patchsets here:
>>
>> http://people.canonical.com/~agateau/notifications-0.10/
>>
>> There are patches for libnotify, notification-daemon, kdebase and
>> notify-osd.
>>
>> Please give them a try.
> 
> I only looked at the kdebae patch.
> Appart from the name that Aaron already mentioned:
> 
> 
> in knotify/notifybypopup.cpp:
> -	int timeout = !timeoutStr.isEmpty() ? timeoutStr.toInt() : 0;
> +	// -1 means: notification server decides
> +	int timeout = !timeoutStr.isEmpty() ? timeoutStr.toInt() : -1;
> 
> That's wrong.  We do not want any timeout.  The norification has to stay 
> forever until it is closed by the user or by the client application.

There are multiple ways to define a notification timeout in KDE:

- Show a notification using the KNotification::CloseOnTimeout flag (on
by default). Then you get a 6 seconds timeout.

- Define the "Timeout" key in your knotifyrc file (which no one seems to
do[1]) then you get a static timeout in seconds. My understanding is
that if you use KNotification::CloseOnTimeout together with this key,
then the notification will be closed in 6 seconds even if "Timeout" is
set to a higher value (haven't tried it though).

Since the "Timeout" key is virtually unused, we could fix this by having
KNotificationManager tell KNotify whether the notification is persistent
or not. KNotify would translate this to a notification spec timeout:
Persistent => 0, CloseOnTimeout => -1.

> I am not sure the image can still possibly works on kde with this patch.

I do not understand what you mean.

Aurélien

[1] I did a case insensitive grep for "timeout" on the kde modules I
have (kdebase, kdeedu, kdegames, kdegraphics, kdelibs, kdemultimedia,
kdenetwork, kdepim, kdepimlibs, kdeplasma-addons, kdesdk, kdeutils) and
could not find a single instance of it in the 45 knotifyrc files I found.


More information about the xdg mailing list