gtk3 test: reduce variable scope