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_lock_gdk (void) {
   if (!rb_thread_helpers_in_main_thread ())  gdk_threads_enter ();
}

void rb_thread_helpers_unlock_gdk (void) {
   if (!rb_thread_helpers_in_main_thread ()) gdk_threads_leave ();
}

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to