[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: gschem.c
User: pcjc2
Date: 07/06/09 10:54:34
Modified: . gschem.c
Log:
Added call to g_thread_init() in Gschem and Gattrib.
Gschem and Gattrib aren't threaded, but some of GTK's file chooser
backends uses threading so we need to call g_thread_init().
Revision Changes Path
1.43 eda/geda/gaf/gschem/src/gschem.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: gschem.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/gschem.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- gschem.c 5 May 2007 12:40:44 -0000 1.42
+++ gschem.c 9 Jun 2007 14:54:33 -0000 1.43
@@ -26,6 +26,8 @@
#include <unistd.h>
#endif
+#include <glib.h>
+
#include <libgeda/libgeda.h>
#include "../include/globals.h"
@@ -94,6 +96,14 @@
char *geda_data = NULL;
char *filename;
+#ifdef HAVE_GTHREAD
+ /* Gschem isn't threaded, but some of GTK's file chooser
+ * backends uses threading so we need to call g_thread_init().
+ * GLib requires threading be initialised before any other GLib
+ * functions are called. Do it now if its not already setup. */
+ if (!g_thread_supported ()) g_thread_init (NULL);
+#endif
+
#if ENABLE_NLS
/* this should be equivalent to setlocale (LC_ALL, "") */
gtk_set_locale();
@@ -110,7 +120,6 @@
#endif
-
gtk_init(&argc, &argv);
visual = gdk_visual_get_system();
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs