将gtkglade转换为libglade以实现向后兼容性 [英] convert gtkglade to libglade for a backwards compatibility

查看:125
本文介绍了将gtkglade转换为libglade以实现向后兼容性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个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以实现向后兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆