Re: GTK app with scrolled window crashing trying to show a widget inside



Thank you very much for your immediate response, this resolved my
problem!

Am Freitag, den 30.12.2011, 10:08 -0700 schrieb Michael Torrie:
On 12/30/2011 05:52 AM, David NeÄas wrote:
On Fri, Dec 30, 2011 at 01:28:32PM +0100, Moritz Renftle wrote:
i want to make one of those widgets visible from
another thread

Use glib.idle_add() in that other thread to subsequently execute the
actual Gtk+ code in the thread running the Gtk+ main loop.

http://unpythonic.blogspot.com/2007/08/using-threads-in-pygtk.html

It used to be that threading issues came up every week on the list.  As
David says, the recommended way is using idle_add.  However if you use
gdk locks appropriately, on Linux you can call Gtk calls directly from
threaded code.

http://www.pardon-sleeuwaegen.be/antoon/python/page0.html

But since this won't work so well on Windows, the idle_add() technique
is recommended as it is most safe and most portable.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]