SF.net SVN: geany:[5637] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Sun Mar 27 15:04:58 UTC 2011
Revision: 5637
http://geany.svn.sourceforge.net/geany/?rev=5637&view=rev
Author: eht16
Date: 2011-03-27 15:04:58 +0000 (Sun, 27 Mar 2011)
Log Message:
-----------
Initialize GLib's Gthread system early at startup in case any plugins need it.
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
trunk/src/Makefile.am
trunk/src/main.c
trunk/src/makefile.win32
trunk/wscript
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-03-27 15:02:07 UTC (rev 5636)
+++ trunk/ChangeLog 2011-03-27 15:04:58 UTC (rev 5637)
@@ -1,3 +1,11 @@
+2011-03-27 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+
+ * src/makefile.win32, src/main.c, src/Makefile.am, configure.ac,
+ wscript:
+ Initialize GLib's Gthread system early at startup in case any
+ plugins need it.
+
+
2011-03-27 Colomban Wendling <colomban(at)geany(dot)org>
* plugins/splitwindow.c:
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2011-03-27 15:02:07 UTC (rev 5636)
+++ trunk/configure.ac 2011-03-27 15:04:58 UTC (rev 5637)
@@ -146,6 +146,11 @@
if test $have_gio = 1 ; then
AC_DEFINE(HAVE_GIO, 1, [Whether GIO is available])
fi
+# GTHREAD checks
+gthread_modules="gthread-2.0"
+PKG_CHECK_MODULES(GTHREAD, [$gthread_modules])
+AC_SUBST(GTHREAD_CFLAGS)
+AC_SUBST(GTHREAD_LIBS)
# --disable-deprecated switch for GTK2 purification
AC_ARG_ENABLE(deprecated, [ --disable-deprecated Disable deprecated GTK functions. ],
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2011-03-27 15:02:07 UTC (rev 5636)
+++ trunk/src/Makefile.am 2011-03-27 15:04:58 UTC (rev 5637)
@@ -74,7 +74,7 @@
INCLUDES = -I$(top_srcdir) -I$(srcdir)/../scintilla/include -I$(srcdir)/../tagmanager/include \
- -I$(topsrcdir)/tagmanager/mio @GTK_CFLAGS@ @GIO_CFLAGS@
+ -I$(topsrcdir)/tagmanager/mio @GTK_CFLAGS@ @GIO_CFLAGS@ @GTHREAD_CFLAGS@
# tell automake we have a C++ file so it uses the C++ linker we need for Scintilla
nodist_EXTRA_geany_SOURCES = dummy.cxx
@@ -86,7 +86,8 @@
geany_SOURCES = $(SRCS) win32.c win32.h
geany_LDADD = ../scintilla/libscintilla.a ../tagmanager/libtagmanager.a ../tagmanager/mio/libmio.a \
- @GTK_LIBS@ @GIO_LIBS@ $(INTLLIBS) -lole32 -luuid -liberty -lwsock32 geany_private.res
+ @GTK_LIBS@ @GIO_LIBS@ @GTHREAD_LIBS@ $(INTLLIBS) -lole32 -luuid -liberty -lwsock32 \
+ geany_private.res
AM_CFLAGS = -DGEANY_DATADIR=\"data\" \
-DGEANY_DOCDIR=\"\" \
@@ -113,7 +114,7 @@
geany_SOURCES = $(SRCS) vte.c vte.h
geany_LDADD = ../scintilla/libscintilla.a ../tagmanager/libtagmanager.a ../tagmanager/mio/libmio.a \
- @GTK_LIBS@ @GIO_LIBS@ $(INTLLIBS)
+ @GTK_LIBS@ @GIO_LIBS@ @GTHREAD_LIBS@ $(INTLLIBS)
AM_CFLAGS = -DGEANY_DATADIR=\""$(datadir)"\" \
-DGEANY_DOCDIR=\""$(docdir)"\" \
Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c 2011-03-27 15:02:07 UTC (rev 5636)
+++ trunk/src/main.c 2011-03-27 15:04:58 UTC (rev 5637)
@@ -480,7 +480,7 @@
foreach_slist(node, filetypes_by_title)
{
GeanyFiletype *ft = node->data;
-
+
printf("%s\n", ft->name);
}
filetypes_free_types();
@@ -959,6 +959,11 @@
#endif
parse_command_line_options(&argc, &argv);
+ /* Initialize GLib's thread system in case any plugins want to use it or their
+ * dependencies (e.g. WebKit, Soup, ...) */
+ if (!g_thread_supported())
+ g_thread_init(NULL);
+
signal(SIGTERM, signal_cb);
#ifdef G_OS_UNIX
/* SIGQUIT is used to kill spawned children and we get also this signal, so ignore */
Modified: trunk/src/makefile.win32
===================================================================
--- trunk/src/makefile.win32 2011-03-27 15:02:07 UTC (rev 5636)
+++ trunk/src/makefile.win32 2011-03-27 15:04:58 UTC (rev 5637)
@@ -39,7 +39,7 @@
ALL_GTK_LIBS= \
-L"$(PREFIX)/lib" \
-lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 \
- -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lintl
+ -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lgthread-2.0 -lintl
# these things are for GTK >= 2.8
# (should be same as with MSYS: pkg-config --libs gtk+-2.0 gthread-2.0)
#"$(PREFIX)/lib/libcairo.dll.a" \
Modified: trunk/wscript
===================================================================
--- trunk/wscript 2011-03-27 15:02:07 UTC (rev 5636)
+++ trunk/wscript 2011-03-27 15:04:58 UTC (rev 5637)
@@ -150,6 +150,7 @@
have_gtk_210 = True
else:
gtk_version = 'Unknown'
+ conf.check_cfg(package='gthread-2.0', uselib_store='GTHREAD', args='--cflags --libs')
conf.check_cfg(package='gio-2.0', uselib_store='GIO', args='--cflags --libs', mandatory=False)
# Windows specials
@@ -332,7 +333,7 @@
source = geany_sources,
includes = ['.', 'scintilla/include/', 'tagmanager/include/'],
defines = ['G_LOG_DOMAIN="Geany"', 'GEANY_PRIVATE'],
- uselib = ['GTK', 'GIO', 'WIN32', 'SUNOS_SOCKET'],
+ uselib = ['GTK', 'GIO', 'GTHREAD', 'WIN32', 'SUNOS_SOCKET'],
use = ['scintilla', 'tagmanager', 'mio'])
# geanyfunctions.h
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list