开发 gnome 面板小程序的最新方法是什么(使用 python)
今天我已经切换到 GNOME(从 XFCE)并发现缺少一些很酷的东西,我想(尝试)自己做它们。我试图找到有关如何开发 Gnome 小程序(您放置在面板中的项目)的信息,并且最有可能使用 Python,但这不是一个硬性限制。
我找到了文章“Gnome applet with Python”,但它似乎很旧(2004) 。首先提到的是 bonobo
(无论它是什么),但是 Bonobo 上的 Gnome 页面< /a> 阻止它。
Gnome 站点有一个关于小程序开发的页面,但是这个页面更旧(2003)并且不完整(很多fixme write
)。
那么目前的做法是什么?我不想学一些过时的东西。
Today I've switched to GNOME (from XFCE) and found some of the cool stuff missing and I would like to (try to) do them on my own. I tried to find information on how to develop Gnome applets (items you place within the panel) and most likely in Python, but it's not a hard limitation.
I found the article 'Gnome applets with Python', but it seems quite old (2004). The first thing mentioned there is bonobo
(whatever it is), but Gnome page on Bonobo discourages it.
Gnome site has a page on applet development, but this one is even older (2003) and incomplete (lot of fixme write
).
What is the current approach then? I wouldn't want to learn something outdated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Ubuntu 论坛上 2008 年有一篇名为 Gnome Panel Applets in Python 的文章可能会有所帮助有了这个。
这包括定义 bonobo 组件。这个有关小程序开发的 Gnome 文档指出
因此看起来这是正确的方法。
Theres an article called Gnome Panel Applets in Python from 2008 on the Ubuntu forums that may help with this.
This includes defining a bonobo component. This Gnome documentation on applet development states that
So it looks like that is the correct way to go.
如果其他人遇到这个问题,在 Robert Christie 的回答中链接的论坛帖子中,一位用户指出,如果您只是寻找托盘图标功能(而不是说时钟或主菜单小程序)。此外,如果您认为需要倭黑猩猩,您可能应该使用 D-Bus。
In case anyone else comes across this question, in the forum post linked in Robert Christie's answer a user pointed out that simply using gtk.StatusIcon() is a more portable solution if you're just looking for tray icon functionality (as opposed to say a clock, or main menu applet). Additionally, if you think you need bonobo you should probably be using D-Bus anyways.