Port for Gedit 3.12 and Python3