gtk3: make one sample script gtk3 ready

Please look at commit messages for more details.