modified in ad-hoc to support to gtk-0.13