PyGObject 上的关闭系统托盘图标

Shutdown system tray icon on PyGObject

我对该程序的看法:托盘中的图标,左键单击图标会打开一个 window,其中包含关机、重启等按钮。

新的 Gnome 规范建议改用通知。

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

很遗憾,我没有找到如何Notify.Notification can be displayed in the tray. The only thing that I found is AppIndicator3.Indicator,但是它的构造函数只能带一个Gtk.Menu,这是不合适的。

我可以使用哪个类?

由于评论,我使用了 GtkStatusIcon