Fix Py3 exception in GTK plugin.
Merge pull request #792 from stefanv/gtk_py3

Fix Py3 exception in GTK plugin.