问题描述
我有一个python gtk应用程序,正在将其移植到只能使用pygtk2.10的环境中. pygtk2.10不使用gtkbuilder基础设施,而是libglade基础设施,我有两个目标
I have a python gtk app that I am porting to an environment that can only use pygtk2.10. pygtk2.10 doesn't not use the gtkbuilder infrastructure but rather the libglade infrastructure I have a 2 goals
1)将gtkbuilder林间空地文件格式转换为libglade格式.基本上我想做gtk-builder-convert的相反操作(据我所知,它将libglade转换为gtkbuilder格式)
1) convert the gtkbuilder glade file format to libglade format. Basically I want to do the opposite of gtk-builder-convert (which converts libglade to gtkbuilder formats as far as I understand it)
2)找到gtk.builder函数和libglade函数之间的映射在功能上是相同的
2) find a mapping between gtk.builder functions and libglade functions to be functionally the same
感谢您的帮助
推荐答案
要解决#1,您仍然可以在Glade中保存Libglade文件. 保存"对话框底部有一个控件,您可以在其中选择Libglade或GtkBuilder.
To solve #1, you can still save Libglade files in Glade. There is a control at the bottom of the Save dialog where you can select Libglade or GtkBuilder.
要解决第二个问题,建议您阅读 gtk.Builder 和 gtk.glade.XML 并找出合适的方法到您在应用程序中使用每个应用程序的方式.
To solve #2, I suggest you read the documentation of gtk.Builder and gtk.glade.XML and find out what is appropriate to the way you use each one in your application.
这篇关于将gtkglade转换为libglade以实现向后兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!