Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试编写一个 Rhythmbox 插件,并且需要在左侧面板中添加另一个条目,以允许用户切换到我的插件提供的新“页面”。不幸的是,我能找到的关于编写 RB 插件的唯一资源就是这个,我无法仅仅用它来弄清楚。
我不是经验丰富的 GTK 开发人员,但我知道基础知识。
有人知道怎么做这个吗?
我假设您想在 Rhythmbox 的源面板中添加一个新项目。
您需要RB.Source使用 gobject 子类化并注册它gobject.type_register(ClassName)。
RB.Source
gobject.type_register(ClassName)
这是一个使用 new的示例gi.repository,还有很多不使用的示例。
gi.repository
阅读您提到的链接中的“在工具栏和菜单以外的地方添加 UI”部分。