views:

15

answers:

1

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.

+1  A: 

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.

detly
Good answer, except your postscript confuses Glade the interface designer application and Glade the library. Glade the application has produced GtkBuilder files for several years now. Glade the library is indeed deprecated.
ptomato
Thanks @ptomato - I deleted that bit. When I read the question the first time, I misread that bit.
detly