[Xfce4-commits] r24258 - in xfce4-panel/trunk: . libxfce4panel panel
Nick Schermer
nick at xfce.org
Wed Jan 3 19:19:18 CET 2007
Author: nick
Date: 2007-01-03 18:19:17 +0000 (Wed, 03 Jan 2007)
New Revision: 24258
Modified:
xfce4-panel/trunk/configure.ac.in
xfce4-panel/trunk/libxfce4panel/libxfce4panel-1.0.pc.in
xfce4-panel/trunk/libxfce4panel/xfce-panel-plugin.h
xfce4-panel/trunk/panel/Makefile.am
xfce4-panel/trunk/panel/main.c
Log:
We need to init ghtread for the slice allocator. I've also added this for external plugins (because some of them use the slice macros). This seems to work for external plugins without any problems, so cross you fingers.
Modified: xfce4-panel/trunk/configure.ac.in
===================================================================
--- xfce4-panel/trunk/configure.ac.in 2007-01-03 17:58:14 UTC (rev 24257)
+++ xfce4-panel/trunk/configure.ac.in 2007-01-03 18:19:17 UTC (rev 24258)
@@ -73,6 +73,7 @@
dnl Check for required packages
XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.3.99.2])
+XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.6.0])
XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.6.0])
XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.3.99.2])
XDT_CHECK_PACKAGE(LIBXFCE4MCS_MANAGER, libxfce4mcs-manager-1.0, 4.3.99.2)
Modified: xfce4-panel/trunk/libxfce4panel/libxfce4panel-1.0.pc.in
===================================================================
--- xfce4-panel/trunk/libxfce4panel/libxfce4panel-1.0.pc.in 2007-01-03 17:58:14 UTC (rev 24257)
+++ xfce4-panel/trunk/libxfce4panel/libxfce4panel-1.0.pc.in 2007-01-03 18:19:17 UTC (rev 24258)
@@ -12,7 +12,7 @@
Name: libxfce4panel
Description: Library for the Xfce Panel
-Requires: libxfcegui4-1.0 libxfce4util-1.0
+Requires: gthread-2.0 gtk+-2.0 libxfcegui4-1.0 libxfce4util-1.0
Version: @VERSION@
Libs: -L${libdir} -lxfce4panel
Cflags: -I${includedir}/xfce4/
Modified: xfce4-panel/trunk/libxfce4panel/xfce-panel-plugin.h
===================================================================
--- xfce4-panel/trunk/libxfce4panel/xfce-panel-plugin.h 2007-01-03 17:58:14 UTC (rev 24257)
+++ xfce4-panel/trunk/libxfce4panel/xfce-panel-plugin.h 2007-01-03 18:19:17 UTC (rev 24258)
@@ -23,6 +23,7 @@
#define _XFCE_PANEL_PLUGIN_H
#include <stdlib.h>
+#include <glib.h>
#include <libxfce4panel/xfce-panel-enums.h>
#include <libxfce4panel/xfce-panel-macros.h>
#include <libxfce4panel/xfce-panel-plugin-iface.h>
@@ -43,6 +44,8 @@
main (int argc, char **argv) \
{ \
GtkWidget *plugin; \
+ if (!g_thread_supported ()) \
+ g_thread_init (NULL); \
gtk_init (&argc, &argv); \
plugin = xfce_external_panel_plugin_new (argc, argv, \
(XfcePanelPluginFunc)construct); \
@@ -74,6 +77,8 @@
{ \
GtkWidget *plugin; \
XfcePanelPluginCheck test = (XfcePanelPluginCheck)check; \
+ if (!g_thread_supported ()) \
+ g_thread_init (NULL); \
gtk_init (&argc, &argv); \
if (!test(gdk_screen_get_default())) return 2; \
plugin = xfce_external_panel_plugin_new (argc, argv, \
Modified: xfce4-panel/trunk/panel/Makefile.am
===================================================================
--- xfce4-panel/trunk/panel/Makefile.am 2007-01-03 17:58:14 UTC (rev 24257)
+++ xfce4-panel/trunk/panel/Makefile.am 2007-01-03 18:19:17 UTC (rev 24258)
@@ -32,6 +32,7 @@
xfce4_panel_CFLAGS = \
-I$(top_srcdir) \
@LIBSTARTUP_NOTIFICATION_CFLAGS@ \
+ @GTHREAD_CFLAGS@ \
@LIBX11_CFLAGS@ \
@LIBXFCE4UTIL_CFLAGS@ \
@LIBXFCEGUI4_CFLAGS@ \
@@ -50,6 +51,7 @@
xfce4_panel_LDADD = \
../libxfce4panel/libxfce4panel.la \
+ @GTHREAD_LIBS@ \
@LIBSTARTUP_NOTIFICATION_LIBS@ \
@LIBX11_LIBS@ \
@LIBXFCE4UTIL_LIBS@ \
Modified: xfce4-panel/trunk/panel/main.c
===================================================================
--- xfce4-panel/trunk/panel/main.c 2007-01-03 17:58:14 UTC (rev 24257)
+++ xfce4-panel/trunk/panel/main.c 2007-01-03 18:19:17 UTC (rev 24258)
@@ -27,6 +27,7 @@
#include <unistd.h>
#include <string.h>
#include <locale.h>
+#include <glib.h>
#include <gtk/gtk.h>
#include <libxfce4util/libxfce4util.h>
@@ -144,6 +145,10 @@
xfce_textdomain (GETTEXT_PACKAGE, LOCALEDIR, "UTF-8");
+ /* initialize the GThread system (needed for slice allocator) */
+ if (!g_thread_supported ())
+ g_thread_init (NULL);
+
if (handle_options (argc, argv, &success))
exit (success);
More information about the Xfce4-commits
mailing list