开发者

GTK Widget object naming

开发者 https://www.devze.com 2023-01-19 17:36 出处:网络
I am writting a PyGTK application. I am using the glade interface designer for layouts. I want to know if there is any standard way of naming a Widget object.

I am writting a PyGTK application. I am using the glade interface designer for layouts.

I want to know if there is any standard way of naming a Widget object.

eg : For a button called "Configure" how should I name it ? eg : ConfigureBt, ButtonConfigure, ConfigureButton, etc

I want the app to be accepted in the default ubuntu/debian/gnome setup. I want to follow all 开发者_运维知识库the standards requirements for it.


There's no "official" standard, but you'll save yourself headaches if you use lowercase, underscore separated names (eg. refresh_button). That way, signal handlers can be called eg. refresh_button_clicked, and Glade can automatically connect to them. Then it will match up nicely with Python coding standards.

0

精彩评论

暂无评论...
验证码 换一张
取 消