使用 pygtk 的简单托盘图标应用程序

发布于 2024-07-29 01:30:41 字数 124 浏览 3 评论 0原文

我正在用 python 编写一个网络邮件检查器,我希望它只是位于托盘图标上,并在有新电子邮件时警告我。 就 gtk 代码而言,有人能指出我正确的方向吗?

我已经编写了检查新电子邮件所需的代码,但现在是 CLI。

I'm writing a webmail checker in python and I want it to just sit on the tray icon and warn me when there is a new email. Could anyone point me in the right direction as far as the gtk code?

I already coded the bits necessary to check for new email but it's CLI right now.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

堇色安年 2024-08-05 01:30:41

您将需要使用 gtk.StatusIcon 来实际显示图标。 这里是文档。 如果您刚刚开始使用 GUI 编程,您可能需要学习一些 pygtk 教程< /a>.

You'll want to use a gtk.StatusIcon to actually display the icon. Here are the docs. If you're just getting started with gui programming you might want to work though a bit of the pygtk tutorial.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文