widgets: gtk functions should only be called from the main thread