Re: Help with fixing a notifications issue

2013-05-17 Thread Aaron J. Seigo
On Thursday, May 16, 2013 21:44:02 Daniel Vrátil wrote:
 So...ideas? :-)

imho, in the 4.x libraries, we simply have to rely on applications to get it 
right: if you have actions in your notification, make them persistent.

the notification applet could probably be improved to hide the actions once the 
notification has expired. there is an expireTimeout member in the model.

for Frameworks 5, KNotificatio is set for a re-vamp anyways. things that were 
proposed have included:

* getting rid of the knotify daemon and moving everything in-process
* fix the situation with actions (as you've found for yourself :)
* add categories and urgencies so they can be sorted (as seen in the latest 
revision of the galago spec; no point in diverging at this point)

I know that Sune Vuorela was going to be (or is?) working on this at some 
point, so maybe you could catch up with him and discuss further ..

-- 
Aaron J. Seigo

signature.asc
Description: This is a digitally signed message part.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Help with fixing a notifications issue

2013-05-16 Thread Daniel Vrátil
Heya,

I've been playing with notifications in KDE Telepathy again and run into some 
issues with implementation of the Notifications applet in Plasma and 
KNotifications in general. After some debugging I realized that one of the 
problems is bigger than I though and since I haven't worked with notifications 
before, I could use some directions :-)

The problem is that when an application creates a KNotification with some 
actions (Accept/Reject for instance), the notification is not persistent by 
default. That means, that everything works (the actionXActivated() signals are 
emitted when an action is clicked), but only for the first 6 seconds. After 
that the notification expires and is removed from manager. However nothing 
happens in the Notification applet. The notification is still there, the 
buttons 
are shown,  but when you click them, nothing happens, because 
KNotificationManager discards the signal since it does not know the expired 
notification anymore.

As a result, we are getting bug reports that users are sometimes not able to 
Accept or Reject file transfer notifications. (We could try closing these 
as 
WONTFIX You are too slow, but I'd like to have a better solution :-))).

I believe there are two solutions to this: 

1) Disable the buttons when notification expires. I'm afraid however that there 
is no way for the notification to know it has expired, or is there?

2) Change the behavior so that notifications with at least one action are 
persistent by default. This could however break apps and cause memory leaks.

So...ideas? :-)

Thanks

Dan

-- 
Daniel Vrátil
Associate Software Engineer, KDE Desktop Team
Red Hat, Inc

GPG Key: 0xC59D614F6F4AE348
Fingerprint: 4EC1 86E3 C54E 0B39 5FDD B5FB C59D 614F 6F4A E348

signature.asc
Description: This is a digitally signed message part.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel