Re: Status report 'Refactoring Deskbar-Applet' 02.07.2007
- From: Sebastian Pölsterl <marduk k-d-w org>
- To: "Nickolay V. Shmyrev" <nshmyrev yandex ru>
- Cc: gnome-soc-list gnome org
- Subject: Re: Status report 'Refactoring Deskbar-Applet' 02.07.2007
- Date: Thu, 05 Jul 2007 10:38:52 +0200
Nickolay V. Shmyrev schrieb:
> В Пнд, 02/07/2007 в 22:01 +0200, Sebastian Pölsterl пишет:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> blog entry at http://www.k-d-w.org/news/17/15.html
>>
>> Hi!
>>
>> Unfortunatly, I made even less changes to Deskbar-Applet than last week.
>> I did some minor changes and
>> started on integrating new-stuff-manager[1] support for Deskbar.
>>
>> I ran into a very annoying problem with threads in GTK+. I know that
>> GTK+ is only thread-aware and you
>> have to surround the critical parts with gtk.gdk.threads_enter() and
>> gtk.gdk.threads_leave(). I already did
>> this where the results are added to the ListStore/TreeView storing the
>> matches. However, now and then I get
>> a Xlib asynchronous error. I couldn't find a situation where I can
>> reproduce this error reliably. I would be
>> glad if anybody could give some tips on working with threads and GTK+.
>
> Looking at your main file:
>
> http://svn.gnome.org/viewcvs/deskbar-applet/branches/GSOC_2007/deskbar/gsoc_deskbar.py?revision=1328&view=markup
>
> I see gtk.main() isn't surrounded by gdk.threads_enter/leave(). It's
> probably not the case in python but in C you have to surround mainloop
> by locks:
>
> http://developer.gnome.org/doc/API/2.0/gdk/gdk-Threads.html
>
> I may be wrong though
The problem is that I only call gtk.main() if the applet has been
started in debug mode (i.e. in a separate window). If the Deskbar runs
as applet there's no gtk.main call.
--
Greetings,
Sebastian Pölsterl
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]