Use connect(..., gui_thread()) rather than g_idle_add().

Use the proper functions to ensure things happen in the main gui thread,
instead of fudging around with g_idle_add().