gajim crashes on statup (threads_init)
Bug description
On system where the default mutex type is not PTHREAD_MUTEX_NORMAL but PTHREAD_MUTEX_ERRORCHECK or PTHREAD_MUTEX_STRICT_NP (like FreeBSD or OpenBSD), unlocking an unitialized mutex will end up in a segfault or abort.
In the past, glib didn't care about it but recent versions now catch this error.
In effect that means gajim crashes right when starting... It is due to missing threads_enter / threads_exit calls.
See http://www.pygtk.org/docs/pygtk/gdk-functions.html#function-gdk--threads-enter for details.
Attached patch fixes the issue for me.
Steps to reproduce
Start gajim on OpenBSD with glib >= 2.32.0.
Software versions
OS version: OpenBSD 5.1-current
GTK version: 2.24.10
PyGTK version: 2.24.0