PATCH: gnome-build crash



Hi,

To get the project-manager going I had to apply the attached patchlet:
gconf must be inited if gtkhtml is built with gconf support or it bails
out.

Ok to commit?

Regards
Richard

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-build/ChangeLog,v
retrieving revision 1.60
diff -u -b -B -p -r1.60 ChangeLog
--- ChangeLog	2001/07/22 23:49:07	1.60
+++ ChangeLog	2001/08/06 18:49:50
@@ -1,3 +1,10 @@
+2001-08-06  Richard Hult  <rhult codefactory se>
+
+	* src/controls/control-factories.c (main): Explode the factory
+	macro to a proper function so we can initialize gconf. This is
+	needed for use with gtkhtml built with gconf support.
+	Also include gconf/gconf.h
+
 2001-07-22  Dave Camp  <dave ximian com>
 
 	* src/backends/libgbf_am/gbf-am-build: Turn on command buffering, use 
Index: src/controls/control-factories.c
===================================================================
RCS file: /cvs/gnome/gnome-build/src/controls/control-factories.c,v
retrieving revision 1.12
diff -u -b -B -p -r1.12 control-factories.c
--- src/controls/control-factories.c	2001/07/16 04:20:35	1.12
+++ src/controls/control-factories.c	2001/08/06 18:49:51
@@ -23,6 +23,7 @@
 #include <config.h>
 #include <bonobo.h>
 #include <liboaf/liboaf.h>
+#include <gconf/gconf.h>
 
 #include <gdl/gdl.h>
 #include "gbf-project-tree.h"
@@ -283,8 +284,29 @@ control_factory (BonoboGenericFactory *f
     return NULL;
 }
 
-BONOBO_OAF_FACTORY_MULTI ("OAFIID:GNOME_Development_BuildControlFactory",
-                          "Factory for the gnome-build controls.",
-                          VERSION, 
-                          control_factory, NULL);
+int
+main (int argc, char *argv [])
+{
+    BonoboGenericFactory *factory;
+    CORBA_ORB orb;
+
+	gnome_init_with_popt_table ("Factory for the gnome-build controls.", VERSION,
+                                argc, argv,
+                                oaf_popt_options, 0, NULL);
+    orb = oaf_init (argc, argv);
+
+#ifdef GTKHTML_HAVE_GCONF
+    gconf_init (argc, argv, NULL);
+#endif
+    
+    if (!bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL))
+		g_error (_("Could not initialize Bonobo"));
+
+	factory = bonobo_generic_factory_new_multi ("OAFIID:GNOME_Development_BuildControlFactory", control_factory, NULL);
+    
+    bonobo_running_context_auto_exit_unref (BONOBO_OBJECT (factory));
+
+    bonobo_main ();
+	return 0;
+}
 


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