call gui routines only from main thread

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>