在PyGObject上关闭系统任务栏图标 [英] Shutdown system tray icon on PyGObject

查看:52
本文介绍了在PyGObject上关闭系统任务栏图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对程序的看法:托盘中的图标,单击鼠标左键会打开一个带有关机,重启等按钮的窗口.

My vision of the program: icon in tray, left click on icon opens a window with shutdown, reboot, etc. buttons.

新的Gnome规范建议改为使用通知.

The new Gnome specification advises to use notifications instead.

StatusIcon>!(从3.14版开始不推荐使用:使用通知)

StatusIcon >! (Deprecated since version 3.14: Use notifications)

不幸的是,我没有找到 Notify.Notification 可以显示在托盘中.我发现的唯一东西是 AppIndicator3.Indicator ,但其构造函数只能使用Gtk.Menu,这是不合适的.

Unfortunately, I didn't find how Notify.Notification can be displayed in the tray. The only thing that I found is AppIndicator3.Indicator, but its constructor can only take a Gtk.Menu, which is unsuitable.

我可以使用哪些课程?

推荐答案

由于评论,我使用了GtkStatusIcon

I had used GtkStatusIcon due to comments

这篇关于在PyGObject上关闭系统任务栏图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆