? depcomp
? gtk-doc.make
? libbonoboui-zip
Index: bonobo/bonobo-ui-init-gtk.c
===================================================================
RCS file: /cvs/gnome/libbonoboui/bonobo/bonobo-ui-init-gtk.c,v
retrieving revision 1.6
diff -u -r1.6 bonobo-ui-init-gtk.c
--- bonobo/bonobo-ui-init-gtk.c	22 Jan 2004 00:10:50 -0000	1.6
+++ bonobo/bonobo-ui-init-gtk.c	19 Jun 2005 19:15:50 -0000
@@ -12,49 +12,63 @@
 bonobo_ui_gtk_pre_args_parse (GnomeProgram    *program,
 			      GnomeModuleInfo *mod_info)
 {
-	bonobo_ui_gtk_init_info_t *init_info = g_new0 (bonobo_ui_gtk_init_info_t, 1);
-
-	init_info->gtk_args = g_ptr_array_new ();
-
-	g_object_set_data (G_OBJECT (program),
+	GValue goption_enable = { 0 };
+	g_value_init (&goption_enable, G_TYPE_BOOLEAN);
+	g_object_get_property (G_OBJECT (program),
+		GNOME_PARAM_GOPTION_ENABLE,&goption_enable);
+	
+	if (!g_value_get_boolean(&goption_enable)) {
+		bonobo_ui_gtk_init_info_t *init_info = g_new0 (bonobo_ui_gtk_init_info_t, 1);
+		init_info->gtk_args = g_ptr_array_new ();
+		g_object_set_data (G_OBJECT (program),
 			   "Libbonoboui-Gtk-Module-init-info",
 			   init_info);
+	}
+	g_value_unset (&goption_enable);
+
 }
 
 static void
 bonobo_ui_gtk_post_args_parse (GnomeProgram    *program,
 			       GnomeModuleInfo *mod_info)
 {
-	bonobo_ui_gtk_init_info_t *init_info;
-	int final_argc;
-	char **final_argv;
-	int i;
+	GValue goption_enable = { 0 };
+	g_value_init (&goption_enable, G_TYPE_BOOLEAN);
+	g_object_get_property (G_OBJECT (program),
+		GNOME_PARAM_GOPTION_ENABLE,&goption_enable);
+	
+	if (!g_value_get_boolean(&goption_enable)) {
+		bonobo_ui_gtk_init_info_t *init_info;
+		int final_argc;
+		char **final_argv;
+		int i;
 
-	init_info = g_object_get_data (G_OBJECT (program),
+		init_info = g_object_get_data (G_OBJECT (program),
 				       "Libbonoboui-Gtk-Module-init-info");
 
-	g_ptr_array_add (init_info->gtk_args, NULL);
+		g_ptr_array_add (init_info->gtk_args, NULL);
 
-	final_argc = init_info->gtk_args->len - 1;
-	final_argv = g_memdup (init_info->gtk_args->pdata,
+		final_argc = init_info->gtk_args->len - 1;
+		final_argv = g_memdup (init_info->gtk_args->pdata,
 			       sizeof (char *) * init_info->gtk_args->len);
 
-	gtk_init (&final_argc, &final_argv);
+		gtk_init (&final_argc, &final_argv);
 
-	g_free (final_argv);
+		g_free (final_argv);
 
-	for (i = 0; g_ptr_array_index (init_info->gtk_args, i) != NULL; i++) {
-		g_free (g_ptr_array_index (init_info->gtk_args, i));
-		g_ptr_array_index (init_info->gtk_args, i) = NULL;
-	}
-
-	g_ptr_array_free (init_info->gtk_args, TRUE);
-	init_info->gtk_args = NULL;
-	g_free (init_info);
+		for (i = 0; g_ptr_array_index (init_info->gtk_args, i) != NULL; i++) {
+			g_free (g_ptr_array_index (init_info->gtk_args, i));
+			g_ptr_array_index (init_info->gtk_args, i) = NULL;
+		}
 
-	g_object_set_data (G_OBJECT (program),
-			   "Libbonoboui-Gtk-Module-init-info",
-			   NULL);
+		g_ptr_array_free (init_info->gtk_args, TRUE);
+		init_info->gtk_args = NULL;
+		g_free (init_info);
+
+		g_object_set_data (G_OBJECT (program),
+				   "Libbonoboui-Gtk-Module-init-info",
+				   NULL);
+	}
 }
 
 static void
@@ -165,6 +179,9 @@
 		NULL,
 		NULL, NULL, NULL
 	};
+	
+	module_info.expansion1 = (gpointer) gtk_get_option_group(TRUE);
+
 	if (module_info.version == NULL) {
 		module_info.version = g_strdup_printf ("%d.%d.%d",
 						       GTK_MAJOR_VERSION,
