From: Sebastian B. <sb...@us...> - 2013-12-24 08:54:38
|
Update of /cvsroot/simplemail/simplemail/gtk In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv28295/gtk Modified Files: subthreads.c Log Message: Initialize some other fields of the main thread. Index: subthreads.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/gtk/subthreads.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- subthreads.c 24 Dec 2013 08:53:47 -0000 1.23 +++ subthreads.c 24 Dec 2013 08:54:35 -0000 1.24 @@ -76,6 +76,7 @@ int init_threads(void) { + /* TODO: Proper bailout on failure */ if (!g_thread_supported ()) g_thread_init (NULL); if (!(thread_cond = g_cond_new())) return 0; if (!(thread_mutex = g_mutex_new())) return 0; @@ -85,6 +86,11 @@ socketpair(PF_LOCAL,SOCK_DGRAM,0,sockets); main_thread.thread = g_thread_self(); + if (!(main_thread.context = g_main_context_new())) + return 0; + if (!(main_thread.main_loop = g_main_loop_new(main_thread.context, FALSE))) + return 0; + return 1; } |