I am using PyGObject with Python 3 and I want to display a notification using a Notify.Notification
which has a progress bar in it. The progress bar doesn't need to update on its own/asynchronously or anything - it can (and should) be static, updating only when I manually set a new value then tell the notification to show. I'm after something like a volume notification showing the new volume as you change it.
I have been unable to find any way to do this searching documentation such as this, is this possible using PyGObject? Alternatively is there another Python 3 library which would allow this behaviour?
I'm currently showing notifications with text-based progress similar to this:
import gi
gi.require_version('Notify', '0.7')
from gi.repository import Notify
def __init___(self):
...
Notify.init("Progress")
self.notification = Notify.Notification(summary='Progress', body='0%')
self.notification.set_image_from_pixbuf(notification_image)
...
def on_progress_update(self, progress):
...
self.notification.update('Progress', str(progress) + '%', None)
self.notification.show()
...