using Gtk.Application.Invoke to execute the callback on the main thread