For some reason GLib.main_depth() stopped working and returns 0
even if Gtk.main loop is already running. This leads to crashes
and hangs of whole GUI when exception appears in a thread
different from the main one.
Yeah, I think this is how it's supposed to work. If you look at the
docs for g_main_depth, you'll see it returns a 0 when called from the
toplevel, and a number depending on how many recursive calls are stacked
up.
So yeah, Gtk.main_level looks to be the right thing to use here.
- Chris