updated for new API
- updated to work with QGIS api 1.8 and 2.0+
- crash solved, caused by infinite loop of chained gui elements