Re: gdk_threads_enter/leave() in threaded and non threaded situation

2005-02-13 Thread Pablo
); // normal gdk_thread_enter/leave here GLC_THREADS_LEAVE(bIsThread); return 0; } Saludos. Pablo. - Original Message - From: "Stefan Kost" <[EMAIL PROTECTED]> To: Sent: Thursday, February 10, 2005 6:20 PM Subject: gdk_threads_enter/leave() in

Re: gdk_threads_enter/leave() in threaded and non threaded situation (SOLVED)

2005-02-12 Thread Stefan Kost
just a closing follow up. I found a solution in rythmbox sources : static GThread *main_thread = NULL; void rb_thread_helpers_init (void) { main_thread = g_thread_self (); } gboolean rb_thread_helpers_in_main_thread (void) { return (main_thread == g_thread_self ()); } void rb_thread_helpers_l

Re: gdk_threads_enter/leave() in threaded and non threaded situation

2005-02-11 Thread Stefan Kost
hi again, this with the thread was a bad idea ;). I now have a solution that is imho hacky. I wrap my g_object_set() call by gdk_threads_leave()/enter() to temporaily release the lock. Meanwhile I have downloaded the sources of a lot of gnome apps and now I will study how they do it. Thanks a l

Re: gdk_threads_enter/leave() in threaded and non threaded situation

2005-02-11 Thread Tristan Van Berkom
On Fri, 11 Feb 2005 19:06:44 +0100, Stefan Kost <[EMAIL PROTECTED]> wrote: [...] > The g_object_set() is called from a signal callback that gets triggered > by user action and thus already runs gdk_mutex protected. > Wrapping this with enter/leave would block. > I can wrap the g_object_notify() wit

Re: gdk_threads_enter/leave() in threaded and non threaded situation

2005-02-11 Thread Stefan Kost
another go in trying to make the situation clear. I have two place in the source that is causing the notify signal to be emited: A) core lib :: sequence.play() * when called from a gtk app it will run inside a thread * the method directly changes the property and calls g_object_notify() B) g

Re: gdk_threads_enter/leave() in threaded and non threaded situation

2005-02-11 Thread Stefan Kost
Hi hi, it is still not that simple :( I have a core lib, that is used by a commandline and by a gtk based app. All is gobject based. In the core lib I have an object A that has a property A.a. Now from the gtk app I set this property from a thread (when playing) and from my main thread (via user

Re: gdk_threads_enter/leave() in threaded and non threaded situation

2005-02-11 Thread Tristan Van Berkom
On Fri, 11 Feb 2005 09:46:41 +0200, Olexiy Avramchenko <[EMAIL PROTECTED]> wrote: > Stefan Kost wrote: > > hi hi, > Hello > > I have a gobject property that is set (via g_object_set()) from within a > > thread and from the main thread. > > Further I have signal handlers that watch this via notify::

Re: gdk_threads_enter/leave() in threaded and non threaded situation

2005-02-10 Thread Olexiy Avramchenko
Stefan Kost wrote: hi hi, Hello I have a gobject property that is set (via g_object_set()) from within a thread and from the main thread. Further I have signal handlers that watch this via notify::property. These signal handler call gtk functions. Therefore in these signal handlers the gtk part i

Re: gdk_threads_enter/leave() in threaded and non threaded situation

2005-02-10 Thread Peter Bloomfield
On 2005.02.10 16:20, Stefan Kost wrote: hi hi, I have a gobject property that is set (via g_object_set()) from within a thread and from the main thread. Further I have signal handlers that watch this via notify::property. These signal handler call gtk functions. Therefore in these signal hand

Re: gdk_threads_enter/leave() in threaded and non threaded situation

2005-02-10 Thread Tristan Van Berkom
On Thu, 10 Feb 2005 22:20:51 +0100, Stefan Kost <[EMAIL PROTECTED]> wrote: > hi hi, > > I have a gobject property that is set (via g_object_set()) from within a > thread and from the main thread. > Further I have signal handlers that watch this via notify::property. > These signal handler call gtk

gdk_threads_enter/leave() in threaded and non threaded situation

2005-02-10 Thread Stefan Kost
hi hi, I have a gobject property that is set (via g_object_set()) from within a thread and from the main thread. Further I have signal handlers that watch this via notify::property. These signal handler call gtk functions. Therefore in these signal handlers the gtk part is wrapped with gdk_thread