View Full Version : Pynotify to an image.
solarwind
February 27th, 2008, 11:43 PM
Hey all,
How can I add a pynotify to a gtk.Image or gtk.Eventbox?
G|N|
February 28th, 2008, 03:28 PM
First you need to know the position of the image or eventbox:
x = widget.get_allocation()[1][0]
y = widget.get_allocation()[1][1]
After create the notification:
toast = pynotify.Notification("title","body")
toast.set_hint("x", x)
toast.set_hint("y", y)
toast.show()
That should work :)
solarwind
February 28th, 2008, 09:27 PM
First you need to know the position of the image or eventbox:
x = widget.get_allocation()[1][0]
y = widget.get_allocation()[1][1]
After create the notification:
toast = pynotify.Notification("title","body")
toast.set_hint("x", x)
toast.set_hint("y", y)
toast.show()
That should work :)
Thanks! I used a different method but this should work too!
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.