#! /usr/bin/python # To change this template, choose Tools | Templates # and open the template in the editor. __author__="bjschuma" __date__ ="$Apr 25, 2010 7:14:31 PM$" import gtk import guibuilder class Align(gtk.Alignment): def __init__(self,attrs): xalign = 0.0 yalign = 0.0 xscale = 0.0 yscale = 0.0 for a in attrs: if a == "xalign": xalign = float( attrs[a] ) elif a == "yalign": yalign = float( attrs[a] ) elif a == "xscale": xscale = float( attrs[a] ) elif a == "yscale": yscale = float( attrs[a] ) gtk.Alignment.__init__(self,xalign,yalign,xscale,yscale) self.show() def make_align(attrs):return Align(attrs) guibuilder.parts["align"] = make_align