[f18-alpha] [PATCH] Use Gtk.main_level() to check if main loop is already running

Vratislav Podzimek vpodzime at redhat.com
Tue Aug 28 08:34:46 UTC 2012


On Mon, 2012-08-27 at 10:56 -0400, Chris Lumens wrote:
> > 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.
Yeah, I was looking at the docs yesterday. Weird thing is, that it had
been working in older images.
I will add one line to this patch before pushing:

print "Unexpected error appeared, look at /tmp/anaconda-tb-* file(s) for
more details"

for cases when importing Gtk failed and thus likely no GUI will appear.


-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list