Notices


Reply
Thread Tools
Posts: 2 | Thanked: 0 times | Joined on Dec 2009
#1
Most of the python programs I'm trying to run on my N900 fails with this or a very similar error message:

button = hildon.GtkButton(gtk.HILDON_SIZE_AUTO)
AttributeError: 'module' object has no attribute 'HILDON_SIZE_AUTO'

What package am I missing, or have I installed something in a wrong way?
 
thp's Avatar
Posts: 1,390 | Thanked: 4,262 times | Joined on Sep 2007 @ Vienna, Austria
#2
Originally Posted by Cyrgon View Post
Most of the python programs I'm trying to run on my N900 fails with this or a very similar error message:

button = hildon.GtkButton(gtk.HILDON_SIZE_AUTO)
AttributeError: 'module' object has no attribute 'HILDON_SIZE_AUTO'

What package am I missing, or have I installed something in a wrong way?
You probably want to use HILDON_SIZE_FINGER_HEIGHT or HILDON_SIZE_THUMB_HEIGHT and maybe (OR-ed using '|') HILDON_SIZE_AUTO_WIDTH. Also, you probably want to use hildon.Button instead of hildon.GtkButton. Make sure you have the latest version of python-gtk2 and python-hildon installed.

Code:
~ $ python
>>> import gtk
>>> print '\n'.join(x for x in dir(gtk) if x.startswith('HILDON_SIZE_'))
HILDON_SIZE_AUTO
HILDON_SIZE_AUTO_HEIGHT
HILDON_SIZE_AUTO_WIDTH
HILDON_SIZE_FINGER_HEIGHT
HILDON_SIZE_FULLSCREEN_WIDTH
HILDON_SIZE_HALFSCREEN_WIDTH
HILDON_SIZE_THUMB_HEIGHT
 

The Following User Says Thank You to thp For This Useful Post:
Posts: 2 | Thanked: 0 times | Joined on Dec 2009
#3
python-gtk2 instead of python2.5-gtk2 did the trick. Thanks. =)
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 03:38.