使用 libnotify 显示通知时可以使用哪些图标?
我正在使用 libnotify 库在 Ubuntu 中显示通知。理想情况下,我希望显示某种电池(因为我的应用程序是电池表)。
我可以使用的图标类型有:
指定图标文件名的 URI(例如 file://path/to/my-icon.png)
“库存”图标名称。能够成功调用 gtk_icontheme_lookup() 的图标(例如“stock-delete”) 注意:这些不一定是正常的 GTK 库存图标 - 任何主题图标都可以。
a pixbuf
我理想地希望使用选项#2,但是我找不到可用图标的名称。如何找到可用的图标?
I'm using the libnotify library to display a notification in Ubuntu. I would ideally like to display a battery of some sort (since my app is a battery meter).
The types of icons I can use are:
a URI specifying the icon file name (e.g. file://path/to/my-icon.png)
a 'stock' icon name. One that would succeed in a call to gtk_icontheme_lookup() (e.g. 'stock-delete') Note: these are not necessarily normal GTK stock icons - any theme icon will work.
a pixbuf
I would ideally like to use option #2, however I can't find out the names of the available icons. How can I find which icons are available?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以使用 pygtk 本身轻松找到:
在我的机器上,打印:
You can easily find out using pygtk itself:
On my machine, this prints:
您可以在免费桌面图标命名规范< /a>.看起来您需要的图标是“电池”、“电池警告”和“电池电量低”。
You can look it up in the Free Desktop Icon Naming Specification. It looks like the icons you need are "battery", "battery-caution", and "battery-low".
图标在“freedesktop icon-theme-spec”中指定,您可以在此处阅读:
https://specations.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html#directory_layout
HOME/.icons
/usr/share/icons
/usr/share/pixmaps
The icons are specify in "freedesktop icon-theme-spec", you can read here:
https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html#directory_layout
HOME/.icons
/usr/share/icons
/usr/share/pixmaps