开发者

How to display a status message in the Gnome panel?

I have a Gnome applet I've been working on. It is written in Python and it displays the progress of something in a small label.

My question is: what is the best way to display status notific开发者_运维问答ations to the user? On Ubuntu, I notice that whenever I connect to a network or adjust the volume, a black box appears in the upper-right corner. Is there a way to do something like that with Python?


You can use pynotify, there isn't much documentation but it's usage is pretty straightforward. Example:

import pynotify    
pynotify.Notification ("WiFi connection lost","","notification-network-wireless-disconnected")

See also: https://wiki.ubuntu.com/NotificationDevelopmentGuidelines

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜