Bug 314357

Summary: Action buttons in notifications don't work
Product: [Unmaintained] kdelibs Reporter: Daniel Vrátil <dvratil>
Component: knotifyAssignee: Marco Martin <notmart>
Status: RESOLVED FIXED    
Severity: major CC: cfeck, christoph, Tanktalus
Priority: NOR    
Version: 4.9.98 RC3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Daniel Vrátil 2013-02-03 14:46:41 UTC
The action buttons don't work. When you click a button, it disappears, but KNotification does not emit action1Activated() signal.

A bit of debugging revealed that immediately after the notification appears KNotificationManager::notificationClosed() is called, dropping the event from KNotificationManager. When you click a button later KNotificationManager::notificationActivated() does nothing, because KNotificationManager does not know the notification anymore.


Reproducible: Always

Steps to Reproduce:
1. Install KDE Telepathy
2. Ask someone to send you a file
3. A notification with "Accept" and "Reject" buttons appear
4. Click any button
Actual Results:  
Nothing happens (file transfer is not accepted or rejected)

Expected Results:  
KNotification emits action1Activated().

Please let me know if you need any more info.
Comment 1 Christoph Feck 2013-02-04 23:58:22 UTC
Did it work in KDE 4.9? If yes, it might be related to the Plasma changes.
Comment 2 Daniel Vrátil 2013-02-05 11:45:32 UTC
Yes, the buttons work in KDE 4.9.5.
Comment 3 Daniel Vrátil 2013-02-07 10:20:00 UTC
Another issue that this causes is that calling KNotification::close() does not work (notification does not disappear), because KNotificationManager is no longer aware of it.
Comment 4 Christoph Feck 2013-02-14 23:43:41 UTC
This could be a duplicate of bug 314595, can you check if the instructions there also apply to this bug?
Comment 5 Daniel Vrátil 2013-02-15 10:47:39 UTC
No, the bug you linked is about KStatusNotifierItem, which just adds an icon into systray. This works for us perfectly, even without using any ID. 

See http://quickgit.kde.org/?p=ktp-approver.git&a=blob&f=src%2Ftubechannelapprover.cpp, line 100 for our usecase.
Comment 6 Christoph Cullmann 2024-06-20 19:16:50 UTC
This seems to work in Plasma 6 for me.