Rework for python3 and gtk3.