gnome-control-center r8649 - trunk/capplets/common



Author: jensg
Date: Sun Apr 13 18:06:34 2008
New Revision: 8649
URL: http://svn.gnome.org/viewvc/gnome-control-center?rev=8649&view=rev

Log:
2008-04-13  Jens Granseuer  <jensgr gmx net>

	Disable theme thumbnailing on MacOS. Some CoreFoundation functionality
	can apparently no longer be used from forked processes (see bug
	#525058). Unfortunately, it is used by freetype/pango/cairo/gtk, and
	as such by our forked thumbnailer. This change means no thumbnails on
	MacOS, but I suppose that's better than crashing. Reworking the
	thumbnailer to work without forking is going to be a major effort.

	* theme-thumbnail.c: (theme_thumbnail_factory_init): only enable the
	asynchronous thumbnailer if not on MacOS


Modified:
   trunk/capplets/common/ChangeLog
   trunk/capplets/common/theme-thumbnail.c

Modified: trunk/capplets/common/theme-thumbnail.c
==============================================================================
--- trunk/capplets/common/theme-thumbnail.c	(original)
+++ trunk/capplets/common/theme-thumbnail.c	Sun Apr 13 18:06:34 2008
@@ -20,8 +20,6 @@
 #include "gtkrc-utils.h"
 #include "capplet-util.h"
 
-static gint child_pid;
-
 typedef struct
 {
   gboolean set;
@@ -1184,9 +1182,19 @@
 void
 theme_thumbnail_factory_init (int argc, char *argv[])
 {
+#ifndef __APPLE__
+  gint child_pid;
+#endif
+
   pipe (pipe_to_factory_fd);
   pipe (pipe_from_factory_fd);
 
+/* Apple's CoreFoundation classes must not be used from forked
+ * processes. Since freetype (and thus GTK) uses them, we simply
+ * disable the thumbnailer on MacOS for now. That means no thumbs
+ * until the thumbnailing process is rewritten, but at least we won't
+ * make apps crash. */
+#ifndef __APPLE__
   child_pid = fork ();
   if (child_pid == 0)
   {
@@ -1225,8 +1233,9 @@
   /* Parent */
   close (pipe_to_factory_fd[0]);
   close (pipe_from_factory_fd[1]);
+#endif /* __APPLE__ */
+
   async_data.set = FALSE;
   async_data.theme_name = NULL;
   async_data.data = g_byte_array_new ();
 }
-



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]