Thursday, April 25, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 489  / 2 Years ago, fri, may 6, 2022, 8:14:46

I've written a program that uses Notify-OSD but occasionally messages from my app will stack up in the queue. I've read about Notify-OSD merging However, it doesn't do this automatically - how can I get my application to merge notifications so they don't stream in one at a time?


More From » ayatana

 Answers
6

You can concatenate related notifications bubbles by setting the hint string x-canonical-append to true.



from gi.repository import Notify
Notify.init('test')

n = Notify.Notification.new('Summary', 'Line 1', 'dialog-information')
n.set_hint_string('x-canonical-append', 'true')
n.show()

n = Notify.Notification.new('Summary', 'Line 2', 'dialog-information')
n.set_hint_string('x-canonical-append', 'true')
n.show()


For more details see append-hint-python.py python example at http://bazaar.launchpad.net/~indicator-applet-developers/notify-osd/trunk/view/head:/examples/append-hint-example.py



Source: http://developer.ubuntu.com/resources/technologies/notification/#Concatenating_related_notification_bubbles


[#44622] Sunday, May 8, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
earxcept

Total Points: 310
Total Questions: 115
Total Answers: 111

Location: Japan
Member since Sat, Oct 2, 2021
3 Years ago
;